diff --git a/.github/workflows/difftest.yml b/.github/workflows/difftest.yml index b6e0d6c..d5ef24c 100644 --- a/.github/workflows/difftest.yml +++ b/.github/workflows/difftest.yml @@ -2,9 +2,9 @@ name: difftest # The milestone-6 cron lane: differential fuzzing of darkwing against the # pinned DuckDB CLI, plus a native fuzz run of the public Parse API. The -# nightly artifact only matches the pin until upstream moves it, so the -# lane verifies the version first and skips (green) once it drifts — -# advancing the pin is its own workflow (cmd/regenerate), not this one. +# pin is a tagged release, so the CLI comes from its immutable release +# asset (duckdbsrc.ReleaseURL); the version check stays as a guard against +# a pin advanced without updating that URL. on: schedule: @@ -23,13 +23,13 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod - - name: Download the nightly DuckDB CLI + - name: Download the pinned DuckDB CLI run: | - curl -sSL -o duckdb.zip https://artifacts.duckdb.org/latest/duckdb-binaries-linux-amd64.zip - unzip -o -q duckdb.zip duckdb_cli-linux-amd64.zip + url=$(sed -n 's/.*ReleaseURL = "\(.*\)"/\1/p' internal/duckdbsrc/duckdbsrc.go) + curl -fsSL -o duckdb_cli-linux-amd64.zip "$url" unzip -o -q duckdb_cli-linux-amd64.zip ./duckdb --version - - name: Check the nightly against the pin + - name: Check the CLI against the pin id: pin run: | pin=$(sed -n 's/.*PinnedVersion = "\(.*\)"/\1/p' internal/duckdbsrc/duckdbsrc.go) @@ -38,7 +38,7 @@ jobs: echo "matches=true" >> "$GITHUB_OUTPUT" else echo "matches=false" >> "$GITHUB_OUTPUT" - echo "nightly is $version, pin is $pin - skipping until the pin advances" + echo "CLI is $version, pin is $pin - skipping until ReleaseURL matches the pin" fi - name: Differential fuzzing vs the pinned CLI if: steps.pin.outputs.matches == 'true' diff --git a/.gitignore b/.gitignore index d991716..5b9138f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -duckdb +/duckdb *.db *.db.wal *.zip diff --git a/CLAUDE.md b/CLAUDE.md index ffb3fc9..a1513ef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ in `internal/grammar/README.md`. ## Layout -- `token/` — token kinds, `Token{Kind, Text, Span}`, the five keyword +- `token/` — token kinds, `Token{Kind, Text, Span}`, the six keyword categories (built from the vendored `.list` files). - `lexer/` — port of `base_tokenizer.cpp` + `parser_tokenizer.cpp`. - `internal/grammar/` — vendored `.gram`/`.list` files (never edit them by @@ -46,10 +46,14 @@ in `internal/grammar/README.md`. - **Effective behavior over textbook behavior.** darkwing replicates what the pinned DuckDB build actually does, including acknowledged quirks: negative - lookahead (`!`) is parsed but ignored by the matcher; `/` binds only the - immediately preceding element (upstream grammars parenthesize sequences in - alternatives); `*`/`+`/`?` wrap only the last element of the current list. - Do not "fix" these — they are pinned by tests. + lookahead (`!`) is parsed but ignored by the matcher. Do not "fix" these — + they are pinned by tests. (Since v2.0.0 the grammar parser uses ordinary + PEG precedence — postfix, then sequence, then `/` — so the earlier + "`/` binds one element" quirk is gone.) +- **The oracle is the library parser.** The pinned CLI is run with + `SET active_grammar_extensions=[]` (its `shell` extension re-adds bare + expression statements) and `DUCKDB_AGENT_MODE=0`; see + `internal/duckdbsrc`. - **Vendored files are verbatim.** `internal/grammar/duckdb/**` is copied unmodified from upstream. Changing grammar behavior means advancing the pin, never editing the files. @@ -109,7 +113,7 @@ DARKWING_DUCKDB=/path/to/duckdb-cli go run ./cmd/serialize-diff -corpus ``` Regenerating the corpus (needs a DuckDB checkout at the pinned commit and -the matching nightly CLI; see `internal/grammar/README.md` for the pin): +the matching release CLI; see `internal/grammar/README.md` for the pin): ``` DARKWING_DUCKDB=/path/to/duckdb-cli \ diff --git a/ast/ddl.go b/ast/ddl.go index 06da80b..e3ca902 100644 --- a/ast/ddl.go +++ b/ast/ddl.go @@ -169,6 +169,8 @@ type CreateTableInfo struct { Query *SelectStatement `json:"query,omitempty"` // QueryAliases are the CTAS column aliases (`CREATE TABLE t (a, b) AS`). QueryAliases []string `json:"query_aliases,omitempty"` + // Options is the WITH (...) option list. + Options []RelOption `json:"options,omitempty"` } func (i *CreateTableInfo) Children() []Node { @@ -179,25 +181,44 @@ func (i *CreateTableInfo) Children() []Node { for _, c := range i.Constraints { nodes = add(nodes, c) } - return add(nodes, i.Query) + return relOptionExprs(add(nodes, i.Query), i.Options) +} + +// RelOption is one WITH (name = value) entry (upstream's RelOptionList, +// a case-insensitive option map). A bare name carries a NULL constant. +type RelOption struct { + Name string `json:"name"` + Value Expr `json:"value,omitempty"` +} + +func relOptionExprs(nodes []Node, opts []RelOption) []Node { + for _, o := range opts { + nodes = add(nodes, o.Value) + } + return nodes } // CreateViewInfo is CREATE VIEW. Port of CreateViewInfo. type CreateViewInfo struct { CreateInfoBase + // Secure is CREATE SECURE VIEW (upstream's ViewSecurityType). + Secure bool `json:"secure,omitempty"` Recursive bool `json:"recursive,omitempty"` Aliases []string `json:"aliases,omitempty"` + Options []RelOption `json:"options,omitempty"` Query *SelectStatement `json:"query"` } -func (i *CreateViewInfo) Children() []Node { return add(nil, i.Query) } +func (i *CreateViewInfo) Children() []Node { return add(relOptionExprs(nil, i.Options), i.Query) } // CreateSchemaInfo is CREATE SCHEMA. Port of CreateSchemaInfo. type CreateSchemaInfo struct { CreateInfoBase + // Options is the WITH (...) option list. + Options []RelOption `json:"options,omitempty"` } -func (i *CreateSchemaInfo) Children() []Node { return nil } +func (i *CreateSchemaInfo) Children() []Node { return relOptionExprs(nil, i.Options) } // IndexElement is one indexed expression with its ordering. type IndexElement struct { @@ -215,6 +236,7 @@ type CreateIndexInfo struct { // verbatim here). IndexType string `json:"index_type,omitempty"` Elements []IndexElement `json:"elements,omitempty"` + Options []RelOption `json:"options,omitempty"` Where Expr `json:"where,omitempty"` } @@ -223,7 +245,7 @@ func (i *CreateIndexInfo) Children() []Node { for j := range i.Elements { nodes = add(nodes, i.Elements[j].Expr) } - return add(nodes, i.Where) + return relOptionExprs(add(nodes, i.Where), i.Options) } // CreateSequenceInfo is CREATE SEQUENCE. Port of CreateSequenceInfo. @@ -251,7 +273,8 @@ func (i *CreateSequenceInfo) Children() []Node { // CreateTypeInfo is CREATE TYPE. Port of CreateTypeInfo. type CreateTypeInfo struct { CreateInfoBase - // Type is the aliased type (`CREATE TYPE t AS `). + // Type is the aliased type (`CREATE TYPE t AS `), or for + // `AS ENUM (...)[]` the list/array wrapping of the enum. Type *TypeExpression `json:"type,omitempty"` // EnumValues is `AS ENUM ('a', 'b')`. EnumValues []string `json:"enum_values,omitempty"` @@ -370,9 +393,10 @@ func (a *DropColumnInfo) Children() []Node { return nil } // AlterColumnTypeInfo is ALTER TABLE ALTER COLUMN ... [SET DATA] TYPE. type AlterColumnTypeInfo struct { alterInfoBase - Column []string `json:"column"` - Type *TypeExpression `json:"type,omitempty"` - Using Expr `json:"using,omitempty"` + Column []string `json:"column"` + Type *TypeExpression `json:"type,omitempty"` + Collation string `json:"collation,omitempty"` + Using Expr `json:"using,omitempty"` } func (a *AlterColumnTypeInfo) Children() []Node { @@ -449,8 +473,22 @@ func (a *SetDatabaseAliasInfo) Children() []Node { return nil } type GenericAlterInfo struct { alterInfoBase // Kind names the option (e.g. "SET_PARTITIONED_BY"). - Kind string `json:"kind"` - Expressions []Expr `json:"expressions,omitempty"` + Kind string `json:"kind"` + Expressions []Expr `json:"expressions,omitempty"` + Options []RelOption `json:"options,omitempty"` +} + +func (a *GenericAlterInfo) Children() []Node { + return relOptionExprs(exprs(a.Expressions), a.Options) +} + +// DropConstraintInfo is ALTER TABLE DROP CONSTRAINT (parsed upstream, +// then rejected as not implemented after parsing). +type DropConstraintInfo struct { + alterInfoBase + IfExists bool `json:"if_exists,omitempty"` + Name string `json:"name"` + Cascade bool `json:"cascade,omitempty"` } -func (a *GenericAlterInfo) Children() []Node { return exprs(a.Expressions) } +func (a *DropConstraintInfo) Children() []Node { return nil } diff --git a/ast/expr.go b/ast/expr.go index 4e41990..cbbe20c 100644 --- a/ast/expr.go +++ b/ast/expr.go @@ -62,10 +62,14 @@ type ColumnRefExpression struct { func (e *ColumnRefExpression) Children() []Node { return nil } -// ConstantExpression is a literal value. Port of ConstantExpression. +// ConstantExpression is a literal atom. Port of ConstantExpression: since +// DuckDB v2.0 it carries the Literal as written; Value is the literal's +// value (Literal::ToValue), derived at construction for the +// transformers' convenience. type ConstantExpression struct { exprBase - Value Value `json:"value"` + Literal Literal `json:"literal"` + Value Value `json:"value"` } func (e *ConstantExpression) Children() []Node { return nil } @@ -144,15 +148,19 @@ type FunctionArgument struct { // FunctionExpression. type FunctionExpression struct { exprBase - Catalog string `json:"catalog,omitempty"` - Schema string `json:"schema,omitempty"` - FunctionName string `json:"function_name"` - Arguments []FunctionArgument `json:"arguments"` - Distinct bool `json:"distinct,omitempty"` - IsOperator bool `json:"is_operator,omitempty"` - ExportState bool `json:"export_state,omitempty"` - Filter Expr `json:"filter,omitempty"` - OrderBys []OrderByNode `json:"order_bys,omitempty"` + Catalog string `json:"catalog,omitempty"` + Schema string `json:"schema,omitempty"` + // Qualification is the full qualification path when it is deeper + // than catalog.schema (a nested schema chain); Catalog and Schema + // then hold QualifiedName::Catalog()/Schema() of it. + Qualification []string `json:"qualification,omitempty"` + FunctionName string `json:"function_name"` + Arguments []FunctionArgument `json:"arguments"` + Distinct bool `json:"distinct,omitempty"` + IsOperator bool `json:"is_operator,omitempty"` + ExportState bool `json:"export_state,omitempty"` + Filter Expr `json:"filter,omitempty"` + OrderBys []OrderByNode `json:"order_bys,omitempty"` } func (e *FunctionExpression) Children() []Node { @@ -377,9 +385,12 @@ func (e *DefaultExpression) Children() []Node { return nil } // alias). Port of upstream's TYPE expression class. type TypeExpression struct { exprBase - Catalog string `json:"catalog,omitempty"` - Schema string `json:"schema,omitempty"` - TypeName string `json:"type_name"` + Catalog string `json:"catalog,omitempty"` + Schema string `json:"schema,omitempty"` + // Qualification is the full qualification path when it is deeper + // than catalog.schema (see FunctionExpression.Qualification). + Qualification []string `json:"qualification,omitempty"` + TypeName string `json:"type_name"` // Args holds type modifiers (constants) and element types (nested // TypeExpressions; a struct field's name is the child's Alias). Args []Expr `json:"children,omitempty"` @@ -419,20 +430,23 @@ const ( // aggregates). Port of WindowExpression. type WindowExpression struct { exprBase - Type ExpressionType `json:"type"` - Catalog string `json:"catalog,omitempty"` - Schema string `json:"schema,omitempty"` - FunctionName string `json:"function_name"` - Arguments []FunctionArgument `json:"arguments"` - Partitions []Expr `json:"partitions,omitempty"` - Orders []OrderByNode `json:"orders,omitempty"` - FrameStart WindowBoundary `json:"start"` - FrameEnd WindowBoundary `json:"end"` - StartExpr Expr `json:"start_expr,omitempty"` - EndExpr Expr `json:"end_expr,omitempty"` - OffsetExpr Expr `json:"offset_expr,omitempty"` - DefaultExpr Expr `json:"default_expr,omitempty"` - IgnoreNulls bool `json:"ignore_nulls,omitempty"` + Type ExpressionType `json:"type"` + Catalog string `json:"catalog,omitempty"` + Schema string `json:"schema,omitempty"` + // Qualification is the full qualification path when it is deeper + // than catalog.schema (see FunctionExpression.Qualification). + Qualification []string `json:"qualification,omitempty"` + FunctionName string `json:"function_name"` + Arguments []FunctionArgument `json:"arguments"` + Partitions []Expr `json:"partitions,omitempty"` + Orders []OrderByNode `json:"orders,omitempty"` + FrameStart WindowBoundary `json:"start"` + FrameEnd WindowBoundary `json:"end"` + StartExpr Expr `json:"start_expr,omitempty"` + EndExpr Expr `json:"end_expr,omitempty"` + OffsetExpr Expr `json:"offset_expr,omitempty"` + DefaultExpr Expr `json:"default_expr,omitempty"` + IgnoreNulls bool `json:"ignore_nulls,omitempty"` // HasIgnoreNulls records that IGNORE or RESPECT NULLS was written. HasIgnoreNulls bool `json:"has_ignore_nulls,omitempty"` Distinct bool `json:"distinct,omitempty"` diff --git a/ast/misc.go b/ast/misc.go index 4424cfd..047eff1 100644 --- a/ast/misc.go +++ b/ast/misc.go @@ -241,6 +241,8 @@ type ExplainType string const ( ExplainStandard ExplainType = "EXPLAIN_STANDARD" ExplainAnalyze ExplainType = "EXPLAIN_ANALYZE" + // ExplainSQL is EXPLAIN (SQL): render the plan back as SQL. + ExplainSQL ExplainType = "EXPLAIN_SQL" ) // ExplainStatement is EXPLAIN [ANALYZE] [(options)] . Port of @@ -261,14 +263,33 @@ func (s *ExplainStatement) Children() []Node { return add(nil, s.Statement) } type AttachStatement struct { stmtBase // Path is the database path expression (usually a string constant). - Path Expr `json:"path"` - Alias string `json:"alias,omitempty"` - OnConflict OnCreateConflict `json:"on_conflict"` - Options []GenericOption `json:"options,omitempty"` - NamedParams []NamedParam `json:"named_param_map,omitempty"` + Path Expr `json:"path"` + Alias string `json:"alias,omitempty"` + OnConflict OnCreateConflict `json:"on_conflict"` + Options []GenericOption `json:"options,omitempty"` + // ExternalResource is ATTACH TO [NEW TEMPORARY] EXTERNAL RESOURCE + // (Path is nil then). + ExternalResource *ExternalResourceSource `json:"external_resource,omitempty"` + NamedParams []NamedParam `json:"named_param_map,omitempty"` +} + +func (s *AttachStatement) Children() []Node { + nodes := optionExprs(add(nil, s.Path), s.Options) + if s.ExternalResource != nil { + nodes = optionExprs(nodes, s.ExternalResource.Params) + } + return nodes } -func (s *AttachStatement) Children() []Node { return optionExprs(add(nil, s.Path), s.Options) } +// ExternalResourceSource is the resource an ATTACH TO / CONNECT TO +// statement targets. Port of ExternalResourceOptions: NEW TEMPORARY +// EXTERNAL RESOURCE 'provider' (params) provisions one; EXTERNAL +// RESOURCE name borrows a registered one. +type ExternalResourceSource struct { + Provider string `json:"provider,omitempty"` + Params []GenericOption `json:"params,omitempty"` + ReferenceName string `json:"reference_name,omitempty"` +} // DetachStatement is DETACH [DATABASE] [IF EXISTS] name. Port of // DetachStatement/DetachInfo. @@ -290,10 +311,18 @@ type ConnectStatement struct { // NameIsString marks a string-literal target. NameIsString bool `json:"name_is_string,omitempty"` Options []GenericOption `json:"options,omitempty"` - NamedParams []NamedParam `json:"named_param_map,omitempty"` + // ExternalResource is CONNECT TO [NEW TEMPORARY] EXTERNAL RESOURCE. + ExternalResource *ExternalResourceSource `json:"external_resource,omitempty"` + NamedParams []NamedParam `json:"named_param_map,omitempty"` } -func (s *ConnectStatement) Children() []Node { return optionExprs(nil, s.Options) } +func (s *ConnectStatement) Children() []Node { + nodes := optionExprs(nil, s.Options) + if s.ExternalResource != nil { + nodes = optionExprs(nodes, s.ExternalResource.Params) + } + return nodes +} // DisconnectStatement is DISCONNECT. Port of DisconnectStatement. type DisconnectStatement struct { @@ -310,22 +339,36 @@ const ( LoadTypeLoadAs LoadKind = "LOAD_AS" LoadTypeInstall LoadKind = "INSTALL" LoadTypeForceInstall LoadKind = "FORCE_INSTALL" + // LoadTypeCreateRepository / LoadTypeDropRepository are CREATE / + // DROP EXTENSION REPOSITORY (LoadType::CREATE_REPOSITORY etc.). + LoadTypeCreateRepository LoadKind = "CREATE_REPOSITORY" + LoadTypeDropRepository LoadKind = "DROP_REPOSITORY" ) -// LoadStatement is LOAD / INSTALL / FORCE INSTALL. Port of -// LoadStatement/LoadInfo (upstream models INSTALL as a load kind). +// LoadStatement is LOAD / INSTALL / FORCE INSTALL / CREATE and DROP +// EXTENSION REPOSITORY. Port of LoadStatement/LoadInfo (upstream models +// INSTALL and the repository statements as load kinds). type LoadStatement struct { stmtBase Kind LoadKind `json:"kind"` // Name is the extension name or filename. - Name string `json:"name"` + Name string `json:"name,omitempty"` // Alias is LOAD ... AS alias. Alias string `json:"alias,omitempty"` - // Repository is INSTALL ... FROM ; RepoIsAlias marks the + // Repository is [INSTALL|LOAD] ... FROM (or the repository + // name of the repository statements); RepoIsAlias marks the // identifier (alias) form as opposed to a literal URL. Repository string `json:"repository,omitempty"` RepoIsAlias bool `json:"repo_is_alias,omitempty"` Version string `json:"version,omitempty"` + // LoadAfterInstall is INSTALL AND LOAD. + LoadAfterInstall bool `json:"load_after_install,omitempty"` + // RepositoryURL, PublicKeys and OnConflict belong to CREATE EXTENSION + // REPOSITORY; MissingOK to DROP EXTENSION REPOSITORY IF EXISTS. + RepositoryURL string `json:"repository_url,omitempty"` + PublicKeys []string `json:"public_keys,omitempty"` + OnConflict OnCreateConflict `json:"on_conflict,omitempty"` + MissingOK bool `json:"missing_ok,omitempty"` } func (s *LoadStatement) Children() []Node { return nil } diff --git a/ast/stmt.go b/ast/stmt.go index ba73107..92cac05 100644 --- a/ast/stmt.go +++ b/ast/stmt.go @@ -78,6 +78,9 @@ type InsertStatement struct { // Columns is the explicit insert column list. Columns []string `json:"columns,omitempty"` ColumnOrder InsertColumnOrder `json:"column_order,omitempty"` + // Overriding is the OVERRIDING {USER|SYSTEM} VALUE scope (parsed and + // otherwise ignored upstream). + Overriding string `json:"overriding,omitempty"` // Query is the inserted data; nil for DEFAULT VALUES. Query *SelectStatement `json:"select_statement,omitempty"` DefaultValues bool `json:"default_values,omitempty"` @@ -170,7 +173,10 @@ func (s *DeleteStatement) Children() []Node { // statement but represented like upstream as a delete without a WHERE. type TruncateStatement struct { stmtBase - Table TableRef `json:"table"` + Table TableRef `json:"table"` + // Cascade records TRUNCATE ... CASCADE (rejected upstream as not + // implemented, after parsing). + Cascade bool `json:"cascade,omitempty"` NamedParams []NamedParam `json:"named_param_map,omitempty"` } diff --git a/ast/tableref.go b/ast/tableref.go index 5920259..f19e82c 100644 --- a/ast/tableref.go +++ b/ast/tableref.go @@ -31,8 +31,12 @@ func (a *AtClause) Children() []Node { return add(nil, a.Expr) } // BaseTableRef. type BaseTableRef struct { tableRefBase - CatalogName string `json:"catalog_name,omitempty"` - SchemaName string `json:"schema_name,omitempty"` + CatalogName string `json:"catalog_name,omitempty"` + SchemaName string `json:"schema_name,omitempty"` + // Qualification is the full qualification path when it is deeper + // than catalog.schema (a nested schema chain, DuckDB v2.0); + // CatalogName/SchemaName then hold QualifiedName::Catalog()/Schema(). + Qualification []string `json:"qualification,omitempty"` TableName string `json:"table_name"` ColumnNameAlias []string `json:"column_name_alias,omitempty"` At *AtClause `json:"at_clause,omitempty"` @@ -182,10 +186,15 @@ func (t *PivotRef) Children() []Node { type ShowType string const ( - ShowTypeDescribe ShowType = "DESCRIBE" - ShowTypeSummary ShowType = "SUMMARY" - ShowTypeShowFrom ShowType = "SHOW_FROM" - ShowTypeShowUnqualified ShowType = "SHOW_UNQUALIFIED" + ShowTypeDescribe ShowType = "DESCRIBE" + ShowTypeSummary ShowType = "SUMMARY" + // ShowTypeShow is `SHOW name`: a setting, falling back to describing + // a table of that name. + ShowTypeShow ShowType = "SHOW" + ShowTypeShowFrom ShowType = "SHOW_FROM" + // ShowTypeShowSpecial is SHOW TABLES / DATABASES / SCHEMAS / + // VARIABLES and SHOW ALL TABLES. + ShowTypeShowSpecial ShowType = "SHOW_SPECIAL" ) // ShowRef is the relation behind SHOW/DESCRIBE/SUMMARIZE. Port of @@ -195,6 +204,9 @@ type ShowRef struct { TableName string `json:"table_name,omitempty"` CatalogName string `json:"catalog_name,omitempty"` SchemaName string `json:"schema_name,omitempty"` + // Qualification is the full qualification path of a nested name + // (see BaseTableRef.Qualification). + Qualification []string `json:"qualification,omitempty"` // Query is set when describing a query (`DESCRIBE SELECT ...`). Query QueryNode `json:"query,omitempty"` ShowType ShowType `json:"show_type"` diff --git a/ast/value.go b/ast/value.go index 5b96ac2..c613467 100644 --- a/ast/value.go +++ b/ast/value.go @@ -55,3 +55,44 @@ type Value struct { Float64 float64 `json:"float64,omitempty"` Str string `json:"str,omitempty"` } + +// LiteralKind is the syntactic kind of a literal atom, spelled as +// DuckDB's LiteralKind enum serializes. +type LiteralKind string + +const ( + LiteralNull LiteralKind = "NULL_LITERAL" + LiteralBoolean LiteralKind = "BOOLEAN" + // LiteralInteger is digits with an optional leading '-' and '_' + // separators; no '.' and no exponent. + LiteralInteger LiteralKind = "INTEGER" + // LiteralNumeric is number text with a '.' and/or an exponent. + LiteralNumeric LiteralKind = "NUMERIC" + // LiteralString is decoded string text (quotes stripped, escapes + // decoded). + LiteralString LiteralKind = "STRING" + // LiteralHex is X'..': the hex digits without prefix and quotes. + LiteralHex LiteralKind = "HEX" + // LiteralBit is B'..': the bit digits without prefix and quotes. + LiteralBit LiteralKind = "BIT" +) + +// Literal is a literal atom as written in the query text — what a +// ConstantExpression serializes since DuckDB v2.0. Port of +// duckdb::Literal; it holds no type information (the binder turns it +// into a Value). +type Literal struct { + Kind LiteralKind `json:"kind"` + Text string `json:"text"` +} + +// IsNumeric reports whether the literal is an INTEGER or NUMERIC atom. +func (l Literal) IsNumeric() bool { return l.Kind == LiteralInteger || l.Kind == LiteralNumeric } + +// Negate toggles the leading '-' of a numeric literal (Literal::Negate). +func (l Literal) Negate() Literal { + if len(l.Text) > 0 && l.Text[0] == '-' { + return Literal{Kind: l.Kind, Text: l.Text[1:]} + } + return Literal{Kind: l.Kind, Text: "-" + l.Text} +} diff --git a/cmd/debug-parse/main.go b/cmd/debug-parse/main.go index 6ec4842..d0eb12a 100644 --- a/cmd/debug-parse/main.go +++ b/cmd/debug-parse/main.go @@ -49,7 +49,16 @@ func run(sql string, tokensOnly bool) error { } if tokensOnly { for _, t := range tokens { - fmt.Printf("%-16s %4d..%-4d %q\n", t.Kind, t.Span.Start, t.Span.End, t.Text) + // trivia flags: n = preceded by a newline, c = preceded by a + // block comment (string literal continuation) + trivia := []byte("..") + if t.PrecededByNewline { + trivia[0] = 'n' + } + if t.PrecededByBlockComment { + trivia[1] = 'c' + } + fmt.Printf("%-16s %4d..%-4d %s %q\n", t.Kind, t.Span.Start, t.Span.End, trivia, t.Text) } return nil } diff --git a/cmd/regenerate/main.go b/cmd/regenerate/main.go index d7f7dd8..80d4e20 100644 --- a/cmd/regenerate/main.go +++ b/cmd/regenerate/main.go @@ -190,7 +190,7 @@ hand; rerun the tool instead (see PLAN.md, § Conformance oracle and corpus). - Source: DuckDB test/sql/**/*.test and test/fuzzer/**/*.test - Pinned commit: %s -- Oracle: DuckDB CLI %s (nightly build of the pinned commit) +- Oracle: DuckDB CLI %s (release build of the pinned commit) - Files: %d, cases: %d (%d must-accept, %d must-reject) - Statements without an observed verdict (oracle timeout/crash): %d, dropped diff --git a/cmd/serialize-diff/main.go b/cmd/serialize-diff/main.go index 23b6600..09966d5 100644 --- a/cmd/serialize-diff/main.go +++ b/cmd/serialize-diff/main.go @@ -243,11 +243,15 @@ func isSelectOnly(sql string) (ok bool) { func oracleSerialize(bin string, sqls []string) ([]string, error) { var script bytes.Buffer script.WriteString(".mode line\n") + // the library grammar, not the CLI's shell extension (see + // duckdbsrc's oracle preamble) + script.WriteString("SET active_grammar_extensions=[];\n") for _, sql := range sqls { escaped := strings.ReplaceAll(sql, "'", "''") fmt.Fprintf(&script, "SELECT json_serialize_sql('%s') AS j;\n", escaped) } cmd := exec.Command(bin, "-batch", "-noheader", "-list", ":memory:") + cmd.Env = duckdbsrc.Env() cmd.Stdin = &script var stdout bytes.Buffer cmd.Stdout = &stdout diff --git a/internal/duckdbsrc/duckdbsrc.go b/internal/duckdbsrc/duckdbsrc.go index 634fd93..04cc974 100644 --- a/internal/duckdbsrc/duckdbsrc.go +++ b/internal/duckdbsrc/duckdbsrc.go @@ -1,6 +1,6 @@ // Package duckdbsrc locates and drives the pinned DuckDB CLI binary — the -// conformance oracle. The pin is a source commit plus the nightly CLI build -// of that commit; grammar, corpus expectations, and oracle must all come +// conformance oracle. The pin is a tagged source commit plus the release +// CLI built from it; grammar, corpus expectations, and oracle must all come // from the same commit (see internal/grammar/README.md). package duckdbsrc @@ -19,19 +19,28 @@ import ( // Pinned build identity. Advancing the pin means updating these alongside // the vendored grammar and regenerated corpus. const ( - // PinnedCommit is the DuckDB source commit of the pin. - PinnedCommit = "8cbdaba6acb50db7780d22a65dd131584d472262" - // PinnedVersion is the CLI version string of the matching nightly. - PinnedVersion = "v2.0.0-alpha38195" - // NightlyURL is where DuckDB serves the current nightly CLI bundle. - // "latest" moves: once it no longer matches PinnedCommit, the pin - // must be advanced (or a cached binary used). - NightlyURL = "https://artifacts.duckdb.org/latest/duckdb-binaries-linux-amd64.zip" + // PinnedCommit is the DuckDB source commit of the pin (the v2.0.0 tag). + PinnedCommit = "d54cbbe3df17e8e5ce68312f483b4155836112aa" + // PinnedVersion is the CLI version string of the pinned release. + PinnedVersion = "v2.0.0" + // ReleaseURL is where DuckDB serves the pinned release's CLI. Unlike + // the nightly bundle a tagged release never moves. + ReleaseURL = "https://github.com/duckdb/duckdb/releases/download/v2.0.0/duckdb_cli-linux-amd64.zip" ) // EnvBinary is the environment variable naming the pinned CLI binary. const EnvBinary = "DARKWING_DUCKDB" +// Env returns the environment for running the CLI: the current one with +// agent mode forced off. Since v2.0.0 the CLI switches to a JSON/markdown +// "agent mode" output format when its stdout is a pipe and it detects a +// coding agent in the environment (AI_AGENT, CLAUDECODE, ...), which would +// change the error lines the oracle classifies; DUCKDB_AGENT_MODE=0 +// overrides the detection (ShellState::DetectAgentMode in shell.cpp). +func Env() []string { + return append(os.Environ(), "DUCKDB_AGENT_MODE=0") +} + // Find locates the pinned DuckDB CLI: $DARKWING_DUCKDB, or "duckdb" on // PATH. The binary's version is verified against the pin. func Find() (string, error) { @@ -40,7 +49,7 @@ func Find() (string, error) { p, err := exec.LookPath("duckdb") if err != nil { return "", fmt.Errorf("pinned DuckDB CLI not found: set %s or put duckdb on PATH (want %s @ %.10s, from %s)", - EnvBinary, PinnedVersion, PinnedCommit, NightlyURL) + EnvBinary, PinnedVersion, PinnedCommit, ReleaseURL) } path = p } @@ -53,13 +62,15 @@ func Find() (string, error) { // Verify checks that the binary at path reports the pinned version and // commit. func Verify(path string) error { - out, err := exec.Command(path, "--version").Output() + cmd := exec.Command(path, "--version") + cmd.Env = Env() + out, err := cmd.Output() if err != nil { return fmt.Errorf("running %s --version: %w", path, err) } version := strings.TrimSpace(string(out)) if !strings.Contains(version, PinnedVersion) || !strings.Contains(version, PinnedCommit[:10]) { - return fmt.Errorf("binary %s reports %q, want %s @ %.10s: advance the pin or point %s at the matching nightly", + return fmt.Errorf("binary %s reports %q, want %s @ %.10s: advance the pin or point %s at the matching release CLI", path, version, PinnedVersion, PinnedCommit, EnvBinary) } return nil @@ -101,7 +112,13 @@ type Oracle struct { // preamble disables extension auto-loading and bounds resource use so the // oracle's verdicts depend only on parsing and cheap post-parse checks. -const preamble = "SET autoinstall_known_extensions=false;\n" + +// It also turns off the CLI's own grammar extension: since v2.0.0 the +// shell opens with active_grammar_extensions=['shell'], which re-adds bare +// expression statements ("1 + 1") that the library grammar - the one +// darkwing vendors and every embedded DuckDB parses with - rejects +// (tools/shell/shell_grammar_extension.cpp). +const preamble = "SET active_grammar_extensions=[];\n" + + "SET autoinstall_known_extensions=false;\n" + "SET autoload_known_extensions=false;\n" + "SET memory_limit='512MB';\n" + "SET threads=1;\n" @@ -116,6 +133,7 @@ func (o *Oracle) Run(sql string) (Verdict, error) { defer cancel() cmd := exec.CommandContext(ctx, o.Binary, "-batch", "-noheader", ":memory:") + cmd.Env = Env() cmd.Dir = o.Dir if cmd.Dir == "" { cmd.Dir = os.TempDir() diff --git a/internal/grammar/README.md b/internal/grammar/README.md index dc4f2f7..7d020e8 100644 --- a/internal/grammar/README.md +++ b/internal/grammar/README.md @@ -7,10 +7,9 @@ edit them by hand — changes happen only by advancing the pin (see PLAN.md, - Upstream: https://github.com/duckdb/duckdb - Source tree: `src/parser/peg/grammar/` -- Pinned commit: `8cbdaba6acb50db7780d22a65dd131584d472262` (main, 2026-08-18) -- Matching oracle binary: DuckDB CLI `v2.0.0-alpha38195 (Cyanoptera) 8cbdaba6ac` - (the nightly build served by https://artifacts.duckdb.org; see - `internal/duckdbsrc`) +- Pinned commit: `d54cbbe3df17e8e5ce68312f483b4155836112aa` (tag `v2.0.0`, 2026-10-20) +- Matching oracle binary: DuckDB CLI `v2.0.0 d54cbbe3df` (the v2.0.0 release + CLI; see `internal/duckdbsrc`) The pin follows the oracle binary: grammar, corpus expectations, and the CLI used to derive them must come from the same commit. @@ -20,49 +19,51 @@ DuckDB is MIT-licensed; see `LICENSE.DUCKDB` at the repository root. ## File checksums (SHA-256) ``` -a4a70d6558ff8684ab5adaed67a53328135ba163faa553a5eec544a10768cf8b statements/alter.gram +d6a4de42cffd26db45a76460102ab4be7efeced1c401613f9604ed76e5ad55e7 statements/alter.gram 4bd5c409bb84e7b0fa189de1cf73c145ace1498138d2bc0d7c5fdea470815fd0 statements/analyze.gram fb98930e1a251fec3a44a5443ab98ea02d9426fc96477aeb356654f2c55075fa statements/attach.gram cf752ee0bae6b4f2940d63d701b18a533549a6a5f623f3f68f9d3c2e08637e33 statements/call.gram 0758036168b998cd2020a3fa2b358a978cc40de4d6706e84c04793dbca0e78e2 statements/checkpoint.gram -bf7567659ec5cfb157acfe174ecad6e5fa6d8e13b8792cf41c4e0217c52193e4 statements/comment.gram -411b742320a6b8c956f2505d89a2f1468c6917dd0b6b9e5371a940776aa9be7a statements/common.gram +6408b038796b3fd125e8bf205b508997b17fabb1542f2e4d11af54c2e2270ad6 statements/comment.gram +098c3b3262e6e7ea5a2a337f2ba9608cbb76c02b915e1a3f23ad89f6560101b9 statements/common.gram 19b1c24e05dd0fd5795e2ae5c5495583a10f0f6c1f4afcbfe5e4abfb360c7aba statements/connect.gram -f70d1566ee95ea32152761ae708e89c6ce16364758ec0fb4a9fd635ad9a2b6a3 statements/copy.gram -2f77a721a498ccae914ed4426884ac704931a7a4dd724eb325940de909ea1e62 statements/create_index.gram +be323c6f6b9ed544dcf0564bba7f14b56fa8158dce9bc0c5c1ca246a703ee4d4 statements/copy.gram +bbf148a4bd1f2b3d338966d97281f9c5e8ca581164972f11f2b92dd7f59c13a6 statements/create_index.gram 831dbbe5fd612ddbd4aa448560acc290015080887917d8b2d2c1a38c9dffb3d7 statements/create_macro.gram -fbcec6a4c54ccafccf1f902e27b2417edf3450a0a04226beab1e4c6f6c742eb2 statements/create_schema.gram +6f52aa63c7ea606817f8ed32b925f952fb38084de235161ebfc0601d75557494 statements/create_schema.gram d145c7659cbda441cd380b7cbdda88adf84307c18148aeed46dbefbc41c72ec5 statements/create_secret.gram 9dfdc09fb59bdd891fe71f51ccfc48f7acaa39c49250be18e10ee77dccf36bac statements/create_sequence.gram -2b68d04246879ca3b8162d942484e59731d367882ee18d3461dcea918589e3ad statements/create_table.gram +b5bc5170347d26bff09e5b644ddd69b1f75d58611cf0de91161d1f9ec02be29c statements/create_table.gram 15ec6922853cdae4e1d51e7c10c1a25da70f5f2969b8b2993185c37fd81c6fe7 statements/create_trigger.gram -0da80da21a0660a2c59b4a1312a70bb3fdf51cbfb3211925fee894db89233f21 statements/create_type.gram -c21f5da90d789335c80a8aee162fc834157c3dda69b3d9e95c58d821299cb853 statements/create_view.gram -d62c7218252ad6f762cc05125dc6cfe02c3c5f906df1e3a599a958296f78ff69 statements/deallocate.gram -f9ded93197d1133107d3ec6d48210c1c5ccdb588cc61d03d164cadebfb06881d statements/delete.gram -d7376c4de5b04bd8a5ac2b5453af3514c1a168e0db3a30abad61be34a3adde99 statements/describe.gram +7a62195fb4f53f5e622a86c05e0f078381a308d4f8cdea712ceec8f943ac852c statements/create_type.gram +9ede97c886fa89f1c617914f88e3657192d34ae72bcf4803dee01e57cc2300c4 statements/create_view.gram +c1aa087a0af8cd88dc8e7d638e8e1a08a8348cad98d8c58e859b27bcf247ab30 statements/deallocate.gram +d82d170411ad444e768405279e56a50219e22dca69df846b8b7a021b49351bbd statements/delete.gram +c1242ea8a05cf628e152e189df9c94d866494e1b092553fcbb45142d0b3b92e7 statements/describe.gram ec5f4bd0ba34ecfefbf09f2d637bfaec2f7b84311a639aeee589b997d72abba9 statements/detach.gram -ca141624e02e3f1542e4b1251359b8938cd4d02c563f32bbbc5fff1fbc178643 statements/drop.gram -9f2ad89280ac00af9f6ab462a693f21a54383738ddcbb8d144409481ef85923b statements/execute.gram +b9e071a89874e169a80bc7a6b547841c7a868b189af773204a0d60644e08ad96 statements/drop.gram +c39dbaed5de68045913b78bc15205885b2c36e3e9f37d9f37e1ac71aeb89b5b9 statements/execute.gram 306c0603ae5e1a72975f3739a238570038b8d5487a89997afde7101eafccc8e7 statements/explain.gram 507cca9d8af7c3a061e04a654ccda1671784c81a115418b3aff57f9157382b53 statements/export.gram -79dfa73c85d18e4674009a7f210ce771f4df8957d05ffad6b58e3781b7365f00 statements/expression.gram -f150e2176c4a7398f8380c5ca8be43ec1d9ad63018f1e974ebf3b6e525529ae4 statements/external_resource.gram -000cdce02e55003cb38ca8d1c1f8304cc1e0b5513e92494d2de9aae2d467556d statements/insert.gram -3763ae5ea68638fe6d1b484ac147aa89c626d15f72d874cffd513c883bb1f340 statements/load.gram -2b98ac7310bcf1726fe4b2288e0fa02a09e6cb68cb2c0b8168e4bd770f73fb1f statements/merge_into.gram -f01099ef498cd6dd3e32f008e8600fc2e3da9715d1f8b84d0b46d559ee7f72da statements/pivot.gram +8105e1537dd51d3123b8dbb47c590751ccb1282ed160dff59d8c7848c16b48d0 statements/expression.gram +06592b807fbdfcd88c52abda051ea9ef44171f71e1f9b4a4c225aa03b0f4aa1f statements/external_resource.gram +5f0420aac8bd5e9b8fc8f62faf5d41ffdba52e1f17de916163bfe86214108956 statements/external_resource_source.gram +d40b438c674ba10792691b16ea370a81d28dea3b7fe330d6a4b6273bf635330d statements/insert.gram +70b7794dac3294c87fc01049e26a8d486824db959bfc689af63a1edf58ac9ade statements/load.gram +de64fb79521407b537d4ab4f240b7bc5280e8bfb76d1cbfd56924d7a1e9d9601 statements/merge_into.gram +ca8a8d1e4d6e5911b83037c2aaf234a2f2680fec08f67825b20fed35375b86d6 statements/pivot.gram 68ba82f61baed8fd57bb29043d025b2aaff86da0bfde49bee711f67e1f0ff8c3 statements/pragma.gram -a8ce0da5078fa6d07c3376ff0f3b9db21a214f53cba43f7f39c0112f9dee228c statements/prepare.gram -3b3ffd33489e8b25c74b0f547fff72c8fcf1b8ecf73b7f40d3df3b3baddff352 statements/select.gram +4bc9403d48ba71b584648a42b5bb2d5ca7294a7f2be862fc7bbcfd48df6c0d59 statements/prepare.gram +894bae17476ec7811bc21a3f085d51ae17cb2dc17e4e3b66f5e3e4f743b9266d statements/select.gram 1d500aeb6bdd88fc8e434bb116dde8192c13c9e7354017e596dc2ef46424288a statements/set.gram 2de0cc72aeb00b6b6247348bd06db8e9a088cecb2c20516e678fe4261c909877 statements/transaction.gram -d13cc52137a903fa42b4e476341b2f08cbe24ed4ad31b41df76001151f1b58d7 statements/update.gram -27b36ea5fdfc5b1c38fa3976276dc857629764bfa57171b8d1db1f2ff74b6787 statements/use.gram -6888deac794935a90e191f389f24f7786bc2b23a69a6374d5214dad50f095c4b statements/vacuum.gram +eab0c287f27d034d33f81ddc8dfe92762c262369d6d1efe0d7ed6d94cee5da2e statements/update.gram +9c9f82bead64307f2c798bb6e812d2ae37434856e0ec7f0454ff21208f45aad9 statements/use.gram +3d5ac4d0b83ff32d35122d901244a5e9717d43c47fbc5af449d7daeb90534b4c statements/vacuum.gram +0236b1321866323328fb5c5dc95903e906b03d613a8dda271dae7a3ff500cb21 keywords/bare_label_keyword.list 39ad28d2ef56a744fc354ee6f37a79434f490401d7810250d3899ffbc19891c7 keywords/column_name_keyword.list 6e0d26e4f6a6b47b4392542ed4c4a3f68db3792781d349874bd0cce537dfe877 keywords/func_name_keyword.list 0e66c73b69c650f44d542840de6936fd6adc72bd6d8f80703209bc93aa7f4c41 keywords/reserved_keyword.list f999e346c982a548c8ede53d8a9022e4c366a1c54fb6380b7d97afedcf5ccad3 keywords/type_name_keyword.list -4af9cce1fa0031eee19170211dde58af9bd782bb9cc6a2b4569957875a30da7e keywords/unreserved_keyword.list +263deeb44f9d9785e61b3752a7bfe15e3f7ec16866c1d9a4fb09c1a3ed583a9d keywords/unreserved_keyword.list ``` diff --git a/internal/grammar/duckdb/keywords/bare_label_keyword.list b/internal/grammar/duckdb/keywords/bare_label_keyword.list new file mode 100644 index 0000000..9479eb0 --- /dev/null +++ b/internal/grammar/duckdb/keywords/bare_label_keyword.list @@ -0,0 +1,358 @@ +abort +absolute +access +action +add +admin +after +aggregate +also +alter +always +approx +assertion +assignment +attach +attribute +backward +before +begin +between +bigint +bit +boolean +cache +call +called +cascade +cascaded +catalog +chain +char +character +characteristics +checkpoint +class +close +cluster +coalesce +columns +comment +comments +commit +committed +compression +configuration +conflict +connect +connection +constraints +content +continue +conversion +copy +cost +csv +cube +current +cursor +cycle +data +database +deallocate +dec +decimal +declare +defaults +deferred +definer +delete +delimiter +delimiters +depends +destroy +detach +dictionary +disable +discard +disconnect +distance +document +domain +double +drop +each +enable +encoding +encrypted +enum +error +event +exact +excluding +exclusive +execute +exists +explain +export +extension +extensions +external +extract +family +first +float +following +force +forward +function +functions +generated +global +grant +granted +grouping +grouping_id +groups +handler +header +hold +identity +if +immediate +immutable +implicit +import +include +including +increment +index +indexes +inherit +inherits +inline +inout +input +insensitive +insert +install +instead +int +integer +interval +invoker +isolation +json +key +label +language +large +last +leakproof +level +listen +load +local +location +lock +locked +logged +macro +map +mapping +match +matched +materialized +maxvalue +merge +method +minvalue +mode +move +name +names +national +nchar +nearest +new +next +no +none +nothing +notify +nowait +nullif +nulls +numeric +object +of +off +oids +old +operator +option +options +ordinality +others +out +overlay +overriding +owned +owner +parallel +parser +partial +partition +partitioned +passing +password +percent +persistent +plans +policy +position +pragma +preceding +prepare +prepared +preserve +prior +privileges +procedural +procedure +program +publication +quote +range +read +real +reassign +recheck +recursive +ref +referencing +refresh +register +reindex +relative +release +repeatable +replica +reset +resource +resources +restart +restrict +returns +revoke +role +rollback +rollup +row +rows +rule +sample +savepoint +schema +schemas +scope +scroll +search +secret +secure +security +sequence +sequences +serializable +server +session +set +setof +sets +share +similarity +simple +skip +smallint +snapshot +sorted +source +sql +stable +standalone +start +statement +statistics +stdin +stdout +storage +stored +strict +strip +struct +subscription +substring +sysid +system +tables +tablespace +target +temp +template +temporary +text +ties +time +timestamp +transaction +transform +treat +trigger +trim +truncate +trusted +try_cast +tuple +type +types +unbounded +uncommitted +unencrypted +unknown +unlisten +unlogged +until +update +use +user +vacuum +valid +validate +validator +value +values +varchar +variable +version +view +views +virtual +volatile +whitespace +work +wrapper +write +xml +xmlattributes +xmlconcat +xmlelement +xmlexists +xmlforest +xmlnamespaces +xmlparse +xmlpi +xmlroot +xmlserialize +xmltable +yes +zone diff --git a/internal/grammar/duckdb/keywords/unreserved_keyword.list b/internal/grammar/duckdb/keywords/unreserved_keyword.list index fb3d73b..7475f24 100644 --- a/internal/grammar/duckdb/keywords/unreserved_keyword.list +++ b/internal/grammar/duckdb/keywords/unreserved_keyword.list @@ -66,6 +66,7 @@ DELETE DELIMITER DELIMITERS DEPENDS +DESTROY DETACH DICTIONARY DISABLE @@ -227,6 +228,7 @@ RECURSIVE REF REFERENCING REFRESH +REGISTER REINDEX RELATIVE RELEASE @@ -236,6 +238,7 @@ REPLACE REPLICA RESET RESOURCE +RESOURCES RESPECT RESTART RESTRICT @@ -256,6 +259,7 @@ SEARCH SECRET SECOND SECONDS +SECURE SECURITY SEQUENCE SEQUENCES diff --git a/internal/grammar/duckdb/statements/alter.gram b/internal/grammar/duckdb/statements/alter.gram index 6066fa1..e68a83d 100644 --- a/internal/grammar/duckdb/statements/alter.gram +++ b/internal/grammar/duckdb/statements/alter.gram @@ -3,20 +3,22 @@ AlterStatement <- 'ALTER' AlterOptions AlterOptions <- AlterTableStmt / AlterViewStmt / AlterSequenceStmt / AlterDatabaseStmt / AlterSchemaStmt AlterTableStmt <- 'TABLE' IfExists? BaseTableName List(AlterTableOptions) -AlterSchemaStmt <- 'SCHEMA' IfExists? QualifiedName RenameAlter +AlterSchemaStmt <- 'SCHEMA' IfExists? QualifiedName AlterSchemaOptions +AlterSchemaOptions <- RenameAlter / SetOptions / ResetOptions -AlterTableOptions <- AddColumn / DropColumn / AlterColumn / AddConstraint / ChangeNullability / +AlterTableOptions <- AddColumn / DropConstraint / DropColumn / AlterColumn / AddConstraint / RenameColumn / RenameAlter / SetPartitionedBy / ResetPartitionedBy / SetSortedBy / ResetSortedBy / SetOptions / ResetOptions AddConstraint <- 'ADD' TopLevelConstraint +DropConstraint <- 'DROP' 'CONSTRAINT' IfExists? ConstraintName DropBehavior? AddColumn <- 'ADD' 'COLUMN'? IfNotExists? AddColumnEntry AddColumnEntry <- DottedIdentifier Type? GeneratedColumn? ColumnConstraint* DropColumn <- 'DROP' 'COLUMN'? IfExists? NestedColumnName DropBehavior? AlterColumn <- 'ALTER' 'COLUMN'? NestedColumnName AlterColumnEntry -RenameColumn <- 'RENAME' 'COLUMN'? NestedColumnName 'TO' Identifier +RenameColumn <- 'RENAME' 'COLUMN'? NestedColumnName 'TO' ColIdOrString NestedColumnName <- IdentifierDot* ColumnName IdentifierDot <- Identifier '.' -RenameAlter <- 'RENAME' 'TO' Identifier +RenameAlter <- 'RENAME' 'TO' ColIdOrString SetPartitionedBy <- 'SET' 'PARTITIONED' 'BY' Parens(List(Expression)) ResetPartitionedBy <- 'RESET' 'PARTITIONED' 'BY' SetSortedBy <- 'SET' 'SORTED' 'BY' Parens(OrderByExpressions) @@ -35,7 +37,7 @@ DropOrSet <- DropNullability / SetNullability DropNullability <- 'DROP' SetNullability <- 'SET' -AlterType <- SetData? 'TYPE' Type? UsingExpression? +AlterType <- SetData? 'TYPE' Type? ColumnCollation? UsingExpression? SetData <- 'SET' 'DATA'? UsingExpression <- 'USING' Expression diff --git a/internal/grammar/duckdb/statements/comment.gram b/internal/grammar/duckdb/statements/comment.gram index fd58174..5dd662e 100644 --- a/internal/grammar/duckdb/statements/comment.gram +++ b/internal/grammar/duckdb/statements/comment.gram @@ -1,4 +1,7 @@ -CommentStatement <- 'COMMENT' 'ON' CommentOnType DottedIdentifier 'IS' CommentValue +CommentStatement <- 'COMMENT' 'ON' CommentOnType CommentTarget 'IS' CommentValue + +CommentTarget <- DottedIdentifier / CommentStringLiteralIdentifier +CommentStringLiteralIdentifier <- StringLiteralIdentifier CommentOnType <- CommentTable / CommentSequence / CommentFunction / CommentMacroTable / CommentMacro / CommentView / CommentDatabase / CommentIndex / CommentSchema / CommentType / CommentColumn diff --git a/internal/grammar/duckdb/statements/common.gram b/internal/grammar/duckdb/statements/common.gram index 445b426..2b8dae8 100644 --- a/internal/grammar/duckdb/statements/common.gram +++ b/internal/grammar/duckdb/statements/common.gram @@ -4,6 +4,7 @@ TopLevelStatement <- Statement? (';'+ / EndOfInput) Statement <- ExternalResourceStatement / + ExtensionRepositoryStatement / CreateStatement / SelectStatement / SetStatement / @@ -36,14 +37,10 @@ Statement <- AnalyzeStatement / MergeIntoStatement / ConnectStatement / - DisconnectStatement / - ExpressionStatement + DisconnectStatement AnalyzeKeyword <- 'ANALYZE' / 'ANALYSE' -ExpressionStatement <- List(ExpressionAlias) -ExpressionAlias <- ColIdExpression / ExpressionAsCollabel / Expression - CatalogName <- Identifier SchemaName <- Identifier ReservedSchemaName <- Identifier @@ -164,16 +161,17 @@ NumericModType <- 'NUMERIC' TypeModifiers? QualifiedTypeName <- CatalogReservedSchemaTypeName / SchemaReservedTypeName / TypeNameAsQualifiedName TypeNameAsQualifiedName <- TypeName -CatalogReservedSchemaTypeName <- CatalogQualification ReservedSchemaQualification ReservedTypeName +CatalogReservedSchemaTypeName <- CatalogQualification ReservedSchemaQualification+ ReservedTypeName SchemaReservedTypeName <- SchemaQualification ReservedTypeName TypeModifiers <- Parens(List(Expression)?) +NestedType <- TypeVariations ArrayBounds* RowType <- RowOrStruct ColIdTypeList? -SetofType <- 'SETOF' Type +SetofType <- 'SETOF' NestedType UnionType <- 'UNION' ColIdTypeList ColIdTypeList <- Parens(List(ColIdType)) -MapType <- 'MAP' Parens(List(Type))? -TupleType <- 'TUPLE' Parens(List(Type)) -ColIdType <- ColId Type +MapType <- 'MAP' Parens(List(NestedType))? +TupleType <- 'TUPLE' Parens(List(NestedType)) +ColIdType <- ColId NestedType ArrayBounds <- ArrayKeywordWithBounds / SquareBracketsArray / ArrayKeyword ArrayKeyword <- 'ARRAY' ArrayKeywordWithBounds <- 'ARRAY' SquareBracketsArray diff --git a/internal/grammar/duckdb/statements/copy.gram b/internal/grammar/duckdb/statements/copy.gram index 06cb3f5..219a294 100644 --- a/internal/grammar/duckdb/statements/copy.gram +++ b/internal/grammar/duckdb/statements/copy.gram @@ -1,19 +1,23 @@ CopyStatement <- 'COPY' CopyVariations CopyVariations <- CopyTable / CopySelect / CopyFromDatabase -CopyTable <- BaseTableName InsertColumnList? FromOrTo CopyFileName CopyOptions? +CopyTable <- BaseTableName InsertColumnList? FromOrTo CopyFileName CopyLegacyOption? CopyOptions? FromOrTo <- CopyFrom / CopyTo CopyFrom <- 'FROM' CopyTo <- 'TO' CopySelect <- Parens(SelectStatementInternal) 'TO' CopyFileName CopyOptions? -CopyFileName <- CopyFileNameExpression / CopyFileNameStringLiteral / CopyFileNameIdentifier / CopyFileNameIdentifierColId +CopyFileName <- CopyFileNameExpression / CopyFileNameStringLiteral / CopyFileNameIdentifierColId / CopyFileNameIdentifier CopyFileNameExpression <- Parameter / ParensExpression CopyFileNameStringLiteral <- StringLiteral CopyFileNameIdentifier <- Identifier CopyFileNameIdentifierColId <- IdentifierColId -IdentifierColId <- Identifier '.' ColId +IdentifierColId <- Identifier CopyFileNameSuffix+ +CopyFileNameSuffix <- '.' ColId + +CopyLegacyOption <- 'USING'? 'DELIMITERS' StringLiteral + CopyOptions <- 'WITH'? CopyOptionList CopyOptionList <- CopyGenericOptionList / SpecializedOptionList SpecializedOptionList <- SpecializedOption SpecializedOptionTail* diff --git a/internal/grammar/duckdb/statements/create_index.gram b/internal/grammar/duckdb/statements/create_index.gram index 1d5161c..879b807 100644 --- a/internal/grammar/duckdb/statements/create_index.gram +++ b/internal/grammar/duckdb/statements/create_index.gram @@ -1,4 +1,4 @@ -CreateIndexStmt <- UniqueIndex? 'INDEX' IfNotExists? IndexName? 'ON' BaseTableName InsertColumnList? IndexType? Parens(List(IndexElement))? WithList? WhereClause? +CreateIndexStmt <- UniqueIndex? 'INDEX' IfNotExists? IndexName? 'ON' BaseTableName IndexType? Parens(List(IndexElement)) WithList? WhereClause? WithList <- 'WITH' RelOptionOrOids RelOptionOrOids <- RelOptionList / Oids @@ -11,8 +11,8 @@ IndexElement <- Expression DescOrAsc? NullsFirstOrLast? UniqueIndex <- 'UNIQUE' IndexType <- 'USING' Identifier RelOption <- RelOptionName RelOptionArgumentOpt? -RelOptionName <- DottedIdentifierString / StringLiteral -DottedIdentifierString <- DottedIdentifier +RelOptionName <- DottedColLabel / StringLiteral +DottedColLabel <- ColLabel DotColLabel* RelOptionArgumentOpt <- '=' DefArg DefArg <- DefArgNull / DefArgStringLiteral / NumberLiteral / NoneLiteral / Expression / DefArgKeyword DefArgNull <- NullLiteral diff --git a/internal/grammar/duckdb/statements/create_schema.gram b/internal/grammar/duckdb/statements/create_schema.gram index 5044cc8..0069c56 100644 --- a/internal/grammar/duckdb/statements/create_schema.gram +++ b/internal/grammar/duckdb/statements/create_schema.gram @@ -1 +1,3 @@ -CreateSchemaStmt <- 'SCHEMA' IfNotExists? QualifiedName \ No newline at end of file +CreateSchemaStmt <- 'SCHEMA' IfNotExists? QualifiedName WithOptionList? + +WithOptionList <- 'WITH' RelOptionList diff --git a/internal/grammar/duckdb/statements/create_table.gram b/internal/grammar/duckdb/statements/create_table.gram index 26883ef..fa5fab5 100644 --- a/internal/grammar/duckdb/statements/create_table.gram +++ b/internal/grammar/duckdb/statements/create_table.gram @@ -24,7 +24,7 @@ CreateColumnList <- Parens(CreateTableColumnList?) PartitionSortedOptions? WithL IfNotExists <- 'IF' 'NOT' 'EXISTS' QualifiedName <- CatalogReservedSchemaIdentifier / SchemaReservedIdentifierOrStringLiteral / IdentifierOrStringLiteral SchemaReservedIdentifierOrStringLiteral <- SchemaQualification ReservedIdentifierOrStringLiteral -CatalogReservedSchemaIdentifier <- CatalogQualification ReservedSchemaQualification ReservedIdentifierOrStringLiteral +CatalogReservedSchemaIdentifier <- CatalogQualification ReservedSchemaQualification+ ReservedIdentifierOrStringLiteral IdentifierOrStringLiteral <- Identifier / StringLiteral ReservedIdentifierOrStringLiteral <- ReservedIdentifier / StringLiteral CatalogQualification <- CatalogName '.' @@ -37,8 +37,10 @@ CreateTableColumnList <- List(CreateTableColumnElement) CreateTableColumnElement <- CreateTableColumnDefinition / CreateTableConstraint CreateTableColumnDefinition <- ColumnDefinition CreateTableConstraint <- TopLevelConstraint -ColumnDefinition <- DottedIdentifier Type? GeneratedColumn? ConstraintNameClause? ColumnConstraint* -ColumnConstraint <- NotNullConstraint / UniqueConstraint / PrimaryKeyConstraint / DefaultValue / CheckConstraint / ForeignKeyConstraint / ColumnCollation / ColumnCompression +ColumnDefinition <- Identifier Type? GeneratedColumn? ColumnConstraint* +ColumnConstraint <- NameableColumnConstraint / ColumnCollation +NameableColumnConstraint <- ConstraintNameClause? ColumnConstraintElement +ColumnConstraintElement <- NotNullConstraint / UniqueConstraint / PrimaryKeyConstraint / DefaultValue / CheckConstraint / ForeignKeyConstraint / ColumnCompression NotNullConstraint <- NullConstraint / NotNullColumnConstraint NullConstraint <- 'NULL' NotNullColumnConstraint <- 'NOT' 'NULL' @@ -46,11 +48,13 @@ UniqueConstraint <- 'UNIQUE' PrimaryKeyConstraint <- 'PRIMARY' 'KEY' DefaultValue <- 'DEFAULT' ColumnDefaultExpr CheckConstraint <- 'CHECK' Parens(Expression) -ForeignKeyConstraint <- 'REFERENCES' BaseTableName Parens(ColumnList)? KeyActions +ForeignKeyConstraint <- 'REFERENCES' BaseTableName Parens(ColumnList)? KeyActions? ColumnCollation <- 'COLLATE' DottedIdentifier ColumnCompression <- 'USING' 'COMPRESSION' ColIdOrString -KeyActions <- UpdateAction? DeleteAction? +KeyActions <- UpdateFirstKeyActions / DeleteFirstKeyActions +UpdateFirstKeyActions <- UpdateAction DeleteAction? +DeleteFirstKeyActions <- DeleteAction UpdateAction? UpdateAction <- 'ON' 'UPDATE' KeyAction DeleteAction <- 'ON' 'DELETE' KeyAction KeyAction <- NoKeyAction / RestrictKeyAction / CascadeKeyAction / SetNullKeyAction / SetDefaultKeyAction @@ -62,7 +66,7 @@ SetDefaultKeyAction <- 'SET' 'DEFAULT' TopLevelConstraint <- ConstraintNameClause? TopLevelConstraintList TopLevelConstraintList <- TopPrimaryKeyConstraint / TopCheckConstraint / TopUniqueConstraint / TopForeignKeyConstraint -ConstraintNameClause <- 'CONSTRAINT' Identifier +ConstraintNameClause <- 'CONSTRAINT' ConstraintName TopCheckConstraint <- CheckConstraint TopPrimaryKeyConstraint <- 'PRIMARY' 'KEY' ColumnIdList TopUniqueConstraint <- 'UNIQUE' ColumnIdList @@ -70,23 +74,26 @@ TopForeignKeyConstraint <- 'FOREIGN' 'KEY' ColumnIdList ForeignKeyConstraint ColumnIdList <- Parens(List(ColId)) PlainIdentifier <- !ReservedKeyword <[a-z_]i[a-z0-9_]i*> -QuotedIdentifier <- '"' [^"]* '"' +QuotedIdentifier <- ('"' [^"]* '"') / ('`' [^`]* '`') DottedIdentifier <- Identifier DotColLabel* DotColLabel <- '.' ColLabel Identifier <- QuotedIdentifier / PlainIdentifier ColId <- UnreservedKeyword / ColumnNameKeyword / Identifier ColIdOrString <- ColId / StringLiteralIdentifier -TypeFuncName <- UnreservedKeyword / TypeNameKeyword / FuncNameKeyword / Identifier +TypeFuncName <- UnreservedKeyword / TypeFuncKeyword / Identifier +TypeFuncKeyword <- TypeNameKeyword / FuncNameKeyword TypeName <- UnreservedKeyword / TypeNameKeyword / Identifier ColLabel <- ReservedKeyword / UnreservedKeyword / ColumnNameKeyword / FuncNameKeyword / TypeNameKeyword / Identifier ColLabelOrString <- ColLabelIdentifier / StringLiteralIdentifier ColLabelIdentifier <- ColLabel +BareColLabel <- BareLabelKeyword / Identifier StringLiteralIdentifier <- StringLiteral GeneratedColumn <- Generated? 'AS' Parens(Expression) GeneratedColumnType? -Generated <- 'GENERATED' AlwaysOrByDefault? -AlwaysOrByDefault <- 'ALWAYS' / ('BY' 'DEFAULT') +Generated <- GeneratedAlways / GeneratedByDefault +GeneratedAlways <- 'GENERATED' 'ALWAYS' +GeneratedByDefault <- 'GENERATED' 'BY' 'DEFAULT' GeneratedColumnType <- VirtualGeneratedColumn / StoredGeneratedColumn CommitAction <- 'ON' 'COMMIT' PreserveOrDelete 'ROWS' diff --git a/internal/grammar/duckdb/statements/create_type.gram b/internal/grammar/duckdb/statements/create_type.gram index d0eb562..c1a19a7 100644 --- a/internal/grammar/duckdb/statements/create_type.gram +++ b/internal/grammar/duckdb/statements/create_type.gram @@ -2,4 +2,4 @@ CreateTypeStmt <- 'TYPE' IfNotExists? QualifiedName 'AS' CreateType CreateType <- EnumSelectType / EnumStringLiteralList / CreateTypeFromType CreateTypeFromType <- Type EnumSelectType <- 'ENUM' Parens(SelectStatementInternal) -EnumStringLiteralList <- 'ENUM' Parens(List(StringLiteral)?) +EnumStringLiteralList <- 'ENUM' Parens(List(StringLiteral)?) ArrayBounds* diff --git a/internal/grammar/duckdb/statements/create_view.gram b/internal/grammar/duckdb/statements/create_view.gram index e58319c..4f598dc 100644 --- a/internal/grammar/duckdb/statements/create_view.gram +++ b/internal/grammar/duckdb/statements/create_view.gram @@ -1,2 +1,3 @@ -CreateViewStmt <- CreateRecursive? 'VIEW' IfNotExists? QualifiedName InsertColumnList? WithList? 'AS' SelectStatementInternal +CreateViewStmt <- CreateSecure? CreateRecursive? 'VIEW' IfNotExists? QualifiedName InsertColumnList? WithList? 'AS' SelectStatementInternal CreateRecursive <- 'RECURSIVE' +CreateSecure <- 'SECURE' diff --git a/internal/grammar/duckdb/statements/deallocate.gram b/internal/grammar/duckdb/statements/deallocate.gram index 3526871..bdd4f56 100644 --- a/internal/grammar/duckdb/statements/deallocate.gram +++ b/internal/grammar/duckdb/statements/deallocate.gram @@ -1,2 +1,2 @@ -DeallocateStatement <- 'DEALLOCATE' DeallocatePrepare? Identifier +DeallocateStatement <- 'DEALLOCATE' DeallocatePrepare? ColIdOrString DeallocatePrepare <- 'PREPARE' diff --git a/internal/grammar/duckdb/statements/delete.gram b/internal/grammar/duckdb/statements/delete.gram index f609c2f..4ed23e2 100644 --- a/internal/grammar/duckdb/statements/delete.gram +++ b/internal/grammar/duckdb/statements/delete.gram @@ -1,4 +1,9 @@ DeleteStatement <- WithClause? 'DELETE' 'FROM' TargetOptAlias DeleteUsingClause? WhereClause? ReturningClause? -TruncateStatement <- 'TRUNCATE' 'TABLE'? BaseTableName -TargetOptAlias <- BaseTableName 'AS'? ColId? +TruncateStatement <- 'TRUNCATE' 'TABLE'? BaseTableName TruncateOptions? +# DropBehavior first, so CASCADE/RESTRICT are not consumed as an alias +TruncateOptions <- TruncateDropBehavior / TruncateAliasOptions +TruncateAliasOptions <- TargetAlias TruncateDropBehavior? +TruncateDropBehavior <- DropBehavior +TargetOptAlias <- BaseTableName TargetAlias? +TargetAlias <- 'AS'? ColId DeleteUsingClause <- 'USING' List(TableRef) diff --git a/internal/grammar/duckdb/statements/describe.gram b/internal/grammar/duckdb/statements/describe.gram index b873808..fbf71f3 100644 --- a/internal/grammar/duckdb/statements/describe.gram +++ b/internal/grammar/duckdb/statements/describe.gram @@ -1,14 +1,35 @@ -DescribeStatement <- ShowTables / ShowSelect / ShowAllTables / ShowQualifiedName +DescribeStatement <- ShowTables / ShowDeprecatedSelect / DescribeSelect / ShowAllTables / ShowByName / DescribeByName -ShowSelect <- ShowOrDescribeOrSummarize SelectStatementInternal +# "DESCRIBE (query)" and "SUMMARIZE (query)" describe the query's columns. "SHOW (query)" does too but is deprecated, +# so ShowDeprecatedSelect is parsed yet suppressed from autocomplete (matcher_factory.cpp) - SHOW won't offer to complete a query. +ShowDeprecatedSelect <- ShowRule SelectStatementInternal +DescribeSelect <- DescribeOrSummarize SelectStatementInternal ShowAllTables <- ShowOrDescribe 'ALL' 'TABLES'? -ShowQualifiedName <- ShowOrDescribeOrSummarize DescribeTarget? ShowTables <- ShowOrDescribe 'TABLES' 'FROM' QualifiedName + +# "SHOW name" is settings-first, so its target autocompletes setting names (and the special MySQL forms), not +# arbitrary tables. "DESCRIBE"/"SUMMARIZE" describe a relation, so their target autocompletes table names. +ShowByName <- ShowRule ShowTarget? +DescribeByName <- DescribeOrSummarize DescribeTarget? +DescribeOrSummarize <- DescribeRule / Summarize + +# SHOW's own forms (a settings-first name and the special MySQL forms) plus the describe-style targets it still +# tolerates for the deprecated "describe via SHOW". Only settings and the special forms are autocompleted after SHOW; +# a qualified table is parsed but its suggestions are suppressed (see matcher.cpp). +ShowTarget <- ShowDeprecatedQualifiedTableName / ShowSettingName / DescribeStringLiteral / ShowSpecialForm +# "SHOW cat.tbl" still describes a table (deprecated), but is suppressed from autocomplete (see matcher.cpp) so SHOW +# does not complete qualified tables (unlike DESCRIBE, which does). Wraps the generic QualifiedTableName (select.gram). +ShowDeprecatedQualifiedTableName <- QualifiedTableName +# A bare identifier is suggested as a setting name (SettingName is overridden to SUGGEST_SETTING_NAME). +ShowSettingName <- SettingName +# The special MySQL forms are only here so autocomplete suggests these keywords after SHOW; parsing of e.g. +# "SHOW databases" resolves through ShowSettingName (the identifier) above, which the transformer special-cases. +ShowSpecialForm <- 'DATABASES' / 'SCHEMAS' / 'TABLES' / 'VARIABLES' + DescribeTarget <- DescribeBaseTableName / DescribeStringLiteral DescribeBaseTableName <- BaseTableName DescribeStringLiteral <- StringLiteral -ShowOrDescribeOrSummarize <- ShowOrDescribe / Summarize Summarize <- SummarizeRule SummarizeRule <- 'SUMMARIZE' ShowOrDescribe <- ShowRule / DescribeRule diff --git a/internal/grammar/duckdb/statements/drop.gram b/internal/grammar/duckdb/statements/drop.gram index 8c9c5c2..4445d43 100644 --- a/internal/grammar/duckdb/statements/drop.gram +++ b/internal/grammar/duckdb/statements/drop.gram @@ -15,7 +15,7 @@ DropEntries <- DropTrigger <- 'TRIGGER' IfExists? TriggerName 'ON' BaseTableName DropTable <- TableOrView IfExists? List(BaseTableName) -DropTableFunction <- CommentMacroTable IfExists? List(TableFunctionName) +DropTableFunction <- CommentMacroTable IfExists? List(QualifiedTableFunction) DropFunction <- FunctionTypeMacro IfExists? List(FunctionIdentifier) DropSchema <- 'SCHEMA' IfExists? List(QualifiedName) DropIndex <- 'INDEX' IfExists? List(QualifiedIndexName) diff --git a/internal/grammar/duckdb/statements/execute.gram b/internal/grammar/duckdb/statements/execute.gram index 13e5ca1..5557950 100644 --- a/internal/grammar/duckdb/statements/execute.gram +++ b/internal/grammar/duckdb/statements/execute.gram @@ -1 +1 @@ -ExecuteStatement <- 'EXECUTE' Identifier TableFunctionArguments? \ No newline at end of file +ExecuteStatement <- 'EXECUTE' ColIdOrString TableFunctionArguments? diff --git a/internal/grammar/duckdb/statements/expression.gram b/internal/grammar/duckdb/statements/expression.gram index 65738f7..abab034 100644 --- a/internal/grammar/duckdb/statements/expression.gram +++ b/internal/grammar/duckdb/statements/expression.gram @@ -1,4 +1,7 @@ -ColumnReference <- CatalogReservedSchemaTableColumnName / SchemaReservedTableColumnName / TableReservedColumnName / NestedColumnName +ColumnReference <- NestedSchemaTableColumnName / CatalogReservedSchemaTableColumnName / SchemaReservedTableColumnName / TableReservedColumnName / NestedColumnName +# a column of a table in a nested schema chain - five or more components, where the qualification is deeper than +# catalog + schema and it is no longer positional which components are schemas and which is the table +NestedSchemaTableColumnName <- CatalogQualification ReservedSchemaQualification ReservedSchemaQualification ReservedSchemaQualification+ ReservedColumnName CatalogReservedSchemaTableColumnName <- CatalogQualification ReservedSchemaQualification ReservedTableQualification ReservedColumnName SchemaReservedTableColumnName <- SchemaQualification ReservedTableQualification ReservedColumnName TableReservedColumnName <- TableQualification ReservedColumnName @@ -9,7 +12,7 @@ FunctionArgumentList <- List(FunctionArgument) FunctionIdentifier <- CatalogReservedSchemaFunctionName / SchemaReservedFunctionName / FunctionNameAsQualifiedName FunctionNameAsQualifiedName <- FunctionName -CatalogReservedSchemaFunctionName <- CatalogQualification ReservedSchemaQualification? ReservedFunctionName +CatalogReservedSchemaFunctionName <- CatalogQualification ReservedSchemaQualification* ReservedFunctionName SchemaReservedFunctionName <- SchemaQualification ReservedFunctionName DistinctOrAll <- DistinctKeyword / AllKeyword @@ -167,7 +170,14 @@ LogicalNotExpression <- NotExpression? IsExpression NotExpression <- NotKeyword+ NotKeyword <- 'NOT' # LEVEL 4 -IsExpression <- IsDistinctFromExpression IsTest* +IsExpression <- IsDistinctFromExpression IsExpressionContinuation? +IsExpressionContinuation <- IsTest IsExpressionTail* +IsExpressionTail <- IsTestTail / IsDistinctTail / IsComparisonTail / IsOtherOperatorTail / IsCastTail +IsTestTail <- IsTest +IsDistinctTail <- IsDistinctFromTail +IsComparisonTail <- ComparisonExpressionTail +IsOtherOperatorTail <- OtherOperatorTail +IsCastTail <- CastOperator IsTest <- IsLiteral / NotNull / IsNull IsLiteral <- 'IS' 'NOT'? IsLiteralValue IsLiteralValue <- TrueLiteral / FalseLiteral / NullLiteral / UnknownLiteral @@ -177,13 +187,16 @@ NotNullKeyword <- 'NOT' 'NULL' NotNullOperator <- 'NOTNULL' IsNull <- IsNullOperator IsNullOperator <- 'ISNULL' -# LEVEL 5 (Split because IsDistinctFromExpression allows post expression while IsOperator does not) +# LEVEL 5 (IS DISTINCT FROM retains the comparison binding) IsDistinctFromExpression <- ComparisonExpression IsDistinctFromTail* IsDistinctFromTail <- IsDistinctFromOp ComparisonExpression IsDistinctFromOp <- 'IS' 'NOT'? 'DISTINCT' 'FROM' # LEVEL 6 ComparisonExpression <- BetweenInLikeExpression ComparisonExpressionTail* -ComparisonExpressionTail <- ComparisonOperator NotExpression? BetweenInLikeExpression +ComparisonExpressionTail <- ComparisonOperator ComparisonOperand +ComparisonOperand <- NotComparisonOperand / BetweenInLikeExpression +# NOT after a comparison operator binds everything up to the IS level: a < NOT b IS NULL is a < (NOT (b IS NULL)) +NotComparisonOperand <- NotExpression IsExpression ComparisonOperator <- OperatorEqual / OperatorNotEqual / @@ -199,11 +212,12 @@ OperatorGreaterThan <- '>' OperatorLessThanEquals <- '<=' OperatorGreaterThanEquals <- '>=' # LEVEL 7 -BetweenInLikeExpression <- OtherOperatorExpression BetweenInLikeOp? -BetweenInLikeOp <- 'NOT'? BetweenInLikeOpExpression -BetweenInLikeOpExpression <- BetweenClause / InClause / LikeClause +BetweenInLikeExpression <- OtherOperatorExpression InPredicate* BetweenLikeOp? +InPredicate <- 'NOT'? InClause CastOperator* +BetweenLikeOp <- 'NOT'? BetweenLikeOpExpression +BetweenLikeOpExpression <- BetweenClause / LikeClause LikeClause <- LikeVariations OtherOperatorExpression EscapeClause? -EscapeClause <- 'ESCAPE' ComparisonExpression +EscapeClause <- 'ESCAPE' OtherOperatorExpression LikeVariations <- SimilarToToken / RegexInsensitiveMatchToken / RegexMatchToken / ILikeToken / LikeToken / GlobToken / NotILikeOp / NotLikeOp / NotRegexInsensitiveMatchOp / NotSimilarToOp LikeToken <- 'LIKE' / '~~' @@ -222,31 +236,32 @@ InExpression <- InExpressionList / InSelectStatement / InContainsExpression InContainsExpression <- OtherOperatorExpression InExpressionList <- Parens(List(Expression)) InSelectStatement <- Parens(SelectStatementInternal) -BetweenClause <- 'BETWEEN' OtherOperatorExpression 'AND' OtherOperatorExpression +BetweenClause <- 'BETWEEN' Asymmetric? OtherOperatorExpression 'AND' OtherOperatorExpression +Asymmetric <- 'ASYMMETRIC' # LEVEL 8 -OtherOperatorExpression <- BitwiseExpression OtherOperatorTail* +OtherOperatorExpression <- InfixOtherOperatorExpression / CustomPrefixExpression +InfixOtherOperatorExpression <- BitwiseExpression OtherOperatorTail* +CustomPrefixExpression <- OperatorLiteral OtherOperatorExpression OtherOperatorTail <- OtherOperator BitwiseExpression OtherOperator <- AnyAllParsedOperator / NamedOtherOperator AnyAllParsedOperator <- AnyAllOperator NamedOtherOperator <- - QualifiedOperator / InetOperator / JsonOperator / ListOperator / StringOperator / OperatorLiteral + QualifiedOperator / OperatorLiteral OperatorLiteral <- Identifier -AnyAllOperator <- AnyOp AnyOrAll +AnyOperatorLiteral <- Identifier +AnyAllOperator <- AnyOperatorLiteral AnyOrAll AnyOrAll <- SubqueryAny / SubqueryAll -SubqueryAny <- 'ANY' +SubqueryAny <- 'ANY' / 'SOME' SubqueryAll <- 'ALL' -InetOperator <- '>>=' / '<<=' -JsonOperator <- '->>' -ListOperator <- '&&' / '@>' / '<@' -StringOperator <- '^@' / '||' QualifiedOperator <- 'OPERATOR' Parens(QualifiedOperatorContents) -QualifiedOperatorContents <- ColIdDot* AnyOp -AnyOp <- '!~~*' / '>>=' / '<<=' / '->>' / '!~~' / '!~*' / '~~*' / '~~~' / '~*' / '!~' / '^@' / '||' / '&&' / '@>' / '<@' / '<=' / '>=' / '<>' / '!=' / '==' / '<<' / '>>' / '//' / '**' / '->' / '~~' / '+' / '-' / '*' / '/' / '%' / '^' / '<' / '>' / '=' / '&' / '|' / '~' / '!' +QualifiedOperatorContents <- ColIdDot* AnyOperatorLiteral # LEVEL 9 -BitwiseExpression <- AdditiveExpression BitwiseExpressionTail* -BitwiseExpressionTail <- BitOperator AdditiveExpression +BitwiseExpression <- TildeExpression BitwiseExpressionTail* +BitwiseExpressionTail <- BitOperator TildeExpression BitOperator <- '&' / '|' / '<<' / '>>' +# LEVEL 9.5 +TildeExpression <- TildePrefixOperator* AdditiveExpression # LEVEL 10 AdditiveExpression <- MultiplicativeExpression AdditiveExpressionTail* AdditiveExpressionTail <- Term MultiplicativeExpression @@ -269,7 +284,7 @@ AtTimeZoneExpressionTail <- AtTimeZoneOperator PrefixExpression AtTimeZoneOperator <- 'AT' 'TIME' 'ZONE' # LEVEL 15 PrefixExpression <- PrefixOperator* BaseExpression -PrefixOperator <- QualifiedOperator / MinusPrefixOperator / PlusPrefixOperator / TildePrefixOperator +PrefixOperator <- QualifiedOperator / MinusPrefixOperator / PlusPrefixOperator MinusPrefixOperator <- '-' PlusPrefixOperator <- '+' TildePrefixOperator <- '~' @@ -287,10 +302,11 @@ MethodExpressionArguments <- Parens(MethodExpressionArgumentList) MethodExpressionArgumentList <- DistinctOrAll? MethodFunctionArguments? OrderByClause? IgnoreOrRespectNulls? MethodFunctionArguments <- List(FunctionArgument) SliceExpression <- '[' SliceBound ']' -SliceBound <- Expression? EndSliceBound? StepSliceBound? -EndSliceBound <- ':' EndSliceValue? -EndSliceValue <- Expression / EndSliceMinus -EndSliceMinus <- '-' +SliceBound <- Expression? SliceUpperBound? +SliceUpperBound <- MinusStepSliceBound / EndStepSliceBound +MinusStepSliceBound <- ':' '-' StepSliceBound +EndStepSliceBound <- EndSliceBound StepSliceBound? +EndSliceBound <- ':' Expression? StepSliceBound <- ':' Expression? PostfixOperator <- '!' diff --git a/internal/grammar/duckdb/statements/external_resource.gram b/internal/grammar/duckdb/statements/external_resource.gram index b493a11..e1359d0 100644 --- a/internal/grammar/duckdb/statements/external_resource.gram +++ b/internal/grammar/duckdb/statements/external_resource.gram @@ -1,11 +1,16 @@ -ExternalResourceStatement <- CreateExternalResourceStmt / RegisterExternalResourceStmt / DestroyExternalResourceStmt / ShowExternalResourcesStmt +# Every statement about external resources, so the top-level Statement choice carries one entry +# rather than one per form. +ExternalResourceStatement <- CreateExternalResourceStmt / RegisterExternalResourceStmt / DestroyExternalResourceStmt / ShowExternalResourcesStmt / AttachToExternalResource / ConnectToExternalResource -CreateExternalResourceStmt <- 'CREATE' 'EXTERNAL' 'RESOURCE' StringLiteral AttachAlias? ExternalResourceCreationOptions? -RegisterExternalResourceStmt <- 'REGISTER' 'EXTERNAL' 'RESOURCE' StringLiteral AttachAlias? 'FROM' Expression -DestroyExternalResourceStmt <- 'DESTROY' 'EXTERNAL' 'RESOURCE' ColId +CreateExternalResourceStmt <- 'CREATE' ExternalResourceKeyword StringLiteral AttachAlias? ExternalResourceCreationOptions? +RegisterExternalResourceStmt <- 'REGISTER' ExternalResourceKeyword StringLiteral AttachAlias? 'FROM' Expression +DestroyExternalResourceStmt <- 'DESTROY' ExternalResourceKeyword ColId ShowExternalResourcesStmt <- 'SHOW' ShowAllModifier? 'EXTERNAL' 'RESOURCES' ShowAllModifier <- 'ALL' +# Syntax only: the keyword pair every singular form repeats. The plural in SHOW cannot share it. +ExternalResourceKeyword <- 'EXTERNAL' 'RESOURCE' + # The recipe's create params. Its own rule rather than AttachOptions: the two option bags are # distinct, and a statement can carry both. ExternalResourceCreationOptions <- GenericCopyOptionList diff --git a/internal/grammar/duckdb/statements/external_resource_source.gram b/internal/grammar/duckdb/statements/external_resource_source.gram new file mode 100644 index 0000000..529e40b --- /dev/null +++ b/internal/grammar/duckdb/statements/external_resource_source.gram @@ -0,0 +1,10 @@ +# The attach alias is mandatory: it separates the recipe's create params, which precede it, from the +# attachment's own options, which follow. Without it a single option list would be ambiguous. +# CONNECT has no such separator. Borrowing a registered resource has no create params to be confused +# with, so a list there is the connection's; provisioning does, and the transformer rejects the second +# list rather than let position decide. +AttachToExternalResource <- 'ATTACH' 'TO' ExternalResourceSource AttachAlias AttachOptions? +ConnectToExternalResource <- 'CONNECT' 'TO' ExternalResourceSource AttachOptions? +ExternalResourceSource <- ExternalResourceCreateClause / ExternalResourceReferenceClause +ExternalResourceCreateClause <- 'NEW' 'TEMPORARY' ExternalResourceKeyword StringLiteral ExternalResourceCreationOptions? +ExternalResourceReferenceClause <- ExternalResourceKeyword ColId diff --git a/internal/grammar/duckdb/statements/insert.gram b/internal/grammar/duckdb/statements/insert.gram index 3e1ffa8..9a4ec18 100644 --- a/internal/grammar/duckdb/statements/insert.gram +++ b/internal/grammar/duckdb/statements/insert.gram @@ -1,4 +1,4 @@ -InsertStatement <- WithClause? 'INSERT' OrAction? 'INTO' InsertTarget ByNameOrPosition? InsertColumnList? InsertValues OnConflictClause? ReturningClause? +InsertStatement <- WithClause? 'INSERT' OrAction? 'INTO' InsertTarget ByNameOrPosition? InsertColumnList? OverridingClause? InsertValues OnConflictClause? ReturningClause? OrAction <- InsertOrReplace / InsertOrIgnore InsertOrReplace <- 'OR' 'REPLACE' @@ -8,6 +8,8 @@ InsertByNameOrder <- 'BY' InsertByName InsertByPositionOrder <- 'BY' InsertByPosition InsertByName <- 'NAME' InsertByPosition <- 'POSITION' +OverridingClause <- 'OVERRIDING' OverridingScope 'VALUE' +OverridingScope <- 'USER' / 'SYSTEM' InsertTarget <- BaseTableName InsertAlias? InsertAlias <- 'AS' Identifier @@ -28,7 +30,7 @@ OnConflictIndexTarget <- 'ON' 'CONSTRAINT' ConstraintName OnConflictAction <- OnConflictUpdate / OnConflictNothing -OnConflictUpdate <- 'DO' 'UPDATE' 'SET' UpdateSetClause WhereClause? +OnConflictUpdate <- 'DO' 'UPDATE' 'SET' UpdateSetClauseList WhereClause? OnConflictNothing <- 'DO' 'NOTHING' ReturningClause <- 'RETURNING' TargetList diff --git a/internal/grammar/duckdb/statements/load.gram b/internal/grammar/duckdb/statements/load.gram index 1659edb..b91565e 100644 --- a/internal/grammar/duckdb/statements/load.gram +++ b/internal/grammar/duckdb/statements/load.gram @@ -1,8 +1,15 @@ -LoadStatement <- 'LOAD' ColIdOrString ExtensionAlias? +LoadStatement <- 'LOAD' ColIdOrString FromSource? ExtensionAlias? ExtensionAlias <- 'AS' Identifier -InstallStatement <- 'FORCE'? 'INSTALL' IdentifierOrStringLiteral FromSource? VersionNumber? +InstallStatement <- 'FORCE'? 'INSTALL' InstallAndLoad? IdentifierOrStringLiteral FromSource? VersionNumber? +InstallAndLoad <- 'AND' 'LOAD' UpdateExtensionsStatement <- 'UPDATE' 'EXTENSIONS' Parens(List(Identifier))? FromSource <- FromSourceIdentifier / FromSourceString FromSourceIdentifier <- 'FROM' Identifier FromSourceString <- 'FROM' StringLiteral -VersionNumber <- 'VERSION' IdentifierOrStringLiteral \ No newline at end of file +VersionNumber <- 'VERSION' IdentifierOrStringLiteral + +ExtensionRepositoryStatement <- CreateExtensionRepositoryStmt / DropExtensionRepositoryStmt +CreateExtensionRepositoryStmt <- 'CREATE' OrReplace? 'EXTENSION' 'REPOSITORY' IfNotExists? ColIdOrString RepositoryPrefix RepositoryPublicKey? +RepositoryPrefix <- 'WITH'? 'PREFIX' StringLiteral +RepositoryPublicKey <- 'USING'? 'PUBLIC' ('KEYS' / 'KEY') List(StringLiteral) +DropExtensionRepositoryStmt <- 'DROP' 'EXTENSION' 'REPOSITORY' IfExists? ColIdOrString diff --git a/internal/grammar/duckdb/statements/merge_into.gram b/internal/grammar/duckdb/statements/merge_into.gram index a1ceb3c..d4448d5 100644 --- a/internal/grammar/duckdb/statements/merge_into.gram +++ b/internal/grammar/duckdb/statements/merge_into.gram @@ -16,7 +16,7 @@ InsertValuesList <- InsertColumnList? 'VALUES' Parens(List(Expression)) DoNothingMatchClause <- 'DO' 'NOTHING' ErrorMatchClause <- 'ERROR' Expression? UpdateMatchSetClause <- 'SET' UpdateMatchSetInfo -UpdateMatchSetInfo <- UpdateSetClause / StarSymbol +UpdateMatchSetInfo <- UpdateSetClauseList / StarSymbol AndExpression <- 'AND' Expression NotMatchedClause <- 'WHEN' 'NOT' 'MATCHED' BySourceOrTarget? AndExpression? 'THEN' MatchedClauseAction BySourceOrTarget <- BySource / ByTarget diff --git a/internal/grammar/duckdb/statements/pivot.gram b/internal/grammar/duckdb/statements/pivot.gram index 6f2841f..fd14568 100644 --- a/internal/grammar/duckdb/statements/pivot.gram +++ b/internal/grammar/duckdb/statements/pivot.gram @@ -12,10 +12,14 @@ UnpivotKeyword <- 'UNPIVOT' / 'PIVOT_LONGER' UnpivotStatement <- UnpivotKeyword TableRef 'ON' TargetList IntoNameValues? -IntoNameValues <- 'INTO' 'NAME' ColIdOrString ValueOrValues List(Identifier) +IntoNameValues <- 'INTO' 'NAME' ColIdOrString ValueOrValues OptionalParensNameList ValueOrValues <- 'VALUE' / 'VALUES' +OptionalParensNameList <- ParenthesizedNameList / BareNameList +ParenthesizedNameList <- Parens(List(ColIdOrString)) +BareNameList <- List(ColIdOrString) + IncludeOrExcludeNulls <- IncludeNulls / ExcludeNulls IncludeNulls <- 'INCLUDE' 'NULLS' ExcludeNulls <- 'EXCLUDE' 'NULLS' diff --git a/internal/grammar/duckdb/statements/prepare.gram b/internal/grammar/duckdb/statements/prepare.gram index 269b69f..ccf8f9d 100644 --- a/internal/grammar/duckdb/statements/prepare.gram +++ b/internal/grammar/duckdb/statements/prepare.gram @@ -1,3 +1,3 @@ -PrepareStatement <- 'PREPARE' Identifier TypeList? 'AS' Statement +PrepareStatement <- 'PREPARE' ColIdOrString TypeList? 'AS' Statement TypeList <- Parens(List(Type)) diff --git a/internal/grammar/duckdb/statements/select.gram b/internal/grammar/duckdb/statements/select.gram index 11b7b33..ce19e3f 100644 --- a/internal/grammar/duckdb/statements/select.gram +++ b/internal/grammar/duckdb/statements/select.gram @@ -17,20 +17,21 @@ ByName <- 'BY' 'NAME' SelectStatementType <- OptionalParensSimpleSelect / ValuesClause / DescribeStatement / TableStatement / PivotStatement / UnpivotStatement ResultModifiers <- OrderByClause? LimitOffset? -LimitOffset <- LimitOffsetClause / OffsetFetchClause / OffsetLimitClause / FetchOnlyClause +LimitOffset <- LimitOffsetClause / OffsetFetchClause / OffsetLimitClause / FetchOffsetClause / FetchOnlyClause LimitOffsetClause <- LimitClause OffsetClause? OffsetLimitClause <- OffsetClause LimitClause? OffsetFetchClause <- OffsetClause FetchClause +FetchOffsetClause <- FetchClause OffsetClause FetchOnlyClause <- FetchClause TableStatement <- 'TABLE' BaseTableName OptionalParensSimpleSelect <- SimpleSelectParens / SimpleSelect SimpleSelectParens <- Parens(SimpleSelect) -SimpleSelect <- SelectFrom WhereClause? GroupByClause? HavingClause? WindowClause? QualifyClause? SampleClause? +SimpleSelect <- SelectFrom WhereClause? GroupByClause? HavingClause? WindowClause? QualifyClause? SelectSampleClause? SelectFrom <- SelectFromClause / FromSelectClause SelectFromClause <- SelectClause FromClause? FromSelectClause <- FromClause SelectClause? -WithStatement <- ColIdOrString InsertColumnList? UsingKey? 'AS' Materialized? CTEBody +WithStatement <- ColIdOrString ColumnAliases? UsingKey? 'AS' Materialized? CTEBody CTEBody <- CTESelectBody / CTEDMLBody CTESelectBody <- Parens(SelectStatementInternal) CTEDMLBody <- Parens(Statement) @@ -50,17 +51,17 @@ DistinctOnTargets <- 'ON' Parens(List(Expression)) InnerTableRef <- ValuesRef / TableFunction / TableSubquery / BaseTableRef / ParensTableRef TableRef <- InnerTableRef JoinOrPivot* -TableSubquery <- Lateral? SubqueryReference TableAlias? +TableSubquery <- TableAliasColon? Lateral? SubqueryReference TableAlias? SampleClause? BaseTableRef <- TableAliasColon? BaseTableName TableAlias? AtClause? SampleClause? TableAliasColon <- ColIdOrString ':' -ValuesRef <- ValuesClause TableAlias? +ValuesRef <- TableAliasColon? ValuesClause TableAlias? SampleClause? ParensTableRef <- TableAliasColon? Parens(TableRef) TableAlias? SampleClause? JoinOrPivot <- JoinClause / TablePivotClause / TableUnpivotClause TablePivotClause <- 'PIVOT' Parens(TablePivotClauseBody) TableAlias? TablePivotClauseBody <- TargetList 'FOR' PivotValueList+ PivotGroupByList? -PivotGroupByList <- 'GROUP' 'BY' List(ColIdOrString) +PivotGroupByList <- 'GROUP' 'BY' OptionalParensNameList TableUnpivotClause <- 'UNPIVOT' IncludeOrExcludeNulls? Parens(TableUnpivotClauseBody) TableAlias? TableUnpivotClauseBody <- UnpivotHeader 'FOR' UnpivotValueList+ @@ -75,19 +76,20 @@ UnpivotTargetList <- Parens(TargetList) Lateral <- 'LATERAL' -BaseTableName <- CatalogReservedSchemaTable / SchemaReservedTable / UnqualifiedBaseTableName +BaseTableName <- QualifiedTableName / UnqualifiedBaseTableName UnqualifiedBaseTableName <- TableName +QualifiedTableName <- CatalogReservedSchemaTable / SchemaReservedTable SchemaReservedTable <- SchemaQualification ReservedTableName -CatalogReservedSchemaTable <- CatalogQualification ReservedSchemaQualification ReservedTableName +CatalogReservedSchemaTable <- CatalogQualification ReservedSchemaQualification+ ReservedTableName TableFunction <- TableFunctionLateralOpt / TableFunctionAliasColon -TableFunctionLateralOpt <- Lateral? QualifiedTableFunction TableFunctionArguments WithOrdinality? TableAlias? +TableFunctionLateralOpt <- Lateral? QualifiedTableFunction TableFunctionArguments WithOrdinality? TableAlias? SampleClause? TableFunctionAliasColon <- TableAliasColon QualifiedTableFunction TableFunctionArguments WithOrdinality? SampleClause? WithOrdinality <- 'WITH' 'ORDINALITY' -QualifiedTableFunction <- CatalogQualification? SchemaQualification? TableFunctionName +QualifiedTableFunction <- CatalogQualification? SchemaQualification* TableFunctionName TableFunctionArguments <- Parens(List(FunctionArgument)?) FunctionArgument <- NamedFunctionArgument / PositionalFunctionArgument -NamedFunctionArgument <- NamedParameter +NamedFunctionArgument <- TypeFuncName NamedParameterAssignment Expression PositionalFunctionArgument <- Expression NamedParameter <- TypeFuncName Type? NamedParameterAssignment Expression NamedParameterAssignment <- ':=' / '=>' @@ -127,7 +129,8 @@ Asof <- 'ASOF' JoinWithoutOnClause <- JoinPrefix 'JOIN' InnerTableRef JoinQualifier <- OnClause / UsingClause OnClause <- 'ON' Expression -UsingClause <- 'USING' Parens(List(ColumnName)) +UsingClause <- 'USING' Parens(List(UsingColumnName)) +UsingColumnName <- ColumnName / StringLiteralIdentifier JoinType <- FullJoin / LeftJoin / RightJoin / SemiJoin / AntiJoin / InnerJoin JoinPrefix <- CrossJoinPrefix / NaturalJoinPrefix / PositionalJoinPrefix @@ -146,7 +149,8 @@ WhereClause <- 'WHERE' Expression GroupByClause <- 'GROUP' 'BY' GroupByExpressions HavingClause <- 'HAVING' Expression QualifyClause <- 'QUALIFY' Expression -SampleClause <- (TableSample / UsingSample) SampleEntry +SampleClause <- TableSample SampleEntry +SelectSampleClause <- UsingSample SampleEntry UsingSample <- 'USING' 'SAMPLE' TableSample <- 'TABLESAMPLE' WindowClause <- 'WINDOW' List(WindowDefinition) @@ -201,14 +205,16 @@ LimitValue <- LimitAll / LimitLiteralPercent / LimitExpression LimitAll <- 'ALL' LimitLiteralPercent <- NumberLiteral 'PERCENT' LimitExpression <- Expression '%'? -FetchClause <- 'FETCH' FirstOrNext FetchValue RowOrRows 'ONLY' +FetchClause <- FetchClauseWithoutValue / FetchClauseWithValue +FetchClauseWithoutValue <- 'FETCH' FirstOrNext RowOrRows 'ONLY' +FetchClauseWithValue <- 'FETCH' FirstOrNext FetchValue RowOrRows 'ONLY' FirstOrNext <- 'FIRST' / 'NEXT' FetchValue <- Expression AliasedExpression <- ColIdExpression / ExpressionAsCollabel / ExpressionOptIdentifier ColIdExpression <- ColId ':' Expression ExpressionAsCollabel <- Expression 'AS' ColLabelOrString -ExpressionOptIdentifier <- Expression Identifier? +ExpressionOptIdentifier <- Expression BareColLabel? ValuesClause <- 'VALUES' List(ValuesExpressions) ValuesExpressions <- Parens(List(Expression)) diff --git a/internal/grammar/duckdb/statements/update.gram b/internal/grammar/duckdb/statements/update.gram index 70a734b..e942a32 100644 --- a/internal/grammar/duckdb/statements/update.gram +++ b/internal/grammar/duckdb/statements/update.gram @@ -1,11 +1,11 @@ -UpdateStatement <- WithClause? 'UPDATE' UpdateTarget UpdateSetClause FromClause? WhereClause? ReturningClause? +UpdateStatement <- WithClause? 'UPDATE' UpdateTarget UpdateSetClauseList FromClause? WhereClause? ReturningClause? UpdateTarget <- BaseTableSet / BaseTableAliasSet BaseTableSet <- BaseTableName 'SET' BaseTableAliasSet <- BaseTableName UpdateAlias? 'SET' UpdateAlias <- 'AS'? ColId -UpdateSetClause <- UpdateSetElementList / UpdateSetTuple +UpdateSetClauseList <- List(UpdateSetClause) +UpdateSetClause <- UpdateSetElement / UpdateSetTuple UpdateSetTuple <- Parens(List(ColumnName)) '=' Expression -UpdateSetElementList <- List(UpdateSetElement) UpdateSetElement <- UpdateSetColumnTarget '=' Expression UpdateSetColumnTarget <- ColumnName DotIdentifier* diff --git a/internal/grammar/duckdb/statements/use.gram b/internal/grammar/duckdb/statements/use.gram index 4336370..cc36578 100644 --- a/internal/grammar/duckdb/statements/use.gram +++ b/internal/grammar/duckdb/statements/use.gram @@ -1,7 +1,7 @@ UseStatement <- 'USE' UseTarget UseTarget <- UseTargetCatalogSchema / SchemaNameAsUseTarget / CatalogNameAsUseTarget -SchemaNameAsUseTarget <- SchemaName -CatalogNameAsUseTarget <- CatalogName +SchemaNameAsUseTarget <- SchemaName / StringLiteral +CatalogNameAsUseTarget <- CatalogName / StringLiteral UseTargetCatalogSchema <- CatalogName '.' ReservedSchemaName DotIdentifier* DotIdentifier <- '.' Identifier diff --git a/internal/grammar/duckdb/statements/vacuum.gram b/internal/grammar/duckdb/statements/vacuum.gram index b2b532e..a431d8b 100644 --- a/internal/grammar/duckdb/statements/vacuum.gram +++ b/internal/grammar/duckdb/statements/vacuum.gram @@ -10,4 +10,4 @@ OptFull <- 'FULL' OptFreeze <- 'FREEZE' OptVerbose <- 'VERBOSE' -NameList <- Parens(List(ColId)) +NameList <- Parens(List(ColIdOrString)) diff --git a/internal/grammar/embed.go b/internal/grammar/embed.go index e2a7652..d9bb59d 100644 --- a/internal/grammar/embed.go +++ b/internal/grammar/embed.go @@ -24,10 +24,11 @@ type KeywordList struct { RuleName string } -// KeywordLists enumerates the five vendored keyword lists in the order the +// KeywordLists enumerates the six vendored keyword lists in the order the // assembly step visits them (sorted by file name, as upstream does). func KeywordLists() []KeywordList { return []KeywordList{ + {File: "bare_label_keyword.list", RuleName: "BareLabelKeyword"}, {File: "column_name_keyword.list", RuleName: "ColumnNameKeyword"}, {File: "func_name_keyword.list", RuleName: "FuncNameKeyword"}, {File: "reserved_keyword.list", RuleName: "ReservedKeyword"}, @@ -140,12 +141,9 @@ func Load() (*Grammar, error) { loadErr = fmt.Errorf("parsing embedded grammar: %w", err) return } - // Upstream's ParsedGrammar::CreateDefault adds an empty EndOfInput - // rule when the grammar text does not define one; the matcher - // satisfies it with a rule override. - if g.Rule("EndOfInput") == nil { - g.addRule(&Rule{Name: "EndOfInput"}) - } + // EndOfInput is not a grammar rule: the matcher satisfies the + // references with a rule override (upstream's CompiledGrammar + // CheckReference exempts it) loaded = g }) return loaded, loadErr diff --git a/internal/grammar/expression.go b/internal/grammar/expression.go new file mode 100644 index 0000000..6d0135d --- /dev/null +++ b/internal/grammar/expression.go @@ -0,0 +1,221 @@ +package grammar + +import ( + "fmt" + "strings" +) + +// ExprType classifies a node of a rule's expression tree. Port of duckdb +// PEGExpression::Type (peg_parser.hpp). +type ExprType int + +const ( + // ExprLiteral is a quoted keyword or punctuation literal. + ExprLiteral ExprType = iota + // ExprReference is a reference to a parameter or another rule. + ExprReference + // ExprFunctionCall is a parameterized-rule call; its single child is + // the argument. + ExprFunctionCall + // ExprSequence is an ordered sequence of its children. + ExprSequence + // ExprChoice is an ordered choice ('/') between its children. + ExprChoice + // ExprOptional is child?. + ExprOptional + // ExprRepeat is child+ (one or more). + ExprRepeat + // ExprOptionalRepeat is child* (zero or more). + ExprOptionalRepeat + // ExprRegex is a character class; the matcher factory rejects it. + ExprRegex +) + +// Expression is one node of a rule's expression tree. Port of duckdb +// PEGExpression. +type Expression struct { + Type ExprType + // Text is the literal text, reference name or function name. + Text string + // Children holds the operands of sequences, choices, the postfix + // operators and function calls. + Children []*Expression +} + +// String renders the expression in grammar syntax, parenthesizing every +// nested sequence and choice so the tree structure is explicit. +func (e *Expression) String() string { + var sb strings.Builder + e.write(&sb, true) + return sb.String() +} + +func (e *Expression) write(sb *strings.Builder, top bool) { + join := func(sep string) { + if !top { + sb.WriteString("(") + } + for i, child := range e.Children { + if i > 0 { + sb.WriteString(sep) + } + child.write(sb, false) + } + if !top { + sb.WriteString(")") + } + } + switch e.Type { + case ExprLiteral: + sb.WriteString("'" + e.Text + "'") + case ExprReference, ExprRegex: + sb.WriteString(e.Text) + case ExprFunctionCall: + sb.WriteString(e.Text + "(") + e.Children[0].write(sb, true) + sb.WriteString(")") + case ExprSequence: + join(" ") + case ExprChoice: + join(" / ") + case ExprOptional, ExprRepeat, ExprOptionalRepeat: + e.Children[0].write(sb, false) + sb.WriteString(map[ExprType]string{ExprOptional: "?", ExprRepeat: "+", ExprOptionalRepeat: "*"}[e.Type]) + } +} + +// buildExpression parses a rule's token stream into its expression tree. +// Port of PEGExpressionParser (peg_parser.cpp), a recursive-descent parser +// with textbook PEG precedence: postfix operators bind tighter than +// sequencing, which binds tighter than '/'. Negative lookahead ('!') is +// parsed but ignored - the operand is matched as if the '!' were absent, +// an acknowledged upstream FIXME replicated here; flip it in lockstep +// with upstream, never independently. +func buildExpression(tokens []Token) (*Expression, error) { + p := &exprParser{tokens: tokens} + root, err := p.parseChoice() + if err != nil { + return nil, err + } + if p.pos != len(p.tokens) { + return nil, fmt.Errorf("unexpected trailing tokens in PEG rule") + } + return root, nil +} + +type exprParser struct { + tokens []Token + pos int +} + +func (p *exprParser) isOp(op byte) bool { + return p.pos < len(p.tokens) && p.tokens[p.pos].Type == Operator && p.tokens[p.pos].Text[0] == op +} + +// parseChoice: choice := sequence ('/' sequence)* +func (p *exprParser) parseChoice() (*Expression, error) { + first, err := p.parseSequence() + if err != nil { + return nil, err + } + if !p.isOp('/') { + return first, nil + } + choice := &Expression{Type: ExprChoice, Children: []*Expression{first}} + for p.isOp('/') { + p.pos++ + next, err := p.parseSequence() + if err != nil { + return nil, err + } + choice.Children = append(choice.Children, next) + } + return choice, nil +} + +// parseSequence: sequence := postfix* +func (p *exprParser) parseSequence() (*Expression, error) { + seq := &Expression{Type: ExprSequence} + for p.pos < len(p.tokens) && !p.isOp('/') && !p.isOp(')') { + child, err := p.parsePostfix() + if err != nil { + return nil, err + } + seq.Children = append(seq.Children, child) + } + if len(seq.Children) == 1 { + // collapse trivial sequences + return seq.Children[0], nil + } + return seq, nil +} + +// parsePostfix: postfix := primary ('?' | '*' | '+')? +func (p *exprParser) parsePostfix() (*Expression, error) { + node, err := p.parsePrimary() + if err != nil { + return nil, err + } + for _, op := range []struct { + char byte + typ ExprType + }{{'?', ExprOptional}, {'*', ExprOptionalRepeat}, {'+', ExprRepeat}} { + if p.isOp(op.char) { + p.pos++ + return &Expression{Type: op.typ, Children: []*Expression{node}}, nil + } + } + return node, nil +} + +// parsePrimary: primary := '(' choice ')' | literal | reference | function_call +func (p *exprParser) parsePrimary() (*Expression, error) { + if p.isOp('(') { + p.pos++ + inner, err := p.parseChoice() + if err != nil { + return nil, err + } + if !p.isOp(')') { + return nil, fmt.Errorf("expected closing ')' in PEG rule") + } + p.pos++ + // a parenthesized group is always a sequence, so it compiles to a + // list matcher of its own + if inner.Type == ExprSequence { + return inner, nil + } + return &Expression{Type: ExprSequence, Children: []*Expression{inner}}, nil + } + if p.isOp('!') { + // FIXME (upstream): NOT ignored when parsing + p.pos++ + return p.parsePrimary() + } + if p.pos >= len(p.tokens) { + return nil, fmt.Errorf("unexpected end of PEG rule tokens") + } + tok := p.tokens[p.pos] + p.pos++ + switch tok.Type { + case Literal: + return &Expression{Type: ExprLiteral, Text: tok.Text}, nil + case Reference: + return &Expression{Type: ExprReference, Text: tok.Text}, nil + case FunctionCall: + // same "consume until close" as '(' does + body, err := p.parseChoice() + if err != nil { + return nil, err + } + if !p.isOp(')') { + return nil, fmt.Errorf("expected closing ')' after function call '%s'", tok.Text) + } + p.pos++ + return &Expression{Type: ExprFunctionCall, Text: tok.Text, Children: []*Expression{body}}, nil + case Regex: + return &Expression{Type: ExprRegex, Text: tok.Text}, nil + default: + return nil, fmt.Errorf("unrecognized peg token type") + } +} diff --git a/internal/grammar/grammar_test.go b/internal/grammar/grammar_test.go index e55d66b..0b7bf92 100644 --- a/internal/grammar/grammar_test.go +++ b/internal/grammar/grammar_test.go @@ -11,11 +11,15 @@ func TestLoadVendoredGrammar(t *testing.T) { if err != nil { t.Fatalf("Load: %v", err) } - for _, name := range []string{"Program", "TopLevelStatement", "Statement", "Expression", "List", "Parens", "EndOfInput", "%whitespace"} { + for _, name := range []string{"Program", "TopLevelStatement", "Statement", "Expression", "List", "Parens", "%whitespace"} { if g.Rule(name) == nil { t.Errorf("rule %q missing", name) } } + // EndOfInput is satisfied by a matcher rule override, not a rule + if g.Rule("EndOfInput") != nil { + t.Error("EndOfInput is a grammar rule") + } // the keyword lists become ordered-choice rules during assembly for _, list := range KeywordLists() { rule := g.Rule(list.RuleName) @@ -40,8 +44,9 @@ func TestLoadVendoredGrammar(t *testing.T) { } // Every rule reference must resolve to a defined rule. EndOfInput is -// satisfied by a rule override; %whitespace is character-level and never -// referenced (the tokenizer handles whitespace). +// satisfied by a rule override (upstream's CheckReference exempts it); +// %whitespace is character-level and never referenced (the tokenizer +// handles whitespace). func TestAllReferencesDefined(t *testing.T) { g, err := Load() if err != nil { @@ -56,6 +61,9 @@ func TestAllReferencesDefined(t *testing.T) { if _, isParam := rule.Parameters[tok.Text]; isParam { continue } + if strings.EqualFold(tok.Text, "EndOfInput") { + continue + } if g.Rule(tok.Text) == nil { t.Errorf("rule %q references undefined rule %q", name, tok.Text) } @@ -194,8 +202,8 @@ func TestParseErrors(t *testing.T) { {"R <- 'A'i\n", "unexpected \"i\""}, {"<- 'A'\n", "expected an alpha-numeric rule name"}, {"R\n", "does not have a definition"}, - // a stray ')' errors at grammar-parse time; an unbalanced '(' is - // only caught later, when the matcher factory compiles the rule + // a stray ')' errors in the character scanner; an unbalanced '(' + // in the expression parser (TestExpressionErrors) {"R <- 'A')\n", "unclosed bracket"}, } { _, err := Parse(tc.text) @@ -217,3 +225,62 @@ func TestParseSingleRule(t *testing.T) { t.Error("two rules accepted by ParseSingleRule") } } + +// The expression parser applies textbook PEG precedence (postfix > +// sequence > choice); String parenthesizes every nested sequence and +// choice. +func TestExpressionTree(t *testing.T) { + for _, tc := range []struct { + body string + want string + }{ + {"'A'", "'A'"}, + {"'A' B", "'A' B"}, + // '/' separates whole sequences + {"A B / C D", "(A B) / (C D)"}, + {"A / B / C", "A / B / C"}, + // postfix operators bind their primary only + {"A B*", "A B*"}, + {"A / B?", "A / B?"}, + {"(A B)+ C", "(A B)+ C"}, + // a parenthesized group is always a sequence, even of one element + {"A (B)", "A (B)"}, + {"A (B / C)", "A ((B / C))"}, + // a top-level group is the rule's sequence itself + {"(A B)", "A B"}, + {"(A)", "A"}, + {"List(A B / C)", "List((A B) / C)"}, + {"Parens(List(A))", "Parens(List(A))"}, + // negative lookahead is parsed but ignored + {"!A B", "A B"}, + // an empty alternative is an empty sequence + {"A / ", "A / ()"}, + } { + g, err := Parse("R <- " + tc.body + "\n") + if err != nil { + t.Errorf("Parse(%q): %v", tc.body, err) + continue + } + if got := g.Rule("R").Expression.String(); got != tc.want { + t.Errorf("Parse(%q) = %s, want %s", tc.body, got, tc.want) + } + } +} + +func TestExpressionErrors(t *testing.T) { + for _, tc := range []struct { + text string + want string + }{ + // an unbalanced '(' runs the rule to the end of the grammar + {"R <- ('A'\n", "expected closing ')'"}, + {"R <- List('A'\n", "expected closing ')' after function call 'List'"}, + {"R <- ? 'A'\n", "unrecognized peg token type"}, + {"R <- 'A' !\n", "unexpected end of PEG rule tokens"}, + } { + _, err := Parse(tc.text) + if err == nil || !strings.Contains(err.Error(), tc.want) { + t.Errorf("Parse(%q) err = %v, want containing %q", tc.text, err, tc.want) + } + } +} diff --git a/internal/grammar/parser.go b/internal/grammar/parser.go index 2f21144..6fcad7b 100644 --- a/internal/grammar/parser.go +++ b/internal/grammar/parser.go @@ -29,14 +29,18 @@ type Token struct { } // Rule is a parsed grammar rule: a name, optional parameters (for macros -// such as List(D)), and the flat token stream of its definition. Port of +// such as List(D)), and its definition as an expression tree. Port of // duckdb PEGRule. type Rule struct { Name string // Parameters maps parameter name to position. Upstream supports at most // one parameter per rule; the matcher factory enforces that. Parameters map[string]int - Tokens []Token + // Tokens is the flat token stream of the definition, the input of the + // expression parser (upstream discards it once the tree is built). + Tokens []Token + // Expression is the definition's expression tree. + Expression *Expression } // Grammar is an immutable set of parsed rules, keyed case-insensitively by @@ -70,8 +74,8 @@ func (g *Grammar) addRule(rule *Rule) error { // Parse parses PEG grammar text into rules. It is a direct port of duckdb // PEGParser::ParseRules (peg_parser.cpp): a small state machine over the // characters of the grammar text that produces, per rule, a flat token -// stream. Structure (grouping, choice, repetition) is interpreted later by -// the matcher factory, exactly as upstream does. +// stream, which the expression parser (expression.go) then turns into the +// rule's expression tree. func Parse(text string) (*Grammar, error) { p := &pegParser{grammar: &Grammar{rules: make(map[string]*Rule)}} if err := p.parseRules(text); err != nil { @@ -146,8 +150,7 @@ func (p *pegParser) parseRules(grammar string) error { if state == stateRuleDefinition && isNewline(grammar[c]) && bracketCount == 0 && !inOrClause && len(rule.Tokens) > 0 { // a newline while parsing a rule definition completes the rule - rule.Name = ruleName - if err := p.grammar.addRule(rule); err != nil { + if err := p.completeRule(ruleName, rule); err != nil { return err } rule = &Rule{} @@ -291,10 +294,22 @@ func (p *pegParser) parseRules(grammar string) error { if len(rule.Tokens) == 0 { return fmt.Errorf("failed to parse grammar - rule %s is empty", ruleName) } - rule.Name = ruleName - if err := p.grammar.addRule(rule); err != nil { + if err := p.completeRule(ruleName, rule); err != nil { return err } } return nil } + +// completeRule builds the expression tree of a finished rule and adds it +// to the grammar (upstream: PEGRule(parameters, BuildExpression(tokens)) +// followed by PEGParser::AddRule). +func (p *pegParser) completeRule(name string, rule *Rule) error { + rule.Name = name + expr, err := buildExpression(rule.Tokens) + if err != nil { + return err + } + rule.Expression = expr + return p.grammar.addRule(rule) +} diff --git a/internal/grammar/upstream_test.go b/internal/grammar/upstream_test.go new file mode 100644 index 0000000..ea665a3 --- /dev/null +++ b/internal/grammar/upstream_test.go @@ -0,0 +1,73 @@ +package grammar + +import ( + "os" + "path/filepath" + "regexp" + "strconv" + "strings" + "testing" +) + +// EnvDuckDBSource names a DuckDB checkout at the pinned commit. When set, +// TestAssembledTextMatchesUpstream compares AssembledText with the +// grammar upstream actually compiles. +const EnvDuckDBSource = "DARKWING_DUCKDB_SRC" + +// AssembledText must reproduce upstream's inline_grammar.py output, the +// INLINED_PEG_GRAMMAR byte array of inlined_grammar.hpp that +// ParsedGrammar::CreateDefault parses. The comparison ignores blank lines +// and case: rule names and literals are both matched case-insensitively, +// and darkwing lowercases the keyword lists on load. Opt-in, since the +// header is not vendored. +func TestAssembledTextMatchesUpstream(t *testing.T) { + src := os.Getenv(EnvDuckDBSource) + if src == "" { + t.Skipf("%s not set", EnvDuckDBSource) + } + header, err := os.ReadFile(filepath.Join(src, "src/include/duckdb/parser/peg/inlined_grammar.hpp")) + if err != nil { + t.Fatal(err) + } + text := string(header) + start := strings.Index(text, "INLINED_PEG_GRAMMAR[] = {") + end := strings.Index(text, "};") + if start < 0 || end < start { + t.Fatal("INLINED_PEG_GRAMMAR array not found") + } + var upstream []byte + for _, digits := range regexp.MustCompile(`\d+`).FindAllString(text[start+len("INLINED_PEG_GRAMMAR[] = {"):end], -1) { + b, err := strconv.Atoi(digits) + if err != nil || b > 255 { + t.Fatalf("bad byte %q", digits) + } + if b != 0 { + upstream = append(upstream, byte(b)) + } + } + assembled, err := AssembledText() + if err != nil { + t.Fatal(err) + } + normalize := func(s string) []string { + var lines []string + for _, line := range strings.Split(s, "\n") { + if strings.TrimSpace(line) != "" { + lines = append(lines, strings.ToLower(line)) + } + } + return lines + } + want, got := normalize(string(upstream)), normalize(assembled) + if len(want) < 100 { + t.Fatalf("upstream grammar has only %d lines", len(want)) + } + for i := 0; i < len(want) && i < len(got); i++ { + if want[i] != got[i] { + t.Fatalf("line %d differs:\nupstream: %s\nassembled: %s", i+1, want[i], got[i]) + } + } + if len(want) != len(got) { + t.Fatalf("assembled grammar has %d non-blank lines, upstream %d", len(got), len(want)) + } +} diff --git a/internal/matcher/factory.go b/internal/matcher/factory.go index b9e0416..3618daa 100644 --- a/internal/matcher/factory.go +++ b/internal/matcher/factory.go @@ -8,11 +8,10 @@ import ( ) // factory compiles grammar rules into a matcher tree. Port of -// MatcherFactory (matcher_factory.cpp): the flat token stream of each rule -// is interpreted with a stack of open lists; `/` `?` `*` `+` rewrite the -// most recent element, replicating upstream's (deliberately ported) -// binding quirks — `/` binds only the immediately preceding element, which -// is why upstream grammars parenthesize multi-token alternatives. +// MatcherFactory (matcher_factory.cpp): each rule's expression tree +// (grammar.Expression) maps one-to-one onto list, choice, optional and +// repeat matchers, with references resolved to the cached rule matchers +// and the rule overrides. type factory struct { grammar *grammar.Grammar // matchers caches rule matchers by rule name and holds the rule @@ -98,83 +97,10 @@ func (f *factory) addRuleOverride(name string, m matcher) { f.matchers[name] = m } -// stack entry for interpreting one rule's token stream. Port of -// MatcherFactory::MatcherList. -type stackEntry struct { - m matcher - functionName string - isFunction bool -} - -type matcherStack struct { - f *factory - entries []stackEntry -} - -func (ms *matcherStack) addRoot(m matcher) { - ms.entries = append(ms.entries, stackEntry{m: m}) -} - -func (ms *matcherStack) beginFunction(name string) { - ms.entries = append(ms.entries, stackEntry{m: ms.f.newList(), functionName: name, isFunction: true}) -} - -func (ms *matcherStack) addMatcher(m matcher) error { - root := ms.entries[len(ms.entries)-1].m - switch root := root.(type) { - case *listMatcher: - root.children = append(root.children, m) - case *choiceMatcher: - // for a choice matcher we pop the choice from the stack after - // adding the alternative - if len(ms.entries) <= 1 { - return fmt.Errorf("choice matcher should never be the root in the matcher stack") - } - root.children = append(root.children, m) - ms.entries = ms.entries[:len(ms.entries)-1] - default: - return fmt.Errorf("cannot add matcher to root matcher of this type") - } - return nil -} - -func (ms *matcherStack) closeBracket() error { - if len(ms.entries) <= 1 { - return fmt.Errorf("PEG matcher create error - found too many close brackets") - } - top := ms.entries[len(ms.entries)-1] - if !top.isFunction { - ms.entries = ms.entries[:len(ms.entries)-1] - return ms.addMatcher(top.m) - } - // function matcher: substitute the parameterized rule - params := top.m.(*listMatcher) - var param matcher - if len(params.children) == 1 { - param = params.children[0] - } else { - param = ms.f.newListWith(params.children) - } - call, err := ms.f.createMatcher(top.functionName, []matcher{param}) - if err != nil { - return err - } - ms.entries = ms.entries[:len(ms.entries)-1] - return ms.addMatcher(call) -} - -func (ms *matcherStack) lastRootList() (*listMatcher, error) { - root, ok := ms.entries[len(ms.entries)-1].m.(*listMatcher) - if !ok { - return nil, fmt.Errorf("expected a list matcher") - } - return root, nil -} - // createMatcher builds (and caches) the matcher for a rule, recursively // building referenced rules. params carries macro arguments for // parameterized rules (List(D), Parens(D)). Port of -// MatcherFactory::CreateMatcher. +// MatcherFactory::CreateMatcher(rule_name, parameters). func (f *factory) createMatcher(ruleName string, params []matcher) (matcher, error) { isFunctionCall := len(params) > 0 if !isFunctionCall { @@ -187,13 +113,11 @@ func (f *factory) createMatcher(ruleName string, params []matcher) (matcher, err return nil, fmt.Errorf("failed to create matcher for rule %s - rule is missing", ruleName) } // matchers can be recursive: cache before recursively constructing + // (upstream registers every rule's list matcher up front) root := f.newList() if !isFunctionCall { f.matchers[rule.Name] = root } - - stack := &matcherStack{f: f} - stack.addRoot(root) if len(rule.Parameters) > 1 { return nil, fmt.Errorf("only functions with a single parameter are supported") } @@ -201,37 +125,16 @@ func (f *factory) createMatcher(ruleName string, params []matcher) (matcher, err return nil, fmt.Errorf("parameter count mismatch (rule %s expected %d parameters but got %d)", ruleName, len(rule.Parameters), len(params)) } - for _, tok := range rule.Tokens { - var err error - switch tok.Type { - case grammar.Literal: - err = stack.addMatcher(f.keyword(tok.Text)) - case grammar.Reference: - if idx, ok := rule.Parameters[tok.Text]; ok { - // refers to a macro parameter - use it directly - err = stack.addMatcher(params[idx]) - } else { - var child matcher - child, err = f.createMatcher(tok.Text, nil) - if err == nil { - err = stack.addMatcher(child) - } - } - case grammar.FunctionCall: - stack.beginFunction(tok.Text) - case grammar.Operator: - err = f.applyOperator(stack, ruleName, tok.Text[0]) - case grammar.Regex: - err = fmt.Errorf("REGEX operator not supported in PEG grammar (found in rule %s)", ruleName) - default: - err = fmt.Errorf("unrecognized peg token type") - } - if err != nil { - return nil, err - } + body, err := f.createExpression(ruleName, rule.Expression, rule.Parameters, params) + if err != nil { + return nil, err } - if len(stack.entries) != 1 { - return nil, fmt.Errorf("PEG matcher create error - unclosed bracket found in rule %s", ruleName) + // a sequence body becomes the rule's own list; anything else is its + // single element + if rule.Expression.Type == grammar.ExprSequence { + root.children = body.(*listMatcher).children + } else { + root.children = []matcher{body} } root.setRule(rule.Name) @@ -241,93 +144,83 @@ func (f *factory) createMatcher(ruleName string, params []matcher) (matcher, err return root, nil } -func (f *factory) applyOperator(stack *matcherStack, ruleName string, op byte) error { - switch op { - case '?', '*': - // optional/repeat rewrites the most recent element of the current - // list; '*' is Optional(Repeat(child)) - root, err := stack.lastRootList() - if err != nil { - return fmt.Errorf("optional/repeat in rule %s: %w", ruleName, err) - } - if len(root.children) == 0 { - return fmt.Errorf("optional/repeat rule found as first token in rule %s", ruleName) +// createExpression builds the matcher for one expression node. Port of +// MatcherFactory::CreateMatcher(expression, parameter_map, parameters). +func (f *factory) createExpression(ruleName string, expr *grammar.Expression, paramMap map[string]int, params []matcher) (matcher, error) { + switch expr.Type { + case grammar.ExprLiteral: + return f.keyword(expr.Text), nil + case grammar.ExprReference: + if idx, ok := paramMap[expr.Text]; ok { + // refers to a macro parameter - use it directly + return params[idx], nil } - final := root.children[len(root.children)-1] - if op == '*' { - final = f.newRepeat(final) + return f.createMatcher(expr.Text, nil) + case grammar.ExprFunctionCall: + if len(expr.Children) != 1 { + return nil, fmt.Errorf("function call '%s' expected a single argument", expr.Text) } - root.children[len(root.children)-1] = f.newOptional(final) - case '+': - root, err := stack.lastRootList() + param, err := f.createExpression(ruleName, expr.Children[0], paramMap, params) if err != nil { - return fmt.Errorf("repeat in rule %s: %w", ruleName, err) + return nil, err + } + return f.createMatcher(expr.Text, []matcher{param}) + case grammar.ExprSequence, grammar.ExprChoice: + children := make([]matcher, 0, len(expr.Children)) + for _, child := range expr.Children { + m, err := f.createExpression(ruleName, child, paramMap, params) + if err != nil { + return nil, err + } + children = append(children, m) } - if len(root.children) == 0 { - return fmt.Errorf("repeat rule found as first token in rule %s", ruleName) + if expr.Type == grammar.ExprSequence { + return f.newListWith(children), nil } - final := root.children[len(root.children)-1] - root.children[len(root.children)-1] = f.newRepeat(final) - case '/': - // ordered choice between the most recent element and what follows - root, err := stack.lastRootList() - if err != nil { - return fmt.Errorf("OR in rule %s: %w", ruleName, err) + // upstream compiles an all-keyword choice to a LiteralChoiceMatcher + // that dispatches on the token's literal id; it picks the same + // alternative as trying them in order, so the plain choice stands + // in for it + return f.newChoice(children), nil + case grammar.ExprOptional, grammar.ExprRepeat, grammar.ExprOptionalRepeat: + if len(expr.Children) != 1 { + return nil, fmt.Errorf("PEG postfix expression expected a single child") } - if len(root.children) == 0 { - return fmt.Errorf("OR rule found as first token in rule %s", ruleName) + child, err := f.createExpression(ruleName, expr.Children[0], paramMap, params) + if err != nil { + return nil, err } - previous := root.children[len(root.children)-1] - if choice, ok := previous.(*choiceMatcher); ok { - stack.addRoot(choice) - } else { - choice := f.newChoice([]matcher{previous}) - root.children[len(root.children)-1] = choice - stack.addRoot(choice) + switch expr.Type { + case grammar.ExprOptional: + return f.newOptional(child), nil + case grammar.ExprRepeat: + return f.newRepeat(child), nil + default: + // '*' is Optional(Repeat(child)) + return f.newOptional(f.newRepeat(child)), nil } - case '(': - stack.addRoot(f.newList()) - case ')': - return stack.closeBracket() - case '!': - // negative lookahead is parsed but ignored, replicating the pinned - // DuckDB build (an acknowledged upstream TODO). Flip this in - // lockstep with upstream, never independently. + case grammar.ExprRegex: + return nil, fmt.Errorf("REGEX operator not supported in PEG grammar (found in rule %s)", ruleName) default: - return fmt.Errorf("unrecognized peg operator type %q", string(op)) + return nil, fmt.Errorf("unrecognized PEG expression type") } - return nil } //===----------------------------------------------------------------------===// -// Generated tables (transcribed from matcher_factory.cpp) +// Generated tables (transcribed from matcher_factory.cpp and +// compiled_grammar.cpp) //===----------------------------------------------------------------------===// // packratMemoizedRules is upstream's designated hot-rule list // (START/END GENERATED PACKRAT MEMOIZED RULES). var packratMemoizedRules = []string{ "Expression", - "LambdaArrowExpression", - "LogicalOrExpression", - "LogicalAndExpression", - "LogicalNotExpression", - "IsExpression", - "ComparisonExpression", - "BitwiseExpression", - "AdditiveExpression", - "MultiplicativeExpression", - "ExponentiationExpression", - "PrefixExpression", - "CollateExpression", - "AtTimeZoneExpression", - "SingleExpression", - "BaseExpression", - "ParensExpression", - "ParenthesisExpression", + "TableRef", "Identifier", "ColId", - "ColumnReference", - "FunctionExpression", + "CatalogQualification", + "SchemaQualification", + "ReservedSchemaQualification", } // installOverrides transcribes upstream's rule override table @@ -343,6 +236,7 @@ func (f *factory) installOverrides() { f.addRuleOverride("Identifier", ident(classColumnName, false, "VARIABLE")) f.addRuleOverride("ReservedIdentifier", reserved(false, "VARIABLE")) + f.addRuleOverride("BareColLabel", ident(classBareLabel, false, "?VARIABLE?")) f.addRuleOverride("CatalogName", ident(classColumnName, false, "CATALOG_NAME")) f.addRuleOverride("SchemaName", ident(classColumnName, false, "SCHEMA_NAME")) f.addRuleOverride("ReservedSchemaName", reserved(false, "SCHEMA_NAME")) @@ -365,6 +259,7 @@ func (f *factory) installOverrides() { f.addRuleOverride("NumberLiteral", &numberLiteralMatcher{matcherMeta: matcherMeta{name: "NumberLiteral"}}) f.addRuleOverride("StringLiteral", &stringLiteralMatcher{matcherMeta: matcherMeta{name: "StringLiteral"}}) f.addRuleOverride("OperatorLiteral", &operatorMatcher{}) + f.addRuleOverride("AnyOperatorLiteral", &operatorMatcher{allOperators: true}) // EndOfInput has no grammar body; satisfied here, as upstream does // outside the regenerated block @@ -375,12 +270,12 @@ func (f *factory) installOverrides() { // cross-check the override table against the vendored grammar. func OverrideRuleNames() []string { return []string{ - "Identifier", "ReservedIdentifier", "CatalogName", "SchemaName", + "Identifier", "ReservedIdentifier", "BareColLabel", "CatalogName", "SchemaName", "ReservedSchemaName", "TableName", "ReservedTableName", "ColumnName", "ReservedColumnName", "IndexName", "ReservedIndexName", "SequenceName", "FunctionName", "ReservedFunctionName", "ReservedKeyword", "TableFunctionName", "TypeName", "ReservedTypeName", "PragmaName", "SettingName", "CopyOptionName", "NumberLiteral", "StringLiteral", - "OperatorLiteral", "EndOfInput", + "OperatorLiteral", "AnyOperatorLiteral", "EndOfInput", } } diff --git a/internal/matcher/matcher_test.go b/internal/matcher/matcher_test.go index 5bb74ec..937ee40 100644 --- a/internal/matcher/matcher_test.go +++ b/internal/matcher/matcher_test.go @@ -24,15 +24,18 @@ func TestDefaultEngineCompiles(t *testing.T) { } } -// Every rule override must name a rule the vendored grammar defines (or, -// for EndOfInput, the implicit rule the loader adds), so the transcribed -// table cannot drift silently from upstream. +// Every rule override must name a rule the vendored grammar defines +// (except EndOfInput, which has no grammar rule upstream either), so the +// transcribed table cannot drift silently from upstream. func TestOverridesExistInGrammar(t *testing.T) { g, err := grammar.Load() if err != nil { t.Fatal(err) } for _, name := range OverrideRuleNames() { + if name == "EndOfInput" { + continue + } if g.Rule(name) == nil { t.Errorf("override %q has no rule in the vendored grammar", name) } @@ -111,7 +114,7 @@ func TestAcceptStatements(t *testing.T) { "FROM t SELECT x", "FROM t", "SELECT * EXCLUDE (a) REPLACE (b + 1 AS b) FROM t", - "1 + 1", + "SELECT 1 + 1", "SELECT [1, 2, 3]", "SELECT {'a': 1}", "SELECT x -> x + 1", @@ -197,6 +200,8 @@ func TestRejectStatements(t *testing.T) { {"CREATE 1", "1"}, {"SELECT * FROM WHERE", "WHERE"}, {"INSERT INTO", "INTO"}, + // v2.0.0 dropped the bare-expression statement (ExpressionStatement) + {"1 + 1", "1"}, } for _, tc := range rejected { _, err := matchAll(t, engine, tc.sql) @@ -235,9 +240,10 @@ func TestKeywordCategoryMatching(t *testing.T) { } // Negative lookahead (`!`) is parsed but ignored by the matcher, -// replicating the pinned DuckDB build (acknowledged upstream TODO in -// matcher_factory.cpp). "Ignored" means only the `!` operator itself is -// dropped: its operand stays in the sequence as an ordinary CONSUMING +// replicating the pinned DuckDB build (acknowledged upstream FIXME in +// peg_parser.cpp's PEGExpressionParser). "Ignored" means only the `!` +// operator itself is dropped: its operand stays in the sequence as an +// ordinary CONSUMING // element. Textbook PEG would make `!'A' 'A'` unsatisfiable; the pinned // behavior matches two A tokens. Flip this test in lockstep with // upstream, never independently. (The vendored grammar's only bare `!` is @@ -260,10 +266,11 @@ func TestNegativeLookaheadIgnored(t *testing.T) { } } -// The `/` operator binds only the immediately preceding element: upstream -// compiles `A B / C` as A (B / C), which is why the vendored grammars -// parenthesize multi-token alternatives. Pin that quirk. -func TestChoiceBindsLastElement(t *testing.T) { +// The `/` operator separates whole sequences: since v2.0.0 upstream parses +// rules with a precedence-aware expression parser, so `A B / C` is +// (A B) / C. (The pre-v2.0.0 matcher factory bound `/` to the immediately +// preceding element only, compiling it as A (B / C).) +func TestChoiceBindsSequences(t *testing.T) { g, err := grammar.Parse("Root <- 'A' 'B' / 'C'\n") if err != nil { t.Fatal(err) @@ -272,13 +279,36 @@ func TestChoiceBindsLastElement(t *testing.T) { if err != nil { t.Fatal(err) } - // "A C" matches: A then (B / C) - if _, _, err := engine.Match(mustTokens(t, "A C"), 0); err != nil { - t.Errorf("A C should match A (B / C): %v", err) + for _, sql := range []string{"A B", "C"} { + if _, _, err := engine.Match(mustTokens(t, sql), 0); err != nil { + t.Errorf("%s should match (A B) / C: %v", sql, err) + } } - // bare "C" does not: the leading A is required - if _, _, err := engine.Match(mustTokens(t, "C"), 0); err == nil { - t.Error("C alone should not match A (B / C)") + if _, _, err := engine.Match(mustTokens(t, "A C"), 0); err == nil { + t.Error("A C should not match (A B) / C") + } +} + +// Postfix operators bind their primary only, and the rule body of a +// parenthesized sequence is the rule's own list (no extra nesting). +func TestRuleBodyShape(t *testing.T) { + g, err := grammar.Parse("Root <- ('A' 'B')\nOther <- ('A')\n") + if err != nil { + t.Fatal(err) + } + for _, name := range []string{"Root", "Other"} { + engine, err := New(g, name) + if err != nil { + t.Fatal(err) + } + r, _, err := engine.Match(mustTokens(t, "A B"), 0) + if err != nil { + t.Fatal(err) + } + list := r.(*ListResult) + if _, ok := list.Child(0).(*KeywordResult); !ok { + t.Errorf("%s child 0 = %T, want *KeywordResult", name, list.Child(0)) + } } } diff --git a/internal/matcher/result.go b/internal/matcher/result.go index 774943c..7dfddaa 100644 --- a/internal/matcher/result.go +++ b/internal/matcher/result.go @@ -1,8 +1,10 @@ // Package matcher compiles the loaded PEG grammar into a matcher tree and // matches token streams against it, producing a generic parse tree -// (ParseResult). It is a port of DuckDB's matcher_factory.cpp, matcher.cpp, -// parser_packrat.cpp and the matcher/*.hpp headers, minus the autocomplete -// suggestion machinery (out of scope for darkwing). +// (ParseResult). It is a port of DuckDB's matcher_factory.cpp, +// matcher_process.cpp, matcher_stack.cpp, compiled_grammar.cpp (the rule +// override table), parser_packrat.cpp and the matcher/*.hpp headers, minus +// the autocomplete suggestion machinery (out of scope for darkwing) and +// the FIRST-set pruning (matcher_first_set.cpp), a pure optimization. package matcher import ( diff --git a/internal/matcher/special.go b/internal/matcher/special.go index 1b5d966..f2a668b 100644 --- a/internal/matcher/special.go +++ b/internal/matcher/special.go @@ -21,6 +21,10 @@ const ( // classTypeName allows unreserved + type-name keywords (type name // positions). classTypeName + // classBareLabel allows only bare-label keywords (column aliases + // without AS); unlike the other classes, unreserved keywords outside + // the bare-label list are rejected. + classBareLabel ) // identifierMatcher matches identifier tokens with category-aware keyword @@ -40,8 +44,25 @@ type identifierMatcher struct { display string } +// isQuoteDelimiter is IdentifierMatcher::IsQuoteDelimiter. +func isQuoteDelimiter(c byte) bool { + return c == '"' || c == '`' +} + +// isQuoted reports a delimited identifier: "..." or `...`, closed by the +// delimiter it opened with. func isQuoted(text string) bool { - return text[0] == '"' && text[len(text)-1] == '"' + if len(text) < 2 { + return false + } + return isQuoteDelimiter(text[0]) && text[0] == text[len(text)-1] +} + +// unquoteIdentifier strips the delimiters of a quoted identifier and +// un-doubles escaped delimiters (IdentifierMatcher::UnquoteIdentifier). +func unquoteIdentifier(text string) string { + delimiter := text[:1] + return strings.ReplaceAll(text[1:len(text)-1], delimiter+delimiter, delimiter) } func isSingleQuoted(text string) bool { @@ -52,11 +73,11 @@ func isSingleQuoted(text string) bool { // identifier character. func charIsKeywordStart(c byte) bool { switch c { - case '(', ')', '{', '}', '[', ']', ',', '?', '$', '-', '#': + case '(', ')', '{', '}', '[', ']', ',', ':', '?', '$', '#': // single-byte operators return false case '\'', ';', '"', '.': - // control flow ('-' already covered above) + // control flow return false } if c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' { @@ -83,6 +104,10 @@ func (m *identifierMatcher) isIdentifier(text string) bool { // CharacterIsInitialNumber return false } + if text[len(text)-1] == '\'' { + // a prefixed string literal such as x'41' or e'ab' + return false + } return charIsKeywordStart(text[0]) } @@ -91,6 +116,10 @@ func (m *identifierMatcher) isAllowedKeyword(text string) bool { if categories == token.KeywordNone { return true } + // DefaultKeywordMaps::GetIdentifierMask + if m.class == classBareLabel { + return categories.Has(token.KeywordBareLabel) + } if categories.Has(token.KeywordUnreserved) { return true } @@ -124,23 +153,24 @@ func (m *identifierMatcher) matchInternal(s *state) ParseResult { result := text if m.reserved { - // ReservedIdentifierMatcher only unwraps double quotes; a + // ReservedIdentifierMatcher only unwraps quoted identifiers; a // single-quoted path literal is kept verbatim if isQuoted(result) { - result = strings.ReplaceAll(result[1:len(result)-1], `""`, `"`) + result = unquoteIdentifier(result) } } else { switch { case isQuoted(result): - result = strings.ReplaceAll(result[1:len(result)-1], `""`, `"`) + result = unquoteIdentifier(result) case isSingleQuoted(result) && m.supportsStringLiteral: // a single-quoted token in a table or file-name position is a // path: unwrapped but never folded result = strings.ReplaceAll(result[1:len(result)-1], "''", "'") } } - // identifier case folding (preserve_identifier_case) is not ported: + // identifier case folding (MatchState::FoldIdentifier) is not ported: // darkwing always preserves case, DuckDB's default + // (IdentifierCaseMode::PRESERVE_CASE) ir := &IdentifierResult{Identifier: result} ir.offset, ir.hasOffset = offset, true @@ -180,8 +210,16 @@ func (m *numberLiteralMatcher) matchInternal(s *state) ParseResult { return nil } scientific := false + hasDot := text[0] == '.' for i := 1; i < len(text); i++ { c := text[i] + if c == '.' { + // a number has at most one dot, and none in its exponent + if hasDot || scientific { + return nil + } + hasDot = true + } if c == 'e' || c == 'E' { if scientific { // upstream throws a ParserException here, aborting the @@ -211,9 +249,12 @@ func (m *numberLiteralMatcher) String() string { return "NUMBER_LITERAL" } -// stringLiteralMatcher matches string literal tokens, including prefixed -// forms (E”, N”, X”, B”). Port of StringLiteralMatcher + -// special_string_utils.hpp. +// stringLiteralMatcher matches string literal tokens: single-quoted, +// including the prefixed forms (E'...', N'...', X'...', B'...'), and +// dollar-quoted. +// A single-quoted literal absorbs the plain '...' literals that follow it +// on later lines ('a''b' is 'ab'). Port of StringLiteralMatcher +// (matcher/string_literal_matcher.hpp) + special_string_utils.hpp. type stringLiteralMatcher struct { matcherMeta } @@ -242,27 +283,79 @@ func specialStringInfo(text string) (StringKind, int) { return StringStandard, 1 } +// isSingleQuotedLiteral is StringLiteralMatcher::IsSingleQuotedStringLiteral. +func isSingleQuotedLiteral(text string, prefixLen int) bool { + if prefixLen == 0 || len(text) < prefixLen+1 { + return false + } + return text[prefixLen-1] == '\'' && text[len(text)-1] == '\'' +} + +// dollarQuoteDelimiterLength reports the length of the $tag$ delimiter of +// a terminated dollar-quoted literal (TryGetDollarQuoteDelimiterLength). +func dollarQuoteDelimiterLength(tok *token.Token) (int, bool) { + text := tok.Text + if tok.Unterminated || text == "" || text[0] != '$' { + return 0, false + } + end := strings.IndexByte(text[1:], '$') + if end < 0 { + return 0, false + } + length := end + 2 + if len(text) < length*2 { + return 0, false + } + return length, strings.HasSuffix(text, text[:length]) +} + +// stripStringLiteral is StringLiteralMatcher::StripStringLiteral: the +// contents between the delimiters, with doubled quotes un-doubled in +// single-quoted literals. +func stripStringLiteral(tok *token.Token, prefixLen int) string { + if length, ok := dollarQuoteDelimiterLength(tok); ok { + return tok.Text[length : len(tok.Text)-length] + } + return strings.ReplaceAll(tok.Text[prefixLen:len(tok.Text)-1], "''", "'") +} + +// isStringContinuation is StringLiteralMatcher::IsStringLiteralContinuation: +// a plain single-quoted literal on a later line, with no block comment in +// between. +func isStringContinuation(tok *token.Token) bool { + if tok == nil || !tok.PrecededByNewline || tok.PrecededByBlockComment || tok.Kind != token.String { + return false + } + kind, prefixLen := specialStringInfo(tok.Text) + return kind == StringStandard && isSingleQuotedLiteral(tok.Text, prefixLen) +} + func (m *stringLiteralMatcher) matchInternal(s *state) ParseResult { tok := s.current() if tok == nil { return nil } - text := tok.Text - kind, prefixLen := specialStringInfo(text) - if prefixLen < 1 || len(text) < prefixLen+1 { - return nil - } - if text[prefixLen-1] != '\'' || text[len(text)-1] != '\'' { + kind, prefixLen := specialStringInfo(tok.Text) + singleQuoted := isSingleQuotedLiteral(tok.Text, prefixLen) + if _, dollar := dollarQuoteDelimiterLength(tok); !singleQuoted && !dollar { return nil } offset := tok.Span.Start - length := len(text) + end := tok.Span.Start + len(tok.Text) + value := stripStringLiteral(tok, prefixLen) s.advance() - value := strings.ReplaceAll(text[prefixLen:len(text)-1], "''", "'") + if singleQuoted { + for next := s.current(); isStringContinuation(next); next = s.current() { + _, nextPrefix := specialStringInfo(next.Text) + value += stripStringLiteral(next, nextPrefix) + end = next.Span.Start + len(next.Text) + s.advance() + } + } sr := &StringResult{Value: value, StringKind: kind} sr.name = m.name sr.offset, sr.hasOffset = offset, true - sr.length, sr.hasLength = length, true + sr.length, sr.hasLength = end-offset, true return sr } @@ -270,10 +363,29 @@ func (m *stringLiteralMatcher) String() string { return "STRING_LITERAL" } -// operatorMatcher matches generic multi-character operator tokens that are -// not claimed by dedicated grammar rules. Port of OperatorMatcher. +// operatorMatcher matches operator tokens. Port of OperatorMatcher +// (matcher/operator_matcher.hpp): in the default GENERIC_PRECEDENCE mode +// (OperatorLiteral) it skips the operators the grammar gives a precedence +// level of their own; in ALL_OPERATORS mode (AnyOperatorLiteral, the +// operator of ANY/ALL comparisons) it accepts every operator. type operatorMatcher struct { matcherMeta + allOperators bool +} + +// hasSpecialPrecedence is OperatorMatcher::HasSpecialPrecedence +// (operator_matcher.cpp): the comparison, LIKE-family and lambda-arrow +// operators. +func hasSpecialPrecedence(op string) bool { + switch op { + case "=", "<", ">", "~", + "->", "<=", ">=", "!=", "==", "<>", "~~", "~*", "!~", + "~~*", "~~~", "!~~", "!~*", + "!~~*": + return true + default: + return false + } } func isOperatorChar(c byte) bool { @@ -291,23 +403,7 @@ func (m *operatorMatcher) matchInternal(s *state) ParseResult { return nil } text := tok.Text - // exclude the lambda arrow and JSON arrow - these have dedicated - // grammar roles - if text == "->" || text == "->>" { - return nil - } - // single-character operators are handled at specific precedence levels - if len(text) == 1 { - return nil - } - // exclude known comparison operators - handled by ComparisonExpression - switch text { - case "<=", ">=", "!=", "==", "<>": - return nil - } - // exclude LIKE/SIMILAR operators - handled by LikeVariations - switch text { - case "~~", "~~*", "~~~", "~*", "!~~", "!~~*", "!~", "!~*": + if !m.allOperators && hasSpecialPrecedence(text) { return nil } for i := 0; i < len(text); i++ { diff --git a/internal/matcher/special_test.go b/internal/matcher/special_test.go new file mode 100644 index 0000000..ee0404f --- /dev/null +++ b/internal/matcher/special_test.go @@ -0,0 +1,236 @@ +package matcher + +import ( + "errors" + "testing" + + "github.com/sqlc-dev/darkwing/internal/grammar" +) + +// collect returns every node of a parse tree that pred selects, in +// pre-order. +func collect(r ParseResult, pred func(ParseResult) bool) []ParseResult { + var out []ParseResult + var walk func(ParseResult) + walk = func(n ParseResult) { + if pred(n) { + out = append(out, n) + } + switch n := n.(type) { + case *ListResult: + for _, c := range n.Children { + walk(c) + } + case *RepeatResult: + for _, c := range n.Children { + walk(c) + } + case *ChoiceResult: + walk(n.Result) + case *OptionalResult: + if n.Result != nil { + walk(n.Result) + } + } + } + walk(r) + return out +} + +func stringResults(t *testing.T, engine *Engine, sql string) []*StringResult { + t.Helper() + r, _, err := engine.MatchTopLevel(mustTokens(t, sql), 0) + if err != nil { + t.Fatalf("%q: %v", sql, err) + } + var out []*StringResult + for _, n := range collect(r, func(n ParseResult) bool { _, ok := n.(*StringResult); return ok }) { + out = append(out, n.(*StringResult)) + } + return out +} + +func identifiers(t *testing.T, engine *Engine, sql string) []*IdentifierResult { + t.Helper() + r, _, err := engine.MatchTopLevel(mustTokens(t, sql), 0) + if err != nil { + t.Fatalf("%q: %v", sql, err) + } + var out []*IdentifierResult + for _, n := range collect(r, func(n ParseResult) bool { _, ok := n.(*IdentifierResult); return ok }) { + out = append(out, n.(*IdentifierResult)) + } + return out +} + +func rejectNear(t *testing.T, engine *Engine, sql, near string) { + t.Helper() + _, err := matchAll(t, engine, sql) + var syntaxErr *SyntaxError + if !errors.As(err, &syntaxErr) { + t.Errorf("reject %q: err = %v, want *SyntaxError", sql, err) + return + } + if syntaxErr.Token.Text != near { + t.Errorf("reject %q: at or near %q, want %q", sql, syntaxErr.Token.Text, near) + } +} + +// Backtick-quoted identifiers unwrap like double-quoted ones, each +// un-doubling its own delimiter (IdentifierMatcher::UnquoteIdentifier). +func TestBacktickIdentifiers(t *testing.T) { + engine, err := Default() + if err != nil { + t.Fatal(err) + } + ids := identifiers(t, engine, "SELECT `a``b` AS `x\"y` FROM `select`.\"t\"\"u\"") + var got []string + for _, id := range ids { + got = append(got, id.Identifier) + } + want := []string{"a`b", `x"y`, "select", `t"u`} + if len(got) != len(want) { + t.Fatalf("identifiers = %q, want %q", got, want) + } + for i := range want { + if got[i] != want[i] { + t.Errorf("identifier %d = %q, want %q", i, got[i], want[i]) + } + } +} + +// A prefixed string literal (x'41', e'ab') is never an identifier, not +// even in a table-name position that accepts '...' paths. +func TestPrefixedStringIsNotIdentifier(t *testing.T) { + engine, err := Default() + if err != nil { + t.Fatal(err) + } + rejectNear(t, engine, "SELECT * FROM x'41'", "x'41'") + rejectNear(t, engine, "SELECT 1 e'ab'", "e'ab'") + // the plain path literal is still accepted + ids := identifiers(t, engine, "SELECT * FROM 'data.csv'") + if len(ids) != 1 || ids[0].Identifier != "data.csv" { + t.Errorf("path literal = %v", ids) + } +} + +func TestStringLiterals(t *testing.T) { + engine, err := Default() + if err != nil { + t.Fatal(err) + } + for _, tc := range []struct { + sql string + value string + kind StringKind + offset int + length int + }{ + {"SELECT 'it''s'", "it's", StringStandard, 7, 7}, + // dollar-quoted: raw contents, no quote doubling, true source span + {"SELECT $$it's$$", "it's", StringStandard, 7, 8}, + {"SELECT $q$a$$b$q$", "a$$b", StringStandard, 7, 10}, + // a literal continues across newlines, its span covering every part + {"SELECT 'a'\n'b'\n 'c'", "abc", StringStandard, 7, 13}, + // a prefixed literal can be continued, a continuation cannot be + // prefixed + {"SELECT E'a'\n'b'", "ab", StringEscape, 7, 8}, + {"SELECT X'4'\n'1'", "41", StringHexadecimal, 7, 8}, + } { + got := stringResults(t, engine, tc.sql) + if len(got) != 1 { + t.Errorf("%q: %d string literals, want 1", tc.sql, len(got)) + continue + } + s := got[0] + off, length, _ := s.Loc() + if s.Value != tc.value || s.StringKind != tc.kind || off != tc.offset || length != tc.length { + t.Errorf("%q = %q kind %d at (%d, %d), want %q kind %d at (%d, %d)", + tc.sql, s.Value, s.StringKind, off, length, tc.value, tc.kind, tc.offset, tc.length) + } + } + // no continuation on the same line, after a block comment, for a + // prefixed literal, or from a dollar-quoted literal + rejectNear(t, engine, "SELECT 'a' 'b'", "'b'") + rejectNear(t, engine, "SELECT 'a'\n/* c */ 'b'", "'b'") + rejectNear(t, engine, "SELECT 'a'\nE'b'", "E'b'") + rejectNear(t, engine, "SELECT $$a$$\n'b'", "'b'") + // a line comment is trivia like any other: the newline it ends with + // still separates the parts + if got := stringResults(t, engine, "SELECT 'a' -- c\n'b'"); len(got) != 1 || got[0].Value != "ab" { + t.Errorf("continuation across a line comment = %v", got) + } +} + +// A number has at most one dot, none in its exponent. +func TestNumberLiteralDots(t *testing.T) { + engine, err := Default() + if err != nil { + t.Fatal(err) + } + rejectNear(t, engine, "SELECT 1.2.3", "1.2.3") + rejectNear(t, engine, "SELECT .5.", ".5.") + rejectNear(t, engine, "SELECT 1e5.5", "1e5.5") + for _, sql := range []string{"SELECT 1.5", "SELECT .5", "SELECT 1.", "SELECT 1.5e-3"} { + if _, err := matchAll(t, engine, sql); err != nil { + t.Errorf("accept %q: %v", sql, err) + } + } +} + +// OperatorLiteral skips the operators with a precedence level of their own +// (OperatorMatcher::HasSpecialPrecedence) but, unlike before v2.0.0, takes +// single-character operators; AnyOperatorLiteral takes every operator. +func TestOperatorMatcherModes(t *testing.T) { + g, err := grammar.Parse("Root <- Generic / ('ANY' Any)\nGeneric <- OperatorLiteral EndOfInput\nAny <- AnyOperatorLiteral EndOfInput\nOperatorLiteral <- 'x'\nAnyOperatorLiteral <- 'x'\n") + if err != nil { + t.Fatal(err) + } + engine, err := New(g, "Root") + if err != nil { + t.Fatal(err) + } + for _, tc := range []struct { + op string + generic, any bool + }{ + {"+", true, true}, + {"-", true, true}, + {"%", true, true}, + {"->>", true, true}, + {"@>", true, true}, + {"||", true, true}, + {"=", false, true}, + {"<", false, true}, + {"~", false, true}, + {"->", false, true}, + {"<=", false, true}, + {"<>", false, true}, + {"!~~*", false, true}, + // not operator characters at all + {"::", false, false}, + {"#", false, false}, + } { + if _, _, err := engine.Match(mustTokens(t, tc.op), 0); (err == nil) != tc.generic { + t.Errorf("OperatorLiteral %q: err = %v, want match %v", tc.op, err, tc.generic) + } + if _, _, err := engine.Match(mustTokens(t, "ANY "+tc.op), 0); (err == nil) != tc.any { + t.Errorf("AnyOperatorLiteral %q: err = %v, want match %v", tc.op, err, tc.any) + } + } +} + +// A column alias without AS must be a non-keyword or a bare-label keyword. +func TestBareColLabel(t *testing.T) { + engine, err := Default() + if err != nil { + t.Fatal(err) + } + for _, sql := range []string{"SELECT 1 x", "SELECT 1 abort", "SELECT 1 AS year", "SELECT 1 \"year\""} { + if _, err := matchAll(t, engine, sql); err != nil { + t.Errorf("accept %q: %v", sql, err) + } + } + rejectNear(t, engine, "SELECT 1 year", "year") +} diff --git a/internal/serialize/serialize.go b/internal/serialize/serialize.go index babc593..21fb86b 100644 --- a/internal/serialize/serialize.go +++ b/internal/serialize/serialize.go @@ -122,6 +122,8 @@ func queryNode(n ast.QueryNode) map[string]any { base["table"] = ins.Table base["schema"] = ins.Schema base["catalog"] = ins.Catalog + // v2.0 storage also writes the target's QualifiedName + base["qualified_name"] = map[string]any{"path": qualifiedPath(ins.Catalog, ins.Schema, nil, ins.Table)} base["returning_list"] = exprList(ins.Returning) base["on_conflict_info"] = onConflictInfo(ins.OnConflict) // upstream materializes the insert target as a table ref only @@ -286,14 +288,11 @@ func tableRef(r ast.TableRef) map[string]any { "type": "EMPTY", "alias": ref.Alias, "sample": sampleOptions(ref.Sample), }, ref.Span) case *ast.BaseTableRef: - path := []any{} - if ref.CatalogName != "" { - path = append(path, ref.CatalogName) - } - if ref.SchemaName != "" { - path = append(path, ref.SchemaName) + path := qualifiedPath(ref.CatalogName, ref.SchemaName, ref.Qualification, ref.TableName) + if len(path) == 0 { + // BaseTableRef::SetTable always records the name, even "" + path = []any{""} } - path = append(path, ref.TableName) return locate(map[string]any{ "type": "BASE_TABLE", "alias": ref.Alias, "sample": sampleOptions(ref.Sample), "schema_name": ref.SchemaName, "table_name": ref.TableName, @@ -368,16 +367,38 @@ func tableRef(r ast.TableRef) map[string]any { case *ast.ShowRef: return locate(map[string]any{ "type": "SHOW_REF", "alias": ref.Alias, "sample": sampleOptions(ref.Sample), - "table_name": ref.TableName, - "query": queryNode(ref.Query), - "show_type": string(ref.ShowType), - "catalog_name": ref.CatalogName, - "schema_name": ref.SchemaName, + "table_name": ref.TableName, + "query": queryNode(ref.Query), + "show_type": string(ref.ShowType), + "catalog_name": ref.CatalogName, + "schema_name": ref.SchemaName, + "qualified_name": showRefPath(ref), }, ref.Span) } panic(fmt.Sprintf("serialize: unknown table ref %T", r)) } +// showRefPath renders a ShowRef's v2.0 QualifiedName: the components +// present (SHOW TABLES FROM keeps an empty table name), empty for a +// query-only ShowRef. +func showRefPath(ref *ast.ShowRef) map[string]any { + path := []any{} + if len(ref.Qualification) > 0 { + // a nested schema chain keeps its full path + return map[string]any{"path": qualifiedPath("", "", ref.Qualification, ref.TableName)} + } + if ref.ShowType == ast.ShowTypeShowFrom || ref.TableName != "" || ref.SchemaName != "" { + if ref.CatalogName != "" { + path = append(path, ref.CatalogName) + } + if ref.SchemaName != "" { + path = append(path, ref.SchemaName) + } + path = append(path, ref.TableName) + } + return map[string]any{"path": path} +} + // qualifiedColumnName renders a dotted column path the way upstream // serializes QualifiedColumnName: all four fields, empty when absent. func qualifiedColumnName(q ast.QualifiedColumnName) map[string]any { @@ -526,7 +547,8 @@ func expr(e ast.Expr) map[string]any { case *ast.ConstantExpression: base["class"] = "CONSTANT" base["type"] = "VALUE_CONSTANT" - base["value"] = value(x.Value) + // v2.0 storage writes the literal as written (Literal: kind, text) + base["literal"] = map[string]any{"kind": string(x.Literal.Kind), "text": x.Literal.Text} locate(base, x.Span) case *ast.ParameterExpression: base["class"] = "PARAMETER" @@ -545,6 +567,7 @@ func expr(e ast.Expr) map[string]any { base["is_operator"] = x.IsOperator base["export_state"] = x.ExportState base["arguments"] = functionArguments(x.Arguments) + base["qualified_name"] = map[string]any{"path": qualifiedPath(x.Catalog, x.Schema, x.Qualification, x.FunctionName)} locate(base, x.Span) case *ast.OperatorExpression: base["class"] = "OPERATOR" @@ -566,7 +589,8 @@ func expr(e ast.Expr) map[string]any { base["class"] = "CAST" base["type"] = "OPERATOR_CAST" base["child"] = expr(x.Child) - base["cast_type"] = castType(x) + // v2.0 storage writes the target as a type expression (type_expr) + base["type_expr"] = castTypeExpr(x) base["try_cast"] = x.TryCast locate(base, x.Span) case *ast.CaseExpression: @@ -652,6 +676,7 @@ func expr(e ast.Expr) map[string]any { base["schema"] = x.Schema base["type_name"] = x.TypeName base["children"] = exprList(x.Args) + base["qualified_name"] = map[string]any{"path": qualifiedPath(x.Catalog, x.Schema, x.Qualification, x.TypeName)} locate(base, x.Span) case *ast.WindowExpression: base["class"] = "WINDOW" @@ -674,6 +699,7 @@ func expr(e ast.Expr) map[string]any { base["distinct"] = x.Distinct base["arg_orders"] = orderList(x.ArgOrders) base["arguments"] = functionArguments(x.Arguments) + base["qualified_name"] = map[string]any{"path": qualifiedPath(x.Catalog, x.Schema, x.Qualification, x.FunctionName)} locate(base, x.Span) default: panic(fmt.Sprintf("serialize: unknown expression %T", e)) @@ -681,21 +707,50 @@ func expr(e ast.Expr) map[string]any { return base } -// castType renders a CastExpression's target: a resolved logical type id -// or an UNBOUND type wrapping the type expression. -func castType(x *ast.CastExpression) map[string]any { - if x.ResolvedType != "" { - return map[string]any{"id": x.ResolvedType, "type_info": nil} +// castTypeExpr renders a CastExpression's target type expression: the +// parsed type, or for a pre-resolved logical type the location-free +// TypeExpression::FromLogicalType spelling. +func castTypeExpr(x *ast.CastExpression) map[string]any { + if x.ResolvedType == "" { + return expr(x.CastType) } - return map[string]any{ - "id": "UNBOUND", - "type_info": map[string]any{ - "type": "UNBOUND_TYPE_INFO", - "alias": "", - "extension_info": nil, - "expr": expr(x.CastType), - }, + name := x.ResolvedType + if alias, ok := builtinTypeNames[name]; ok { + name = alias + } + t := &ast.TypeExpression{TypeName: name} + t.SetSpan(ast.Span{Start: -1, End: -1}) + return expr(t) +} + +// builtinTypeNames maps the logical type ids whose BuiltinTypeName +// (type_expression.cpp) differs from the id. +var builtinTypeNames = map[string]string{ + "TIMESTAMP": "TIMESTAMP_US", +} + +// qualifiedPath renders a QualifiedName's path: the full qualification +// when it is deeper than catalog.schema, else the 3-argument constructor +// (catalog, schema, name), dropping empty qualifiers; an empty name with +// no qualification is the empty path. +func qualifiedPath(catalog, schema string, quals []string, name string) []any { + path := []any{} + if len(quals) > 0 { + for _, q := range quals { + path = append(path, q) + } + return append(path, name) + } + if catalog != "" { + path = append(path, catalog) + } + if schema != "" { + path = append(path, schema) + } + if name == "" && len(path) == 0 { + return path } + return append(path, name) } // ---- values ------------------------------------------------------------ diff --git a/lexer/lexer.go b/lexer/lexer.go index a7f4be4..22d4fd5 100644 --- a/lexer/lexer.go +++ b/lexer/lexer.go @@ -8,7 +8,6 @@ package lexer import ( "fmt" - "strings" "github.com/sqlc-dev/darkwing/token" ) @@ -128,7 +127,7 @@ func charIsOperatorAny(c byte) bool { func isSingleByteOperator(c byte) bool { switch c { - case '(', ')', '{', '}', '[', ']', ',', '?', '$', '-', '#': + case '(', ')', '{', '}', '[', ']', ',', ':', '?', '$', '#': return true default: return false @@ -157,7 +156,7 @@ func charIsScientific(c byte) bool { func charIsControlFlow(c byte) bool { switch c { - case '\'', '-', ';', '"', '.': + case '\'', ';', '"', '.': return true default: return false @@ -181,15 +180,22 @@ func charIsKeyword(c byte) bool { } // charIsOperatorCont reports whether c may continue a multi-character -// operator token (Tokenizer::CharacterIsOperator). +// operator token (Tokenizer::CharacterIsOperator): the fixed set of +// PostgreSQL operator characters, narrower than charIsOperatorAny. func charIsOperatorCont(c byte) bool { - if isSingleByteOperator(c) { - return false - } - if charIsControlFlow(c) { + switch c { + case '+', '-', '*', '/', '%', '^', '<', '>', '=', '~', '!', '@', '&', '|': + return true + default: return false } - return charIsOperatorAny(c) +} + +// isQuotedIdentifierDelimiter is Tokenizer::IsQuotedIdentifierDelimiter: +// double quotes are the SQL standard delimiter; backticks are accepted as +// an alternative, with the same doubling rule for escaping the delimiter. +func isQuotedIdentifierDelimiter(c byte) bool { + return c == '"' || c == '`' } func charIsSpecialStringPrefix(c byte) bool { @@ -220,26 +226,24 @@ func isValidDollarTagChar(c byte) bool { return c >= 0x80 } -// specialOperator reports whether a multi-character special operator starts -// at sql[pos] and returns its length (Tokenizer::IsSpecialOperator). -func specialOperator(sql string, pos int) (int, bool) { - if pos+2 < len(sql) && sql[pos:pos+3] == "->>" { - return 3, true - } - if pos+1 >= len(sql) { - // 2-byte operators are out-of-bounds - return 0, false - } - switch sql[pos : pos+2] { - case "::", ":=", "->", "**", "//": - return 2, true +// compoundColonToken reports whether "::" or ":=" starts at sql[pos] +// (Tokenizer::IsCompoundColonToken). Every other multi-character operator +// is assembled by the operator state. +func compoundColonToken(sql string, pos int) bool { + if pos+1 >= len(sql) || sql[pos] != ':' { + return false } - return 0, false + return sql[pos+1] == ':' || sql[pos+1] == '=' } type lexer struct { sql string tokens []token.Token + // hasBlockComment and lastBlockCommentPos track the most recent block + // comment (TokenizerBehavior::has_block_comment / + // last_block_comment_position), for Token.PrecededByBlockComment. + hasBlockComment bool + lastBlockCommentPos int } func (l *lexer) push(kind token.Kind, text string, offset int) { @@ -251,13 +255,26 @@ func (l *lexer) push(kind token.Kind, text string, offset int) { } // pushRange is TokenizerBehavior::PushToken with the parser behavior's -// zero-length delimited identifier check: comments and empty ranges are -// dropped. +// checks (ParserTokenizerBehavior::PushToken): an unterminated block +// comment and a zero-length delimited identifier are errors; comments and +// empty ranges are dropped. Only tokens pushed here get the +// PrecededByNewline / PrecededByBlockComment flags - upstream appends the +// single-byte operators, terminators, parameters and the final token +// directly, bypassing PushToken. func (l *lexer) pushRange(start, end int, kind token.Kind, unterminated bool) error { - if kind == token.Identifier && end == start+2 && l.sql[start:end] == `""` { - return &Error{Msg: "zero-length delimited identifier", Offset: start} + if kind == token.Comment && unterminated { + return &Error{Msg: `unterminated /* comment at or near "` + l.sql[start:end] + `"`, Offset: start} + } + if kind == token.Identifier && end == start+2 { + if q := l.sql[start:end]; q == `""` || q == "``" { + return &Error{Msg: "zero-length delimited identifier", Offset: start} + } } if kind == token.Comment { + if end >= start+2 && l.sql[start] == '/' && l.sql[start+1] == '*' { + l.hasBlockComment = true + l.lastBlockCommentPos = start + } return nil } if start >= end { @@ -269,6 +286,54 @@ func (l *lexer) pushRange(start, end int, kind token.Kind, unterminated bool) er Span: token.Span{Start: start, End: end}, Unterminated: unterminated, }) + if len(l.tokens) < 2 { + return nil + } + cur := &l.tokens[len(l.tokens)-1] + prev := l.tokens[len(l.tokens)-2] + // upstream measures the previous token as offset + text length, which + // is not always its source extent (see push) + prevEnd := prev.Span.Start + len(prev.Text) + if l.hasBlockComment && l.lastBlockCommentPos >= prevEnd && l.lastBlockCommentPos < start { + cur.PrecededByBlockComment = true + } + for pos := prevEnd; pos < start; pos++ { + if l.sql[pos] == '\n' || l.sql[pos] == '\r' { + cur.PrecededByNewline = true + break + } + } + return nil +} + +// pushOperator is Tokenizer::PushOperatorToken, applying the PostgreSQL +// trimming rule: an operator cannot end in '+' or '-' unless it contains +// at least one of ~ ! @ # % ^ & | ` ?. The trimmed characters become +// individual tokens (appended directly, as upstream does). +func (l *lexer) pushOperator(start, end int) error { + sql := l.sql + endPos := end + hasSpecial := false + for pos := start; pos < endPos; pos++ { + switch sql[pos] { + case '~', '!', '@', '#', '%', '^', '&', '|', '`', '?': + hasSpecial = true + } + if hasSpecial { + break + } + } + if !hasSpecial { + for endPos > start+1 && (sql[endPos-1] == '+' || sql[endPos-1] == '-') { + endPos-- + } + } + if err := l.pushRange(start, endPos, token.Operator, false); err != nil { + return err + } + for pos := endPos; pos < end; pos++ { + l.push(token.Operator, string(sql[pos]), pos) + } return nil } @@ -277,7 +342,8 @@ func (l *lexer) pushRange(start, end int, kind token.Kind, unterminated bool) er // are determined by the grammar, not the tokenizer); an EndOfInput sentinel // is always appended. Errors carry byte offsets and match the conditions // upstream's parser tokenizer raises: unterminated string literals, -// unterminated quoted identifiers, and zero-length delimited identifiers. +// unterminated quoted identifiers, unterminated block comments, and +// zero-length delimited identifiers. func Tokenize(sql string) ([]token.Token, error) { l := &lexer{sql: sql} if err := l.run(); err != nil { @@ -293,6 +359,7 @@ func (l *lexer) run() error { state := stateStandard lastPos := 0 escapeString := false + quotedIdentifierDelimiter := byte('"') dollarQuoteMarker := "" dollarMarkerStart := 0 multiLineCommentDepth := 0 @@ -307,8 +374,9 @@ func (l *lexer) run() error { escapeString = false break } - if c == '"' { + if isQuotedIdentifierDelimiter(c) { state = stateQuotedIdentifier + quotedIdentifierDelimiter = c lastPos = i break } @@ -330,6 +398,8 @@ func (l *lexer) run() error { l.push(token.Operator, "$", i) break } + // dollar-quoted string or collabel parameter ($collabel) + lastPos = i // scan until next $ nextDollar := 0 for idx := i + 1; idx < n; idx++ { @@ -374,11 +444,18 @@ func (l *lexer) run() error { lastPos = i + 1 break } - if opLen, ok := specialOperator(sql, i); ok { - // special operator - pushed with lastPos as its offset, + if compoundColonToken(sql, i) { + if i+2 < n && charIsOperatorCont(sql[i+2]) { + // "::" or ":=" followed by an operator character is + // left to the operator state + state = stateOperator + lastPos = i + break + } + // compound colon token - pushed with lastPos as its offset, // exactly as upstream does - l.push(token.Operator, sql[i:i+opLen], lastPos) - i += opLen - 1 + l.push(token.Operator, sql[i:i+2], lastPos) + i++ lastPos = i + 1 break } @@ -417,8 +494,8 @@ func (l *lexer) run() error { if charIsInitialNumber(c) { break } - // underscore only when immediately followed by a digit - if c == '_' && i+1 < n && charIsInitialNumber(sql[i+1]) { + // a digit separator must sit between two digits + if c == '_' && charIsDigit(sql[i-1]) && i+1 < n && charIsDigit(sql[i+1]) { break } // scientific notation marker @@ -444,32 +521,13 @@ func (l *lexer) run() error { i-- case stateOperator: - if !charIsOperatorCont(c) { - // PostgreSQL trimming rule: an operator cannot end in '+' - // unless it contains at least one of: ~ ! @ # % ^ & | ` ? - endPos := i - hasSpecial := false - for j := lastPos; j < endPos; j++ { - switch sql[j] { - case '~', '!', '@', '#', '%', '^', '&', '|', '`', '?': - hasSpecial = true - } - if hasSpecial { - break - } - } - if !hasSpecial { - for endPos > lastPos && sql[endPos-1] == '+' { - endPos-- - } - } - if err := l.pushRange(lastPos, endPos, token.Operator, false); err != nil { + // a comment start ends the operator; back in the standard + // state it is tokenized as a comment + if (c == '-' && i+1 < n && sql[i+1] == '-') || (c == '/' && i+1 < n && sql[i+1] == '*') || + !charIsOperatorCont(c) { + if err := l.pushOperator(lastPos, i); err != nil { return err } - // push any trimmed '+' characters as individual tokens - for j := endPos; j < i; j++ { - l.push(token.Operator, string(sql[j]), j) - } state = stateStandard lastPos = i i-- @@ -511,8 +569,8 @@ func (l *lexer) run() error { } case stateQuotedIdentifier: - if c == '"' { - if i+1 < n && sql[i+1] == '"' { + if c == quotedIdentifierDelimiter { + if i+1 < n && sql[i+1] == quotedIdentifierDelimiter { // escaped - skip escape i++ } else { @@ -576,16 +634,11 @@ func (l *lexer) run() error { // marker mismatch break } - // marker found - rewrite to a plain quoted literal, exactly as - // upstream does - fullMarkerLen := len(dollarQuoteMarker) + 2 - quoted := sql[lastPos : start+len(dollarQuoteMarker)+1] - content := quoted[fullMarkerLen : len(quoted)-fullMarkerLen] - content = strings.ReplaceAll(content, "'", "''") - quoted = "'" + content + "'" - // upstream records the rewritten text's length, not the source - // extent, so the span is Start + len(Text) - l.push(token.String, quoted, dollarMarkerStart-1) + // marker found - the token keeps its raw dollar-quoted text; + // the string literal matcher strips the delimiters + if err := l.pushRange(lastPos, end+1, token.String, false); err != nil { + return err + } dollarQuoteMarker = "" state = stateStandard i = end @@ -594,8 +647,12 @@ func (l *lexer) run() error { } switch state { - case stateSingleLineComment, stateMultiLineComment: + case stateSingleLineComment: return l.pushRange(lastPos, n, token.Comment, false) + case stateMultiLineComment: + return l.pushRange(lastPos, n, token.Comment, true) + case stateOperator: + return l.pushOperator(lastPos, n) case stateDollarQuotedString: return l.pushRange(lastPos, n, token.String, true) } @@ -615,5 +672,13 @@ func (l *lexer) run() error { if state == stateKeyword && !token.IsKeyword(lastWord) { state = stateStandard } - return l.pushRange(lastPos, n, stateToKind(state), isUnterminatedState(state)) + // TokenizerBehavior::OnLastToken appends the token directly, bypassing + // PushToken and its preceding-trivia flags + l.tokens = append(l.tokens, token.Token{ + Kind: stateToKind(state), + Text: lastWord, + Span: token.Span{Start: lastPos, End: n}, + Unterminated: isUnterminatedState(state), + }) + return nil } diff --git a/lexer/lexer_test.go b/lexer/lexer_test.go index b1f373c..a316a62 100644 --- a/lexer/lexer_test.go +++ b/lexer/lexer_test.go @@ -103,17 +103,33 @@ func TestStrings(t *testing.T) { func TestQuotedIdentifiers(t *testing.T) { check(t, `"my table"`, []tok{{token.Identifier, `"my table"`, 0}}) check(t, `"a""b"`, []tok{{token.Identifier, `"a""b"`, 0}}) + // backticks delimit identifiers too, each closed only by its own + // delimiter and escaped by doubling it + check(t, "`my table`", []tok{{token.Identifier, "`my table`", 0}}) + check(t, "`a``b` `x\"y`", []tok{ + {token.Identifier, "`a``b`", 0}, + {token.Identifier, "`x\"y`", 7}, + }) + check(t, "\"a`b\"", []tok{{token.Identifier, "\"a`b\"", 0}}) + // a backtick ends a bare word + check(t, "a`b`", []tok{ + {token.Identifier, "a", 0}, + {token.Identifier, "`b`", 1}, + }) } func TestDollarQuotedStrings(t *testing.T) { - // empty tag: rewritten to a plain quoted literal - check(t, "$$abc$$", []tok{{token.String, "'abc'", 0}}) + // the token keeps its raw text, delimiters included; the string + // literal matcher strips them + check(t, "$$abc$$", []tok{{token.String, "$$abc$$", 0}}) // named tag - check(t, "$tag$abc$tag$", []tok{{token.String, "'abc'", 0}}) - // embedded quotes are doubled during the rewrite - check(t, "$$it's$$", []tok{{token.String, "'it''s'", 0}}) + check(t, "$tag$abc$tag$ 1", []tok{ + {token.String, "$tag$abc$tag$", 0}, + {token.Number, "1", 14}, + }) + check(t, "$$it's$$", []tok{{token.String, "$$it's$$", 0}}) // mismatched inner marker does not close the string - check(t, "$a$x$b$y$a$", []tok{{token.String, "'x$b$y'", 0}}) + check(t, "$a$x$b$y$a$", []tok{{token.String, "$a$x$b$y$a$", 0}}) // $1 is a parameter, never a dollar-quote opener check(t, "$1", []tok{ {token.Operator, "$", 0}, @@ -175,12 +191,21 @@ func TestNumbers(t *testing.T) { {token.Number, "0", 0}, {token.Identifier, "x1A", 1}, }) - // underscore separators: only underscore-digit is allowed + // underscore separators must sit between two digits check(t, "1_000", []tok{{token.Number, "1_000", 0}}) check(t, "1__0", []tok{ {token.Number, "1", 0}, {token.Identifier, "__0", 1}, }) + check(t, "1_.5", []tok{ + {token.Number, "1", 0}, + {token.Identifier, "_", 1}, + {token.Number, ".5", 2}, + }) + check(t, "1._5", []tok{ + {token.Number, "1.", 0}, + {token.Identifier, "_5", 2}, + }) // double exponent splits at the second marker check(t, "1ee5", []tok{ {token.Number, "1", 0}, @@ -259,6 +284,60 @@ func TestOperators(t *testing.T) { {token.Operator, "!=", 2}, {token.Identifier, "b", 5}, }) + // the trimming rule also applies to a trailing '-', but never trims + // an operator to nothing + check(t, "a<-b", []tok{ + {token.Identifier, "a", 0}, + {token.Operator, "<", 1}, + {token.Operator, "-", 2}, + {token.Identifier, "b", 3}, + }) + check(t, "a++b", []tok{ + {token.Identifier, "a", 0}, + {token.Operator, "+", 1}, + {token.Operator, "+", 2}, + {token.Identifier, "b", 3}, + }) + // ':' is a single-byte operator, except in "::" and ":=" + check(t, "a:b", []tok{ + {token.Identifier, "a", 0}, + {token.Operator, ":", 1}, + {token.Identifier, "b", 2}, + }) + // a compound colon followed by an operator character is handed to the + // operator state, which does not continue past ':' + check(t, "x::-1", []tok{ + {token.Identifier, "x", 0}, + {token.Operator, ":", 1}, + {token.Operator, ":", 2}, + {token.Operator, "-", 3}, + {token.Number, "1", 4}, + }) + check(t, "x:=-1", []tok{ + {token.Identifier, "x", 0}, + {token.Operator, ":=", 1}, + {token.Operator, "-", 3}, + {token.Number, "1", 4}, + }) + // a comment start ends an operator + check(t, "1+--c\n2", []tok{ + {token.Number, "1", 0}, + {token.Operator, "+", 1}, + {token.Number, "2", 6}, + }) + check(t, "1+/* c */2", []tok{ + {token.Number, "1", 0}, + {token.Operator, "+", 1}, + {token.Number, "2", 9}, + }) + // operator characters outside the PostgreSQL set do not continue an + // operator + check(t, "a=\\b", []tok{ + {token.Identifier, "a", 0}, + {token.Operator, "=", 1}, + {token.Operator, "\\", 2}, + {token.Identifier, "b", 3}, + }) } func TestComments(t *testing.T) { @@ -280,17 +359,62 @@ func TestComments(t *testing.T) { {token.Keyword, "SELECT", 0}, {token.Number, "1", 25}, }) - // unterminated comments are not an error: the rest is a comment - check(t, "SELECT 1 /* open", []tok{ + // an unterminated line comment is not an error: the rest is a comment + check(t, "SELECT 1 -- open", []tok{ {token.Keyword, "SELECT", 0}, {token.Number, "1", 7}, }) } +func TestPrecedingTrivia(t *testing.T) { + got, err := Tokenize("SELECT 'a'\n'b' /* c */ 'd'\n/* e */\n'f' -- g\n'h'\nx") + if err != nil { + t.Fatal(err) + } + type flags struct { + text string + newline, comment bool + } + want := []flags{ + {"SELECT", false, false}, + {"'a'", false, false}, + {"'b'", true, false}, + {"'d'", false, true}, + {"'f'", true, true}, + {"'h'", true, false}, + // the final token bypasses PushToken upstream and never carries + // the flags + {"x", false, false}, + {"", false, false}, + } + if len(got) != len(want) { + t.Fatalf("tokens = %v", got) + } + for i, w := range want { + g := got[i] + if g.Text != w.text || g.PrecededByNewline != w.newline || g.PrecededByBlockComment != w.comment { + t.Errorf("token %d = %q newline=%v comment=%v, want %q newline=%v comment=%v", + i, g.Text, g.PrecededByNewline, g.PrecededByBlockComment, w.text, w.newline, w.comment) + } + } + // directly appended tokens (single-byte operators) carry no flags + got, err = Tokenize("a\n(") + if err != nil { + t.Fatal(err) + } + if got[1].PrecededByNewline { + t.Errorf("single-byte operator flagged: %+v", got[1]) + } +} + func TestErrors(t *testing.T) { checkErr(t, "SELECT 'abc", "unterminated string literal", 7) checkErr(t, `SELECT "abc`, "unterminated quoted identifier", 7) checkErr(t, `SELECT ""`, "zero-length delimited identifier", 7) + checkErr(t, "SELECT ``", "zero-length delimited identifier", 7) + checkErr(t, "SELECT `abc", "unterminated quoted identifier", 7) + checkErr(t, "SELECT 1 /* open", `unterminated /* comment at or near "/* open"`, 9) + checkErr(t, "SELECT /* a /* b */", `unterminated /* comment at or near "/* a /* b */"`, 7) } func TestLastTokenStates(t *testing.T) { @@ -304,6 +428,12 @@ func TestLastTokenStates(t *testing.T) { {token.Number, "1", 0}, {token.Operator, "=", 2}, }) + // ... with the trimming rule applied + check(t, "a =-", []tok{ + {token.Identifier, "a", 0}, + {token.Operator, "=", 2}, + {token.Operator, "-", 3}, + }) // keyword state at end resolves against the keyword table check(t, "SELECT", []tok{{token.Keyword, "SELECT", 0}}) check(t, "selectx", []tok{{token.Identifier, "selectx", 0}}) diff --git a/parser/errors_test.go b/parser/errors_test.go index d11f9b8..14d5a1d 100644 --- a/parser/errors_test.go +++ b/parser/errors_test.go @@ -85,11 +85,11 @@ func TestErrorPositions(t *testing.T) { line, col int }{ { - // SELCT itself parses as a bare expression statement (a - // column reference), so the failure lands on the 1 + // v2.0.0 dropped bare expression statements from the + // library grammar, so the failure lands on SELCT itself sql: "SELCT 1", - msg: `Parser Error: syntax error at or near "1"`, - offset: 6, line: 1, col: 7, + msg: `Parser Error: syntax error at or near "SELCT"`, + offset: 0, line: 1, col: 1, }, { sql: "SELECT 1 2", @@ -98,8 +98,8 @@ func TestErrorPositions(t *testing.T) { }, { sql: "SELECT 1;\nSELCT 2;", - msg: `Parser Error: syntax error at or near "2"`, - offset: 16, line: 2, col: 7, + msg: `Parser Error: syntax error at or near "SELCT"`, + offset: 10, line: 2, col: 1, }, { sql: "SELECT 1\nFROM t\nWHERE (", diff --git a/parser/expr_v2_test.go b/parser/expr_v2_test.go new file mode 100644 index 0000000..d65107f --- /dev/null +++ b/parser/expr_v2_test.go @@ -0,0 +1,102 @@ +package parser + +import ( + "strings" + "testing" + + "github.com/sqlc-dev/darkwing/ast" + "github.com/sqlc-dev/darkwing/internal/serialize" +) + +// TestV2QueryErrors pins the Parser Errors the v2.0 query/expression +// transformers raise (each verified against the pinned v2.0.0 oracle). +func TestV2QueryErrors(t *testing.T) { + const depth = `Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth.` + for _, tc := range []struct{ sql, want string }{ + {"SELECT a IS NULL = b = c", "Chained comparisons are not supported, use AND to combine comparisons"}, + {"SELECT a NOT !~~ 'x'", "NOT cannot precede an operator that is already negated (!~~, !~~*, !~ or !~*)"}, + {"SELECT a ~* 'x' ESCAPE 'y'", "ESCAPE clause is not supported with case-insensitive regular expression match operators"}, + {"SELECT count(DISTINCT)", "DISTINCT requires at least one argument"}, + {"SELECT count(ALL)", "ALL requires at least one argument"}, + {"SELECT Foo(x) WITHIN GROUP (ORDER BY x)", `Unknown ordered aggregate "Foo".`}, + {"SELECT mode(DISTINCT x) WITHIN GROUP (ORDER BY x)", "DISTINCT is not allowed in combination with WITHIN GROUP"}, + {"SELECT mode(ORDER BY x) WITHIN GROUP (ORDER BY x)", "Cannot use multiple ORDER BY statements with WITHIN GROUP"}, + {"SELECT (x).ifnull(DISTINCT 1)", "DISTINCT is not supported in IFNULL expressions"}, + {"SELECT (x).ifnull(1 ORDER BY 1)", "ORDER BY is not supported in IFNULL expressions"}, + {"SELECT x.ifnull(1)", "Wrong number of arguments to IFNULL."}, + {`SELECT "unpack"(a := 1)`, "Named arguments are not supported in UNPACK operator"}, + {"SELECT sum(x) OVER (ROWS BETWEEN CURRENT ROW AND 1 PRECEDING)", "Frame starting from current row cannot have preceding rows"}, + {"SELECT sum(x) OVER (ROWS BETWEEN 1 FOLLOWING AND CURRENT ROW)", "Frame starting from following row cannot have preceding rows"}, + {"SELECT sum(x) OVER (ROWS 1 FOLLOWING)", "Frame starting from following row cannot end with current row"}, + {"SELECT sum(x) OVER w FROM t WINDOW w AS (), w AS ()", `window "w" is already defined`}, + {"SELECT (SELECT sum(x) OVER w) FROM t WINDOW w AS ()", `window "w" does not exist`}, + {"SELECT $0", "Parameter numbers must be greater than 0"}, + {"SELECT #99999999999999999999", "Positional reference node needs to be >= 1"}, + {"SELECT x::TIMESTAMP(3) WITH TIME ZONE", "TIMESTAMP WITH TIME ZONE does not take a precision"}, + {"SELECT x::TIMESTAMP(NULL)", "TIMESTAMP precision cannot be NULL"}, + {"SELECT x::TIMESTAMP(1.5)", "TIMESTAMP precision must be an integral type"}, + {"SELECT X'0'", "Hex string literal must have an even number of hex digits"}, + {"SELECT X'0G'", "Hex string literal contains a non-hexadecimal character 'G'"}, + {"SELECT B'012'", "Bit string literal contains a non-binary character '2'"}, + {`WITH "a""b" AS (SELECT 1), "a""b" AS (SELECT 2) SELECT 1`, `Duplicate CTE name "a""b"`}, + {"SELECT * FROM t: (SELECT 1) AS u", "Table reference (SELECT 1) cannot have two aliases"}, + {"SELECT * FROM LATERAL (SELECT 1) TABLESAMPLE 10%", "TABLESAMPLE cannot be applied to a LATERAL subquery"}, + {"SELECT * FROM LATERAL range(3) TABLESAMPLE 10%", "TABLESAMPLE cannot be applied to a LATERAL table function"}, + {"PIVOT t", "PIVOT requires an ON, USING or GROUP BY clause"}, + {"PIVOT t ON a IN (x.y)", "PIVOT IN list cannot contain qualified column references"}, + {"SELECT * EXCLUDE (i) REPLACE (i+100 AS i) FROM integers", `Column ""i"" cannot occur in both EXCLUDE and REPLACE list`}, + {"SELECT * EXCLUDE (a.b.c.d.e) FROM t", "Expected at most 4 entries (catalog.schema.table.column), but found 5 entries (input: a.b.c.d.e)"}, + {"SUMMARIZE", "Expected table name with SUMMARIZE"}, + {"SHOW ''", "Expected a table name, but got an empty string"}, + {"SELECT 1 + ANY([1, 2])", `Unsupported comparison "+" for ANY/ALL subquery`}, + {"SELECT " + strings.Repeat("(", 1000) + "1" + strings.Repeat(")", 1000), depth}, + {"SELECT " + strings.Repeat("NOT ", 1000) + "true", depth}, + } { + if got := parseErr(t, tc.sql); got != tc.want { + t.Errorf("Parse(%.60q):\n got %q\nwant %q", tc.sql, got, tc.want) + } + } + // one below the limit parses + parseOne(t, "SELECT "+strings.Repeat("(", 999)+"1"+strings.Repeat(")", 999)) + parseOne(t, "SELECT "+strings.Repeat("NOT ", 999)+"true") +} + +// TestV2Shapes spot-checks v2.0 tree shapes (oracle-verified): literals +// keep their text, IF stays a function, omitted slice bounds are +// list_value(), and nested schema paths survive in qualified_name. +func TestV2Shapes(t *testing.T) { + sel := func(sql string) *ast.SelectNode { + t.Helper() + return parseOne(t, sql).(*ast.SelectStatement).Node.(*ast.SelectNode) + } + n := sel("SELECT -9223372036854775808, 1.50, if(a, 1, 2), a[1:], s1.s2.s3.f(1)") + if c := n.SelectList[0].(*ast.ConstantExpression); c.Literal != (ast.Literal{Kind: ast.LiteralInteger, Text: "-9223372036854775808"}) { + t.Errorf("negated literal = %+v", c.Literal) + } + if c := n.SelectList[1].(*ast.ConstantExpression); c.Literal != (ast.Literal{Kind: ast.LiteralNumeric, Text: "1.50"}) { + t.Errorf("numeric literal = %+v", c.Literal) + } + if f, ok := n.SelectList[2].(*ast.FunctionExpression); !ok || f.FunctionName != "if" { + t.Errorf("IF = %T, want FunctionExpression if", n.SelectList[2]) + } + slice := n.SelectList[3].(*ast.OperatorExpression) + if f, ok := slice.Operands[2].(*ast.FunctionExpression); !ok || f.FunctionName != "list_value" || len(f.Arguments) != 0 { + t.Errorf("open slice end = %T", slice.Operands[2]) + } + f := n.SelectList[4].(*ast.FunctionExpression) + if f.Catalog != "s1" || f.Schema != "s3" || strings.Join(f.Qualification, ".") != "s1.s2.s3" { + t.Errorf("nested function = %q %q %v", f.Catalog, f.Schema, f.Qualification) + } + out, err := serialize.SelectStatementJSON(&ast.SelectStatement{Node: n}) + if err != nil { + t.Fatal(err) + } + for _, want := range []string{ + `"literal":{"kind":"INTEGER","text":"-9223372036854775808"}`, + `"qualified_name":{"path":["s1","s2","s3","f"]}`, + } { + if !strings.Contains(string(out), want) { + t.Errorf("serialization lacks %s", want) + } + } +} diff --git a/parser/misc_test.go b/parser/misc_test.go index 5d4a33a..9b737cc 100644 --- a/parser/misc_test.go +++ b/parser/misc_test.go @@ -499,12 +499,18 @@ func TestCollateNames(t *testing.T) { } // TestUnconvertibleNumberLiterals: a number token whose text has no -// value ("2.03.0") still parses — upstream throws InvalidInputException -// only while constructing the value, which is post-parse under the -// oracle's classification (found by cmd/difftest). +// value ("2.03.0") is a syntax error since v2.0.0 (the pinned oracle +// reports `syntax error at or near "2.03.0"`; before, the token parsed +// and failed only when the value was constructed). func TestUnconvertibleNumberLiterals(t *testing.T) { - parseOne(t, "SELECT 2.03.0") - parseOne(t, "SELECT list_position([1.0,2.03.0,]::varchar[], 'a')") - parseOne(t, "SELECT 12.5.5.5") - parseOne(t, "SELECT 999999999999999999999999999999999999999999.1.1") + for _, tc := range []struct{ sql, tok string }{ + {"SELECT 2.03.0", "2.03.0"}, + {"SELECT list_position([1.0,2.03.0,]::varchar[], 'a')", "2.03.0"}, + {"SELECT 12.5.5.5", "12.5.5.5"}, + {"SELECT 999999999999999999999999999999999999999999.1.1", "999999999999999999999999999999999999999999.1.1"}, + } { + if msg, want := parseErr(t, tc.sql), `syntax error at or near "`+tc.tok+`"`; msg != want { + t.Errorf("Parse(%q) = %q, want %q", tc.sql, msg, want) + } + } } diff --git a/parser/stmt_v2_test.go b/parser/stmt_v2_test.go new file mode 100644 index 0000000..a8d345e --- /dev/null +++ b/parser/stmt_v2_test.go @@ -0,0 +1,239 @@ +// stmt_v2_test.go: the statement-transformer behaviors added or changed +// by the DuckDB v2.0.0 pin. Every expected message was checked against +// the pinned v2.0.0 CLI. +package parser + +import ( + "reflect" + "strings" + "testing" + + "github.com/sqlc-dev/darkwing/ast" +) + +func TestStatementErrorsV2(t *testing.T) { + tests := []struct{ sql, msg string }{ + // CREATE TABLE (TransformCreateTableStmt / TransformCreateColumnList) + {"CREATE TABLE t ()", "Table must have at least one column!"}, + {"CREATE TABLE '' AS SELECT 42", "Empty table name not supported"}, + // TransformColumnDefinition + {"CREATE TABLE t (Foo)", "Column Foo must have a type or be defined as a GENERATED column."}, + {"CREATE TABLE t (_1a)", `Column "_1a" must have a type or be defined as a GENERATED column.`}, + {"CREATE TABLE t (a INT COLLATE nocase)", "Only VARCHAR columns can have collations!"}, + {"CREATE TABLE t (a VARCHAR[] COLLATE nocase)", "Only VARCHAR columns can have collations!"}, + {"CREATE TABLE t (a VARCHAR COLLATE nocase COLLATE noaccent)", "multiple COLLATE clauses not allowed"}, + {"CREATE TABLE t (a AS (1) COLLATE x)", "Collations are not supported on generated columns"}, + {"CREATE TABLE t (a INT DEFAULT 1 DEFAULT 2)", "Cannot define a default value twice"}, + {"CREATE TABLE t (a INT GENERATED BY DEFAULT AS (1))", "for a generated column, GENERATED ALWAYS must be specified"}, + {"CREATE TABLE t (a INT AS ((SELECT 1)))", `Expression of generated column "a" contains a subquery, which isn't allowed`}, + {"CREATE TABLE t (a INT USING COMPRESSION auto)", "Unrecognized option for column compression, expected none, uncompressed, rle, dictionary, pfor, bitpacking, fsst, chimp, patas, zstd, alp, alprd or roaring"}, + // TransformRelOptionList + {"CREATE TABLE t (a INT) WITH (x = 1, X = 2)", `Duplicate option "X" in WITH clause`}, + {"CREATE SCHEMA s WITH (a = 1, A = 2)", `Duplicate option "A" in WITH clause`}, + {"ALTER TABLE t SET (a = 1, a = 2)", `Duplicate option "a" in WITH clause`}, + {"ALTER SCHEMA s RESET (a = 2)", `Reset option "a" cannot set any value. Did you mean to use SET?`}, + // TransformExplainStatement -> PivotEntryCheck + {"EXPLAIN (SQL) PIVOT (SELECT 1 AS i) ON i", "PIVOT statements with pivot elements extracted from the data cannot be used in EXPLAIN (SQL) statements.\n" + + "In order to use PIVOT in a EXPLAIN (SQL) statement the PIVOT values must be manually specified, e.g.:\n" + + "PIVOT ... ON i IN (val1, val2, ...)"}, + // TransformCreateStatement + {"CREATE PERSISTENT TABLE t (a INT)", "PERSISTENT is only supported for CREATE SECRET"}, + {"CREATE TEMP INDEX i ON t (a)", "Temporary indexes are not supported"}, + // TransformCreateViewStmt + {"CREATE RECURSIVE VIEW v AS SELECT 1", "CREATE RECURSIVE VIEW requires a column list"}, + {"CREATE VIEW v WITH (x) AS SELECT 1", "Only DEFER_BINDING is currently supported as option for CREATE VIEW"}, + // CheckIntegerSequenceOption + {"CREATE SEQUENCE s INCREMENT BY 1.5", "Expected an integer argument for INCREMENT, got 1.5"}, + {"CREATE SEQUENCE s START WITH 'x'", "Expected an integer argument for START, got 'x'"}, + {"CREATE SEQUENCE s MINVALUE 1e3", "Expected an integer argument for MINVALUE, got 1e3"}, + {"CREATE SEQUENCE s MAXVALUE -2.5", "Expected an integer argument for MAXVALUE, got -2.5"}, + {"CREATE SEQUENCE s INCREMENT BY true", "Expected an integer argument for INCREMENT, got true"}, + {"CREATE SEQUENCE s INCREMENT 1.5 INCREMENT 2", "Expected an integer argument for INCREMENT, got 1.5"}, + {"ALTER SEQUENCE s INCREMENT BY 1.5", "Expected an integer argument for INCREMENT, got 1.5"}, + // TransformAddColumnEntry + {"ALTER TABLE t ADD COLUMN c INT PRIMARY KEY", "Adding columns with PRIMARY KEY constraints is not supported yet"}, + {"ALTER TABLE t ADD COLUMN c INT CHECK (c > 0)", "Adding columns with CHECK constraints is not supported yet"}, + {"ALTER TABLE t ADD COLUMN c INT REFERENCES o(a)", "Adding columns with FOREIGN KEY constraints is not supported yet"}, + {"ALTER TABLE t ADD COLUMN c INT USING COMPRESSION auto", "Unrecognized option for column compression"}, + {"ALTER TABLE t ADD COLUMN c INT COLLATE nocase", "Only VARCHAR columns can have collations!"}, + {"ALTER TABLE t ADD COLUMN c INT DEFAULT 1 DEFAULT 2", "Cannot define a default value twice"}, + // TransformAlterType + ApplyColumnCollation + {"ALTER TABLE t ALTER a TYPE INT COLLATE nocase", "Only VARCHAR columns can have collations!"}, + {"ALTER TABLE t ALTER a TYPE COLLATE nocase USING a", "Specify the VARCHAR type to set a collation"}, + // TransformCommentStatement + {"COMMENT ON COLUMN 'x' IS 'y'", "Invalid column reference: x"}, + {"COMMENT ON COLUMN Abc IS 'y'", "Invalid column reference: Abc"}, + {`COMMENT ON COLUMN "select" IS 'y'`, `Invalid column reference: "select"`}, + // SetCopyOptions / TransformGenericCopyOptionList / BuildGenericCopyOption + {"COPY t FROM 'f' USING DELIMITERS ',' (DELIMITER ';')", `Unexpected duplicate option "delimiter"`}, + {"COPY t TO 'f' (HEADER, header 1)", `Unexpected duplicate option "header"`}, + {"ATTACH 'x' (TYPE sqlite, type duckdb)", `Unexpected duplicate option "type"`}, + {"CREATE EXTERNAL RESOURCE 'x' AS r (a 1, a 2)", `Unexpected duplicate option "a"`}, + {"COPY t TO 'f' (PARTITION_PATH)", "PARTITION_PATH expects an expression"}, + {"COPY t TO 'f' (PARTITION_PATH (a, b))", "PARTITION_PATH expects a single expression"}, + {"COPY t TO 'f' (PARTITION_PATH (a DESC))", "PARTITION_PATH expects a single expression"}, + // TransformConnectToExternalResource + {"CONNECT TO NEW TEMPORARY EXTERNAL RESOURCE 'x' (a 1) (b 2)", "CONNECT TO NEW TEMPORARY EXTERNAL RESOURCE: the option list belongs to the resource, so the connection cannot take one of its own. Use `ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE ... AS (options); CONNECT ;` instead"}, + // TransformInsertStatement + {"INSERT INTO t OVERRIDING USER VALUE DEFAULT VALUES", "OVERRIDING SYSTEM|USER VALUE can not be combined with DEFAULT VALUES, please remove one of the two"}, + // TransformCreateExtensionRepositoryStmt + {"CREATE OR REPLACE EXTENSION REPOSITORY IF NOT EXISTS r PREFIX 'http://x'", "Cannot combine OR REPLACE with IF NOT EXISTS"}, + // TransformDropStatement / TransformDropSecret + {"DROP SECRET s CASCADE", "CASCADE and RESTRICT are not supported for DROP SECRET"}, + {"DROP TEMPORARY SECRET s FROM x", "Can not combine TEMPORARY with specifying a storage for drop secret"}, + // TransformVacuumParensOptions + {"VACUUM (ANALYZE, FOO)", `unrecognized VACUUM option "FOO"`}, + // transform_describe.cpp + {"SUMMARIZE", "Expected table name with SUMMARIZE"}, + {"SHOW ''", "Expected a table name, but got an empty string"}, + {"SHOW TABLES FROM a.b.c", `Expected "SHOW TABLES FROM database", "SHOW TABLES FROM schema", or "SHOW TABLES FROM database.schema"`}, + // TransformMacroDefinition (Identifier formatting is quoted) + {"CREATE MACRO m(a, A) AS a", `Duplicate parameter "A" in macro definition`}, + } + for _, tt := range tests { + if msg := parseErr(t, tt.sql); msg != "Parser Error: "+tt.msg && msg != tt.msg { + t.Errorf("Parse(%q): message = %q, want %q", tt.sql, msg, tt.msg) + } + } +} + +func TestStatementAcceptsV2(t *testing.T) { + // post-parse rejects upstream (NotImplemented/InvalidInput/Binder) + // and new grammar forms that must transform + for _, sql := range []string{ + "CREATE TABLE a.b.c.d (i INT)", + "CREATE TABLE t (a INT CONSTRAINT c NOT NULL CONSTRAINT d UNIQUE)", + "CREATE TABLE t (a INT REFERENCES o(b) ON DELETE RESTRICT ON UPDATE NO ACTION)", + "CREATE TABLE t (a INT REFERENCES o)", + "CREATE INDEX i ON t (a) WHERE a > 1", + "CREATE SCHEMA a.b.c", + "CREATE SECURE VIEW v AS SELECT 1", + "ALTER SEQUENCE s RENAME TO t", + "ALTER TABLE t ADD COLUMN IF NOT EXISTS c INT NOT NULL", + "ALTER TABLE t ADD COLUMN s.c INT NOT NULL", + "ALTER TABLE t DROP CONSTRAINT IF EXISTS c CASCADE", + "ALTER TABLE t RENAME TO 'x y'", + "ALTER SCHEMA s RENAME TO t", + "COPY t TO 'f' (PARTITION_PATH a || 'x')", + "ATTACH TO EXTERNAL RESOURCE r AS d", + "CONNECT TO EXTERNAL RESOURCE r (a 1)", + "DESTROY EXTERNAL RESOURCE r", + "TRUNCATE t CASCADE", + "TRUNCATE t AS x RESTRICT", + "VACUUM (FULL, FOO)", + "USE 'x.y'", + "DEALLOCATE 'p'", + "PREPARE 'p' AS SELECT 1", + "EXECUTE 'p'", + "DROP MACRO TABLE a.b.c.d", + "SHOW a.b", + } { + parseOne(t, sql) + } +} + +func TestStatementShapesV2(t *testing.T) { + // TargetAlias / TruncateOptions + del := parseAs[*ast.DeleteStatement](t, "DELETE FROM s.t x") + if ref := del.Table.(*ast.BaseTableRef); ref.Alias != "x" || ref.SchemaName != "s" { + t.Errorf("delete target = %+v", ref) + } + tr := parseAs[*ast.TruncateStatement](t, "TRUNCATE t AS x CASCADE") + if !tr.Cascade { + t.Errorf("truncate = %+v", tr) + } + // nested schema paths keep the component before the name + drop := parseAs[*ast.DropStatement](t, "DROP TABLE a.b.c.d, x.y") + want := []ast.QualifiedName{{Catalog: "a", Schema: "c", Name: "d"}, {Schema: "x", Name: "y"}} + if !reflect.DeepEqual(drop.Names, want) { + t.Errorf("drop names = %+v", drop.Names) + } + // UpdateSetClauseList concatenates elements and tuples + upd := parseAs[*ast.UpdateStatement](t, "UPDATE t SET a = 1, (b, c) = (2, 3)") + if !reflect.DeepEqual(upd.SetInfo.Columns, [][]string{{"a"}, {"b"}, {"c"}}) || len(upd.SetInfo.Expressions) != 3 { + t.Errorf("update set = %+v", upd.SetInfo) + } + ins := parseAs[*ast.InsertStatement](t, "INSERT INTO t OVERRIDING SYSTEM VALUE SELECT 1") + if ins.Overriding != "SYSTEM" { + t.Errorf("overriding = %q", ins.Overriding) + } + // CREATE INDEX qualifies plain column elements without USING + idx := createInfo[*ast.CreateIndexInfo](t, "CREATE INDEX i ON t (a, b + 1)") + if c, ok := idx.Elements[0].Expr.(*ast.ColumnRefExpression); !ok || !reflect.DeepEqual(c.ColumnNames, []string{"t", "a"}) { + t.Errorf("index element = %+v", idx.Elements[0].Expr) + } + view := createInfo[*ast.CreateViewInfo](t, "CREATE SECURE VIEW v WITH (defer_binding = true) AS SELECT 1") + if !view.Secure || len(view.Options) != 1 { + t.Errorf("view = %+v", view) + } + typ := createInfo[*ast.CreateTypeInfo](t, "CREATE TYPE e AS ENUM ('a', 'b')[]") + if typ.Type == nil || typ.Type.TypeName != "list" { + t.Errorf("enum array type = %+v", typ.Type) + } + // COPY legacy delimiter, dotted bare file names, stdin + cp := parseAs[*ast.CopyStatement](t, "COPY t FROM a.b.csv USING DELIMITERS '|'") + if cp.Info.FilePath != "a.b.csv" || len(cp.Info.Options) != 1 || cp.Info.Options[0].Name != "delimiter" { + t.Errorf("copy = %+v", cp.Info) + } + if cp := parseAs[*ast.CopyStatement](t, "COPY t FROM stdin"); cp.Info.FilePath != "/dev/stdin" { + t.Errorf("copy stdin = %q", cp.Info.FilePath) + } + // LOAD/INSTALL forms and the extension repository statements + load := parseAs[*ast.LoadStatement](t, "LOAD x FROM core AS y") + if load.Repository != "core" || !load.RepoIsAlias || load.Alias != "y" { + t.Errorf("load = %+v", load) + } + inst := parseAs[*ast.LoadStatement](t, "FORCE INSTALL AND LOAD x FROM 'http://r' VERSION 'v1'") + if !inst.LoadAfterInstall || inst.Kind != ast.LoadTypeForceInstall || inst.RepoIsAlias || inst.Version != "v1" { + t.Errorf("install = %+v", inst) + } + repo := parseAs[*ast.LoadStatement](t, "CREATE EXTENSION REPOSITORY IF NOT EXISTS 'r' WITH PREFIX 'http://x' USING PUBLIC KEYS 'a', 'b'") + if repo.Kind != ast.LoadTypeCreateRepository || repo.Repository != "r" || repo.RepositoryURL != "http://x" || + !reflect.DeepEqual(repo.PublicKeys, []string{"a", "b"}) || repo.OnConflict != ast.CreateIgnore { + t.Errorf("create repository = %+v", repo) + } + if d := parseAs[*ast.LoadStatement](t, "DROP EXTENSION REPOSITORY IF EXISTS r"); d.Kind != ast.LoadTypeDropRepository || !d.MissingOK { + t.Errorf("drop repository = %+v", d) + } + att := parseAs[*ast.AttachStatement](t, "ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'x' (a) AS d (b 2)") + if att.Alias != "d" || att.ExternalResource == nil || att.ExternalResource.Provider != "x" || + len(att.ExternalResource.Params) != 1 || len(att.Options) != 1 { + t.Errorf("attach to external resource = %+v", att) + } + // SHOW is settings-first; DESCRIBE 'lit' names the table + show := showRef(t, "SHOW memory_limit") + if show.ShowType != ast.ShowTypeShow || show.TableName != "memory_limit" || show.Query != nil { + t.Errorf("show = %+v", show) + } + // a string target matches DescribeBaseTableName first (a quoted + // table name), so it is described through a query + if d := showRef(t, "DESCRIBE 'f.csv'"); d.ShowType != ast.ShowTypeDescribe || d.Query == nil { + t.Errorf("describe literal = %+v", d) + } + if d := showRef(t, "SHOW 'lit'"); d.ShowType != ast.ShowTypeShow || d.TableName != "lit" { + t.Errorf("show literal = %+v", d) + } + if d := showRef(t, "SHOW databases"); d.ShowType != ast.ShowTypeShowSpecial || d.TableName != `"databases"` { + t.Errorf("show databases = %+v", d) + } + if d := showRef(t, "SHOW s.t"); d.ShowType != ast.ShowTypeShow || d.Query == nil || d.SchemaName != "s" { + t.Errorf("show qualified = %+v", d) + } + if !strings.Contains(parseErr(t, "SUMMARIZE"), "SUMMARIZE") { + t.Error("bare SUMMARIZE must be rejected") + } +} + +func showRef(t *testing.T, sql string) *ast.ShowRef { + t.Helper() + sel := parseAs[*ast.SelectStatement](t, sql) + node, ok := sel.Node.(*ast.SelectNode) + if !ok { + t.Fatalf("%s: node = %T", sql, sel.Node) + } + ref, ok := node.FromTable.(*ast.ShowRef) + if !ok { + t.Fatalf("%s: from = %T", sql, node.FromTable) + } + return ref +} diff --git a/parser/testdata/README.md b/parser/testdata/README.md index a7613c0..f7fac0d 100644 --- a/parser/testdata/README.md +++ b/parser/testdata/README.md @@ -4,10 +4,10 @@ Generated by cmd/regenerate - do not edit corpus files or expectations by hand; rerun the tool instead (see PLAN.md, § Conformance oracle and corpus). - Source: DuckDB test/sql/**/*.test and test/fuzzer/**/*.test -- Pinned commit: 8cbdaba6acb50db7780d22a65dd131584d472262 -- Oracle: DuckDB CLI v2.0.0-alpha38195 (nightly build of the pinned commit) -- Files: 4070, cases: 45214 (43807 must-accept, 1407 must-reject) -- Statements without an observed verdict (oracle timeout/crash): 12, dropped +- Pinned commit: d54cbbe3df17e8e5ce68312f483b4155836112aa +- Oracle: DuckDB CLI v2.0.0 (release build of the pinned commit) +- Files: 4925, cases: 56064 (54106 must-accept, 1958 must-reject) +- Statements without an observed verdict (oracle timeout/crash): 11, dropped Classification: the oracle runs each statement against :memory: with extension autoloading disabled. An error starting with "Parser Error" diff --git a/parser/testdata/corpus/fuzzer/afl/alter_if_exists.test b/parser/testdata/corpus/fuzzer/afl/alter_if_exists.test index 2a178c4..785e8c3 100644 --- a/parser/testdata/corpus/fuzzer/afl/alter_if_exists.test +++ b/parser/testdata/corpus/fuzzer/afl/alter_if_exists.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/alter_if_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE IF EXISTS t0 ADD COLUMN c1 INT; diff --git a/parser/testdata/corpus/fuzzer/afl/analyze_empty_table.test b/parser/testdata/corpus/fuzzer/afl/analyze_empty_table.test index 1fa4d94..2f1dc83 100644 --- a/parser/testdata/corpus/fuzzer/afl/analyze_empty_table.test +++ b/parser/testdata/corpus/fuzzer/afl/analyze_empty_table.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/analyze_empty_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA disable_optimizer diff --git a/parser/testdata/corpus/fuzzer/afl/case_map_cast.test b/parser/testdata/corpus/fuzzer/afl/case_map_cast.test index 32d539c..9dc6390 100644 --- a/parser/testdata/corpus/fuzzer/afl/case_map_cast.test +++ b/parser/testdata/corpus/fuzzer/afl/case_map_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/case_map_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRUE WHERE CASE MAP { } WHEN 'abc' [ ('any_string' IN (NULL::VARCHAR)): ] THEN TRUE END ; diff --git a/parser/testdata/corpus/fuzzer/afl/decimal_string_roundtrip.test b/parser/testdata/corpus/fuzzer/afl/decimal_string_roundtrip.test index cec6cc4..fbdf6fe 100644 --- a/parser/testdata/corpus/fuzzer/afl/decimal_string_roundtrip.test +++ b/parser/testdata/corpus/fuzzer/afl/decimal_string_roundtrip.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/decimal_string_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT .0 diff --git a/parser/testdata/corpus/fuzzer/afl/generate_series_null.test b/parser/testdata/corpus/fuzzer/afl/generate_series_null.test index 36c4f84..a9eea6e 100644 --- a/parser/testdata/corpus/fuzzer/afl/generate_series_null.test +++ b/parser/testdata/corpus/fuzzer/afl/generate_series_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/generate_series_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c0 FROM generate_series(NULL) t3(c0); diff --git a/parser/testdata/corpus/fuzzer/afl/grouping_empty_table.test b/parser/testdata/corpus/fuzzer/afl/grouping_empty_table.test index 8f3911d..30f5970 100644 --- a/parser/testdata/corpus/fuzzer/afl/grouping_empty_table.test +++ b/parser/testdata/corpus/fuzzer/afl/grouping_empty_table.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/grouping_empty_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c1 INT); diff --git a/parser/testdata/corpus/fuzzer/afl/invalid_foreign_key.test b/parser/testdata/corpus/fuzzer/afl/invalid_foreign_key.test index 3b151d2..194dcf4 100644 --- a/parser/testdata/corpus/fuzzer/afl/invalid_foreign_key.test +++ b/parser/testdata/corpus/fuzzer/afl/invalid_foreign_key.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/invalid_foreign_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table y(y int, foreign key (y) references y(y)); diff --git a/parser/testdata/corpus/fuzzer/afl/issue_7551.test b/parser/testdata/corpus/fuzzer/afl/issue_7551.test index f82ccb4..ecd1883 100644 --- a/parser/testdata/corpus/fuzzer/afl/issue_7551.test +++ b/parser/testdata/corpus/fuzzer/afl/issue_7551.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/issue_7551.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/afl/issue_8185.test b/parser/testdata/corpus/fuzzer/afl/issue_8185.test index e6a68ea..b3aadbc 100644 --- a/parser/testdata/corpus/fuzzer/afl/issue_8185.test +++ b/parser/testdata/corpus/fuzzer/afl/issue_8185.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/issue_8185.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v0 ( v1 INTEGER , v2 INTEGER) ; diff --git a/parser/testdata/corpus/fuzzer/afl/limit_out_of_range.test b/parser/testdata/corpus/fuzzer/afl/limit_out_of_range.test index 5e19f7f..07296a4 100644 --- a/parser/testdata/corpus/fuzzer/afl/limit_out_of_range.test +++ b/parser/testdata/corpus/fuzzer/afl/limit_out_of_range.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/limit_out_of_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 LIMIT 3493690519702624888078795276804013381392711238711408854154521934990547605008475834286773858253643735619391784938186674922945640543537290894084514784093972720748475288610394187481276081350259062592878908961890372712236217855377408.000000%; diff --git a/parser/testdata/corpus/fuzzer/afl/non_foldable_parameter.test b/parser/testdata/corpus/fuzzer/afl/non_foldable_parameter.test index f51cdfb..d729f91 100644 --- a/parser/testdata/corpus/fuzzer/afl/non_foldable_parameter.test +++ b/parser/testdata/corpus/fuzzer/afl/non_foldable_parameter.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/non_foldable_parameter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE p AS SELECT ?; diff --git a/parser/testdata/corpus/fuzzer/afl/random_join.test b/parser/testdata/corpus/fuzzer/afl/random_join.test index 51749ca..90ae093 100644 --- a/parser/testdata/corpus/fuzzer/afl/random_join.test +++ b/parser/testdata/corpus/fuzzer/afl/random_join.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/random_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c1 INT); diff --git a/parser/testdata/corpus/fuzzer/afl/self_referential_alias.test b/parser/testdata/corpus/fuzzer/afl/self_referential_alias.test index 1ea9d05..8c28fa9 100644 --- a/parser/testdata/corpus/fuzzer/afl/self_referential_alias.test +++ b/parser/testdata/corpus/fuzzer/afl/self_referential_alias.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/self_referential_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT x x WHERE x = 0; diff --git a/parser/testdata/corpus/fuzzer/afl/window_function_binder_error.test b/parser/testdata/corpus/fuzzer/afl/window_function_binder_error.test index eaaffb0..c68e207 100644 --- a/parser/testdata/corpus/fuzzer/afl/window_function_binder_error.test +++ b/parser/testdata/corpus/fuzzer/afl/window_function_binder_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/window_function_binder_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(x) OVER () FROM (SELECT 1) x(x); diff --git a/parser/testdata/corpus/fuzzer/afl/window_type_mismatch.test b/parser/testdata/corpus/fuzzer/afl/window_type_mismatch.test index a3f0297..1305797 100644 --- a/parser/testdata/corpus/fuzzer/afl/window_type_mismatch.test +++ b/parser/testdata/corpus/fuzzer/afl/window_type_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/afl/window_type_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT rank() OVER (), lag(NULL) OVER (); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/arg_minmax_by_decimal.test b/parser/testdata/corpus/fuzzer/duckfuzz/arg_minmax_by_decimal.test index b40ec5c..66ce98a 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/arg_minmax_by_decimal.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/arg_minmax_by_decimal.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/arg_minmax_by_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_const_columndatacopy.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_const_columndatacopy.test index fd237f6..28d5839 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_const_columndatacopy.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_const_columndatacopy.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_const_columndatacopy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uuids(uuid UUID); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_const_null_cast.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_const_null_cast.test index 0a18c00..4b8d6f5 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_const_null_cast.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_const_null_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_const_null_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(c8 UTINYINT); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_distance.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_distance.test index dc0d749..4b535e3 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_distance.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_distance.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_distance.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_distance('asdf', [42]::INTEGER[1]); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_group_by_sample.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_group_by_sample.test index 0a3886a..011c362 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_group_by_sample.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_group_by_sample.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_group_by_sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE array_tbl(c50 INTEGER[2][]); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_hash.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_hash.test index e9e3869..e5009d4 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_hash.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_hash.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_hash.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA threads = 1 diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_list_gather_cast.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_list_gather_cast.test index 978959a..25e4ee2 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_list_gather_cast.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_list_gather_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_list_gather_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table my_table as select * exclude(small_enum, medium_enum, large_enum) from test_all_types(); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_serialization_flattening.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_serialization_flattening.test index 647ed73..07cd870 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_serialization_flattening.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_serialization_flattening.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_serialization_flattening.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(c2 BOOL, c48 STRUCT(a INTEGER[3], b VARCHAR[3]));; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_nullness.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_nullness.test index 099ebc6..feedc08 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_nullness.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_nullness.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_slice_nullness.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_reverse(NULL::INTEGER[]) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_underflow.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_underflow.test index eb9b868..9fe024b 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_underflow.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_underflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_slice_underflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ([1, 2, 3])[0:-9223372036854775808]; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_vector_type.test b/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_vector_type.test index eb79341..1e6ebce 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_vector_type.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/array_slice_vector_type.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/array_slice_vector_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/arrow_scan_subquery_nullptr.test b/parser/testdata/corpus/fuzzer/duckfuzz/arrow_scan_subquery_nullptr.test index 9a15807..cbb0c37 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/arrow_scan_subquery_nullptr.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/arrow_scan_subquery_nullptr.test @@ -1,9 +1,13 @@ # source: test/fuzzer/duckfuzz/arrow_scan_subquery_nullptr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (SELECT * FROM arrow_scan(NULL, NULL, NULL)); -- ok == +SELECT * FROM (SELECT * FROM arrow_scan()); +-- +ok +== diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_minmax.test b/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_minmax.test index 7de53ca..a1094ad 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_minmax.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_minmax.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/bitstring_agg_minmax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select bitstring_agg(4741, 1706, -128); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_uhugeint.test b/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_uhugeint.test index 056a912..c94f230 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_uhugeint.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_uhugeint.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/bitstring_agg_uhugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as select hugeint, uhugeint from test_all_types(); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_unfoldable.test b/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_unfoldable.test index d4679d6..6deba4f 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_unfoldable.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/bitstring_agg_unfoldable.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/bitstring_agg_unfoldable.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT bitstring_agg(i, i, 42) FROM range(10) t(i); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/column_alias_exist.test b/parser/testdata/corpus/fuzzer/duckfuzz/column_alias_exist.test index e5039a3..335d70c 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/column_alias_exist.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/column_alias_exist.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/column_alias_exist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types() limit 0 diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/complex_join_cardinality_assert.test b/parser/testdata/corpus/fuzzer/duckfuzz/complex_join_cardinality_assert.test index eb2507a..894134e 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/complex_join_cardinality_assert.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/complex_join_cardinality_assert.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/complex_join_cardinality_assert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers(i int); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_hugeint.test b/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_hugeint.test index 093729e..89c454d 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_hugeint.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_hugeint.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/compressed_materialization_hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT TRY_CAST(COLUMNS(*) AS HUGEINT) FROM all_types AS t51(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c47, c48, c49, c50) ORDER BY c14 DESC NULLS FIRST diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_json.test b/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_json.test index 38f4e2d..aba5feb 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_json.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/compressed_materialization_json.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/compressed_materialization_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select distinct json_array(); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/correlated_subqueries.test b/parser/testdata/corpus/fuzzer/duckfuzz/correlated_subqueries.test index bd30418..6941470 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/correlated_subqueries.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/correlated_subqueries.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/correlated_subqueries.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE mytable(i INT) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/corrupted_parquet.test b/parser/testdata/corpus/fuzzer/duckfuzz/corrupted_parquet.test index a3031b5..cb4dc15 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/corrupted_parquet.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/corrupted_parquet.test @@ -1,8 +1,12 @@ # source: test/fuzzer/duckfuzz/corrupted_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit +from read_parquet('data/parquet-testing/broken/fuzzer4360.parquet', filename=true); +-- +ok +== from read_parquet('data/parquet-testing/broken/fuzzer4360.parquet', filename=true, filename=map { 1: {name: 'cool_column', type: 'VARCHAR', default_value: NULL} }); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/create_sort_key_strings.test b/parser/testdata/corpus/fuzzer/duckfuzz/create_sort_key_strings.test index e4a738c..555b123 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/create_sort_key_strings.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/create_sort_key_strings.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/create_sort_key_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2(c38 STRUCT(a INTEGER, b VARCHAR)); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/duck_fuzz_column_binding_tests.test b/parser/testdata/corpus/fuzzer/duckfuzz/duck_fuzz_column_binding_tests.test index b8d67fb..9e33226 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/duck_fuzz_column_binding_tests.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/duck_fuzz_column_binding_tests.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/duck_fuzz_column_binding_tests.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ref_8.uint AS c0, diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/duckdb_fuzzer_4430.test b/parser/testdata/corpus/fuzzer/duckfuzz/duckdb_fuzzer_4430.test index 9a5404a..9e081f6 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/duckdb_fuzzer_4430.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/duckdb_fuzzer_4430.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/duckdb_fuzzer_4430.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/duckdb_fuzzer_4430.db' AS db1 diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/empty_result_pullup_delim_joins.test b/parser/testdata/corpus/fuzzer/duckfuzz/empty_result_pullup_delim_joins.test index 1ebfa9a..a7d8498 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/empty_result_pullup_delim_joins.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/empty_result_pullup_delim_joins.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/empty_result_pullup_delim_joins.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit call dbgen(sf=0.1); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/enum_const_cast.test b/parser/testdata/corpus/fuzzer/duckfuzz/enum_const_cast.test index 7b34401..c84417e 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/enum_const_cast.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/enum_const_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/enum_const_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST(TRY_CAST((ceil(2918) AND shobj_description(5, (NOT 6203))) AS ENUM('enum_0', 'enum_1', 'enum_2', 'enum_3', 'enum_4', 'enum_5', 'enum_6', 'enum_7', 'enum_8', 'enum_9', 'enum_10', 'enum_11', 'enum_12', 'enum_13', 'enum_14', 'enum_15', 'enum_16', 'enum_17', 'enum_18', 'enum_19', 'enum_20', 'enum_21', 'enum_22', 'enum_23', 'enum_24', 'enum_25', 'enum_26', 'enum_27', 'enum_28', 'enum_29', 'enum_30', 'enum_31', 'enum_32', 'enum_33', 'enum_34', 'enum_35', 'enum_36', 'enum_37', 'enum_38', 'enum_39', 'enum_40', 'enum_41', 'enum_42', 'enum_43', 'enum_44', 'enum_45', 'enum_46', 'enum_47', 'enum_48', 'enum_49', 'enum_50', 'enum_51', 'enum_52', 'enum_53', 'enum_54', 'enum_55', 'enum_56', 'enum_57', 'enum_58', 'enum_59', 'enum_60', 'enum_61', 'enum_62', 'enum_63', 'enum_64', 'enum_65', 'enum_66', 'enum_67', 'enum_68', 'enum_69', 'enum_70', 'enum_71', 'enum_72', 'enum_73', 'enum_74', 'enum_75', 'enum_76', 'enum_77', 'enum_78', 'enum_79', 'enum_80', 'enum_81', 'enum_82', 'enum_83', 'enum_84', 'enum_85', 'enum_86', 'enum_87', 'enum_88', 'enum_89', 'enum_90', 'enum_91', 'enum_92', 'enum_93', 'enum_94', 'enum_95', 'enum_96', 'enum_97', 'enum_98', 'enum_99', 'enum_100', 'enum_101', 'enum_102', 'enum_103', 'enum_104', 'enum_105', 'enum_106', 'enum_107', 'enum_108', 'enum_109', 'enum_110', 'enum_111', 'enum_112', 'enum_113', 'enum_114', 'enum_115', 'enum_116', 'enum_117', 'enum_118', 'enum_119', 'enum_120', 'enum_121', 'enum_122', 'enum_123', 'enum_124', 'enum_125', 'enum_126', 'enum_127', 'enum_128', 'enum_129', 'enum_130', 'enum_131', 'enum_132', 'enum_133', 'enum_134', 'enum_135', 'enum_136', 'enum_137', 'enum_138', 'enum_139', 'enum_140', 'enum_141', 'enum_142', 'enum_143', 'enum_144', 'enum_145', 'enum_146', 'enum_147', 'enum_148', 'enum_149', 'enum_150', 'enum_151', 'enum_152', 'enum_153', 'enum_154', 'enum_155', 'enum_156', 'enum_157', 'enum_158', 'enum_159', 'enum_160', 'enum_161', 'enum_162', 'enum_163', 'enum_164', 'enum_165', 'enum_166', 'enum_167', 'enum_168', 'enum_169', 'enum_170', 'enum_171', 'enum_172', 'enum_173', 'enum_174', 'enum_175', 'enum_176', 'enum_177', 'enum_178', 'enum_179', 'enum_180', 'enum_181', 'enum_182', 'enum_183', 'enum_184', 'enum_185', 'enum_186', 'enum_187', 'enum_188', 'enum_189', 'enum_190', 'enum_191', 'enum_192', 'enum_193', 'enum_194', 'enum_195', 'enum_196', 'enum_197', 'enum_198', 'enum_199', 'enum_200', 'enum_201', 'enum_202', 'enum_203', 'enum_204', 'enum_205', 'enum_206', 'enum_207', 'enum_208', 'enum_209', 'enum_210', 'enum_211', 'enum_212', 'enum_213', 'enum_214', 'enum_215', 'enum_216', 'enum_217', 'enum_218', 'enum_219', 'enum_220', 'enum_221', 'enum_222', 'enum_223', 'enum_224', 'enum_225', 'enum_226', 'enum_227', 'enum_228', 'enum_229', 'enum_230', 'enum_231', 'enum_232', 'enum_233', 'enum_234', 'enum_235', 'enum_236', 'enum_237', 'enum_238', 'enum_239', 'enum_240', 'enum_241', 'enum_242', 'enum_243', 'enum_244', 'enum_245', 'enum_246', 'enum_247', 'enum_248', 'enum_249', 'enum_250', 'enum_251', 'enum_252', 'enum_253', 'enum_254', 'enum_255', 'enum_256', 'enum_257', 'enum_258', 'enum_259', 'enum_260', 'enum_261', 'enum_262', 'enum_263', 'enum_264', 'enum_265', 'enum_266', 'enum_267', 'enum_268', 'enum_269', 'enum_270', 'enum_271', 'enum_272', 'enum_273', 'enum_274', 'enum_275', 'enum_276', 'enum_277', 'enum_278', 'enum_279', 'enum_280', 'enum_281', 'enum_282', 'enum_283', 'enum_284', 'enum_285', 'enum_286', 'enum_287', 'enum_288', 'enum_289', 'enum_290', 'enum_291', 'enum_292', 'enum_293', 'enum_294', 'enum_295', 'enum_296', 'enum_297', 'enum_298', 'enum_299')) AS ENUM('enum_0', 'enum_69999')) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/filter_combiner_assert.test b/parser/testdata/corpus/fuzzer/duckfuzz/filter_combiner_assert.test index 4c87e12..6121287 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/filter_combiner_assert.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/filter_combiner_assert.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/filter_combiner_assert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE partsupp(ps_partkey INTEGER, ps_suppkey INTEGER, ps_availqty INTEGER, ps_supplycost DECIMAL(15,2), ps_comment VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2698.test b/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2698.test index 13d40e8..1eada0f 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2698.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2698.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/fuzzer_issue_2698.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (TRY_CAST(5572 AS INTEGER[3][3]) BETWEEN json(c48) AND NULL) FROM all_types AS t51(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c47, c48, c49, c50); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2980.test b/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2980.test index cbcfce2..3d0c8bf 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2980.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_2980.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/fuzzer_issue_2980.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT NULL FROM query_table(NULL, NULL) AS t6(c1, c2, c3, c4, c5) , region AS t10(c7, c8, c9) HAVING TRY_CAST(c3 AS STRUCT(a INTEGER, b VARCHAR)[3]) QUALIFY (c3 BETWEEN c8 AND (c4 BETWEEN c4 AND c5)); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_4325.test b/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_4325.test index ceca0e2..c608730 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_4325.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/fuzzer_issue_4325.test @@ -1,9 +1,13 @@ # source: test/fuzzer/duckfuzz/fuzzer_issue_4325.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL FROM (VALUES (0, 1, 2, 3, 4)) AS _("0", "1", "2", "3", "4") INNER JOIN (SELECT NULL LIMIT rank_dense() OVER (PARTITION BY #4, NULL, NULL, NULL ROWS BETWEEN c83 PRECEDING AND CURRENT ROW)) USING (c19) -- ok == +SELECT * FROM (SELECT NULL LIMIT rank_dense() OVER ()) +-- +ok +== diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/generate_null_timestamp.test b/parser/testdata/corpus/fuzzer/duckfuzz/generate_null_timestamp.test index 6ccb54d..1c87b8c 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/generate_null_timestamp.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/generate_null_timestamp.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/generate_null_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/group_by_all_positional_ref.test b/parser/testdata/corpus/fuzzer/duckfuzz/group_by_all_positional_ref.test index d433453..eacb4e2 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/group_by_all_positional_ref.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/group_by_all_positional_ref.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/group_by_all_positional_ref.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers(c1 int, c2 int); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/hash_constant.test b/parser/testdata/corpus/fuzzer/duckfuzz/hash_constant.test index 38bc1f2..097aaaa 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/hash_constant.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/hash_constant.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/hash_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT hash(main.list_value(main.list_value(), main.list_value(42, 999, NULL, NULL, -42), NULL, main.list_value(), main.list_value(42, 999, NULL, NULL, -42))) FROM all_types; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/having_window_bind.test b/parser/testdata/corpus/fuzzer/duckfuzz/having_window_bind.test index 1f94290..fb982e9 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/having_window_bind.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/having_window_bind.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/having_window_bind.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit call dbgen(sf=0); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/hugeint_negate_underflow.test b/parser/testdata/corpus/fuzzer/duckfuzz/hugeint_negate_underflow.test index 10b5ef1..4863fa7 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/hugeint_negate_underflow.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/hugeint_negate_underflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/hugeint_negate_underflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select -(-170141183460469231731687303715884105728)::HUGEINT; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/invalid_make_time.test b/parser/testdata/corpus/fuzzer/duckfuzz/invalid_make_time.test index bf03c8b..450b1d3 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/invalid_make_time.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/invalid_make_time.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/invalid_make_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT make_time(64, 64, 157); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/json_execute_serialized_null.test b/parser/testdata/corpus/fuzzer/duckfuzz/json_execute_serialized_null.test index 96382b0..a8d49a3 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/json_execute_serialized_null.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/json_execute_serialized_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/json_execute_serialized_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit call dbgen(sf=0.01); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_null.test b/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_null.test index c3e2bbb..ec4ec12 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_null.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/json_extract_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_extract('hello world', CAST(NULL AS json)) AS c1 diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_string_null.test b/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_string_null.test index 85cded0..c413796 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_string_null.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/json_extract_string_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/json_extract_string_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into integers values (1); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/json_functions_null_params.test b/parser/testdata/corpus/fuzzer/duckfuzz/json_functions_null_params.test index 3fd6ccc..5d5b342 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/json_functions_null_params.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/json_functions_null_params.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/json_functions_null_params.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT from_json('{"duck": 42}', NULL::JSON) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/julian_overflow.test b/parser/testdata/corpus/fuzzer/duckfuzz/julian_overflow.test index dce329a..21da384 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/julian_overflow.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/julian_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/julian_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT julian(c1) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/late_materialization_filter.test b/parser/testdata/corpus/fuzzer/duckfuzz/late_materialization_filter.test index 6cf61d8..dfd97d7 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/late_materialization_filter.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/late_materialization_filter.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/late_materialization_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(z int, i bool, j bool, k uhugeint); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/limit_offset_macro_subquery.test b/parser/testdata/corpus/fuzzer/duckfuzz/limit_offset_macro_subquery.test index 66ecac6..2108ad4 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/limit_offset_macro_subquery.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/limit_offset_macro_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/limit_offset_macro_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42 OFFSET format_type(NULL, 2515); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/limit_percent_subquery.test b/parser/testdata/corpus/fuzzer/duckfuzz/limit_percent_subquery.test index a9dad3d..6aca631 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/limit_percent_subquery.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/limit_percent_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/limit_percent_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(i INT); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/list_try_cast.test b/parser/testdata/corpus/fuzzer/duckfuzz/list_try_cast.test index b53657e..ad19d04 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/list_try_cast.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/list_try_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/list_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers(i INT[]); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/list_zip_no_args.test b/parser/testdata/corpus/fuzzer/duckfuzz/list_zip_no_args.test index e12f098..eab58a7 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/list_zip_no_args.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/list_zip_no_args.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/list_zip_no_args.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_zip() AS c0; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/logger_null.test b/parser/testdata/corpus/fuzzer/duckfuzz/logger_null.test index a1d398b..093ea85 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/logger_null.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/logger_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/logger_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM duckdb_logs(denormalized_table := NULL) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/map_concat_type_mismatch.test b/parser/testdata/corpus/fuzzer/duckfuzz/map_concat_type_mismatch.test index e4cf985..aefea3f 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/map_concat_type_mismatch.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/map_concat_type_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/map_concat_type_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT map_concat(42, 42); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/null_arguments.test b/parser/testdata/corpus/fuzzer/duckfuzz/null_arguments.test index 7419234..7eca7d6 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/null_arguments.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/null_arguments.test @@ -1,15 +1,15 @@ # source: test/fuzzer/duckfuzz/null_arguments.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL FROM parquet_scan(NULL, "schema" := NULL); -- -error: Parser Error: parquet_scan cannot take NULL list as parameter +error: Parser Error: "parquet_scan" cannot take NULL list as parameter == SELECT NULL FROM read_ndjson_auto(NULL, timestamp_format := 5469, "compression" := NULL) -- -error: Parser Error: read_ndjson_auto cannot take NULL list as parameter +error: Parser Error: "read_ndjson_auto" cannot take NULL list as parameter == COPY (VALUES (NULL), (NULL)) TO '{TEST_DIR}/test_null_args.parquet' (FORMAT PARQUET); -- @@ -21,7 +21,7 @@ ok == FROM read_ndjson(NULL, filename := NULL) AS t14(c11, c12, c13) -- -error: Parser Error: read_ndjson cannot take NULL list as parameter +error: Parser Error: "read_ndjson" cannot take NULL list as parameter == COPY (VALUES (NULL), (NULL)) TO '{TEST_DIR}/test_null_args.csv' (FORMAT CSV); -- diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/null_checkpoint.test b/parser/testdata/corpus/fuzzer/duckfuzz/null_checkpoint.test index 711ad18..941f0cc 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/null_checkpoint.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/null_checkpoint.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/null_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL checkpoint(NULL) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/ordagg_nargs.test b/parser/testdata/corpus/fuzzer/duckfuzz/ordagg_nargs.test index 47faf2c..579ec95 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/ordagg_nargs.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/ordagg_nargs.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/ordagg_nargs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT cume_dist() OVER (ROWS diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/order_by_positional_reference.test b/parser/testdata/corpus/fuzzer/duckfuzz/order_by_positional_reference.test index 4301736..5465c46 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/order_by_positional_reference.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/order_by_positional_reference.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/order_by_positional_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c1, c2, NULL FROM integers ORDER BY #10 diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/pivot_aggregate_mismatch.test b/parser/testdata/corpus/fuzzer/duckfuzz/pivot_aggregate_mismatch.test index 3d7e362..f6a03e1 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/pivot_aggregate_mismatch.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/pivot_aggregate_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/pivot_aggregate_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM (VALUES (42)) t(i) PIVOT (current_date() FOR (i) IN (41)) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/qualify_column_reference.test b/parser/testdata/corpus/fuzzer/duckfuzz/qualify_column_reference.test index f21efc7..34c1a8e 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/qualify_column_reference.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/qualify_column_reference.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/qualify_column_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(c1 int, c2 int); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test b/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test index abde81a..d06d936 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test @@ -1,13 +1,13 @@ # source: test/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_ndjson([42]) -- -ok +error: Parser Error: "read_ndjson" reader can only take a list of strings, structs or variants as a parameter == FROM read_csv_auto([42]) -- -ok +error: Parser Error: "read_csv_auto" reader can only take a list of strings, structs or variants as a parameter == diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test.metadata.json b/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test.metadata.json new file mode 100644 index 0000000..8c1f97b --- /dev/null +++ b/parser/testdata/corpus/fuzzer/duckfuzz/read_ndjson_non_varchar_input.test.metadata.json @@ -0,0 +1,6 @@ +{ + "todo": { + "38a79c41adc26b4d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "632be0b856f08a70": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/regex_syntax_2889.test b/parser/testdata/corpus/fuzzer/duckfuzz/regex_syntax_2889.test index 1412423..d49fbb1 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/regex_syntax_2889.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/regex_syntax_2889.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/regex_syntax_2889.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42 diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/regexp_replace_constant.test b/parser/testdata/corpus/fuzzer/duckfuzz/regexp_replace_constant.test index 853d16a..a05d382 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/regexp_replace_constant.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/regexp_replace_constant.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/regexp_replace_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_extract('foobarbaz', 'B..', 0, NULL); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/repeat_row_null.test b/parser/testdata/corpus/fuzzer/duckfuzz/repeat_row_null.test index 6ad24d1..31d8dd5 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/repeat_row_null.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/repeat_row_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/repeat_row_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM repeat_row(NULL) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/repeat_wrong_number.test b/parser/testdata/corpus/fuzzer/duckfuzz/repeat_wrong_number.test index ab369b6..5345813 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/repeat_wrong_number.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/repeat_wrong_number.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/repeat_wrong_number.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM repeat(42, 1) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/semi_join_has_correct_left_right_relations.test b/parser/testdata/corpus/fuzzer/duckfuzz/semi_join_has_correct_left_right_relations.test index e0ca19b..55f7e93 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/semi_join_has_correct_left_right_relations.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/semi_join_has_correct_left_right_relations.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/semi_join_has_correct_left_right_relations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select range a from range(300); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/string_to_nested_cast_sample.test b/parser/testdata/corpus/fuzzer/duckfuzz/string_to_nested_cast_sample.test index 75f06fa..6fa24d7 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/string_to_nested_cast_sample.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/string_to_nested_cast_sample.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/string_to_nested_cast_sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE part AS SELECT concat('this is a long part name', i) AS p_name FROM range(20000) t(i); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/strptime_const_arg.test b/parser/testdata/corpus/fuzzer/duckfuzz/strptime_const_arg.test index d860a18..446bee8 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/strptime_const_arg.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/strptime_const_arg.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/strptime_const_arg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types AS diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/temporal_avg.test b/parser/testdata/corpus/fuzzer/duckfuzz/temporal_avg.test index dbdf8dc..03e49cb 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/temporal_avg.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/temporal_avg.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/temporal_avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT avg(c1) FROM test_vector_types(CAST(NULL AS TIMESTAMP)) AS test_vector_types(c1); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/test_vector_types_double_3.test b/parser/testdata/corpus/fuzzer/duckfuzz/test_vector_types_double_3.test index e047536..42528c3 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/test_vector_types_double_3.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/test_vector_types_double_3.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/test_vector_types_double_3.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM test_vector_types(CAST(NULL AS DOUBLE[3]), CAST(NULL AS DOUBLE[3])) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/to_weeks_overflow.test b/parser/testdata/corpus/fuzzer/duckfuzz/to_weeks_overflow.test index f237fe5..ca9dcd6 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/to_weeks_overflow.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/to_weeks_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/to_weeks_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT to_weeks(#4) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/tuple_data_empty_heap.test b/parser/testdata/corpus/fuzzer/duckfuzz/tuple_data_empty_heap.test index f733c33..ee2fc22 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/tuple_data_empty_heap.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/tuple_data_empty_heap.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/tuple_data_empty_heap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set threads=4; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/union_dict_tag.test b/parser/testdata/corpus/fuzzer/duckfuzz/union_dict_tag.test index a56deba..ee19e5c 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/union_dict_tag.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/union_dict_tag.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/union_dict_tag.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT encode("union"::varchar), "double" FROM all_types where "double"; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/unpivot_multiple_in.test b/parser/testdata/corpus/fuzzer/duckfuzz/unpivot_multiple_in.test index 6c0f1c5..4f46178 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/unpivot_multiple_in.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/unpivot_multiple_in.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/unpivot_multiple_in.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM (SELECT 42) AS t1 UNPIVOT (c2 FOR c2 IN (6317) c2 IN (NULL)) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/vector_size_out_of_range.test b/parser/testdata/corpus/fuzzer/duckfuzz/vector_size_out_of_range.test index 2ec4007..5eedbf4 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/vector_size_out_of_range.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/vector_size_out_of_range.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/vector_size_out_of_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT OPERATOR ( / ) + ARRAY [ ] :: INTERVAL SECONDS [9] [ ] :: SETOF NCHAR ARRAY :: FLOAT ; diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/vector_type.test b/parser/testdata/corpus/fuzzer/duckfuzz/vector_type.test index b4fb8d6..78b2ea3 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/vector_type.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/vector_type.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/vector_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT vector_type(42::INTEGER) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/visit_operator_expressions_in_column_lifetime_analyzer.test b/parser/testdata/corpus/fuzzer/duckfuzz/visit_operator_expressions_in_column_lifetime_analyzer.test index 5ccfdb9..4ccaf05 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/visit_operator_expressions_in_column_lifetime_analyzer.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/visit_operator_expressions_in_column_lifetime_analyzer.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/visit_operator_expressions_in_column_lifetime_analyzer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT arg_min(CAST(ref_19."varchar" AS VARCHAR), CAST(ref_3."varchar" AS VARCHAR)) OVER (PARTITION BY ref_23."bit" ORDER BY ref_6.ubigint) FROM (SELECT (SELECT "time" FROM main.all_types LIMIT 1 OFFSET 4) AS c1 FROM main.all_types AS ref_0 WHERE ref_0."varchar") AS subq_0 INNER JOIN (SELECT ref_1."varchar" AS c5 FROM main.all_types AS ref_1 LEFT JOIN main.all_types AS ref_2 ON ((ref_1."varchar" !~~* ref_2."varchar")) WHERE (ref_2."varchar" ~~* ref_2."varchar")) AS subq_1 INNER JOIN main.all_types AS ref_3 ON ((subq_1.c5 ~~ ref_3."varchar")) ON ((ref_3."varchar" ~~ subq_1.c5)) INNER JOIN main.all_types AS ref_4 RIGHT JOIN main.all_types AS ref_5 RIGHT JOIN main.all_types AS ref_6 ON ((ref_6."varchar" ^@ ref_6."varchar")) ON ((ref_6.timestamp_ms IS NOT NULL)) INNER JOIN main.all_types AS ref_7 INNER JOIN main.all_types AS ref_8 ON ((ref_7.dec_4_1 = ref_8.dec_4_1)) LEFT JOIN main.all_types AS ref_9 RIGHT JOIN main.all_types AS ref_10 ON ((ref_9.timestamp_array = ref_10.timestamp_array)) ON ((ref_10."varchar" ^@ ref_8."varchar")) INNER JOIN main.all_types AS ref_11 RIGHT JOIN main.all_types AS ref_12 ON ((ref_11."float" = ref_12."float")) LEFT JOIN main.all_types AS ref_13 ON ((ref_11."varchar" ~~~ ref_12."varchar")) ON ((CAST(NULL AS VARCHAR) ~~~ ref_7."varchar")) ON (((((ref_8."varchar" !~~ ref_8."varchar") AND (ref_6."varchar" ~~~ ref_12."varchar")) OR (ref_9."varchar" ~~ CAST(NULL AS VARCHAR))) AND (ref_6."varchar" ^@ ref_8."varchar") AND (ref_11.hugeint IS NOT NULL))) RIGHT JOIN (SELECT (SELECT bool FROM main.all_types LIMIT 1 OFFSET 6) AS c4) AS subq_2 ON ((ref_9."varchar" !~~ ref_8."varchar")) ON ((ref_3."int" = ref_10."int")) INNER JOIN (SELECT 41 AS c0 FROM main.all_types AS ref_15 RIGHT JOIN main.all_types AS ref_16 ON ((ref_15."varchar" = ref_16."varchar"))) AS subq_3 INNER JOIN (SELECT ref_17.timestamp_s AS c5 FROM main.all_types AS ref_17) AS subq_4 ON ((subq_3.c0 IS NULL)) INNER JOIN main.all_types AS ref_18 LEFT JOIN main.all_types AS ref_19 INNER JOIN main.all_types AS ref_20 INNER JOIN main.all_types AS ref_21 ON (((SELECT "varchar" FROM main.all_types LIMIT 1 OFFSET 4) ~~~ ref_21."varchar")) ON ((ref_21."timestamp" IS NULL)) ON ((ref_19."varchar" ~~~ ref_20."varchar")) RIGHT JOIN main.all_types AS ref_22 LEFT JOIN main.all_types AS ref_23 ON (1) ON (0) ON ((0 OR (ref_20."varchar" !~~* ref_19."varchar") OR ((EXISTS(SELECT (SELECT tinyint FROM main.all_types LIMIT 1 OFFSET 1) AS c0 FROM main.all_types AS ref_24 WHERE (ref_23."bigint" IS NOT NULL) LIMIT 110) OR (ref_23.timestamp_array IS NULL)) AND (ref_21."varchar" ^@ ref_21."varchar")))) ON ((ref_9."varchar" ~~* chr(CAST(ref_18."int" AS INTEGER)))) WHERE (ref_12."varchar" ^@ ref_20."varchar"); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/window_expression_equality.test b/parser/testdata/corpus/fuzzer/duckfuzz/window_expression_equality.test index 96eb1dd..d2ee46a 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/window_expression_equality.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/window_expression_equality.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/window_expression_equality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types(c1 BOOL, c9 SMALLINT, c10 UINTEGER, c36 VARCHAR[]); diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/window_negate_stats.test b/parser/testdata/corpus/fuzzer/duckfuzz/window_negate_stats.test index 15c21b9..0f07410 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/window_negate_stats.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/window_negate_stats.test @@ -1,9 +1,9 @@ # source: test/fuzzer/duckfuzz/window_negate_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SELECT max(c34) FILTER (WHERE c26) OVER (PARTITION BY c23 ROWS BETWEEN COALESCE(c5, 0) PRECEDING AND CURRENT ROW) +SELECT max(c34) FILTER (WHERE c26) OVER (PARTITION BY c23 ROWS BETWEEN GREATEST(COALESCE(c5, 0), 0) PRECEDING AND CURRENT ROW) FROM all_types AS t43(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43) ORDER BY ALL NULLS LAST -- diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/window_null_range.test b/parser/testdata/corpus/fuzzer/duckfuzz/window_null_range.test index 2e0211e..8b13eee 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/window_null_range.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/window_null_range.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/window_null_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as select * exclude(small_enum, medium_enum, large_enum) diff --git a/parser/testdata/corpus/fuzzer/duckfuzz/window_order_bind_failure.test b/parser/testdata/corpus/fuzzer/duckfuzz/window_order_bind_failure.test index 38ed11c..bd1b605 100644 --- a/parser/testdata/corpus/fuzzer/duckfuzz/window_order_bind_failure.test +++ b/parser/testdata/corpus/fuzzer/duckfuzz/window_order_bind_failure.test @@ -1,6 +1,6 @@ # source: test/fuzzer/duckfuzz/window_order_bind_failure.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types AS SELECT * EXCLUDE(small_enum, medium_enum, large_enum) diff --git a/parser/testdata/corpus/fuzzer/fuzz_not_operator.test b/parser/testdata/corpus/fuzzer/fuzz_not_operator.test index 3ab1aab..0474299 100644 --- a/parser/testdata/corpus/fuzzer/fuzz_not_operator.test +++ b/parser/testdata/corpus/fuzzer/fuzz_not_operator.test @@ -1,6 +1,6 @@ # source: test/fuzzer/fuzz_not_operator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i FROM (select 1) tbl(i) WHERE ( 2060771621 != i + -2134619525 ) diff --git a/parser/testdata/corpus/fuzzer/fuzz_not_unpacked_columns.test b/parser/testdata/corpus/fuzzer/fuzz_not_unpacked_columns.test index 9b4693d..189dfb5 100644 --- a/parser/testdata/corpus/fuzzer/fuzz_not_unpacked_columns.test +++ b/parser/testdata/corpus/fuzzer/fuzz_not_unpacked_columns.test @@ -1,6 +1,6 @@ # source: test/fuzzer/fuzz_not_unpacked_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v00 (c01 INT, c02 STRING); diff --git a/parser/testdata/corpus/fuzzer/issue4298.test b/parser/testdata/corpus/fuzzer/issue4298.test index 408fe58..bed5d22 100644 --- a/parser/testdata/corpus/fuzzer/issue4298.test +++ b/parser/testdata/corpus/fuzzer/issue4298.test @@ -1,6 +1,6 @@ # source: test/fuzzer/issue4298.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * FROM test_all_types(use_large_bignum := -32768, use_large_enum := NULL); diff --git a/parser/testdata/corpus/fuzzer/nthvalue_indexing.test b/parser/testdata/corpus/fuzzer/nthvalue_indexing.test index 27108fa..488c996 100644 --- a/parser/testdata/corpus/fuzzer/nthvalue_indexing.test +++ b/parser/testdata/corpus/fuzzer/nthvalue_indexing.test @@ -1,6 +1,6 @@ # source: test/fuzzer/nthvalue_indexing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT nth_value(NULL, (c2 IS NOT NULL)::BIGINT) OVER (PARTITION BY 1585 ROWS BETWEEN CURRENT ROW AND CURRENT ROW) diff --git a/parser/testdata/corpus/fuzzer/pedro/C_C++_API_query_verification.test b/parser/testdata/corpus/fuzzer/pedro/C_C++_API_query_verification.test index 7a21039..720f5f7 100644 --- a/parser/testdata/corpus/fuzzer/pedro/C_C++_API_query_verification.test +++ b/parser/testdata/corpus/fuzzer/pedro/C_C++_API_query_verification.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/C_C++_API_query_verification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/aggregate_assertion_errors.test b/parser/testdata/corpus/fuzzer/pedro/aggregate_assertion_errors.test index d455b00..7a07d5d 100644 --- a/parser/testdata/corpus/fuzzer/pedro/aggregate_assertion_errors.test +++ b/parser/testdata/corpus/fuzzer/pedro/aggregate_assertion_errors.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/aggregate_assertion_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT reservoir_quantile(1, 1 ORDER BY 1); diff --git a/parser/testdata/corpus/fuzzer/pedro/alter_column_generated.test b/parser/testdata/corpus/fuzzer/pedro/alter_column_generated.test index cf8a4e9..4ac0baf 100644 --- a/parser/testdata/corpus/fuzzer/pedro/alter_column_generated.test +++ b/parser/testdata/corpus/fuzzer/pedro/alter_column_generated.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/alter_column_generated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 AS (1), c1 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/alter_dependencies.test b/parser/testdata/corpus/fuzzer/pedro/alter_dependencies.test index 1fcd195..23e939d 100644 --- a/parser/testdata/corpus/fuzzer/pedro/alter_dependencies.test +++ b/parser/testdata/corpus/fuzzer/pedro/alter_dependencies.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/alter_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c2 INT, c1 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/alter_dependency_conflict.test b/parser/testdata/corpus/fuzzer/pedro/alter_dependency_conflict.test index 3d453aa..24e7a63 100644 --- a/parser/testdata/corpus/fuzzer/pedro/alter_dependency_conflict.test +++ b/parser/testdata/corpus/fuzzer/pedro/alter_dependency_conflict.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/alter_dependency_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t4 (c0 DATE, c3 VARCHAR(10)); diff --git a/parser/testdata/corpus/fuzzer/pedro/alter_table_rowid.test b/parser/testdata/corpus/fuzzer/pedro/alter_table_rowid.test index 8451e9e..b7efbef 100644 --- a/parser/testdata/corpus/fuzzer/pedro/alter_table_rowid.test +++ b/parser/testdata/corpus/fuzzer/pedro/alter_table_rowid.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/alter_table_rowid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 INTEGER, c1 INTEGER); diff --git a/parser/testdata/corpus/fuzzer/pedro/alter_type_null_mix.test b/parser/testdata/corpus/fuzzer/pedro/alter_type_null_mix.test index e642dee..ae11022 100644 --- a/parser/testdata/corpus/fuzzer/pedro/alter_type_null_mix.test +++ b/parser/testdata/corpus/fuzzer/pedro/alter_type_null_mix.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/alter_type_null_mix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c0 USMALLINT); diff --git a/parser/testdata/corpus/fuzzer/pedro/alter_virtual_column_segfault.test b/parser/testdata/corpus/fuzzer/pedro/alter_virtual_column_segfault.test index 4255e29..c35fd2f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/alter_virtual_column_segfault.test +++ b/parser/testdata/corpus/fuzzer/pedro/alter_virtual_column_segfault.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/alter_virtual_column_segfault.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c2 AS (1) VIRTUAL, c1 TIME WITH TIME ZONE); diff --git a/parser/testdata/corpus/fuzzer/pedro/analyze_nonexistant.test b/parser/testdata/corpus/fuzzer/pedro/analyze_nonexistant.test index 9ae1580..a5ca941 100644 --- a/parser/testdata/corpus/fuzzer/pedro/analyze_nonexistant.test +++ b/parser/testdata/corpus/fuzzer/pedro/analyze_nonexistant.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/analyze_nonexistant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 TINYINT); diff --git a/parser/testdata/corpus/fuzzer/pedro/another_binder_error.test b/parser/testdata/corpus/fuzzer/pedro/another_binder_error.test index 0abc406..5ce5105 100644 --- a/parser/testdata/corpus/fuzzer/pedro/another_binder_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/another_binder_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/another_binder_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT avg(0) c0, (SELECT 0 OFFSET c0); diff --git a/parser/testdata/corpus/fuzzer/pedro/art_concatenate_prefix.test b/parser/testdata/corpus/fuzzer/pedro/art_concatenate_prefix.test index 609dcd3..2ad2fc8 100644 --- a/parser/testdata/corpus/fuzzer/pedro/art_concatenate_prefix.test +++ b/parser/testdata/corpus/fuzzer/pedro/art_concatenate_prefix.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/art_concatenate_prefix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/art_prefix_error.test b/parser/testdata/corpus/fuzzer/pedro/art_prefix_error.test index 6aac757..89e4a5f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/art_prefix_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/art_prefix_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/art_prefix_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 BLOB PRIMARY KEY); diff --git a/parser/testdata/corpus/fuzzer/pedro/between_mark_reference.test b/parser/testdata/corpus/fuzzer/pedro/between_mark_reference.test index c88b6e7..8c01802 100644 --- a/parser/testdata/corpus/fuzzer/pedro/between_mark_reference.test +++ b/parser/testdata/corpus/fuzzer/pedro/between_mark_reference.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/between_mark_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 WHERE '23:' > ALL(SELECT '0') BETWEEN false AND true; diff --git a/parser/testdata/corpus/fuzzer/pedro/between_type_mismatch.test b/parser/testdata/corpus/fuzzer/pedro/between_type_mismatch.test index aaf4cb2..f241ea5 100644 --- a/parser/testdata/corpus/fuzzer/pedro/between_type_mismatch.test +++ b/parser/testdata/corpus/fuzzer/pedro/between_type_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/between_type_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 USMALLINT); diff --git a/parser/testdata/corpus/fuzzer/pedro/binder_assertion_error.test b/parser/testdata/corpus/fuzzer/pedro/binder_assertion_error.test index 361f3b5..995ac5c 100644 --- a/parser/testdata/corpus/fuzzer/pedro/binder_assertion_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/binder_assertion_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/binder_assertion_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT 2) c0 WHERE (SELECT (SELECT (SELECT c0))); diff --git a/parser/testdata/corpus/fuzzer/pedro/binder_error_with_having_statement.test b/parser/testdata/corpus/fuzzer/pedro/binder_error_with_having_statement.test index 9d5b3a3..fb699d8 100644 --- a/parser/testdata/corpus/fuzzer/pedro/binder_error_with_having_statement.test +++ b/parser/testdata/corpus/fuzzer/pedro/binder_error_with_having_statement.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/binder_error_with_having_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2(c1 INT, c2 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/blob_wrong_optimization.test b/parser/testdata/corpus/fuzzer/pedro/blob_wrong_optimization.test index a46d36a..09666c7 100644 --- a/parser/testdata/corpus/fuzzer/pedro/blob_wrong_optimization.test +++ b/parser/testdata/corpus/fuzzer/pedro/blob_wrong_optimization.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/blob_wrong_optimization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW t1(c1, c0) AS (SELECT 1, max(c0) FROM t0); diff --git a/parser/testdata/corpus/fuzzer/pedro/buffer_manager_out_of_memory.test b/parser/testdata/corpus/fuzzer/pedro/buffer_manager_out_of_memory.test index 3434c37..713f1ae 100644 --- a/parser/testdata/corpus/fuzzer/pedro/buffer_manager_out_of_memory.test +++ b/parser/testdata/corpus/fuzzer/pedro/buffer_manager_out_of_memory.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/buffer_manager_out_of_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA MEMORY_LIMIT='10MB'; diff --git a/parser/testdata/corpus/fuzzer/pedro/buffer_manager_resize_issue.test b/parser/testdata/corpus/fuzzer/pedro/buffer_manager_resize_issue.test index 1c68759..71669dc 100644 --- a/parser/testdata/corpus/fuzzer/pedro/buffer_manager_resize_issue.test +++ b/parser/testdata/corpus/fuzzer/pedro/buffer_manager_resize_issue.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/buffer_manager_resize_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c1 INT, c0 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_assertion_error.test b/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_assertion_error.test index 41e1e73..431ccd2 100644 --- a/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_assertion_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_assertion_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/cardinality_estimator_assertion_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM (SELECT 2) t0, (SELECT 3) t1 WHERE INTERVAL '1' DAYS USING SAMPLE (1 ROWS) REPEATABLE (1); diff --git a/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_runtime_issue.test b/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_runtime_issue.test index 92229b5..05ccbbf 100644 --- a/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_runtime_issue.test +++ b/parser/testdata/corpus/fuzzer/pedro/cardinality_estimator_runtime_issue.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/cardinality_estimator_runtime_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 AS (SELECT 2); diff --git a/parser/testdata/corpus/fuzzer/pedro/comparison_to_string.test b/parser/testdata/corpus/fuzzer/pedro/comparison_to_string.test index 8a153b6..e7cc624 100644 --- a/parser/testdata/corpus/fuzzer/pedro/comparison_to_string.test +++ b/parser/testdata/corpus/fuzzer/pedro/comparison_to_string.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/comparison_to_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 WHERE (1 IS DISTINCT FROM 1) > ANY(SELECT 2); diff --git a/parser/testdata/corpus/fuzzer/pedro/complex_offset_clause_crash.test b/parser/testdata/corpus/fuzzer/pedro/complex_offset_clause_crash.test index 7fb1928..db8f103 100644 --- a/parser/testdata/corpus/fuzzer/pedro/complex_offset_clause_crash.test +++ b/parser/testdata/corpus/fuzzer/pedro/complex_offset_clause_crash.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/complex_offset_clause_crash.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 6 OFFSET count(*) FILTER ((SELECT 2 UNION (SELECT 2) OFFSET (SELECT LAST))) OVER (); diff --git a/parser/testdata/corpus/fuzzer/pedro/complex_type_all_subquery.test b/parser/testdata/corpus/fuzzer/pedro/complex_type_all_subquery.test index bc2acdb..66e7305 100644 --- a/parser/testdata/corpus/fuzzer/pedro/complex_type_all_subquery.test +++ b/parser/testdata/corpus/fuzzer/pedro/complex_type_all_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/complex_type_all_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit VALUES((0, 0) = ALL(SELECT 2)); diff --git a/parser/testdata/corpus/fuzzer/pedro/concurrent_catalog_usage.test b/parser/testdata/corpus/fuzzer/pedro/concurrent_catalog_usage.test index 0facd65..9e8df25 100644 --- a/parser/testdata/corpus/fuzzer/pedro/concurrent_catalog_usage.test +++ b/parser/testdata/corpus/fuzzer/pedro/concurrent_catalog_usage.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/concurrent_catalog_usage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 AS (SELECT 42); diff --git a/parser/testdata/corpus/fuzzer/pedro/concurrent_set_threads.test b/parser/testdata/corpus/fuzzer/pedro/concurrent_set_threads.test index f4aa34a..9f42a84 100644 --- a/parser/testdata/corpus/fuzzer/pedro/concurrent_set_threads.test +++ b/parser/testdata/corpus/fuzzer/pedro/concurrent_set_threads.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/concurrent_set_threads.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads={i} diff --git a/parser/testdata/corpus/fuzzer/pedro/constraints_temp_table.test b/parser/testdata/corpus/fuzzer/pedro/constraints_temp_table.test index a1eabc1..186b387 100644 --- a/parser/testdata/corpus/fuzzer/pedro/constraints_temp_table.test +++ b/parser/testdata/corpus/fuzzer/pedro/constraints_temp_table.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/constraints_temp_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 INT, c0 INT CONSTRAINT k1 REFERENCES t0(c0) UNIQUE); diff --git a/parser/testdata/corpus/fuzzer/pedro/correlated_in_segv.test b/parser/testdata/corpus/fuzzer/pedro/correlated_in_segv.test index 9d954f5..23dfefd 100644 --- a/parser/testdata/corpus/fuzzer/pedro/correlated_in_segv.test +++ b/parser/testdata/corpus/fuzzer/pedro/correlated_in_segv.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/correlated_in_segv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT 1 WHERE 1 IN (c0) GROUP BY ()) FROM (SELECT 1) t0(c0); diff --git a/parser/testdata/corpus/fuzzer/pedro/correlated_limit_rowid.test b/parser/testdata/corpus/fuzzer/pedro/correlated_limit_rowid.test index 7795c9c..8d60478 100644 --- a/parser/testdata/corpus/fuzzer/pedro/correlated_limit_rowid.test +++ b/parser/testdata/corpus/fuzzer/pedro/correlated_limit_rowid.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/correlated_limit_rowid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT 1 LIMIT t1.rowid) FROM t1 NATURAL JOIN t0; diff --git a/parser/testdata/corpus/fuzzer/pedro/correlated_offset_subquery.test b/parser/testdata/corpus/fuzzer/pedro/correlated_offset_subquery.test index 64503e6..11dcb55 100644 --- a/parser/testdata/corpus/fuzzer/pedro/correlated_offset_subquery.test +++ b/parser/testdata/corpus/fuzzer/pedro/correlated_offset_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/correlated_offset_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT 1 OFFSET c0) FROM (VALUES(1)) c0; diff --git a/parser/testdata/corpus/fuzzer/pedro/correlated_subquery_downcast_error.test b/parser/testdata/corpus/fuzzer/pedro/correlated_subquery_downcast_error.test index 219e950..d40de0d 100644 --- a/parser/testdata/corpus/fuzzer/pedro/correlated_subquery_downcast_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/correlated_subquery_downcast_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/correlated_subquery_downcast_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) OVER() = ANY(SELECT * FROM t0 t1 WHERE(c0 = t0.c0)) FROM t0; diff --git a/parser/testdata/corpus/fuzzer/pedro/create_index_error.test b/parser/testdata/corpus/fuzzer/pedro/create_index_error.test index 543b282..716c7d7 100644 --- a/parser/testdata/corpus/fuzzer/pedro/create_index_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/create_index_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/create_index_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 VARCHAR, c1 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/create_replace_table_union.test b/parser/testdata/corpus/fuzzer/pedro/create_replace_table_union.test index 7d286ee..3d514af 100644 --- a/parser/testdata/corpus/fuzzer/pedro/create_replace_table_union.test +++ b/parser/testdata/corpus/fuzzer/pedro/create_replace_table_union.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/create_replace_table_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t0 AS ((SELECT 1) UNION ALL ((SELECT 2) INTERSECT ALL (SELECT 2))); diff --git a/parser/testdata/corpus/fuzzer/pedro/currval_sequence_dependency.test b/parser/testdata/corpus/fuzzer/pedro/currval_sequence_dependency.test index 067f3b6..7d78ddf 100644 --- a/parser/testdata/corpus/fuzzer/pedro/currval_sequence_dependency.test +++ b/parser/testdata/corpus/fuzzer/pedro/currval_sequence_dependency.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/currval_sequence_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE seq; diff --git a/parser/testdata/corpus/fuzzer/pedro/date_int_optimizer_error.test b/parser/testdata/corpus/fuzzer/pedro/date_int_optimizer_error.test index d776836..da6f862 100644 --- a/parser/testdata/corpus/fuzzer/pedro/date_int_optimizer_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/date_int_optimizer_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/date_int_optimizer_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM t0 WHERE DATE '2010-1-1' = 2; diff --git a/parser/testdata/corpus/fuzzer/pedro/decimal_with_invalid_scale.test b/parser/testdata/corpus/fuzzer/pedro/decimal_with_invalid_scale.test index 13f41b1..40073e7 100644 --- a/parser/testdata/corpus/fuzzer/pedro/decimal_with_invalid_scale.test +++ b/parser/testdata/corpus/fuzzer/pedro/decimal_with_invalid_scale.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/decimal_with_invalid_scale.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE x(x DECIMAL(38763269, 77914819)); diff --git a/parser/testdata/corpus/fuzzer/pedro/delete_add_column.test b/parser/testdata/corpus/fuzzer/pedro/delete_add_column.test index c9781d5..2b149cf 100644 --- a/parser/testdata/corpus/fuzzer/pedro/delete_add_column.test +++ b/parser/testdata/corpus/fuzzer/pedro/delete_add_column.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/delete_add_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT 1 c1; diff --git a/parser/testdata/corpus/fuzzer/pedro/delete_using_bindings.test b/parser/testdata/corpus/fuzzer/pedro/delete_using_bindings.test index aafcbda..e9911c5 100644 --- a/parser/testdata/corpus/fuzzer/pedro/delete_using_bindings.test +++ b/parser/testdata/corpus/fuzzer/pedro/delete_using_bindings.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/delete_using_bindings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM t0 USING ((SELECT 1) t1 INNER JOIN (SELECT 2) t2 ON t0.c0); diff --git a/parser/testdata/corpus/fuzzer/pedro/drop_gcol.test b/parser/testdata/corpus/fuzzer/pedro/drop_gcol.test index 4951c75..e4dc9e1 100644 --- a/parser/testdata/corpus/fuzzer/pedro/drop_gcol.test +++ b/parser/testdata/corpus/fuzzer/pedro/drop_gcol.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/drop_gcol.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 INT AS (0), c1 INT, CHECK(c1 > 0)); diff --git a/parser/testdata/corpus/fuzzer/pedro/duplicate_cte.test b/parser/testdata/corpus/fuzzer/pedro/duplicate_cte.test index 41f2f7c..a3ad9b7 100644 --- a/parser/testdata/corpus/fuzzer/pedro/duplicate_cte.test +++ b/parser/testdata/corpus/fuzzer/pedro/duplicate_cte.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/duplicate_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t0 AS (SELECT 2) INSERT INTO t0 (WITH t0 AS (SELECT 2) SELECT 2); diff --git a/parser/testdata/corpus/fuzzer/pedro/duplicate_using_clause.test b/parser/testdata/corpus/fuzzer/pedro/duplicate_using_clause.test index 9e0d403..0f2d93a 100644 --- a/parser/testdata/corpus/fuzzer/pedro/duplicate_using_clause.test +++ b/parser/testdata/corpus/fuzzer/pedro/duplicate_using_clause.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/duplicate_using_clause.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/escaped_trim_function_call.test b/parser/testdata/corpus/fuzzer/pedro/escaped_trim_function_call.test index 31415d8..d4ed9f9 100644 --- a/parser/testdata/corpus/fuzzer/pedro/escaped_trim_function_call.test +++ b/parser/testdata/corpus/fuzzer/pedro/escaped_trim_function_call.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/escaped_trim_function_call.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT "trim"('hello'); diff --git a/parser/testdata/corpus/fuzzer/pedro/export_parquet_generated.test b/parser/testdata/corpus/fuzzer/pedro/export_parquet_generated.test index 4de50af..984fe71 100644 --- a/parser/testdata/corpus/fuzzer/pedro/export_parquet_generated.test +++ b/parser/testdata/corpus/fuzzer/pedro/export_parquet_generated.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/export_parquet_generated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit BEGIN; diff --git a/parser/testdata/corpus/fuzzer/pedro/first_value_window_crash.test b/parser/testdata/corpus/fuzzer/pedro/first_value_window_crash.test index 08da5d4..895a2c0 100644 --- a/parser/testdata/corpus/fuzzer/pedro/first_value_window_crash.test +++ b/parser/testdata/corpus/fuzzer/pedro/first_value_window_crash.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/first_value_window_crash.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT first_value((1 || mode() WITHIN GROUP (ORDER BY 1)) IGNORE NULLS) OVER () FROM t1; diff --git a/parser/testdata/corpus/fuzzer/pedro/floating_point_conversion_overflow.test b/parser/testdata/corpus/fuzzer/pedro/floating_point_conversion_overflow.test index 79f3509..3e020d5 100644 --- a/parser/testdata/corpus/fuzzer/pedro/floating_point_conversion_overflow.test +++ b/parser/testdata/corpus/fuzzer/pedro/floating_point_conversion_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/floating_point_conversion_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 0::{float_type}::{type} diff --git a/parser/testdata/corpus/fuzzer/pedro/floating_point_inequality.test b/parser/testdata/corpus/fuzzer/pedro/floating_point_inequality.test index 459d92e..2910e13 100644 --- a/parser/testdata/corpus/fuzzer/pedro/floating_point_inequality.test +++ b/parser/testdata/corpus/fuzzer/pedro/floating_point_inequality.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/floating_point_inequality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT -0::DOUBLE, 0::DOUBLE; diff --git a/parser/testdata/corpus/fuzzer/pedro/force_external_blob.test b/parser/testdata/corpus/fuzzer/pedro/force_external_blob.test index 019332a..9b648b1 100644 --- a/parser/testdata/corpus/fuzzer/pedro/force_external_blob.test +++ b/parser/testdata/corpus/fuzzer/pedro/force_external_blob.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/force_external_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA DEBUG_FORCE_EXTERNAL=1; diff --git a/parser/testdata/corpus/fuzzer/pedro/force_no_cross_product.test b/parser/testdata/corpus/fuzzer/pedro/force_no_cross_product.test index 621886b..af8f47a 100644 --- a/parser/testdata/corpus/fuzzer/pedro/force_no_cross_product.test +++ b/parser/testdata/corpus/fuzzer/pedro/force_no_cross_product.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/force_no_cross_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA debug_force_no_cross_product=1; diff --git a/parser/testdata/corpus/fuzzer/pedro/forced_parallelism_empty_select.test b/parser/testdata/corpus/fuzzer/pedro/forced_parallelism_empty_select.test index 0c11995..a245eac 100644 --- a/parser/testdata/corpus/fuzzer/pedro/forced_parallelism_empty_select.test +++ b/parser/testdata/corpus/fuzzer/pedro/forced_parallelism_empty_select.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/forced_parallelism_empty_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA verify_parallelism; diff --git a/parser/testdata/corpus/fuzzer/pedro/foreign_key_binding_issue.test b/parser/testdata/corpus/fuzzer/pedro/foreign_key_binding_issue.test index 858f6cd..40e420e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/foreign_key_binding_issue.test +++ b/parser/testdata/corpus/fuzzer/pedro/foreign_key_binding_issue.test @@ -1,11 +1,11 @@ # source: test/fuzzer/pedro/foreign_key_binding_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 INT, UNIQUE (c0, c0)); -- -error: Parser Error: column "c0" appears twice in primary key constraint +error: Parser Error: column ""c0"" appears twice in primary key constraint == CREATE TABLE t0 (c0 INT, FOREIGN KEY (c0, c0) REFERENCES t0(c0, c0), UNIQUE (c0, c0)); -- diff --git a/parser/testdata/corpus/fuzzer/pedro/foreign_key_type_mismatch.test b/parser/testdata/corpus/fuzzer/pedro/foreign_key_type_mismatch.test index 44b40c4..6891c7c 100644 --- a/parser/testdata/corpus/fuzzer/pedro/foreign_key_type_mismatch.test +++ b/parser/testdata/corpus/fuzzer/pedro/foreign_key_type_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/foreign_key_type_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c2 INT CONSTRAINT k0 UNIQUE, c0 DECIMAL, CONSTRAINT k1 FOREIGN KEY (c0) REFERENCES t0 (c2)); diff --git a/parser/testdata/corpus/fuzzer/pedro/gcol_stack_overflow.test b/parser/testdata/corpus/fuzzer/pedro/gcol_stack_overflow.test index 6bb591f..d508d41 100644 --- a/parser/testdata/corpus/fuzzer/pedro/gcol_stack_overflow.test +++ b/parser/testdata/corpus/fuzzer/pedro/gcol_stack_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/gcol_stack_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c2 AS (c0) VIRTUAL, c0 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/group_by_all_row_alias.test b/parser/testdata/corpus/fuzzer/pedro/group_by_all_row_alias.test index f87375d..1c65e89 100644 --- a/parser/testdata/corpus/fuzzer/pedro/group_by_all_row_alias.test +++ b/parser/testdata/corpus/fuzzer/pedro/group_by_all_row_alias.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/group_by_all_row_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c1 c2, ROW(t0.c1, c2) FROM t0 GROUP BY ALL; diff --git a/parser/testdata/corpus/fuzzer/pedro/hash_finalize_race.test b/parser/testdata/corpus/fuzzer/pedro/hash_finalize_race.test index 3cc2721..9441cc3 100644 --- a/parser/testdata/corpus/fuzzer/pedro/hash_finalize_race.test +++ b/parser/testdata/corpus/fuzzer/pedro/hash_finalize_race.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/hash_finalize_race.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE t4; diff --git a/parser/testdata/corpus/fuzzer/pedro/having_query_wrong_result.test b/parser/testdata/corpus/fuzzer/pedro/having_query_wrong_result.test index 8c87831..e1d5f78 100644 --- a/parser/testdata/corpus/fuzzer/pedro/having_query_wrong_result.test +++ b/parser/testdata/corpus/fuzzer/pedro/having_query_wrong_result.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/having_query_wrong_result.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT nextval('seq'); diff --git a/parser/testdata/corpus/fuzzer/pedro/having_subquery_failed_to_bind.test b/parser/testdata/corpus/fuzzer/pedro/having_subquery_failed_to_bind.test index 9074d5d..3b2f139 100644 --- a/parser/testdata/corpus/fuzzer/pedro/having_subquery_failed_to_bind.test +++ b/parser/testdata/corpus/fuzzer/pedro/having_subquery_failed_to_bind.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/having_subquery_failed_to_bind.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sum(c2) c0 FROM (SELECT 1) t1(c2) HAVING (SELECT c0); diff --git a/parser/testdata/corpus/fuzzer/pedro/in_clause_optimization_error.test b/parser/testdata/corpus/fuzzer/pedro/in_clause_optimization_error.test index 78d2bdb..e3cf21f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/in_clause_optimization_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/in_clause_optimization_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/in_clause_optimization_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t0 VALUES (42) diff --git a/parser/testdata/corpus/fuzzer/pedro/in_clause_setop_rewrite.test b/parser/testdata/corpus/fuzzer/pedro/in_clause_setop_rewrite.test index 87f9b2f..90fa98f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/in_clause_setop_rewrite.test +++ b/parser/testdata/corpus/fuzzer/pedro/in_clause_setop_rewrite.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/in_clause_setop_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t0(id int); diff --git a/parser/testdata/corpus/fuzzer/pedro/incomplete_checkpoint.test b/parser/testdata/corpus/fuzzer/pedro/incomplete_checkpoint.test index 7f7034f..b4bf9b8 100644 --- a/parser/testdata/corpus/fuzzer/pedro/incomplete_checkpoint.test +++ b/parser/testdata/corpus/fuzzer/pedro/incomplete_checkpoint.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/incomplete_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA wal_autocheckpoint='1TB'; diff --git a/parser/testdata/corpus/fuzzer/pedro/incorrect_offset_result.test b/parser/testdata/corpus/fuzzer/pedro/incorrect_offset_result.test index 7501ac2..9ce94fc 100644 --- a/parser/testdata/corpus/fuzzer/pedro/incorrect_offset_result.test +++ b/parser/testdata/corpus/fuzzer/pedro/incorrect_offset_result.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/incorrect_offset_result.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t0 (VALUES (1, 1),(2, 2),(3, 3)); diff --git a/parser/testdata/corpus/fuzzer/pedro/index_current_timestamp.test b/parser/testdata/corpus/fuzzer/pedro/index_current_timestamp.test index d253bb0..a2a8269 100644 --- a/parser/testdata/corpus/fuzzer/pedro/index_current_timestamp.test +++ b/parser/testdata/corpus/fuzzer/pedro/index_current_timestamp.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/index_current_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT, c1 VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/pedro/index_generated_column.test b/parser/testdata/corpus/fuzzer/pedro/index_generated_column.test index 72ffa1e..f17250e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/index_generated_column.test +++ b/parser/testdata/corpus/fuzzer/pedro/index_generated_column.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/index_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX i0 ON t0 USING ART ((c0 + c1)); diff --git a/parser/testdata/corpus/fuzzer/pedro/index_insert_from_union.test b/parser/testdata/corpus/fuzzer/pedro/index_insert_from_union.test index 1aa5f93..cbe3792 100644 --- a/parser/testdata/corpus/fuzzer/pedro/index_insert_from_union.test +++ b/parser/testdata/corpus/fuzzer/pedro/index_insert_from_union.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/index_insert_from_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 (c1 INT, PRIMARY KEY (c1)); diff --git a/parser/testdata/corpus/fuzzer/pedro/index_not_updated_returning.test b/parser/testdata/corpus/fuzzer/pedro/index_not_updated_returning.test index d2fffad..2bc2c7f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/index_not_updated_returning.test +++ b/parser/testdata/corpus/fuzzer/pedro/index_not_updated_returning.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/index_not_updated_returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 AS SELECT 1 c1, 1 c2; diff --git a/parser/testdata/corpus/fuzzer/pedro/index_on_altered_table.test b/parser/testdata/corpus/fuzzer/pedro/index_on_altered_table.test index 1f9e43d..2bf2558 100644 --- a/parser/testdata/corpus/fuzzer/pedro/index_on_altered_table.test +++ b/parser/testdata/corpus/fuzzer/pedro/index_on_altered_table.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/index_on_altered_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CHECKPOINT diff --git a/parser/testdata/corpus/fuzzer/pedro/insert_or_replace_only_pk.test b/parser/testdata/corpus/fuzzer/pedro/insert_or_replace_only_pk.test index 8d940ea..a65abfa 100644 --- a/parser/testdata/corpus/fuzzer/pedro/insert_or_replace_only_pk.test +++ b/parser/testdata/corpus/fuzzer/pedro/insert_or_replace_only_pk.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/insert_or_replace_only_pk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 (c1 INT PRIMARY KEY); diff --git a/parser/testdata/corpus/fuzzer/pedro/intersect_correlated_subquery.test b/parser/testdata/corpus/fuzzer/pedro/intersect_correlated_subquery.test index 68a10f3..1a65f4a 100644 --- a/parser/testdata/corpus/fuzzer/pedro/intersect_correlated_subquery.test +++ b/parser/testdata/corpus/fuzzer/pedro/intersect_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/intersect_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 TINYINT); diff --git a/parser/testdata/corpus/fuzzer/pedro/intersect_empty_array.test b/parser/testdata/corpus/fuzzer/pedro/intersect_empty_array.test index 246f58d..c6c3ec8 100644 --- a/parser/testdata/corpus/fuzzer/pedro/intersect_empty_array.test +++ b/parser/testdata/corpus/fuzzer/pedro/intersect_empty_array.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/intersect_empty_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 2 INTERSECT VALUES([]); diff --git a/parser/testdata/corpus/fuzzer/pedro/is_distinct_from_validation.test b/parser/testdata/corpus/fuzzer/pedro/is_distinct_from_validation.test index b591e8c..a771e26 100644 --- a/parser/testdata/corpus/fuzzer/pedro/is_distinct_from_validation.test +++ b/parser/testdata/corpus/fuzzer/pedro/is_distinct_from_validation.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/is_distinct_from_validation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (0 IS DISTINCT FROM 2) = 0; diff --git a/parser/testdata/corpus/fuzzer/pedro/lag_window_function.test b/parser/testdata/corpus/fuzzer/pedro/lag_window_function.test index 525744b..ee29027 100644 --- a/parser/testdata/corpus/fuzzer/pedro/lag_window_function.test +++ b/parser/testdata/corpus/fuzzer/pedro/lag_window_function.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/lag_window_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT lag(1) OVER (ORDER BY 0 RANGE BETWEEN CURRENT ROW AND 1 FOLLOWING); diff --git a/parser/testdata/corpus/fuzzer/pedro/last_memory_leak.test b/parser/testdata/corpus/fuzzer/pedro/last_memory_leak.test index 5147205..fcb8760 100644 --- a/parser/testdata/corpus/fuzzer/pedro/last_memory_leak.test +++ b/parser/testdata/corpus/fuzzer/pedro/last_memory_leak.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/last_memory_leak.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/pedro/lateral_join.test b/parser/testdata/corpus/fuzzer/pedro/lateral_join.test index e17094b..5aa71e4 100644 --- a/parser/testdata/corpus/fuzzer/pedro/lateral_join.test +++ b/parser/testdata/corpus/fuzzer/pedro/lateral_join.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/lateral_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c1 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/like_empty_list.test b/parser/testdata/corpus/fuzzer/pedro/like_empty_list.test index a05edd9..45e209e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/like_empty_list.test +++ b/parser/testdata/corpus/fuzzer/pedro/like_empty_list.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/like_empty_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '1' LIKE []; diff --git a/parser/testdata/corpus/fuzzer/pedro/limit_on_any_subquery.test b/parser/testdata/corpus/fuzzer/pedro/limit_on_any_subquery.test index f28b909..3c2900e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/limit_on_any_subquery.test +++ b/parser/testdata/corpus/fuzzer/pedro/limit_on_any_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/limit_on_any_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 WHERE 1 < ANY(SELECT 2 LIMIT 0%); diff --git a/parser/testdata/corpus/fuzzer/pedro/local_transaction_delete_empty_tree.test b/parser/testdata/corpus/fuzzer/pedro/local_transaction_delete_empty_tree.test index 3808e53..6a4ba88 100644 --- a/parser/testdata/corpus/fuzzer/pedro/local_transaction_delete_empty_tree.test +++ b/parser/testdata/corpus/fuzzer/pedro/local_transaction_delete_empty_tree.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/local_transaction_delete_empty_tree.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM t1 RETURNING 1; diff --git a/parser/testdata/corpus/fuzzer/pedro/logical_column_index_out_of_range.test b/parser/testdata/corpus/fuzzer/pedro/logical_column_index_out_of_range.test index cc5e43f..692321c 100644 --- a/parser/testdata/corpus/fuzzer/pedro/logical_column_index_out_of_range.test +++ b/parser/testdata/corpus/fuzzer/pedro/logical_column_index_out_of_range.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/logical_column_index_out_of_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT, c2 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/missing_subquery_error.test b/parser/testdata/corpus/fuzzer/pedro/missing_subquery_error.test index 161bbc1..e2b9a4d 100644 --- a/parser/testdata/corpus/fuzzer/pedro/missing_subquery_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/missing_subquery_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/missing_subquery_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t2 AS (SELECT 3 WHERE count(*) FILTER (1)) SELECT 0 FROM t2 diff --git a/parser/testdata/corpus/fuzzer/pedro/multiplication_verification.test b/parser/testdata/corpus/fuzzer/pedro/multiplication_verification.test index 433c8a8..f92818e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/multiplication_verification.test +++ b/parser/testdata/corpus/fuzzer/pedro/multiplication_verification.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/multiplication_verification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 * (1 < 1); diff --git a/parser/testdata/corpus/fuzzer/pedro/nan_as_seed.test b/parser/testdata/corpus/fuzzer/pedro/nan_as_seed.test index 9b77acb..0a80525 100644 --- a/parser/testdata/corpus/fuzzer/pedro/nan_as_seed.test +++ b/parser/testdata/corpus/fuzzer/pedro/nan_as_seed.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/nan_as_seed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select range i from range(10000) diff --git a/parser/testdata/corpus/fuzzer/pedro/natural_join_generated_heap_overflow.test b/parser/testdata/corpus/fuzzer/pedro/natural_join_generated_heap_overflow.test index e0303ec..1ced1bd 100644 --- a/parser/testdata/corpus/fuzzer/pedro/natural_join_generated_heap_overflow.test +++ b/parser/testdata/corpus/fuzzer/pedro/natural_join_generated_heap_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/natural_join_generated_heap_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 AS (1), c0 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/nested_limit_subquery.test b/parser/testdata/corpus/fuzzer/pedro/nested_limit_subquery.test index be7717f..329a382 100644 --- a/parser/testdata/corpus/fuzzer/pedro/nested_limit_subquery.test +++ b/parser/testdata/corpus/fuzzer/pedro/nested_limit_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/nested_limit_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM (SELECT 1) t0(c0) WHERE (SELECT c0); diff --git a/parser/testdata/corpus/fuzzer/pedro/nested_subquery_table_function.test b/parser/testdata/corpus/fuzzer/pedro/nested_subquery_table_function.test index 86908c5..56eb9c1 100644 --- a/parser/testdata/corpus/fuzzer/pedro/nested_subquery_table_function.test +++ b/parser/testdata/corpus/fuzzer/pedro/nested_subquery_table_function.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/nested_subquery_table_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM range((SELECT 1) - 0); diff --git a/parser/testdata/corpus/fuzzer/pedro/non_boolean_aggregate_filter.test b/parser/testdata/corpus/fuzzer/pedro/non_boolean_aggregate_filter.test index 1e3f067..7c32036 100644 --- a/parser/testdata/corpus/fuzzer/pedro/non_boolean_aggregate_filter.test +++ b/parser/testdata/corpus/fuzzer/pedro/non_boolean_aggregate_filter.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/non_boolean_aggregate_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT mode(1) FILTER (0); diff --git a/parser/testdata/corpus/fuzzer/pedro/offset_query_allocator_assertion.test b/parser/testdata/corpus/fuzzer/pedro/offset_query_allocator_assertion.test index 028fea4..10f4dbe 100644 --- a/parser/testdata/corpus/fuzzer/pedro/offset_query_allocator_assertion.test +++ b/parser/testdata/corpus/fuzzer/pedro/offset_query_allocator_assertion.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/offset_query_allocator_assertion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c0 FROM t0 OFFSET 42949672960; diff --git a/parser/testdata/corpus/fuzzer/pedro/order_by_all_with_union.test b/parser/testdata/corpus/fuzzer/pedro/order_by_all_with_union.test index e576472..d585b4b 100644 --- a/parser/testdata/corpus/fuzzer/pedro/order_by_all_with_union.test +++ b/parser/testdata/corpus/fuzzer/pedro/order_by_all_with_union.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/order_by_all_with_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit (SELECT 2 ORDER BY(SELECT 2)) UNION SELECT 1 ORDER BY ALL; diff --git a/parser/testdata/corpus/fuzzer/pedro/overflow_parsing_interval.test b/parser/testdata/corpus/fuzzer/pedro/overflow_parsing_interval.test index ce7d8de..df57faf 100644 --- a/parser/testdata/corpus/fuzzer/pedro/overflow_parsing_interval.test +++ b/parser/testdata/corpus/fuzzer/pedro/overflow_parsing_interval.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/overflow_parsing_interval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT INTERVAL '-9223372036854775808' MICROSECONDS; diff --git a/parser/testdata/corpus/fuzzer/pedro/overflow_varchar_decimal_cast.test b/parser/testdata/corpus/fuzzer/pedro/overflow_varchar_decimal_cast.test index 19c1e96..a59e3ec 100644 --- a/parser/testdata/corpus/fuzzer/pedro/overflow_varchar_decimal_cast.test +++ b/parser/testdata/corpus/fuzzer/pedro/overflow_varchar_decimal_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/overflow_varchar_decimal_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST(strftime(TIMESTAMP '1-1-1 0:00:00',340282346638528859811704183484516925440.0) AS DECIMAL(10,2)); diff --git a/parser/testdata/corpus/fuzzer/pedro/parser_roundtrip.test b/parser/testdata/corpus/fuzzer/pedro/parser_roundtrip.test index a5df898..f89c02e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/parser_roundtrip.test +++ b/parser/testdata/corpus/fuzzer/pedro/parser_roundtrip.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/parser_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT BLOB '\x27' diff --git a/parser/testdata/corpus/fuzzer/pedro/prepared_statement_recursive_cte.test b/parser/testdata/corpus/fuzzer/pedro/prepared_statement_recursive_cte.test index d60fea7..ff9eb64 100644 --- a/parser/testdata/corpus/fuzzer/pedro/prepared_statement_recursive_cte.test +++ b/parser/testdata/corpus/fuzzer/pedro/prepared_statement_recursive_cte.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/prepared_statement_recursive_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE p0 AS WITH RECURSIVE t1(c2) AS ((SELECT 1) UNION DISTINCT (SELECT (c2 + 1) FROM t1 WHERE (c2 < 3))) SELECT * FROM t1 ORDER BY c2 NULLS LAST; diff --git a/parser/testdata/corpus/fuzzer/pedro/pushdown_assertion_error.test b/parser/testdata/corpus/fuzzer/pedro/pushdown_assertion_error.test index 6cdccf2..39053b9 100644 --- a/parser/testdata/corpus/fuzzer/pedro/pushdown_assertion_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/pushdown_assertion_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/pushdown_assertion_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 (c2 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/pushdown_error.test b/parser/testdata/corpus/fuzzer/pedro/pushdown_error.test index 23cbacc..3267511 100644 --- a/parser/testdata/corpus/fuzzer/pedro/pushdown_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/pushdown_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/pushdown_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2(c1 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/pushdown_simplification_overflow.test b/parser/testdata/corpus/fuzzer/pedro/pushdown_simplification_overflow.test index 22a591a..0ff40f2 100644 --- a/parser/testdata/corpus/fuzzer/pedro/pushdown_simplification_overflow.test +++ b/parser/testdata/corpus/fuzzer/pedro/pushdown_simplification_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/pushdown_simplification_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t1(c0) VALUES (1),(2),(3); diff --git a/parser/testdata/corpus/fuzzer/pedro/qualify_binder_error.test b/parser/testdata/corpus/fuzzer/pedro/qualify_binder_error.test index 552dcfe..3baeb9c 100644 --- a/parser/testdata/corpus/fuzzer/pedro/qualify_binder_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/qualify_binder_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/qualify_binder_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c0, count(c0) over () AS count_window FROM (SELECT 1) t0(c0) GROUP BY c0 QUALIFY count_window; diff --git a/parser/testdata/corpus/fuzzer/pedro/random_engine_use_after_free.test b/parser/testdata/corpus/fuzzer/pedro/random_engine_use_after_free.test index 8e5a67c..187d2d3 100644 --- a/parser/testdata/corpus/fuzzer/pedro/random_engine_use_after_free.test +++ b/parser/testdata/corpus/fuzzer/pedro/random_engine_use_after_free.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/random_engine_use_after_free.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c0 INT CHECK (current_schema()='main')); diff --git a/parser/testdata/corpus/fuzzer/pedro/recursive_cte_dependent_join.test b/parser/testdata/corpus/fuzzer/pedro/recursive_cte_dependent_join.test index 2747aa2..4428b53 100644 --- a/parser/testdata/corpus/fuzzer/pedro/recursive_cte_dependent_join.test +++ b/parser/testdata/corpus/fuzzer/pedro/recursive_cte_dependent_join.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/recursive_cte_dependent_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (WITH RECURSIVE t1 AS (SELECT 1 UNION SELECT 1 FROM t1 WHERE c2 < 3) SELECT 2 FROM t1) FROM (SELECT 1 c2) t1; diff --git a/parser/testdata/corpus/fuzzer/pedro/recursive_cte_limit_percent.test b/parser/testdata/corpus/fuzzer/pedro/recursive_cte_limit_percent.test index 508bde8..d379d9d 100644 --- a/parser/testdata/corpus/fuzzer/pedro/recursive_cte_limit_percent.test +++ b/parser/testdata/corpus/fuzzer/pedro/recursive_cte_limit_percent.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/recursive_cte_limit_percent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t1(c0) AS ((SELECT 1, 1 c1) UNION (SELECT 1, 1 FROM (SELECT 1) x(x) JOIN t1 ON FALSE LIMIT 1%)) SELECT 1 FROM t1 JOIN t1 t0 USING (c1); diff --git a/parser/testdata/corpus/fuzzer/pedro/regr_count_validity.test b/parser/testdata/corpus/fuzzer/pedro/regr_count_validity.test index 0f2d1ba..48fcb7c 100644 --- a/parser/testdata/corpus/fuzzer/pedro/regr_count_validity.test +++ b/parser/testdata/corpus/fuzzer/pedro/regr_count_validity.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/regr_count_validity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regr_count(1,1) FROM t0; diff --git a/parser/testdata/corpus/fuzzer/pedro/rename_column_assertion.test b/parser/testdata/corpus/fuzzer/pedro/rename_column_assertion.test index 80f85c3..d0e1c44 100644 --- a/parser/testdata/corpus/fuzzer/pedro/rename_column_assertion.test +++ b/parser/testdata/corpus/fuzzer/pedro/rename_column_assertion.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/rename_column_assertion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c1 INT, c2 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/rename_restart.test b/parser/testdata/corpus/fuzzer/pedro/rename_restart.test index 83a001d..60019e9 100644 --- a/parser/testdata/corpus/fuzzer/pedro/rename_restart.test +++ b/parser/testdata/corpus/fuzzer/pedro/rename_restart.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/rename_restart.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET wal_autocheckpoint='10MB'; diff --git a/parser/testdata/corpus/fuzzer/pedro/rename_table_index_rollback.test b/parser/testdata/corpus/fuzzer/pedro/rename_table_index_rollback.test index 2e89431..45b63d7 100644 --- a/parser/testdata/corpus/fuzzer/pedro/rename_table_index_rollback.test +++ b/parser/testdata/corpus/fuzzer/pedro/rename_table_index_rollback.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/rename_table_index_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE VIEW t1 AS (SELECT 1); diff --git a/parser/testdata/corpus/fuzzer/pedro/rename_table_index_storage.test b/parser/testdata/corpus/fuzzer/pedro/rename_table_index_storage.test index 9ae4dcf..c1c329b 100644 --- a/parser/testdata/corpus/fuzzer/pedro/rename_table_index_storage.test +++ b/parser/testdata/corpus/fuzzer/pedro/rename_table_index_storage.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/rename_table_index_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX i0 ON t1 (c0); diff --git a/parser/testdata/corpus/fuzzer/pedro/restart_current_time.test b/parser/testdata/corpus/fuzzer/pedro/restart_current_time.test index 51e441a..c4b0f9e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/restart_current_time.test +++ b/parser/testdata/corpus/fuzzer/pedro/restart_current_time.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/restart_current_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 INT, CHECK (CURRENT_TIME >= TIME '00:00:00')); diff --git a/parser/testdata/corpus/fuzzer/pedro/restart_random.test b/parser/testdata/corpus/fuzzer/pedro/restart_random.test index 7513c25..c13e302 100644 --- a/parser/testdata/corpus/fuzzer/pedro/restart_random.test +++ b/parser/testdata/corpus/fuzzer/pedro/restart_random.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/restart_random.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 INT, CHECK (RANDOM() >= 0)); diff --git a/parser/testdata/corpus/fuzzer/pedro/returning_clause_sizes_not_match.test b/parser/testdata/corpus/fuzzer/pedro/returning_clause_sizes_not_match.test index 5718125..bb49767 100644 --- a/parser/testdata/corpus/fuzzer/pedro/returning_clause_sizes_not_match.test +++ b/parser/testdata/corpus/fuzzer/pedro/returning_clause_sizes_not_match.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/returning_clause_sizes_not_match.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x INT, y AS(x + 100)); diff --git a/parser/testdata/corpus/fuzzer/pedro/returning_clause_with_rowid.test b/parser/testdata/corpus/fuzzer/pedro/returning_clause_with_rowid.test index e8594a9..a6de36c 100644 --- a/parser/testdata/corpus/fuzzer/pedro/returning_clause_with_rowid.test +++ b/parser/testdata/corpus/fuzzer/pedro/returning_clause_with_rowid.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/returning_clause_with_rowid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t0 VALUES (1) RETURNING c0, rowid; diff --git a/parser/testdata/corpus/fuzzer/pedro/rollup_wrong_result.test b/parser/testdata/corpus/fuzzer/pedro/rollup_wrong_result.test index 6e7e1f9..df359f6 100644 --- a/parser/testdata/corpus/fuzzer/pedro/rollup_wrong_result.test +++ b/parser/testdata/corpus/fuzzer/pedro/rollup_wrong_result.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/rollup_wrong_result.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET default_null_order='nulls_first'; diff --git a/parser/testdata/corpus/fuzzer/pedro/sample_limit_overflow.test b/parser/testdata/corpus/fuzzer/pedro/sample_limit_overflow.test index 52687d2..fb0c51f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/sample_limit_overflow.test +++ b/parser/testdata/corpus/fuzzer/pedro/sample_limit_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/sample_limit_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM (SELECT 1 ORDER BY ALL LIMIT 514322393620248226) USING SAMPLE SYSTEM (36%); diff --git a/parser/testdata/corpus/fuzzer/pedro/segment_tree_index_issue.test b/parser/testdata/corpus/fuzzer/pedro/segment_tree_index_issue.test index d97d80e..fb8038f 100644 --- a/parser/testdata/corpus/fuzzer/pedro/segment_tree_index_issue.test +++ b/parser/testdata/corpus/fuzzer/pedro/segment_tree_index_issue.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/segment_tree_index_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 INT); diff --git a/parser/testdata/corpus/fuzzer/pedro/setop_type_mismatch.test b/parser/testdata/corpus/fuzzer/pedro/setop_type_mismatch.test index c260da1..8b7786b 100644 --- a/parser/testdata/corpus/fuzzer/pedro/setop_type_mismatch.test +++ b/parser/testdata/corpus/fuzzer/pedro/setop_type_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/setop_type_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '\x1E' FROM (SELECT 1) t1(c0) ORDER BY ALL OFFSET (SELECT DISTINCT 6.5 FROM (SELECT 1) t1(c0) UNION ALL SELECT 3); diff --git a/parser/testdata/corpus/fuzzer/pedro/signed_and_unsigned_comparison.test b/parser/testdata/corpus/fuzzer/pedro/signed_and_unsigned_comparison.test index a978ae8..e699984 100644 --- a/parser/testdata/corpus/fuzzer/pedro/signed_and_unsigned_comparison.test +++ b/parser/testdata/corpus/fuzzer/pedro/signed_and_unsigned_comparison.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/signed_and_unsigned_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 ( diff --git a/parser/testdata/corpus/fuzzer/pedro/statistics_propagation_set_op.test b/parser/testdata/corpus/fuzzer/pedro/statistics_propagation_set_op.test index 3f9deea..5f6f817 100644 --- a/parser/testdata/corpus/fuzzer/pedro/statistics_propagation_set_op.test +++ b/parser/testdata/corpus/fuzzer/pedro/statistics_propagation_set_op.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/statistics_propagation_set_op.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM (SELECT 1) t0(c0) WHERE ((VALUES(1), (c0) LIMIT 1) INTERSECT (SELECT 1)); diff --git a/parser/testdata/corpus/fuzzer/pedro/strftime_constant_null.test b/parser/testdata/corpus/fuzzer/pedro/strftime_constant_null.test index 58eb8bb..76a17dc 100644 --- a/parser/testdata/corpus/fuzzer/pedro/strftime_constant_null.test +++ b/parser/testdata/corpus/fuzzer/pedro/strftime_constant_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/strftime_constant_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c1 TIMESTAMP); diff --git a/parser/testdata/corpus/fuzzer/pedro/strptime_null_argument.test b/parser/testdata/corpus/fuzzer/pedro/strptime_null_argument.test index b0f1763..746d734 100644 --- a/parser/testdata/corpus/fuzzer/pedro/strptime_null_argument.test +++ b/parser/testdata/corpus/fuzzer/pedro/strptime_null_argument.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/strptime_null_argument.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT strptime(NULL,'p') IS DISTINCT FROM DATE '-543572-1-1'; diff --git a/parser/testdata/corpus/fuzzer/pedro/subquery_assertion_error.test b/parser/testdata/corpus/fuzzer/pedro/subquery_assertion_error.test index edbd418..2b5b8ef 100644 --- a/parser/testdata/corpus/fuzzer/pedro/subquery_assertion_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/subquery_assertion_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/subquery_assertion_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (VALUES(1 != ALL(SELECT 2))); diff --git a/parser/testdata/corpus/fuzzer/pedro/temp_sequence_durability.test b/parser/testdata/corpus/fuzzer/pedro/temp_sequence_durability.test index 9f164e9..ebf2847 100644 --- a/parser/testdata/corpus/fuzzer/pedro/temp_sequence_durability.test +++ b/parser/testdata/corpus/fuzzer/pedro/temp_sequence_durability.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/temp_sequence_durability.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA DISABLE_CHECKPOINT_ON_SHUTDOWN; diff --git a/parser/testdata/corpus/fuzzer/pedro/temp_sequence_reconnect.test b/parser/testdata/corpus/fuzzer/pedro/temp_sequence_reconnect.test index 73ec287..63b2788 100644 --- a/parser/testdata/corpus/fuzzer/pedro/temp_sequence_reconnect.test +++ b/parser/testdata/corpus/fuzzer/pedro/temp_sequence_reconnect.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/temp_sequence_reconnect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE t1; diff --git a/parser/testdata/corpus/fuzzer/pedro/temp_table_cleanup.test b/parser/testdata/corpus/fuzzer/pedro/temp_table_cleanup.test index 3c7eafe..1c657ca 100644 --- a/parser/testdata/corpus/fuzzer/pedro/temp_table_cleanup.test +++ b/parser/testdata/corpus/fuzzer/pedro/temp_table_cleanup.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/temp_table_cleanup.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE t2 AS (SELECT 1); diff --git a/parser/testdata/corpus/fuzzer/pedro/test_segv_argmax.test b/parser/testdata/corpus/fuzzer/pedro/test_segv_argmax.test index 53a36d1..d8bb3c0 100644 --- a/parser/testdata/corpus/fuzzer/pedro/test_segv_argmax.test +++ b/parser/testdata/corpus/fuzzer/pedro/test_segv_argmax.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/test_segv_argmax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 ( diff --git a/parser/testdata/corpus/fuzzer/pedro/test_truncate_heap_use_after_free.test b/parser/testdata/corpus/fuzzer/pedro/test_truncate_heap_use_after_free.test index df2c320..b70342e 100644 --- a/parser/testdata/corpus/fuzzer/pedro/test_truncate_heap_use_after_free.test +++ b/parser/testdata/corpus/fuzzer/pedro/test_truncate_heap_use_after_free.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/test_truncate_heap_use_after_free.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t2 VALUES (1),(0); diff --git a/parser/testdata/corpus/fuzzer/pedro/test_window_function_nullptr.test b/parser/testdata/corpus/fuzzer/pedro/test_window_function_nullptr.test index ccbd831..497fc19 100644 --- a/parser/testdata/corpus/fuzzer/pedro/test_window_function_nullptr.test +++ b/parser/testdata/corpus/fuzzer/pedro/test_window_function_nullptr.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/test_window_function_nullptr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA DEBUG_WINDOW_MODE='separate'; diff --git a/parser/testdata/corpus/fuzzer/pedro/update_default_segv.test b/parser/testdata/corpus/fuzzer/pedro/update_default_segv.test index 438637b..4ca0676 100644 --- a/parser/testdata/corpus/fuzzer/pedro/update_default_segv.test +++ b/parser/testdata/corpus/fuzzer/pedro/update_default_segv.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/update_default_segv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 VARCHAR, c2 AS(1), c3 INT, UNIQUE(c0)); diff --git a/parser/testdata/corpus/fuzzer/pedro/update_join_bind_error.test b/parser/testdata/corpus/fuzzer/pedro/update_join_bind_error.test index fa7e6c3..bf972f1 100644 --- a/parser/testdata/corpus/fuzzer/pedro/update_join_bind_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/update_join_bind_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/update_join_bind_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT 1 diff --git a/parser/testdata/corpus/fuzzer/pedro/update_join_statistics.test b/parser/testdata/corpus/fuzzer/pedro/update_join_statistics.test index e047ba3..56fa4b4 100644 --- a/parser/testdata/corpus/fuzzer/pedro/update_join_statistics.test +++ b/parser/testdata/corpus/fuzzer/pedro/update_join_statistics.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/update_join_statistics.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c0 INT, c2 BIGINT, PRIMARY KEY (c0)); diff --git a/parser/testdata/corpus/fuzzer/pedro/utf8_invalid_unicode.test b/parser/testdata/corpus/fuzzer/pedro/utf8_invalid_unicode.test index 58616d9..b4a94c5 100644 --- a/parser/testdata/corpus/fuzzer/pedro/utf8_invalid_unicode.test +++ b/parser/testdata/corpus/fuzzer/pedro/utf8_invalid_unicode.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/utf8_invalid_unicode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT upper(decode('\xF6\x96\xB0\x85'::BLOB)::VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/pedro/vacuum_table_with_generated_column.test b/parser/testdata/corpus/fuzzer/pedro/vacuum_table_with_generated_column.test index 0a46902..a41f99b 100644 --- a/parser/testdata/corpus/fuzzer/pedro/vacuum_table_with_generated_column.test +++ b/parser/testdata/corpus/fuzzer/pedro/vacuum_table_with_generated_column.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/vacuum_table_with_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x INT, y AS (x + 100)); diff --git a/parser/testdata/corpus/fuzzer/pedro/vacuum_unsupported_type.test b/parser/testdata/corpus/fuzzer/pedro/vacuum_unsupported_type.test index 0eb69e4..5e109d1 100644 --- a/parser/testdata/corpus/fuzzer/pedro/vacuum_unsupported_type.test +++ b/parser/testdata/corpus/fuzzer/pedro/vacuum_unsupported_type.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/vacuum_unsupported_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS (VALUES ([], {'a': []})); diff --git a/parser/testdata/corpus/fuzzer/pedro/verify_parallelism_batch_index.test b/parser/testdata/corpus/fuzzer/pedro/verify_parallelism_batch_index.test index b6929b4..940d9e8 100644 --- a/parser/testdata/corpus/fuzzer/pedro/verify_parallelism_batch_index.test +++ b/parser/testdata/corpus/fuzzer/pedro/verify_parallelism_batch_index.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/verify_parallelism_batch_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 AS VALUES (1), (2), (3); diff --git a/parser/testdata/corpus/fuzzer/pedro/view_not_rebound_error.test b/parser/testdata/corpus/fuzzer/pedro/view_not_rebound_error.test index 4f6d6ad..fade9ee 100644 --- a/parser/testdata/corpus/fuzzer/pedro/view_not_rebound_error.test +++ b/parser/testdata/corpus/fuzzer/pedro/view_not_rebound_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/view_not_rebound_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set enable_view_dependencies=true diff --git a/parser/testdata/corpus/fuzzer/pedro/wal_rename_table.test b/parser/testdata/corpus/fuzzer/pedro/wal_rename_table.test index d181a7d..a028b11 100644 --- a/parser/testdata/corpus/fuzzer/pedro/wal_rename_table.test +++ b/parser/testdata/corpus/fuzzer/pedro/wal_rename_table.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/wal_rename_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE t1 RENAME TO t0; diff --git a/parser/testdata/corpus/fuzzer/pedro/window_function_timeout.test b/parser/testdata/corpus/fuzzer/pedro/window_function_timeout.test index 67d5f35..b455ac9 100644 --- a/parser/testdata/corpus/fuzzer/pedro/window_function_timeout.test +++ b/parser/testdata/corpus/fuzzer/pedro/window_function_timeout.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/window_function_timeout.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 TIME); diff --git a/parser/testdata/corpus/fuzzer/pedro/window_self_reference.test b/parser/testdata/corpus/fuzzer/pedro/window_self_reference.test index 82bf0eb..43d92fc 100644 --- a/parser/testdata/corpus/fuzzer/pedro/window_self_reference.test +++ b/parser/testdata/corpus/fuzzer/pedro/window_self_reference.test @@ -1,6 +1,6 @@ # source: test/fuzzer/pedro/window_self_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) OVER w1 WINDOW w1 AS (ORDER BY count(*) OVER w1); diff --git a/parser/testdata/corpus/fuzzer/public/cast_index_expression.test b/parser/testdata/corpus/fuzzer/public/cast_index_expression.test index 74fb290..8d4de34 100644 --- a/parser/testdata/corpus/fuzzer/public/cast_index_expression.test +++ b/parser/testdata/corpus/fuzzer/public/cast_index_expression.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/cast_index_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX i_index ON v00 USING ART ( NULLIF ( v00, 'string' ) ); diff --git a/parser/testdata/corpus/fuzzer/public/columns_using.test b/parser/testdata/corpus/fuzzer/public/columns_using.test index 37e9f11..f281175 100644 --- a/parser/testdata/corpus/fuzzer/public/columns_using.test +++ b/parser/testdata/corpus/fuzzer/public/columns_using.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/columns_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v00 (c01 INT); diff --git a/parser/testdata/corpus/fuzzer/public/distinct_on_non_integer_literal.test b/parser/testdata/corpus/fuzzer/public/distinct_on_non_integer_literal.test index 0174ed5..1458bd6 100644 --- a/parser/testdata/corpus/fuzzer/public/distinct_on_non_integer_literal.test +++ b/parser/testdata/corpus/fuzzer/public/distinct_on_non_integer_literal.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/distinct_on_non_integer_literal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET order_by_non_integer_literal=true; diff --git a/parser/testdata/corpus/fuzzer/public/duplicate_alias_using.test b/parser/testdata/corpus/fuzzer/public/duplicate_alias_using.test index 078f669..7d72fee 100644 --- a/parser/testdata/corpus/fuzzer/public/duplicate_alias_using.test +++ b/parser/testdata/corpus/fuzzer/public/duplicate_alias_using.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/duplicate_alias_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c1 diff --git a/parser/testdata/corpus/fuzzer/public/enum_empty_type.test b/parser/testdata/corpus/fuzzer/public/enum_empty_type.test index 2169da0..240ab8a 100644 --- a/parser/testdata/corpus/fuzzer/public/enum_empty_type.test +++ b/parser/testdata/corpus/fuzzer/public/enum_empty_type.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/enum_empty_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE c AS ENUM(''); diff --git a/parser/testdata/corpus/fuzzer/public/insert_by_name_default.test b/parser/testdata/corpus/fuzzer/public/insert_by_name_default.test index aeae0bc..f4cc73a 100644 --- a/parser/testdata/corpus/fuzzer/public/insert_by_name_default.test +++ b/parser/testdata/corpus/fuzzer/public/insert_by_name_default.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/insert_by_name_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(i INT) diff --git a/parser/testdata/corpus/fuzzer/public/insert_or_replace_default_values.test b/parser/testdata/corpus/fuzzer/public/insert_or_replace_default_values.test index 9d7a001..f43a78b 100644 --- a/parser/testdata/corpus/fuzzer/public/insert_or_replace_default_values.test +++ b/parser/testdata/corpus/fuzzer/public/insert_or_replace_default_values.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/insert_or_replace_default_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(id INTEGER PRIMARY KEY DEFAULT 1, payload INTEGER DEFAULT nextval('seq')); diff --git a/parser/testdata/corpus/fuzzer/public/insert_returning.test b/parser/testdata/corpus/fuzzer/public/insert_returning.test index 0659790..bb91928 100644 --- a/parser/testdata/corpus/fuzzer/public/insert_returning.test +++ b/parser/testdata/corpus/fuzzer/public/insert_returning.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/insert_returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO v00 (c01, c02) VALUES (0, 'abc'); diff --git a/parser/testdata/corpus/fuzzer/public/lateral_in_right_side_of_join.test b/parser/testdata/corpus/fuzzer/public/lateral_in_right_side_of_join.test index 9efdb58..498a512 100644 --- a/parser/testdata/corpus/fuzzer/public/lateral_in_right_side_of_join.test +++ b/parser/testdata/corpus/fuzzer/public/lateral_in_right_side_of_join.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/lateral_in_right_side_of_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 INT , c1 VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/public/lateral_join_subquery.test b/parser/testdata/corpus/fuzzer/public/lateral_join_subquery.test index 9639876..b1c830a 100644 --- a/parser/testdata/corpus/fuzzer/public/lateral_join_subquery.test +++ b/parser/testdata/corpus/fuzzer/public/lateral_join_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/lateral_join_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM t1 INNER JOIN (SELECT t1.c1) ON (SELECT 42); diff --git a/parser/testdata/corpus/fuzzer/public/lateral_right_join.test b/parser/testdata/corpus/fuzzer/public/lateral_right_join.test index a6b3b71..c36ac30 100644 --- a/parser/testdata/corpus/fuzzer/public/lateral_right_join.test +++ b/parser/testdata/corpus/fuzzer/public/lateral_right_join.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/lateral_right_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (c01 INT, c02 VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/public/pivot_empty_enum.test b/parser/testdata/corpus/fuzzer/public/pivot_empty_enum.test index f737f38..91041f8 100644 --- a/parser/testdata/corpus/fuzzer/public/pivot_empty_enum.test +++ b/parser/testdata/corpus/fuzzer/public/pivot_empty_enum.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/pivot_empty_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c01 INT); diff --git a/parser/testdata/corpus/fuzzer/public/pivot_full_join_using.test b/parser/testdata/corpus/fuzzer/public/pivot_full_join_using.test index d963c0f..e7a304d 100644 --- a/parser/testdata/corpus/fuzzer/public/pivot_full_join_using.test +++ b/parser/testdata/corpus/fuzzer/public/pivot_full_join_using.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/pivot_full_join_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c01 INT, c02 INT); diff --git a/parser/testdata/corpus/fuzzer/public/positional_join_correlated_subquery.test b/parser/testdata/corpus/fuzzer/public/positional_join_correlated_subquery.test index 6db92b1..764c3d9 100644 --- a/parser/testdata/corpus/fuzzer/public/positional_join_correlated_subquery.test +++ b/parser/testdata/corpus/fuzzer/public/positional_join_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/positional_join_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT 42 FROM (SELECT c01) POSITIONAL JOIN (SELECT c02)) diff --git a/parser/testdata/corpus/fuzzer/public/pragma_named_parameters.test b/parser/testdata/corpus/fuzzer/public/pragma_named_parameters.test index 9807fe5..4eece6e 100644 --- a/parser/testdata/corpus/fuzzer/public/pragma_named_parameters.test +++ b/parser/testdata/corpus/fuzzer/public/pragma_named_parameters.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/pragma_named_parameters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA e=r=0,0; diff --git a/parser/testdata/corpus/fuzzer/public/regex_range_filter_mismatch.test b/parser/testdata/corpus/fuzzer/public/regex_range_filter_mismatch.test index 3fd626e..fc58913 100644 --- a/parser/testdata/corpus/fuzzer/public/regex_range_filter_mismatch.test +++ b/parser/testdata/corpus/fuzzer/public/regex_range_filter_mismatch.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/regex_range_filter_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v00 ( c01 INTEGER ) ; diff --git a/parser/testdata/corpus/fuzzer/public/semi_anti_join_using.test b/parser/testdata/corpus/fuzzer/public/semi_anti_join_using.test index bf28e2c..7e1dd54 100644 --- a/parser/testdata/corpus/fuzzer/public/semi_anti_join_using.test +++ b/parser/testdata/corpus/fuzzer/public/semi_anti_join_using.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/semi_anti_join_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO v00 VALUES (42); diff --git a/parser/testdata/corpus/fuzzer/public/semi_join_using.test b/parser/testdata/corpus/fuzzer/public/semi_join_using.test index 14d4a04..5d30cbe 100644 --- a/parser/testdata/corpus/fuzzer/public/semi_join_using.test +++ b/parser/testdata/corpus/fuzzer/public/semi_join_using.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/semi_join_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c02 diff --git a/parser/testdata/corpus/fuzzer/public/unpivot_partial_values.test b/parser/testdata/corpus/fuzzer/public/unpivot_partial_values.test index ce8dfee..31533b7 100644 --- a/parser/testdata/corpus/fuzzer/public/unpivot_partial_values.test +++ b/parser/testdata/corpus/fuzzer/public/unpivot_partial_values.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/unpivot_partial_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM (SELECT 42 c1) AS ta06 UNPIVOT (c1 FOR 'v' IN ( ( c1, 'a' || 'b' ) ) ) ; diff --git a/parser/testdata/corpus/fuzzer/public/unsatisfiable_filter_prune.test b/parser/testdata/corpus/fuzzer/public/unsatisfiable_filter_prune.test index f05b7e2..6376d1c 100644 --- a/parser/testdata/corpus/fuzzer/public/unsatisfiable_filter_prune.test +++ b/parser/testdata/corpus/fuzzer/public/unsatisfiable_filter_prune.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/unsatisfiable_filter_prune.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 INT, c1 INT); diff --git a/parser/testdata/corpus/fuzzer/public/window_subquery_error.test b/parser/testdata/corpus/fuzzer/public/window_subquery_error.test index 6f40309..8022aa8 100644 --- a/parser/testdata/corpus/fuzzer/public/window_subquery_error.test +++ b/parser/testdata/corpus/fuzzer/public/window_subquery_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/window_subquery_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'string' IN ( SELECT string_agg ('str') OVER ( PARTITION BY c02 + 'string' IN ( SELECT 'string' )) ); diff --git a/parser/testdata/corpus/fuzzer/public/window_subquery_with_functions_error.test b/parser/testdata/corpus/fuzzer/public/window_subquery_with_functions_error.test index 088613d..98e0d02 100644 --- a/parser/testdata/corpus/fuzzer/public/window_subquery_with_functions_error.test +++ b/parser/testdata/corpus/fuzzer/public/window_subquery_with_functions_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/public/window_subquery_with_functions_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v0 ( v1 INTEGER ) ; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_executor.test b/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_executor.test index 111fde3..cf17285 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_executor.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_executor.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/bitstring_agg_executor.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(v UBIGINT); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_overflow.test index 48daa8e..dec5ab5 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/bitstring_agg_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/bitstring_agg_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE integers(i {type}); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/current_schemas_null.test b/parser/testdata/corpus/fuzzer/sqlsmith/current_schemas_null.test index 8b63557..356e8e0 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/current_schemas_null.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/current_schemas_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/current_schemas_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE booleans(bool BOOLEAN); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/dayofweek_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/dayofweek_overflow.test index 5a22243..116ce9b 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/dayofweek_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/dayofweek_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/dayofweek_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(date DATE); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/fuzzer_window_varchar.test b/parser/testdata/corpus/fuzzer/sqlsmith/fuzzer_window_varchar.test index 0e1ec41..fa4bde4 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/fuzzer_window_varchar.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/fuzzer_window_varchar.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/fuzzer_window_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types("varchar" VARCHAR, "double" DOUBLE);; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/generate_series_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/generate_series_overflow.test index 31c22ec..e095cc6 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/generate_series_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/generate_series_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/generate_series_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(bigint BIGINT); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/interval_diff_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/interval_diff_overflow.test index bd0441c..ba38e08 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/interval_diff_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/interval_diff_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/interval_diff_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT subtract( diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/interval_multiply_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/interval_multiply_overflow.test index 87b9515..6abe911 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/interval_multiply_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/interval_multiply_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/interval_multiply_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT multiply("interval", "bigint") diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/json_contains_null.test b/parser/testdata/corpus/fuzzer/sqlsmith/json_contains_null.test index 7501a7c..aedb79f 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/json_contains_null.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/json_contains_null.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/json_contains_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_contains(NULL::VARCHAR, NULL::VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/like_null_pattern.test b/parser/testdata/corpus/fuzzer/sqlsmith/like_null_pattern.test index 08b6372..22e8f3f 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/like_null_pattern.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/like_null_pattern.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/like_null_pattern.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_schema() ~~ CAST(NULL AS VARCHAR) diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/mad_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/mad_overflow.test index 71b95c9..6fa59a3 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/mad_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/mad_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/mad_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT mad(dec38_10) diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/makedate_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/makedate_overflow.test index b226f08..b2ef839 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/makedate_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/makedate_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/makedate_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT make_timestamp("bigint", "bigint", "bigint", "bigint", "bigint", "double") diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/nested_correlated_subquery.test b/parser/testdata/corpus/fuzzer/sqlsmith/nested_correlated_subquery.test index 8aea6f0..306dc33 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/nested_correlated_subquery.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/nested_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/nested_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(ps_supplycost INT, n_name INT); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map.test b/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map.test index f362d38..1fbc0eb 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/nullif_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(map MAP(VARCHAR, VARCHAR));; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map_with_config.test b/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map_with_config.test index 7c746fc..d963c82 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map_with_config.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/nullif_map_with_config.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/nullif_map_with_config.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET default_block_size = 262144; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/statistics_assertion_trigger.test b/parser/testdata/corpus/fuzzer/sqlsmith/statistics_assertion_trigger.test index d13140c..0897298 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/statistics_assertion_trigger.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/statistics_assertion_trigger.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/statistics_assertion_trigger.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL AS c3 diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/strptime_nullpointer.test b/parser/testdata/corpus/fuzzer/sqlsmith/strptime_nullpointer.test index 5212976..592b415 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/strptime_nullpointer.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/strptime_nullpointer.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/strptime_nullpointer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 BOOLEAN DEFAULT(true), c1 VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/struct_null_coalesce_assert.test b/parser/testdata/corpus/fuzzer/sqlsmith/struct_null_coalesce_assert.test index 5828c0c..3c63236 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/struct_null_coalesce_assert.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/struct_null_coalesce_assert.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/struct_null_coalesce_assert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE struct_tbl("struct" STRUCT(a INTEGER, b VARCHAR)); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/struct_verify_crash.test b/parser/testdata/corpus/fuzzer/sqlsmith/struct_verify_crash.test index d31fbad..3c3c6ae 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/struct_verify_crash.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/struct_verify_crash.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/struct_verify_crash.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(array_of_structs STRUCT(a INTEGER, b VARCHAR)[]); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/subquery_binding_error.test b/parser/testdata/corpus/fuzzer/sqlsmith/subquery_binding_error.test index 8ff8463..ed7e396 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/subquery_binding_error.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/subquery_binding_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/subquery_binding_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types("varchar" VARCHAR); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/test_abs_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/test_abs_overflow.test index af48b25..abee876 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/test_abs_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/test_abs_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/test_abs_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numerics AS SELECT tinyint, smallint, int, bigint, hugeint FROM test_all_types(); diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_diff_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_diff_overflow.test index d0c5866..f352a39 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_diff_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_diff_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/timestamp_diff_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ts("timestamp" TIMESTAMP);; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_overflow.test index 891ac20..f5c4864 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/timestamp_overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/timestamp_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT c15 diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_double_cast.test b/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_double_cast.test index 084f1fc..fe0aada 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_double_cast.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_double_cast.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/timestamptz_double_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_null_range.test b/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_null_range.test index 3eaa7be..1d1a58e 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_null_range.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/timestamptz_null_range.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/timestamptz_null_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL FROM ( diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/validity_mask_out_of_bounds.test b/parser/testdata/corpus/fuzzer/sqlsmith/validity_mask_out_of_bounds.test index d443995..f633042 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/validity_mask_out_of_bounds.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/validity_mask_out_of_bounds.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/validity_mask_out_of_bounds.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types(struct_of_arrays STRUCT(a INTEGER[], b VARCHAR[]), "smallint" SMALLINT);; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/window-leadlag-overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/window-leadlag-overflow.test index 65cc7fd..28a7acb 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/window-leadlag-overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/window-leadlag-overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/window-leadlag-overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH all_types AS ( diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/window-list-value.test b/parser/testdata/corpus/fuzzer/sqlsmith/window-list-value.test index 2f20840..0fc16ce 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/window-list-value.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/window-list-value.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/window-list-value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as select * exclude(small_enum, medium_enum, large_enum) @@ -8,7 +8,7 @@ from test_all_types(); -- ok == -SELECT first_value(c40) OVER (PARTITION BY c42 ROWS BETWEEN COALESCE(#4, 0) FOLLOWING AND UNBOUNDED FOLLOWING) +SELECT first_value(c40) OVER (PARTITION BY c42 ROWS BETWEEN GREATEST(COALESCE(#4, 0), 0) FOLLOWING AND UNBOUNDED FOLLOWING) FROM all_types AS t42(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42) ORDER BY ALL -- diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/window-rows-overflow.test b/parser/testdata/corpus/fuzzer/sqlsmith/window-rows-overflow.test index adce6f4..d3856f1 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/window-rows-overflow.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/window-rows-overflow.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/window-rows-overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as @@ -16,7 +16,7 @@ ok SELECT nth_value(1929, 42) OVER ( PARTITION BY ( "usmallint" > "smallint" - ), 747 ROWS BETWEEN COALESCE("bigint", 0) PRECEDING AND CURRENT ROW + ), 747 ROWS BETWEEN GREATEST(COALESCE("bigint", 0), 0) PRECEDING AND CURRENT ROW ) FROM all_types; -- @@ -25,7 +25,7 @@ ok SELECT nth_value(1929, 42) OVER ( PARTITION BY ( "usmallint" > "smallint" - ), 747 ROWS BETWEEN 1 PRECEDING AND COALESCE("bigint", 0) PRECEDING + ), 747 ROWS BETWEEN 1 PRECEDING AND GREATEST(COALESCE("bigint", 0), 0) PRECEDING ) FROM all_types; -- @@ -34,7 +34,7 @@ ok SELECT nth_value(1929, 42) OVER ( PARTITION BY ( "usmallint" > "smallint" - ), 747 ROWS BETWEEN COALESCE("bigint", 0) FOLLOWING AND 1 FOLLOWING + ), 747 ROWS BETWEEN GREATEST(COALESCE("bigint", 0), 0) FOLLOWING AND 1 FOLLOWING ) FROM all_types; -- @@ -43,7 +43,7 @@ ok SELECT nth_value(1929, 42) OVER ( PARTITION BY ( "usmallint" > "smallint" - ), 747 ROWS BETWEEN CURRENT ROW AND COALESCE("bigint", 0) FOLLOWING + ), 747 ROWS BETWEEN CURRENT ROW AND GREATEST(COALESCE("bigint", 0), 0) FOLLOWING ) FROM all_types; -- diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/window_function_error.test b/parser/testdata/corpus/fuzzer/sqlsmith/window_function_error.test index 2ab3bc5..75fddfe 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/window_function_error.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/window_function_error.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/window_function_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT 'thisisastring42' AS r_name; diff --git a/parser/testdata/corpus/fuzzer/sqlsmith/window_scalar_range.test b/parser/testdata/corpus/fuzzer/sqlsmith/window_scalar_range.test index 311fbe1..208c9f7 100644 --- a/parser/testdata/corpus/fuzzer/sqlsmith/window_scalar_range.test +++ b/parser/testdata/corpus/fuzzer/sqlsmith/window_scalar_range.test @@ -1,6 +1,6 @@ # source: test/fuzzer/sqlsmith/window_scalar_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE partsupp AS SELECT (random() * 100)::INT AS c2 diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_count_distinct_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_count_distinct_export_state.test new file mode 100644 index 0000000..9039bde --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_count_distinct_export_state.test @@ -0,0 +1,130 @@ +# source: test/sql/aggregate/aggregate_state_export/approx_count_distinct_export_state.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize(approx_count_distinct(i) EXPORT_STATE) = approx_count_distinct(i), approx_count_distinct(i) FROM range(100000) r(i); +-- +ok +== +SELECT finalize(combine_aggr(s)) FROM (SELECT approx_count_distinct(i) EXPORT_STATE AS s FROM range(100000) r(i) GROUP BY i % 7); +-- +ok +== +SELECT finalize(combine_aggr(s)) FROM (SELECT approx_count_distinct('v' || (i % 500)::VARCHAR) EXPORT_STATE AS s FROM range(5000) r(i) GROUP BY i % 3); +-- +ok +== +SELECT s.precision, len(s.registers), list_max(s.registers) BETWEEN 1 AND 55 FROM ( + SELECT (approx_count_distinct(i) EXPORT_STATE)::STRUCT(precision UTINYINT, registers UTINYINT[]) s + FROM range(1000) t(i) +) t; +-- +ok +== +SELECT finalize(s), list_max(s::STRUCT(precision UTINYINT, registers UTINYINT[]).registers) FROM ( + SELECT approx_count_distinct(x) EXPORT_STATE s FROM (SELECT NULL::INTEGER AS x FROM range(10)) +) t; +-- +ok +== +SELECT finalize(approx_count_distinct(i) EXPORT_STATE) FROM (SELECT 1 AS i WHERE false) t; +-- +ok +== +SELECT finalize(combine_aggr(s)) FROM ( + SELECT approx_count_distinct(i) EXPORT_STATE AS s FROM range(0, 50000) t(i) + UNION ALL + SELECT approx_count_distinct(i) EXPORT_STATE AS s FROM range(50000, 100000) t(i) + UNION ALL + SELECT approx_count_distinct(i) EXPORT_STATE AS s FROM (SELECT 1 AS i WHERE false) t +) t; +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 10, 'registers': list_resize([]::UTINYINT[], 1024, 0)}, 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state(NULL::STRUCT(precision UTINYINT, registers UTINYINT[]), 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +SELECT finalize(combine_aggr(s)) = (SELECT approx_count_distinct(i) FROM range(1000) t(i)) FROM ( + SELECT to_aggregate_state(NULL::STRUCT(precision UTINYINT, registers UTINYINT[]), 'approx_count_distinct', ['BIGINT']) s + UNION ALL + SELECT approx_count_distinct(i) EXPORT_STATE FROM range(1000) t(i) +) t; +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': NULL, 'registers': list_resize([]::UTINYINT[], 1024, 0)}, 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 4, 'registers': list_resize([]::UTINYINT[], 16, 0)}, 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 10, 'registers': [1, 2, 3]::UTINYINT[]}, 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 10, 'registers': list_resize([]::UTINYINT[], 1024, NULL)}, 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 10, 'registers': list_resize([]::UTINYINT[], 1024, 56)}, 'approx_count_distinct', ['BIGINT'])); +-- +ok +== +COPY (SELECT i % 7 AS g, approx_count_distinct(i) EXPORT_STATE AS s FROM range(100000) r(i) GROUP BY g) TO '__TEST_DIR__/approx_count_distinct_states.parquet' (FORMAT PARQUET); +-- +ok +== +SELECT finalize(combine_aggr(to_aggregate_state(s, 'approx_count_distinct', ['BIGINT']))) FROM '__TEST_DIR__/approx_count_distinct_states.parquet'; +-- +ok +== +SELECT g, finalize(to_aggregate_state(s, 'approx_count_distinct', ['BIGINT'])) FROM '__TEST_DIR__/approx_count_distinct_states.parquet' ORDER BY g LIMIT 3; +-- +ok +== +SELECT finalize(to_aggregate_state(s::STRUCT(precision UTINYINT, registers UTINYINT[]), + 'approx_count_distinct', ['ANY'])), + finalize(combine(s, to_aggregate_state(s::STRUCT(precision UTINYINT, registers UTINYINT[]), + 'approx_count_distinct', ['ANY']))) = finalize(s), + typeof(s) = 'AGGREGATE_STATE' AND typeof(finalize(s)) = 'BIGINT' +FROM (SELECT approx_count_distinct(v) EXPORT_STATE s FROM (VALUES (1::BIGINT),(1),(NULL),(2)) input(v)); +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 10, 'registers': list_resize([]::UTINYINT[], 1024, 0)}, + 'approx_count_distinct', ['ANY'])); +-- +ok +== +SELECT finalize(combine_aggr(s)) FROM ( + SELECT approx_count_distinct(v) EXPORT_STATE s FROM (VALUES (1::BIGINT),(NULL)) input(v) + UNION ALL + SELECT approx_count_distinct(v) EXPORT_STATE s FROM (VALUES ('a'),(NULL)) input(v) +) input; +-- +ok +== +SELECT finalize(to_aggregate_state({'precision': 10, 'registers': [0, 0, 0]::UTINYINT[]}, + 'approx_count_distinct', ['ANY'])); +-- +ok +== +SELECT g, finalize(s), + finalize(to_aggregate_state(s::STRUCT(precision UTINYINT, registers UTINYINT[]), + 'approx_count_distinct', ['ANY'])) +FROM ( + SELECT g, approx_count_distinct(v) EXPORT_STATE s + FROM (VALUES (0,1::BIGINT),(0,1),(0,NULL),(1,NULL),(2,2)) input(g,v) + GROUP BY g +) states; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_quantile_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_quantile_export_state.test index 1e66523..4f0acca 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_quantile_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_quantile_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/approx_quantile_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT approx_quantile(i, 0.5) EXPORT_STATE FROM (SELECT 1 AS i WHERE false) t; @@ -80,3 +80,48 @@ SELECT finalize(to_aggregate_state( -- ok == +SELECT finalize(to_aggregate_state( + {'count': 2::UBIGINT, 'min': 0.0::DOUBLE, 'max': 1.0::DOUBLE, + 'centroids': [{'mean': 0.0::DOUBLE, 'weight': {weight}}, {'mean': 1.0::DOUBLE, 'weight': 1.0::DOUBLE}]}, + 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT] +)); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT finalize(to_aggregate_state( + {'count': 2::UBIGINT, 'min': 0.0::DOUBLE, 'max': 1.0::DOUBLE, + 'centroids': [{'mean': 'nan'::DOUBLE, 'weight': 1.0::DOUBLE}, {'mean': 1.0::DOUBLE, 'weight': 1.0::DOUBLE}]}, + 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT] +)); +-- +ok +== +SELECT finalize(to_aggregate_state( + {'count': 2::UBIGINT, 'min': 0.0::DOUBLE, 'max': 1.0::DOUBLE, + 'centroids': [{'mean': 1.0::DOUBLE, 'weight': 1.0::DOUBLE}, {'mean': 0.0::DOUBLE, 'weight': 1.0::DOUBLE}]}, + 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT] +)); +-- +ok +== +SELECT finalize(to_aggregate_state( + {'count': 2::UBIGINT, 'min': 0.0::DOUBLE, 'max': 1.0::DOUBLE, + 'centroids': [{'mean': 0.0::DOUBLE, 'weight': 1e308::DOUBLE}, {'mean': 1.0::DOUBLE, 'weight': 1e308::DOUBLE}]}, + 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT] +)); +-- +ok +== +SELECT finalize(to_aggregate_state( + {'count': 2::UBIGINT, 'min': 'nan'::DOUBLE, 'max': 1.0::DOUBLE, + 'centroids': [{'mean': 0.0::DOUBLE, 'weight': 1.0::DOUBLE}, {'mean': 1.0::DOUBLE, 'weight': 1.0::DOUBLE}]}, + 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT] +)); +-- +ok +== +SELECT approx_quantile(x, 0.5), finalize(to_aggregate_state((approx_quantile(x, 0.5) EXPORT_STATE)::VARCHAR::STRUCT(count UBIGINT, min DOUBLE, max DOUBLE, centroids STRUCT(mean DOUBLE, weight DOUBLE)[]), 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT])) +FROM (VALUES (1.0::DOUBLE), ('inf'), ('-inf'), (2.0)) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_top_k_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_top_k_export_state.test index d2ce1a7..4ca1409 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_top_k_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/approx_top_k_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/approx_top_k_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads=1; @@ -89,3 +89,46 @@ SELECT finalize(combine(approx_top_k(x, 2) EXPORT_STATE, (SELECT approx_top_k(y, -- ok == +SELECT finalize(to_aggregate_state({ + 'k': 2::UBIGINT, + 'values': [ + {'value': 'a'::VARCHAR, 'count': 5::UBIGINT}, + {'value': 'a'::VARCHAR, 'count': 3::UBIGINT} + ]::STRUCT("value" VARCHAR, "count" UBIGINT)[], + 'filter': list_transform(range(64), lambda x: 0::UBIGINT) +}, 'approx_top_k', ['VARCHAR', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({ + 'k': 2::UBIGINT, + 'values': [ + {'value': 'a'::VARCHAR, 'count': 0::UBIGINT} + ]::STRUCT("value" VARCHAR, "count" UBIGINT)[], + 'filter': list_transform(range(64), lambda x: 0::UBIGINT) +}, 'approx_top_k', ['VARCHAR', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({ + 'k': 2::UBIGINT, + 'values': [ + {'value': 'a'::VARCHAR, 'count': 1::UBIGINT}, + {'value': 'b'::VARCHAR, 'count': 5::UBIGINT} + ]::STRUCT("value" VARCHAR, "count" UBIGINT)[], + 'filter': list_transform(range(64), lambda x: 0::UBIGINT) +}, 'approx_top_k', ['VARCHAR', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({ + 'k': 2::UBIGINT, + 'values': [ + {'value': 'a'::VARCHAR, 'count': 5::UBIGINT}, + {'value': 'b'::VARCHAR, 'count': 5::UBIGINT} + ]::STRUCT("value" VARCHAR, "count" UBIGINT)[], + 'filter': list_transform(range(64), lambda x: 0::UBIGINT) +}, 'approx_top_k', ['VARCHAR', 'BIGINT'])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/arg_min_max_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/arg_min_max_export_state.test index ffb43a2..8385a61 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/arg_min_max_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/arg_min_max_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/arg_min_max_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT arg_min(a, b) EXPORT_STATE FROM (SELECT 1 a, 1 b WHERE false) t; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/avg_time_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/avg_time_export_state.test new file mode 100644 index 0000000..70b64b0 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/avg_time_export_state.test @@ -0,0 +1,48 @@ +# source: test/sql/aggregate/aggregate_state_export/avg_time_export_state.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize(to_aggregate_state({'count': 1, 'value': 99999999999999999}, 'avg', ['{type}'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'count': 1, 'value': -1}, 'avg', ['{type}'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'count': 1, 'value': 9223372036854775807}, 'avg', ['{type}'])); +-- +ok +== +SELECT finalize(combine(to_aggregate_state({'count': 1, 'value': 0}, 'avg', ['{type}']), + to_aggregate_state({'count': 1, 'value': 86400000001}, 'avg', ['{type}']))); +-- +ok +== +SELECT finalize(to_aggregate_state({'count': 2, 'value': 86400000000}, 'avg', ['{type}']))::TIME; +-- +ok +== +SELECT finalize(to_aggregate_state({'count': 1, 'value': 86400000000}, 'avg', ['{type}']))::TIME; +-- +ok +== +SELECT finalize(to_aggregate_state({'count': 0, 'value': 0}, 'avg', ['{type}'])); +-- +ok +== +SELECT finalize(to_aggregate_state(NULL, 'avg', ['{type}'])); +-- +ok +== +SELECT finalize(avg(x) EXPORT_STATE), finalize(avg(x::TIMETZ) EXPORT_STATE) FROM (VALUES (TIME '23:00:00'), (TIME '22:00:00')) t(x); +-- +ok +== +SELECT finalize(to_aggregate_state(avg(x) EXPORT_STATE::STRUCT("count" UBIGINT, "value" HUGEINT), 'avg', ['TIME'])), + finalize(to_aggregate_state(avg(x::TIMETZ) EXPORT_STATE::STRUCT("count" UBIGINT, "value" HUGEINT), 'avg', ['TIMETZ'])) +FROM (VALUES (TIME '10:00:00'), (TIME '14:00:00')) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/bool_and_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/bool_and_export_state.test index acb8666..9d09d29 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/bool_and_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/bool_and_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/bool_and_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT bool_and(NULL) EXPORT_STATE diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/combine_aggr_count_overflow.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/combine_aggr_count_overflow.test new file mode 100644 index 0000000..8010c9d --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/combine_aggr_count_overflow.test @@ -0,0 +1,30 @@ +# source: test/sql/aggregate/aggregate_state_export/combine_aggr_count_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH s AS (SELECT {aggr}(x) EXPORT_STATE st FROM (VALUES (1), (2), (2), (7)) v(x)) +SELECT finalize(combine_aggr(st, 4611686018427387904)) FROM s; +-- +error: Parser Error: syntax error at or near "}" +== +WITH s AS (SELECT {aggr}(x, x) EXPORT_STATE st FROM (VALUES (1), (2), (2), (7)) v(x)) +SELECT finalize(combine_aggr(st, 4611686018427387904)) FROM s; +-- +error: Parser Error: syntax error at or near "}" +== +WITH s AS (SELECT approx_quantile(x, 0.5) EXPORT_STATE st FROM (VALUES (1), (2), (2), (7)) v(x)) +SELECT finalize(combine_aggr(st, 4611686018427387904)) FROM s; +-- +ok +== +WITH s AS (SELECT regr_count(x, x) EXPORT_STATE st FROM (VALUES (1), (2)) v(x)) +SELECT finalize(combine_aggr(st, 2147483648)) FROM s; +-- +ok +== +WITH s AS (SELECT var_pop(x) EXPORT_STATE a, regr_count(x, x) EXPORT_STATE b FROM (VALUES (1), (2), (2), (7)) v(x)) +SELECT finalize(combine_aggr(a, 3)), finalize(combine_aggr(b, 3)) FROM s; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/count_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/count_export_state.test index 9f77cb3..e2887c9 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/count_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/count_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/count_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) export_state @@ -15,3 +15,47 @@ SELECT finalize(combine_aggr(s)) from (select COUNT(*) export_state AS s FROM ra -- ok == +WITH nullable_counts AS ( + SELECT g, count(v) EXPORT_STATE c, count(s) EXPORT_STATE t + FROM (VALUES (0,1::BIGINT,'a'),(0,NULL,NULL),(0,1,'a'),(1,NULL,NULL),(2,2,'b')) input(g,v,s) + GROUP BY g +) +SELECT g, finalize(c), finalize(combine(c, to_aggregate_state(t::BIGINT, 'count', ['ANY']))) +FROM nullable_counts; +-- +ok +== +WITH nullable_counts AS ( + SELECT g, count(v) EXPORT_STATE c, count(s) EXPORT_STATE t + FROM (VALUES (0,1::BIGINT,'a'),(0,NULL,NULL),(0,1,'a'),(1,NULL,NULL),(2,2,'b')) input(g,v,s) + GROUP BY g +) +SELECT finalize(combine_aggr(to_aggregate_state(c::BIGINT, 'count', ['any']))), + typeof(combine_aggr(c)), typeof(finalize(combine_aggr(c))) FROM nullable_counts; +-- +ok +== +SELECT finalize(to_aggregate_state(NULL::BIGINT, 'count', ['ANY'])), + finalize(combine_aggr(to_aggregate_state(NULL::BIGINT, 'count', ['ANY']))); +-- +ok +== +SELECT finalize(to_aggregate_state(3::BIGINT, 'count', ['BIGINT'])), + finalize(to_aggregate_state(3::BIGINT, 'count', [make_type('VARCHAR')])), + finalize(to_aggregate_state(3::BIGINT, 'count_star', [])); +-- +ok +== +SELECT combine(to_aggregate_state(1::BIGINT, 'count', ['ANY']), + to_aggregate_state(1::BIGINT, 'count_star', [])); +-- +ok +== +SELECT finalize(combine( + to_aggregate_state([{'v0': 'a', 'k': 2}, {'v0': NULL, 'k': 1}], 'count', ['ANY'], NULL, + [{'column': 1, 'order': 'DESC NULLS FIRST'}]), + to_aggregate_state([{'v0': 'b', 'k': 3}], 'count', ['ANY'], NULL, + [{'column': 1, 'order': 'DESC NULLS FIRST'}]))); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/finalize_null_fields.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/finalize_null_fields.test new file mode 100644 index 0000000..f62c1e5 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/finalize_null_fields.test @@ -0,0 +1,16 @@ +# source: test/sql/aggregate/aggregate_state_export/finalize_null_fields.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*), count(r) FROM ( + SELECT finalize(to_aggregate_state(s, 'avg', ['BIGINT'])) r + FROM (SELECT CASE WHEN i < 2048 THEN {'count': 5, 'value': 10::HUGEINT} ELSE {'count': NULL, 'value': NULL::HUGEINT} END s FROM range(3000) t(i)) +) +-- +ok +== +SELECT finalize(to_aggregate_state({'count': NULL, 'value': NULL::HUGEINT}, 'avg', ['BIGINT'])) +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/first_last_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/first_last_export_state.test index 6b5e2ec..7dd5488 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/first_last_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/first_last_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/first_last_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT first(i) EXPORT_STATE FROM (SELECT 1 AS i WHERE false) t; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/kahan_avg_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/kahan_avg_export_state.test index 6aaf9dd..9641692 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/kahan_avg_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/kahan_avg_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/kahan_avg_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE kahan_context1 AS diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/legacy_aggregate_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/legacy_aggregate_state.test index 172578e..a7ae0f1 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/legacy_aggregate_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/legacy_aggregate_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/legacy_aggregate_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/legacy_aggregate_state.db' AS legacy diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/list_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/list_export_state.test index 9151c05..b052e7f 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/list_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/list_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/list_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT finalize(list(i) EXPORT_STATE) FROM (VALUES (1), (2), (3)) t(i); diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/minmax_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/minmax_export_state.test index 0d9247a..433fdcf 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/minmax_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/minmax_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/minmax_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT min(v) EXPORT_STATE FROM (SELECT NULL::varchar AS v WHERE false) t; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_aggregate_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_aggregate_export_state.test index 0076ca5..019ee26 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_aggregate_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_aggregate_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/ordered_aggregate_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lineitem(l_orderkey BIGINT, l_quantity DECIMAL(15,2), l_shipdate DATE); @@ -242,3 +242,7 @@ SELECT to_aggregate_state([{'v0': 1, 'v1': 10}], 'list', ['INTEGER'], [NULL], [{ -- ok == +SELECT to_aggregate_state([{'v0': 'a'}], 'string_agg', ['VARCHAR'], NULL, [{'column': 0, 'order': 42}]); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_export_state_layout.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_export_state_layout.test new file mode 100644 index 0000000..6b1ad07 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/ordered_export_state_layout.test @@ -0,0 +1,41 @@ +# source: test/sql/aggregate/aggregate_state_export/ordered_export_state_layout.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize(count(INTERVAL 1 DAY ORDER BY INTERVAL 1 DAY) EXPORT_STATE) FROM range(3); +-- +ok +== +SELECT count(INTERVAL 1 DAY ORDER BY INTERVAL 1 DAY) EXPORT_STATE FROM range(3); +-- +ok +== +SELECT finalize(string_agg(s, ',' ORDER BY s DESC) EXPORT_STATE) FROM (VALUES ('a'), ('c'), ('b')) t(s); +-- +ok +== +SELECT finalize(list(r ORDER BY r % 2, r DESC) EXPORT_STATE) FROM range(5) t(r); +-- +ok +== +CREATE TABLE x(id INT); +-- +ok +== +INSERT INTO x VALUES (1), (2); +-- +ok +== +CREATE TABLE y(s VARCHAR); +-- +ok +== +INSERT INTO y VALUES ('p'), ('q'); +-- +ok +== +SELECT finalize(string_agg([y.s, y.s][x.id], ',' ORDER BY [y.s, y.s][x.id]) EXPORT_STATE) FROM x LEFT JOIN y ON true; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/product_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/product_export_state.test index 1ec0309..b995138 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/product_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/product_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/product_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT product(v) EXPORT_STATE FROM (SELECT NULL::double AS v WHERE false) t; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/state_export_parquet.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/state_export_parquet.test index 1fa9a16..38b540c 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/state_export_parquet.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/state_export_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/state_export_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT SUM(42) EXPORT_STATE AS state) TO '{TEST_DIR}/exported_state.parquet'; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/sum_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/sum_export_state.test index c448bd7..ddaee62 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/sum_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/sum_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/sum_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(sum(1::INTEGER) EXPORT_STATE); diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_aggregate_state_type.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_aggregate_state_type.test index 4b0344f..9c341e4 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_aggregate_state_type.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_aggregate_state_type.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_aggregate_state_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(avg(1.0::{type}) EXPORT_STATE); @@ -51,6 +51,10 @@ SELECT typeof(approx_count_distinct(1) EXPORT_STATE); -- ok == +SELECT typeof(histogram(1) EXPORT_STATE); +-- +ok +== SELECT typeof(avg(INTERVAL '1 day' ) EXPORT_STATE); -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_combine_aggr.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_combine_aggr.test index d22e931..93f5e8e 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_combine_aggr.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_combine_aggr.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_combine_aggr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table dummy as select range % 10 g, range d from range(100); @@ -109,6 +109,63 @@ FROM states; -- ok == +WITH states AS ( + SELECT + avg(3::SMALLINT) EXPORT_STATE AS smallint_s, + avg(3::HUGEINT) EXPORT_STATE AS hugeint_s, + avg(3::DOUBLE) EXPORT_STATE AS double_s, + avg(INTERVAL '3 days') EXPORT_STATE AS interval_s, + avg(TIMESTAMP '2020-01-03 12:00:00') EXPORT_STATE AS timestamp_s, + avg(TIMETZ '12:00:00+02') EXPORT_STATE AS timetz_s +) +SELECT + finalize(combine_aggr(smallint_s, 3)) = 3, + finalize(combine_aggr(hugeint_s, 3)) = 3, + finalize(combine_aggr(double_s, 3)) = 3, + finalize(combine_aggr(interval_s, 3)) = INTERVAL '3 days', + finalize(combine_aggr(timestamp_s, 3)) = TIMESTAMP '2020-01-03 12:00:00', + finalize(combine_aggr(timetz_s, 3)) = TIMETZ '10:00:00+00' +FROM states; +-- +ok +== +WITH states AS ( + SELECT + k, + list(v) EXPORT_STATE AS list_s, + median(v) EXPORT_STATE AS median_s, + quantile_cont(v, 0.5) EXPORT_STATE AS quantile_s, + mad(v) EXPORT_STATE AS mad_s + FROM (VALUES (1, 1), (1, 1), (2, 42), (2, 42)) t(k, v) + GROUP BY k +) +SELECT + list_sort(finalize(combine_aggr(list_s, CASE k WHEN 1 THEN 3 ELSE 2 END))), + finalize(combine_aggr(median_s, CASE k WHEN 1 THEN 3 ELSE 2 END)), + finalize(combine_aggr(quantile_s, CASE k WHEN 1 THEN 3 ELSE 2 END)), + finalize(combine_aggr(mad_s, CASE k WHEN 1 THEN 3 ELSE 2 END)) +FROM states; +-- +ok +== +WITH states AS ( + SELECT list(v) EXPORT_STATE AS s + FROM (VALUES (1), (2)) t(v) +) +SELECT + (finalize(combine_aggr(s, 0)) IS NULL)::INTEGER, + (finalize(combine_aggr(s, NULL::BIGINT)) IS NULL)::INTEGER +FROM states; +-- +ok +== +WITH states AS ( + SELECT list(v) EXPORT_STATE AS s FROM (VALUES (1), (2)) t(v) +) +SELECT finalize(combine_aggr(s, -1)) FROM states; +-- +ok +== WITH states AS ( SELECT sum(v) EXPORT_STATE AS s FROM (VALUES (1), (2)) t(v) ) @@ -140,15 +197,15 @@ select finalize(finalize(combine_aggr(state))) from states; -- ok == -CREATE TABLE skew_states AS (SELECT g, (skewness(d) export_state) state FROM dummy GROUP BY g); +CREATE TABLE skew_states AS (SELECT g, (skewness(d) export_state) state, (skewness(d * d) export_state) state_sq FROM dummy GROUP BY g); -- ok == -select skewness(d) from dummy; +select skewness(d), skewness(d * d) from dummy; -- ok == -select finalize(combine_aggr(state)) from skew_states; +select finalize(combine_aggr(state)), finalize(combine_aggr(state_sq)) from skew_states; -- ok == diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_corr_state_export.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_corr_state_export.test index 92b0193..742ee52 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_corr_state_export.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_corr_state_export.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_corr_state_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT corr(d, d+1) export_state FROM dummy; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_covar_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_covar_export_state.test index 2fca52e..46d5a6e 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_covar_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_covar_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_covar_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(x INTEGER, y INTEGER); @@ -43,3 +43,14 @@ SELECT g, finalize(covar_samp(x, y) EXPORT_STATE) FROM grouped GROUP BY g ORDER -- ok == +WITH states AS ( + SELECT + covar_pop(x, y) EXPORT_STATE AS pop_state, + covar_samp(x, y) EXPORT_STATE AS samp_state + FROM (VALUES (0, 1, 2), (0, 2, 4), (1, 3, 6), (1, 4, 8)) t(g, x, y) + GROUP BY g +) +SELECT finalize(combine_aggr(pop_state)), finalize(combine_aggr(samp_state)) FROM states; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_export_state_finalize_limits.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_export_state_finalize_limits.test new file mode 100644 index 0000000..f9770a4 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_export_state_finalize_limits.test @@ -0,0 +1,18 @@ +# source: test/sql/aggregate/aggregate_state_export/test_export_state_finalize_limits.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize( + to_aggregate_state( + { + 'k': CAST(1099511627776 AS UBIGINT), + 'values': list_value({'value': 7, 'count': CAST(5 AS UBIGINT)}), + 'filter': list_value(CAST(0 AS UBIGINT), CAST(0 AS UBIGINT)) + }, + 'approx_top_k', ['INTEGER', 'BIGINT'], [NULL, 3] + ) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_bounds.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_bounds.test new file mode 100644 index 0000000..50abc9f --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_bounds.test @@ -0,0 +1,13 @@ +# source: test/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_bounds.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize(to_aggregate_state([ {'v0' : 1} ], 'string_agg', [ 'VARCHAR', 'VARCHAR' ], NULL,[ {'column' : 0, 'order' : 'ASC NULLS FIRST'} ])); +-- +ok +== +SELECT finalize(to_aggregate_state([ {'v0' : 'b'}, {'v0' : 'a'} ], 'string_agg', ['VARCHAR'], NULL,[ {'column' : 0, 'order' : 'ASC NULLS FIRST'} ])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_types.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_types.test new file mode 100644 index 0000000..9c9e72b --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_types.test @@ -0,0 +1,58 @@ +# source: test/sql/aggregate/aggregate_state_export/test_sorted_aggregate_state_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize(to_aggregate_state([{'v0': 1}, {'v0': 2}], 'list', ['INTEGER[]'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1::BIGINT}], 'list', ['STRUCT(a INTEGER)'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1::BIGINT}], 'list', ['VARCHAR'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 3}, {'v0': 1}], 'list', ['BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1.5::DOUBLE}, {'v0': 0.25::DOUBLE}], 'list', ['DECIMAL(4,2)'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT typeof(finalize(to_aggregate_state([{'v0': 1}], 'list', ['HUGEINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}]))); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1::BIGINT, 'k': 'b'}, {'v0': 2::BIGINT, 'k': 'a'}], 'list', ['VARCHAR'], NULL, [{'column': 1, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1::DOUBLE, 'v1': '10'}, {'v0': 2::DOUBLE, 'v1': '20'}], 'arg_max', ['INTEGER', 'INTEGER'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(combine( + to_aggregate_state([{'v0': 2}], 'list', ['BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}]), + to_aggregate_state([{'v0': 1}], 'list', ['BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}]))); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 'x', 'k': 2}, {'v0': NULL, 'k': 1}], 'count', ['VARCHAR'], NULL, [{'column': 1, 'order': 'ASC NULLS FIRST'}])), + finalize(to_aggregate_state([{'v0': [1, 2], 'k': 2}, {'v0': [3], 'k': 1}], 'first', ['INTEGER[]'], NULL, [{'column': 1, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(combine( + to_aggregate_state([{'v0': 'a', 'k': 2}], 'count', ['VARCHAR'], NULL, [{'column': 1, 'order': 'ASC NULLS FIRST'}]), + to_aggregate_state([{'v0': 'b', 'k': 1}], 'count', ['VARCHAR'], NULL, [{'column': 1, 'order': 'ASC NULLS FIRST'}]))); +-- +ok +== +SELECT count(i ORDER BY i DESC), count(1 ORDER BY 1) FROM range(3) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_opaque.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_opaque.test index 74fc136..3469fa4 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_opaque.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_opaque.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_state_export_opaque.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT skewness(d) FROM dummy; @@ -99,7 +99,7 @@ SELECT (skewness(42) EXPORT_STATE)::BLOB; -- ok == -SELECT (skewness(42) EXPORT_STATE)::STRUCT(n UBIGINT, sum DOUBLE, sum_sqr DOUBLE, sum_cub DOUBLE); +SELECT (skewness(42) EXPORT_STATE)::STRUCT(n UBIGINT, mean DOUBLE, m2 DOUBLE, m3 DOUBLE); -- ok == diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_quantile.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_quantile.test index ef86808..c08aa16 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_quantile.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_quantile.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_state_export_quantile.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT quantile_disc(d, 0.5) FROM dummy; @@ -51,6 +51,16 @@ SELECT finalize(quantile_disc(d, -0.25) EXPORT_STATE) FROM dummy; -- ok == +SELECT + finalize(quantile_disc(d, (-0.5)::DECIMAL(9, 1)) EXPORT_STATE), + finalize(quantile_disc(d, (-0.5)::DECIMAL(18, 1)) EXPORT_STATE), + finalize(quantile_disc(d, (-0.5)::DECIMAL(38, 1)) EXPORT_STATE), + finalize(quantile_disc(d, (-0.5)::DOUBLE) EXPORT_STATE), + finalize(quantile_disc(d, []::DOUBLE[]) EXPORT_STATE) +FROM dummy; +-- +ok +== SELECT g, quantile_cont(d, 0.5) FROM dummy GROUP BY g ORDER BY g; -- ok @@ -171,3 +181,27 @@ SELECT g, quantile_cont(d, [0.25, 0.75]) FROM dummy GROUP BY g ORDER BY g; -- ok == +SELECT finalize(to_aggregate_state([NULL, NULL]::TIME[], 'median', ['TIME'], NULL)); +-- +ok +== +SELECT finalize(to_aggregate_state([1, NULL]::BIGINT[], 'median', ['BIGINT'], NULL)); +-- +ok +== +SELECT finalize(to_aggregate_state([1, NULL]::BIGINT[], 'quantile_disc', ['BIGINT', 'DOUBLE'], [NULL, 0.5])); +-- +ok +== +SELECT finalize(to_aggregate_state([1, NULL]::DOUBLE[], 'mad', ['DOUBLE'], NULL)); +-- +ok +== +SELECT finalize(to_aggregate_state(['a', NULL], 'median', ['VARCHAR'], NULL)); +-- +ok +== +SELECT finalize(to_aggregate_state([1, 3]::BIGINT[], 'median', ['BIGINT'], NULL)), finalize(median(x) EXPORT_STATE) FROM (VALUES (1), (NULL), (3)) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_string_agg.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_string_agg.test index 17c043c..fbcdc7f 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_string_agg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_string_agg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_state_export_string_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT string_agg(d, '|') FROM dummy; diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_struct.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_struct.test index 5f34a87..2595c3d 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_struct.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_state_export_struct.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_state_export_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sum(d), avg(d)::integer, count(d), min(d), max(d), first(d), last(d), kurtosis(d), kurtosis_pop(d) FROM dummy; @@ -284,11 +284,13 @@ SELECT g, finalize(kurtosis_pop(d) EXPORT_STATE) FROM dummy GROUP BY g ORDER BY -- ok == -SELECT kurtosis(d) EXPORT_STATE FROM dummy; +SELECT st.n, st.mean, st.m2, st.m3, st.m4 +FROM (SELECT (kurtosis(d) EXPORT_STATE)::STRUCT(n UBIGINT, mean DOUBLE, m2 DOUBLE, m3 DOUBLE, m4 DOUBLE) st FROM dummy); -- ok == -SELECT kurtosis_pop(d) EXPORT_STATE FROM dummy; +SELECT st.n, st.mean, st.m2, st.m3, st.m4 +FROM (SELECT (kurtosis_pop(d) EXPORT_STATE)::STRUCT(n UBIGINT, mean DOUBLE, m2 DOUBLE, m3 DOUBLE, m4 DOUBLE) st FROM dummy); -- ok == diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_stddev_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_stddev_export_state.test index 09ca279..0d47a1e 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_stddev_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/test_stddev_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/test_stddev_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table stddev_test(val integer, grp integer) diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/to_aggregate_state_argument_types.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/to_aggregate_state_argument_types.test new file mode 100644 index 0000000..b204b57 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/to_aggregate_state_argument_types.test @@ -0,0 +1,25 @@ +# source: test/sql/aggregate/aggregate_state_export/to_aggregate_state_argument_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT finalize(to_aggregate_state(1::BIGINT, 'sum'::VARIANT, ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'count': NULL, 'value': NULL::HUGEINT}, 1::VARIANT, ['BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state(1::BIGINT, 'sum', ['BIGINT']::VARIANT)); +-- +ok +== +SELECT finalize(to_aggregate_state(1::BIGINT, 'sum', 42)); +-- +ok +== +SELECT finalize(to_aggregate_state(1::BIGINT, 'sum', ['BIGINT'])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/to_aggregate_state_errors.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/to_aggregate_state_errors.test new file mode 100644 index 0000000..5a4510b --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/to_aggregate_state_errors.test @@ -0,0 +1,165 @@ +# source: test/sql/aggregate/aggregate_state_export/to_aggregate_state_errors.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT to_aggregate_state(0::HUGEINT, 'sum', [NULL]); +-- +ok +== +SELECT to_aggregate_state(0::HUGEINT, 'sum', [42]); +-- +ok +== +SELECT to_aggregate_state([{'v0': 1}], 'list', ['INTEGER'], NULL, NULL); +-- +ok +== +SELECT to_aggregate_state([{'v0': 1}], 'list', ['INTEGER'], NULL, 42); +-- +ok +== +SELECT to_aggregate_state( + [{'v0': 1}], 'list', ['INTEGER'], NULL, + [NULL::STRUCT("column" UINTEGER, "order" VARCHAR)] +); +-- +ok +== +SELECT to_aggregate_state( + [{'v0': 1}], 'list', ['INTEGER'], NULL, + [{'column': NULL::UINTEGER, 'order': 'ASC NULLS LAST'}] +); +-- +ok +== +SELECT to_aggregate_state( + [{'v0': 1}], 'list', ['INTEGER'], NULL, + [{'column': 0::UINTEGER, 'order': NULL::VARCHAR}] +); +-- +ok +== +SELECT to_aggregate_state( + [1, 2], 'list', ['INTEGER'], NULL, + [{'column': 0::UINTEGER, 'order': 'ASC NULLS LAST'}] +); +-- +ok +== +SELECT to_aggregate_state(1e300, 'sum', ['FLOAT']); +-- +ok +== +SELECT to_aggregate_state(NULL, 'lttb', ['TIME', 'DOUBLE', 'BIGINT']); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1}], 'count', [], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(count(ORDER BY i) EXPORT_STATE) FROM range(3) t(i); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 3, 'v1': 2}, {'v0': 1, 'v1': 2}], 'approx_top_k', ['INTEGER', 'BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'v0': 1}], 'approx_top_k', ['INTEGER', 'BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state({'k': 3, 'values': [{'value': 5, 'count': NULL}], 'filter': list_resize([]::UBIGINT[], 128, 0)}, 'approx_top_k', ['INTEGER', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'k': 3, 'values': [{'value': 5, 'count': 0}], 'filter': list_resize([]::UBIGINT[], 128, 0)}, 'approx_top_k', ['INTEGER', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'k': NULL, 'values': [], 'filter': []}, 'approx_top_k', ['INTEGER', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'k': 3, 'values': [{'value': 5, 'count': 1}], 'filter': list_resize([NULL]::UBIGINT[], 128, NULL)}, 'approx_top_k', ['INTEGER', 'BIGINT'])); +-- +ok +== +SELECT finalize(to_aggregate_state({'k': 3, 'values': [{'value': 5, 'count': 2}, {'value': 7, 'count': 1}], 'filter': list_resize([]::UBIGINT[], 128, 0)}, 'approx_top_k', ['INTEGER', 'BIGINT'])); +-- +ok +== +SELECT CAST(NULL AS ANY); +-- +error: Parser Error: syntax error at or near "ANY" +== +CREATE TABLE any_column(v ANY); +-- +error: Parser Error: syntax error at or near "ANY" +== +SELECT make_type('ANY'); +-- +ok +== +SELECT to_aggregate_state(0::BIGINT, 'count', ['ANY[]']); +-- +ok +== +SELECT to_aggregate_state({'not_a_count': 1}, 'count', ['ANY']); +-- +ok +== +SELECT to_aggregate_state(0::BIGINT, 'count', ['ANY'], [NULL, NULL]); +-- +ok +== +SELECT to_aggregate_state([{'v0': 'a'}], 'count', ['ANY'], NULL, + [{'column': 1, 'order': 'ASC NULLS LAST'}]); +-- +ok +== +SELECT to_aggregate_state(0::BIGINT, '{aggregate}', ['ANY']); +-- +ok +== +SELECT to_aggregate_state(0::BIGINT, 'count', ['ANY', 'ANY']); +-- +ok +== +SELECT to_aggregate_state([1, 2], '{aggregate}', ['ANY', 'BIGINT'], [NULL, 2]); +-- +ok +== +SELECT to_aggregate_state({'arg': 1::BIGINT, 'by': 2::BIGINT}, '{aggregate}', ['ANY', 'BIGINT']); +-- +ok +== +SELECT to_aggregate_state({'arg': 1::BIGINT, 'by': 2::BIGINT}, '{aggregate}', ['BIGINT', 'ANY']); +-- +ok +== +SELECT to_aggregate_state([{'arg': 1::BIGINT, 'by': 2::BIGINT}], '{aggregate}', + ['BIGINT', 'ANY'], NULL, [{'column': 1, 'order': 'ASC NULLS LAST'}]); +-- +ok +== +SELECT finalize(to_aggregate_state({'arg': 1::BIGINT, 'by': 2::BIGINT}, '{aggregate}', ['BIGINT', 'BIGINT'])), + finalize(to_aggregate_state([{'arg': 1::BIGINT, 'by': 2::BIGINT}], '{aggregate}', + ['BIGINT', 'BIGINT'], NULL, [{'column': 1, 'order': 'ASC NULLS LAST'}])); +-- +ok +== +SELECT finalize(to_aggregate_state( + NULL::STRUCT(k UBIGINT, "values" STRUCT("value" BIGINT, count UBIGINT)[], "filter" UBIGINT[]), + 'approx_top_k', ['ANY', 'BIGINT'], [NULL, 2])); +-- +ok +== +SELECT finalize(to_aggregate_state( + NULL::STRUCT(k UBIGINT, "values" STRUCT("value" BIGINT, count UBIGINT)[], "filter" UBIGINT[]), + 'approx_top_k', ['BIGINT', 'BIGINT'], [NULL, 2])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/vector_minmax_export_state.test b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/vector_minmax_export_state.test index 08953f7..d3400cc 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregate_state_export/vector_minmax_export_state.test +++ b/parser/testdata/corpus/sql/aggregate/aggregate_state_export/vector_minmax_export_state.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregate_state_export/vector_minmax_export_state.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT finalize(min(v) EXPORT_STATE) FROM (SELECT NULL::struct(a int, b varchar) AS v WHERE false) t; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/approx_quantile_decimal_scalar.test b/parser/testdata/corpus/sql/aggregate/aggregates/approx_quantile_decimal_scalar.test new file mode 100644 index 0000000..189485f --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/approx_quantile_decimal_scalar.test @@ -0,0 +1,30 @@ +# source: test/sql/aggregate/aggregates/approx_quantile_decimal_scalar.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT approx_quantile(x, 0.5), typeof(approx_quantile(x, 0.5)), approx_quantile(x, [0.5]), quantile_cont(x, 0.5) +FROM (VALUES (1.5::DECIMAL(4,1)), (2.5), (3.5)) v(x); +-- +ok +== +SELECT approx_quantile(x, 0.5) FROM (VALUES (0.25::DECIMAL(18,2)), (0.25), (0.25)) v(x); +-- +ok +== +SELECT approx_quantile(x, 0.5), typeof(approx_quantile(x, 0.5)) FROM (VALUES (0.5::DECIMAL(2,1)), (0.5), (0.5)) v(x); +-- +ok +== +SELECT approx_quantile(x, 0.5), typeof(approx_quantile(x, 0.5)) FROM (VALUES (12.75::DECIMAL(38,2)), (12.75), (12.75)) v(x); +-- +ok +== +SELECT g, approx_quantile(x, 0.5) FROM (VALUES (1, 1.25::DECIMAL(9,2)), (1, 1.25), (2, 7.75), (2, 7.75)) v(g, x) GROUP BY g ORDER BY g; +-- +ok +== +SELECT approx_quantile(x, 0.5) FROM (VALUES (NULL::DECIMAL(9,2))) v(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/approx_quantile_parallel_finalize.test b/parser/testdata/corpus/sql/aggregate/aggregates/approx_quantile_parallel_finalize.test new file mode 100644 index 0000000..f1cec47 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/approx_quantile_parallel_finalize.test @@ -0,0 +1,29 @@ +# source: test/sql/aggregate/aggregates/approx_quantile_parallel_finalize.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA threads=8; +-- +ok +== +CREATE TABLE t AS SELECT i % 5000 AS g, (i * 7919) % 997 AS v FROM range(120000) r(i); +-- +ok +== +SELECT count(*) FROM (SELECT approx_quantile(v, 0.5) AS q FROM t GROUP BY g) WHERE q IS NOT NULL; +-- +ok +== +SELECT count(*) FROM (SELECT approx_quantile(v, 0.99) AS q, approx_quantile(v, 0.5) AS q2 FROM t GROUP BY g) WHERE q >= q2; +-- +ok +== +CREATE TABLE big AS SELECT i % 3000 AS g, (i * 7919) % 97 AS v FROM range(1500000) r(i); +-- +ok +== +SELECT count(*) FROM (SELECT approx_quantile(v, 0.5) AS q FROM big GROUP BY g) WHERE q BETWEEN 0 AND 96; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/approx_top_k.test b/parser/testdata/corpus/sql/aggregate/aggregates/approx_top_k.test index 4067363..b51f1ff 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/approx_top_k.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/approx_top_k.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/approx_top_k.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT i%5 as even_groups, log(1 + i*i)::int as skewed_groups FROM range(10000) t(i); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n.test b/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n.test index 8f45c73..824bede 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/arg_min_max_n.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (val VARCHAR, arg INT); @@ -31,6 +31,10 @@ SELECT arg_max(even_groups, i, 3) FROM t2; -- ok == +SELECT min(v), max(v), min(v, 2), max(v, 2) FROM (VALUES (1),(4),(1),(NULL)) input(v); +-- +ok +== select {FUNC}(arg, NULL) from t1; -- error: Parser Error: syntax error at or near "}" diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n_tpch.test b/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n_tpch.test index a19932f..f30993f 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n_tpch.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_n_tpch.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/arg_min_max_n_tpch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select min(l_orderkey, 3) from lineitem; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_nulls_last.test b/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_nulls_last.test index 003bed6..5e06d01 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_nulls_last.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/arg_min_max_nulls_last.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/arg_min_max_nulls_last.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT * FROM VALUES (1, 5, 1), (1, NULL, 2), (1, 3, NULL), (2, NULL, NULL), (3, 1, NULL) t(grp, arg, val) @@ -47,3 +47,17 @@ SELECT grp, arg_min_nulls_last(arg, val, 2) FROM tbl GROUP BY grp ORDER BY grp -- ok == +WITH floating_values(id, val) AS ( + VALUES (1, 0::{fp_type}), (2, 'NaN'::{fp_type}), (3, -1::{fp_type}), (4, NULL::{fp_type}) +) +SELECT arg_min_nulls_last(id, val, 4), arg_max_nulls_last(id, val, 4) FROM floating_values +-- +error: Parser Error: syntax error at or near "{" +== +WITH floating_values(id, val) AS ( + VALUES (2, 'NaN'::{fp_type}), (4, NULL::{fp_type}), (3, -1::{fp_type}), (1, 0::{fp_type}) +) +SELECT arg_min_nulls_last(id, val, 4), arg_max_nulls_last(id, val, 4) FROM floating_values +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/avg_interval_large_count.test b/parser/testdata/corpus/sql/aggregate/aggregates/avg_interval_large_count.test new file mode 100644 index 0000000..c4aae85 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/avg_interval_large_count.test @@ -0,0 +1,29 @@ +# source: test/sql/aggregate/aggregates/avg_interval_large_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH s AS (SELECT avg(x) EXPORT_STATE st FROM (VALUES (INTERVAL 1 DAY), (INTERVAL 0 DAY)) v(x)) +SELECT finalize(combine_aggr(st, 200000000)) FROM s; +-- +ok +== +WITH s AS (SELECT avg(x) EXPORT_STATE st FROM (VALUES (INTERVAL 1 DAY), (INTERVAL 0 DAY), (INTERVAL 0 DAY)) v(x)) +SELECT finalize(combine_aggr(st, 100000000)) FROM s; +-- +ok +== +WITH s AS (SELECT avg(x) EXPORT_STATE st FROM (VALUES (INTERVAL '-1' DAY), (INTERVAL 0 DAY), (INTERVAL 0 DAY)) v(x)) +SELECT finalize(combine_aggr(st, 100000000)) FROM s; +-- +ok +== +WITH s AS (SELECT avg(x) EXPORT_STATE st FROM (VALUES (INTERVAL 1 MONTH), (INTERVAL 0 DAY), (INTERVAL 0 DAY)) v(x)) +SELECT finalize(combine_aggr(st, 100000000)) FROM s; +-- +ok +== +SELECT avg(x) FROM (VALUES (INTERVAL 1 DAY), (INTERVAL 0 DAY), (INTERVAL 1 MONTH)) v(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/binning.test b/parser/testdata/corpus/sql/aggregate/aggregates/binning.test index 1826d9e..50caf05 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/binning.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/binning.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/binning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT equi_width_bins(0, 10, 2, true) @@ -223,6 +223,46 @@ SELECT EQUI_WIDTH_BINS(0, 10, 5999, false) -- ok == +SELECT equi_width_bins(1::BIGINT, 2::BIGINT, 1000000, false) +-- +ok +== +SELECT equi_width_bins(1::BIGINT, 2::BIGINT, 1000000, true) +-- +ok +== +SELECT equi_width_bins(0::BIGINT, 10::BIGINT, 1000000, false) +-- +ok +== +SELECT equi_width_bins(-2::BIGINT, -1::BIGINT, 1000000, false) +-- +ok +== +SELECT equi_width_bins(TIMESTAMP '2000-01-01', TIMESTAMP '2000-01-01 00:00:00.000001', 1000000, false) +-- +ok +== +SELECT equi_width_bins(0.0, 5e-324, 1000000, false) +-- +ok +== +SELECT equi_width_bins(0.0, 5e-324, 1000000, true) +-- +ok +== +SELECT equi_width_bins(1.0, 1.0000000000000002, 3, false) +-- +ok +== +SELECT equi_width_bins(1.0, 1.0000000000000002, 3, true) +-- +ok +== +SELECT equi_width_bins(0.0, 5e-324, 1, true) +-- +ok +== SELECT equi_width_bins(-0.0, -1.0, 5, true); -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/bitagg_memory_limit.test b/parser/testdata/corpus/sql/aggregate/aggregates/bitagg_memory_limit.test new file mode 100644 index 0000000..f5f0091 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/bitagg_memory_limit.test @@ -0,0 +1,21 @@ +# source: test/sql/aggregate/aggregates/bitagg_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET memory_limit='256MB'; +-- +ok +== +SET threads=4; +-- +ok +== +PRAGMA temp_directory='' +-- +ok +== +PRAGMA max_temp_directory_size='0B' +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_empty.test b/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_empty.test index f3aa225..8a19b07 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_empty.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_empty.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/bitstring_agg_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_force_external=true; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_memory_limit.test b/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_memory_limit.test new file mode 100644 index 0000000..8b026d9 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/bitstring_agg_memory_limit.test @@ -0,0 +1,16 @@ +# source: test/sql/aggregate/aggregates/bitstring_agg_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE src AS +SELECT (i // 2)::BIGINT AS g, ((i * 7) % 96)::INTEGER AS v +FROM range(2000000) t(i); +-- +ok +== +SELECT count(*) AS groups, max(length(bm)) AS bits +FROM (SELECT g, bitstring_agg(v, 0, 6096) AS bm FROM src GROUP BY g); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/duckdb_fuzzer_4313.test b/parser/testdata/corpus/sql/aggregate/aggregates/duckdb_fuzzer_4313.test index 6d35df2..2bd1bb4 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/duckdb_fuzzer_4313.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/duckdb_fuzzer_4313.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/duckdb_fuzzer_4313.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT is_histogram_other_bin(x::BIGINT) FROM(VALUES(1), (NULL)) t(x); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/first_last_alloc_reuse.test b/parser/testdata/corpus/sql/aggregate/aggregates/first_last_alloc_reuse.test new file mode 100644 index 0000000..7a1e709 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/first_last_alloc_reuse.test @@ -0,0 +1,65 @@ +# source: test/sql/aggregate/aggregates/first_last_alloc_reuse.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT i, repeat('x', 1000 + i) AS s FROM range(200) t(i); +-- +ok +== +SELECT length(last(s)) FROM t; +-- +ok +== +SELECT length(first(s)) FROM t; +-- +ok +== +SELECT length(last(s)) FROM (SELECT repeat('y', CASE WHEN i % 2 = 0 THEN 50000 ELSE 10 END) AS s FROM range(41) t(i)); +-- +ok +== +SELECT length(last(s)) FROM (SELECT repeat('y', CASE WHEN i % 2 = 0 THEN 50000 ELSE 10 END) AS s FROM range(40) t(i)); +-- +ok +== +SELECT g, length(first(s)), length(last(s)) FROM (SELECT i % 3 AS g, repeat('z', 1000 + i) AS s FROM range(30) t(i)) GROUP BY g ORDER BY g; +-- +ok +== +SELECT first(s), last(s), any_value(s) FROM (VALUES ('abc'), ('de')) t(s); +-- +ok +== +SELECT last(b)::VARCHAR FROM (VALUES ('\xAA\xBB'::BLOB)) t(b); +-- +ok +== +SELECT first(s), last(s), any_value(s) FROM (VALUES (NULL), ('a')) t(s); +-- +ok +== +SELECT length(min(s)), length(max(s)) FROM (SELECT repeat(chr(CAST(97 + i % 26 AS INTEGER)), 1000 + i) AS s FROM range(60) t(i)); +-- +ok +== +SELECT length(max(s)) FROM (SELECT repeat('y', CASE WHEN i % 2 = 0 THEN 50000 ELSE 10 END) AS s FROM range(41) t(i)); +-- +ok +== +SELECT min(s), max(s) FROM (VALUES ('abc'), ('de'), ('zz')) t(s); +-- +ok +== +SELECT length(mode(s)) FROM (SELECT repeat('q', CASE WHEN i < 20 THEN 50000 ELSE 10 END) AS s FROM range(30) t(i)); +-- +ok +== +SELECT mode(s) FROM (VALUES ('a'), ('b'), ('b')) t(s); +-- +ok +== +SELECT mode(i) FROM (VALUES (1), (2), (2)) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/histogram_exact.test b/parser/testdata/corpus/sql/aggregate/aggregates/histogram_exact.test index e3d6c40..963af22 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/histogram_exact.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/histogram_exact.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/histogram_exact.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE obs(n BIGINT); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/histogram_table_function.test b/parser/testdata/corpus/sql/aggregate/aggregates/histogram_table_function.test index 03bbc12..ca987cb 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/histogram_table_function.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/histogram_table_function.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/histogram_table_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into integers values (42); @@ -71,11 +71,11 @@ SELECT * FROM histogram_values(booleans, b::INTEGER) -- ok == -SELECT * FROM histogram_values(booleans, b) +SELECT * FROM histogram_values(booleans, b) ORDER BY bin -- ok == -SELECT * FROM histogram_values(integers, [i%2]) +SELECT * FROM histogram_values(integers, [i%2]) ORDER BY bin -- ok == diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/lttb.test b/parser/testdata/corpus/sql/aggregate/aggregates/lttb.test index e129478..55ba1e2 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/lttb.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/lttb.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/lttb.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT lttb(x::DOUBLE, y::DOUBLE, 5 ORDER BY x) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/max_n_all_types_grouped.test b/parser/testdata/corpus/sql/aggregate/aggregates/max_n_all_types_grouped.test index a12b3e5..facb8dc 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/max_n_all_types_grouped.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/max_n_all_types_grouped.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/max_n_all_types_grouped.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO compute_top_k(table_name, group_col, val_col, k) AS TABLE diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite.test b/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite.test index fc610ba..4485af4 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite.test @@ -1,12 +1,8 @@ # source: test/sql/aggregate/aggregates/mode_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET threads=4; --- -ok -== CREATE TABLE mode_rewrite(g INTEGER, v VARCHAR, ord INTEGER, keep BOOLEAN); -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite_memory.test b/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite_memory.test index 6e847f3..99680f8 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite_memory.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/mode_rewrite_memory.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/mode_rewrite_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET memory_limit='32MB'; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/quantile_memory_limit.test b/parser/testdata/corpus/sql/aggregate/aggregates/quantile_memory_limit.test new file mode 100644 index 0000000..e26e1fb --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/quantile_memory_limit.test @@ -0,0 +1,17 @@ +# source: test/sql/aggregate/aggregates/quantile_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA memory_limit='300MB' +-- +ok +== +SELECT median(i) FROM range(20000000) t(i) +-- +ok +== +SELECT median(i) FROM range(200000) t(i) +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/string_agg_union.test b/parser/testdata/corpus/sql/aggregate/aggregates/string_agg_union.test index 195c481..cac00c1 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/string_agg_union.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/string_agg_union.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/string_agg_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH my_data as ( diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_aggr_string.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_aggr_string.test index 7a3eb6b..e41b469 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_aggr_string.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_aggr_string.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_aggr_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL as a, NULL as b, NULL as c, NULL as d, 1 as id UNION SELECT 'Кирилл' as a, 'Müller' as b, '我是谁' as c, 'ASCII' as d, 2 as id ORDER BY 1 diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types.test index 41293f4..8292438 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_aggregate_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(s STRING, g INTEGER) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types_scalar.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types_scalar.test index 1916137..74fcbe1 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types_scalar.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_aggregate_types_scalar.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_aggregate_types_scalar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(), COUNT(1), COUNT(*), COUNT(NULL), COUNT('hello'), COUNT(DATE '1992-02-02') diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value.test index 41c2235..0d35fec 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_any_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INTEGER) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value_noninlined.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value_noninlined.test index 7493cc6..a308c07 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value_noninlined.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_any_value_noninlined.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_any_value_noninlined.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a INTEGER, b VARCHAR) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile.test index 2d2da27..857b3d6 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_approx_quantile.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table quantile as select range r, random() from range(10000) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2; @@ -11,7 +11,7 @@ SELECT return_type, count(*) AS defined FROM duckdb_functions() WHERE function_name = 'reservoir_quantile' GROUP BY ALL -HAVING defined <> 2 +HAVING defined <> 1 ORDER BY ALL; -- ok @@ -165,6 +165,10 @@ SELECT approx_quantile(42, CAST(NULL AS INT[])); -- ok == +SELECT approx_quantile(r, 'nan'::FLOAT) FROM quantile +-- +ok +== pragma threads=4 -- ok @@ -252,6 +256,14 @@ SELECT reservoir_quantile(r, NULL) from quantile -- ok == +SELECT reservoir_quantile(r, 'nan'::DOUBLE) from quantile +-- +ok +== +SELECT reservoir_quantile(r, [0.5, 'nan'::DOUBLE]) from quantile +-- +ok +== SELECT reservoir_quantile(r, r, r) from quantile -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile_decimal.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile_decimal.test new file mode 100644 index 0000000..8b2c945 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile_decimal.test @@ -0,0 +1,81 @@ +# source: test/sql/aggregate/aggregates/test_approx_quantile_decimal.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_serializer = true; +-- +ok +== +CREATE TABLE decimals(d DECIMAL(10,2)); +-- +ok +== +INSERT INTO decimals VALUES (1.55); +-- +ok +== +SELECT approx_quantile(d, 0.5), typeof(approx_quantile(d, 0.5)) FROM decimals; +-- +ok +== +SELECT approx_quantile(d, [0.1, 0.9]), typeof(approx_quantile(d, [0.1, 0.9])) FROM decimals; +-- +ok +== +SELECT approx_quantile(1.55::DECIMAL(4,2), 0.5), typeof(approx_quantile(1.55::DECIMAL(4,2), 0.5)); +-- +ok +== +SELECT approx_quantile(1.55::DECIMAL(9,2), 0.5), typeof(approx_quantile(1.55::DECIMAL(9,2), 0.5)); +-- +ok +== +SELECT approx_quantile(1.55::DECIMAL(18,2), 0.5), typeof(approx_quantile(1.55::DECIMAL(18,2), 0.5)); +-- +ok +== +SELECT approx_quantile(1.55::DECIMAL(38,2), 0.5), typeof(approx_quantile(1.55::DECIMAL(38,2), 0.5)); +-- +ok +== +SELECT finalize(approx_quantile(d, 0.5) EXPORT_STATE) = approx_quantile(d, 0.5) FROM decimals; +-- +ok +== +CREATE OR REPLACE TEMP TABLE extremes AS +SELECT d, approx_quantile(d, 0.5) q, approx_quantile(d, [0, 0.5, 1]) qs, + approx_quantile(d, 0.5) EXPORT_STATE s, approx_quantile(d, [0, 0.5, 1]) EXPORT_STATE ss +FROM ( + SELECT ('{sign}' || repeat('9', {width} - {scale}) || + CASE WHEN {scale} = 0 THEN '' ELSE '.' || repeat('9', {scale}) END)::DECIMAL({width},{scale}) d +) t +GROUP BY d; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT q = TRY_CAST(q::VARCHAR AS DECIMAL({width},{scale})), abs(q) <= abs(d) AND sign(q) = sign(d), + qs = [q, q, q], typeof(q) = 'DECIMAL({width},{scale})' +FROM extremes; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT finalize(s) = q, finalize(ss) = qs FROM extremes; +-- +ok +== +SELECT finalize(combine_aggr(s)) = max(q), finalize(combine_aggr(ss))[2] = max(q) +FROM (FROM extremes UNION ALL FROM extremes) t; +-- +ok +== +SELECT approx_quantile('9999999999999999.99'::DECIMAL(18,2), 0.5), + approx_quantile('-9999999999999999.99'::DECIMAL(18,2), 0.5); +-- +ok +== +SELECT approx_quantile(d, 0.5) IS NULL, approx_quantile(d, [0, 1]) IS NULL +FROM (SELECT NULL::DECIMAL(18,2) d WHERE {condition}) t; +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile_timestamp_infinity.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile_timestamp_infinity.test new file mode 100644 index 0000000..0d1ce54 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_approx_quantile_timestamp_infinity.test @@ -0,0 +1,41 @@ +# source: test/sql/aggregate/aggregates/test_approx_quantile_timestamp_infinity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT approx_quantile('-infinity'::TIMESTAMP, 0.25), approx_quantile('infinity'::TIMESTAMP, 0.25) +-- +ok +== +SELECT approx_quantile('-infinity'::TIMESTAMP, 0.25)::VARCHAR +-- +ok +== +SELECT approx_quantile(t, [0.1, 0.9]) FROM (VALUES ('-infinity'::TIMESTAMP), ('infinity'::TIMESTAMP)) v(t) +-- +ok +== +SELECT approx_quantile('-infinity'::TIMESTAMPTZ, 0.5) = '-infinity'::TIMESTAMPTZ +-- +ok +== +CREATE TABLE t AS SELECT approx_quantile('-infinity'::TIMESTAMP, 0.5) q +-- +ok +== +SELECT q, q = '-infinity'::TIMESTAMP FROM t +-- +ok +== +SUMMARIZE (SELECT '-infinity'::TIMESTAMP ti) +-- +ok +== +SELECT approx_quantile(t, 0.5) FROM (VALUES (TIMESTAMP '2020-01-01'), (TIMESTAMP '2020-01-02'), (TIMESTAMP '2020-01-03')) v(t) +-- +ok +== +SELECT approx_quantile(t, [0.0, 1.0]) FROM (VALUES (TIMESTAMP '2020-01-01'), (TIMESTAMP '2020-01-03')) v(t) +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_approximate_distinct_count.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_approximate_distinct_count.test index 75301fc..3038d8a 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_approximate_distinct_count.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_approximate_distinct_count.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_approximate_distinct_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select approx_count_distinct(*) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max.test index 509ea3e..fefa0e6 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_arg_min_max.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select argmin() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max_null.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max_null.test index b8b6ebe..a87435e 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max_null.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_arg_min_max_null.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_arg_min_max_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select arg_min_null() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_avg.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_avg.test index 8ba7ebb..2d21faf 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_avg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_avg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT AVG(3), AVG(NULL) @@ -151,3 +151,12 @@ SELECT AVG(ttz) FROM timetzs; -- ok == +SELECT + FINALIZE(AVG(NULL::SMALLINT) EXPORT_STATE) IS NULL, + FINALIZE(AVG(NULL::DOUBLE) EXPORT_STATE) IS NULL, + FINALIZE(AVG(NULL::TIMESTAMP) EXPORT_STATE) IS NULL, + FINALIZE(AVG(NULL::INTERVAL) EXPORT_STATE) IS NULL, + FINALIZE(AVG(NULL::TIMETZ) EXPORT_STATE) IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bigint_avg.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bigint_avg.test index 3ecbbc2..12544d2 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_bigint_avg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bigint_avg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_bigint_avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigints(n HUGEINT); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_binned_histogram.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_binned_histogram.test index 3ab6fd4..eea26e2 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_binned_histogram.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_binned_histogram.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_binned_histogram.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT histogram(n, [10, 20, 30, 40, 50]) FROM obs diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_and.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_and.test index 8882495..636e636 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_and.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_and.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_bit_and.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT BIT_AND(3), BIT_AND(NULL) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_or.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_or.test index 7d8ceae..726c0dc 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_or.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_or.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_bit_or.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT BIT_OR(3), BIT_OR(NULL) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_xor.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_xor.test index 0ee3084..2e9f0e8 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_xor.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bit_xor.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_bit_xor.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT BIT_XOR(3), BIT_XOR(NULL) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg.test index 7c37830..f53dcbf 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_bitstring_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tinyints(i TINYINT) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg_small_types.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg_small_types.test new file mode 100644 index 0000000..0f6ded1 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bitstring_agg_small_types.test @@ -0,0 +1,41 @@ +# source: test/sql/aggregate/aggregates/test_bitstring_agg_small_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE bt AS SELECT v::TINYINT v FROM (VALUES (-100), (5), (100)) x(v); +-- +ok +== +SELECT bit_count(bitstring_agg(v)), bit_length(bitstring_agg(v)) FROM bt; +-- +ok +== +CREATE TABLE bs AS SELECT v::SMALLINT v FROM (VALUES (-20000), (20000)) x(v); +-- +ok +== +SELECT bit_count(bitstring_agg(v)), bit_length(bitstring_agg(v)) FROM bs; +-- +ok +== +CREATE TABLE bt2 AS SELECT v::TINYINT v FROM (VALUES (-128), (127)) x(v); +-- +ok +== +SELECT bit_count(bitstring_agg(v)), bit_length(bitstring_agg(v)) FROM bt2; +-- +ok +== +SELECT bit_length(bitstring_agg(v, (-128)::TINYINT, 127::TINYINT)) FROM bt; +-- +ok +== +CREATE TABLE bb AS SELECT v::BIGINT v FROM (VALUES (-9223372036854775808), (9223372036854775807)) x(v); +-- +ok +== +SELECT bitstring_agg(v) FROM bb; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_bool.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_bool.test index 5ccdf35..7b58a56 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_bool.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_bool.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select bool_or(0) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_corr.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_corr.test index ee08f63..142d0e9 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_corr.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_corr.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_corr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select corr() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_count.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_count.test index 2be7a05..c62fc5a 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_count.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_count.test @@ -1,12 +1,20 @@ # source: test/sql/aggregate/aggregates/test_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*), COUNT(1), COUNT(100), COUNT(NULL), COUNT(DISTINCT 1) -- ok == +SELECT COUNT(DISTINCT) +-- +error: Parser Error: DISTINCT requires at least one argument +== +SELECT COUNT(ALL) +-- +error: Parser Error: ALL requires at least one argument +== INSERT INTO integers VALUES (1), (2), (NULL) -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_count_all_types.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_count_all_types.test index f4e94d0..5d2e743 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_count_all_types.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_count_all_types.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_count_all_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(n) FROM test_vector_types(NULL::INT, all_flat={flatten}) t(n); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_count_qualified_star.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_count_qualified_star.test new file mode 100644 index 0000000..f2b58e2 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_count_qualified_star.test @@ -0,0 +1,368 @@ +# source: test/sql/aggregate/aggregates/test_count_qualified_star.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE a(id int4); +-- +ok +== +CREATE TABLE b(id int4); +-- +ok +== +INSERT INTO a (id) VALUES (1), (2), (3); +-- +ok +== +INSERT INTO b (id) VALUES (2), (3), (3); +-- +ok +== +SELECT a.id, COUNT(*), COUNT(a.*) AS a_start, COUNT(b.*) AS b_star, COUNT(b.id) AS b_id FROM a LEFT JOIN b ON a.id = b.id GROUP BY a.id ORDER BY a.id; +-- +ok +== +DROP TABLE a; +-- +ok +== +DROP TABLE b; +-- +ok +== +CREATE TABLE a (id INT, uniq INT); +-- +ok +== +CREATE TABLE b (id INT, uniq INT); +-- +ok +== +INSERT INTO a VALUES (1, 100), (1, 101), (2, 102), (2, 103), (3, 104), (3, 105); +-- +ok +== +INSERT INTO b VALUES (2, 500), (3, 502), (3, 503), (3, 504), (3, 505); +-- +ok +== +SELECT +a.id, +COUNT(*), +COUNT(a.*) AS a_star, +COUNT(b.*) AS b_star, +COUNT(b.id) AS b_id, +COUNT(b.uniq) AS b_uniq +FROM a +LEFT JOIN b +ON a.id = b.id +GROUP BY a.id +ORDER BY a.id; +-- +ok +== +INSERT INTO b VALUES (3, NULL); +-- +ok +== +INSERT INTO b VALUES (NULL, NULL); +-- +ok +== +SELECT COUNT(*), COUNT(b.*), COUNT(b.id) FROM b; +-- +ok +== +SELECT COUNT(*), COUNT(a.*), COUNT(b.*), COUNT(b.id) FROM b FULL OUTER JOIN a ON a.id = b.id; +-- +ok +== +CREATE TABLE nx(v INT); +-- +ok +== +CREATE TABLE ny(v INT); +-- +ok +== +INSERT INTO nx VALUES (NULL), (1); +-- +ok +== +INSERT INTO ny VALUES (NULL), (2); +-- +ok +== +SELECT count(*), count(nx.*), count(ny.*) FROM nx FULL OUTER JOIN ny ON nx.v IS NOT DISTINCT FROM ny.v; +-- +ok +== +CREATE TABLE shadow(rowid INT, v INT); +-- +ok +== +INSERT INTO shadow VALUES (NULL, 1), (NULL, NULL); +-- +ok +== +SELECT count(shadow.*), count(shadow.v) FROM a LEFT JOIN shadow ON a.id = shadow.v; +-- +ok +== +SELECT COUNT(t.*), COUNT(t.id) FROM (SELECT b.* FROM a LEFT JOIN b ON a.id = b.id) t; +-- +ok +== +SELECT COUNT(b.*) FROM a JOIN b ON true WHERE a.id = 1; +-- +ok +== +CREATE TABLE l(id INT); +-- +ok +== +CREATE TABLE r(id INT, y VARCHAR); +-- +ok +== +CREATE TABLE s(id INT, z INT); +-- +ok +== +INSERT INTO l VALUES (1), (2), (3); +-- +ok +== +INSERT INTO r VALUES (2, NULL), (3, 'x'); +-- +ok +== +INSERT INTO s VALUES (1, 10), (2, NULL); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT count(r.*) FROM r); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT count(r.*) AS my_count FROM r); +-- +ok +== +SELECT l.id FROM l LEFT JOIN r ON l.id = r.id GROUP BY l.id HAVING count(r.*) > 0 ORDER BY 1; +-- +ok +== +SELECT l.id FROM l LEFT JOIN r ON l.id = r.id GROUP BY l.id ORDER BY count(r.*), l.id; +-- +ok +== +SELECT l.id, count(r.*) OVER () FROM l LEFT JOIN r ON l.id = r.id ORDER BY 1; +-- +ok +== +SELECT l.id, count(r.*) FILTER (WHERE l.id > 1) OVER (PARTITION BY l.id) FROM l LEFT JOIN r ON l.id = r.id ORDER BY 1; +-- +ok +== +SELECT l.id FROM l LEFT JOIN r ON l.id = r.id QUALIFY count(r.*) OVER (PARTITION BY l.id) > 0 ORDER BY 1; +-- +ok +== +SELECT count(r.*) FILTER (WHERE l.id > 2) FROM l LEFT JOIN r ON l.id = r.id; +-- +ok +== +SELECT DISTINCT ON (count(r.*)) l.id, count(r.*) FROM l LEFT JOIN r ON l.id = r.id GROUP BY l.id ORDER BY 1; +-- +ok +== +SELECT l.id, count(r.*) FROM l LEFT JOIN r ON l.id = r.id GROUP BY ALL ORDER BY 1; +-- +ok +== +SELECT l.id, count(r.*) FROM l LEFT JOIN r ON l.id = r.id GROUP BY ROLLUP (l.id) ORDER BY 1 NULLS LAST; +-- +ok +== +SELECT count(l.*) + count(r.*) FROM l LEFT JOIN r ON l.id = r.id; +-- +ok +== +SELECT l.*, count(r.*) FROM l LEFT JOIN r ON l.id = r.id GROUP BY l.id ORDER BY 1; +-- +ok +== +SELECT l.id, (SELECT count(r.*) FROM r WHERE r.id = l.id) FROM l WHERE l.id > 1 ORDER BY 1; +-- +ok +== +SELECT count(*) FROM l WHERE (SELECT count(r.*) FROM r) > 1; +-- +ok +== +SELECT count(l.*) FROM l UNION ALL SELECT count(r.*) FROM r ORDER BY 1; +-- +ok +== +SELECT count(l.*), count(r.*) FROM l FULL OUTER JOIN r ON l.id = r.id; +-- +ok +== +SELECT count(l.*), count(r.*) FROM r RIGHT JOIN l ON l.id = r.id; +-- +ok +== +SELECT count(r.*) FROM l LEFT JOIN r USING (id); +-- +ok +== +SELECT l.id, count(r.*), count(s.*) FROM l LEFT JOIN r ON l.id = r.id LEFT JOIN s ON l.id = s.id GROUP BY l.id ORDER BY 1; +-- +ok +== +SELECT count(r1.*), count(r2.*) FROM r r1 LEFT JOIN r r2 ON r1.y = r2.y; +-- +ok +== +SELECT count(rr.*) FROM l LEFT JOIN r rr ON l.id = rr.id; +-- +ok +== +SELECT count(r.*) FROM l LEFT JOIN r rr ON l.id = rr.id; +-- +ok +== +SELECT count("R".*) FROM r AS "R"; +-- +ok +== +SELECT count(t.*) FROM l LEFT JOIN (SELECT * FROM r) t ON l.id = t.id; +-- +ok +== +WITH cte AS (SELECT * FROM r) SELECT count(cte.*) FROM l LEFT JOIN cte ON l.id = cte.id; +-- +ok +== +SELECT count(lat.*) FROM l, LATERAL (SELECT r.id FROM r WHERE r.id = l.id) lat; +-- +ok +== +SELECT count(t.*) FROM range(3) t; +-- +ok +== +SELECT count(t.*) FROM (VALUES (1, 2), (NULL, NULL)) t(x, y); +-- +ok +== +SELECT count(*) OVER (), count(t.*) OVER () FROM (VALUES (NULL::INT, NULL::INT)) AS t(x, y); +-- +ok +== +SELECT count(p.*), count(q.*) FROM range(3) p POSITIONAL JOIN range(1) q; +-- +ok +== +SELECT count(st.*) FROM (SELECT {'x': 1, 'y': 2} AS st) t; +-- +ok +== +SELECT count(st.*) FROM (SELECT {'x': NULL, 'y': NULL} AS st) t; +-- +ok +== +SELECT count(st.*) FROM l LEFT JOIN (SELECT 2 AS id, {'x': NULL} AS st) t ON l.id = t.id; +-- +ok +== +CREATE VIEW v AS SELECT l.id AS id, count(r.*) AS r_star FROM l LEFT JOIN r ON l.id = r.id GROUP BY l.id; +-- +ok +== +SELECT * FROM v ORDER BY 1; +-- +ok +== +CREATE TABLE ctas AS SELECT l.id AS id, count(r.*) AS r_star FROM l LEFT JOIN r ON l.id = r.id GROUP BY l.id; +-- +ok +== +SELECT * FROM ctas ORDER BY 1; +-- +ok +== +PREPARE p AS SELECT count(r.*) FROM l LEFT JOIN r ON l.id = r.id WHERE l.id > ?; +-- +ok +== +EXECUTE p(1); +-- +ok +== +CREATE MACRO count_rows() AS count(t.*); +-- +ok +== +SELECT count_rows() FROM (VALUES (NULL::INT, NULL::INT)) AS t(x, y); +-- +ok +== +SELECT count_rows() FROM l LEFT JOIN r AS t ON l.id = t.id; +-- +ok +== +CREATE MACRO count_rows_over() AS count(t.*) OVER (); +-- +ok +== +SELECT count_rows_over() FROM (VALUES (NULL::INT, NULL::INT)) AS t(x, y); +-- +ok +== +CREATE TABLE piv(g INT, y VARCHAR); +-- +ok +== +INSERT INTO piv VALUES (1, 'x'), (1, 'z'), (2, 'x'), (NULL, NULL); +-- +ok +== +PIVOT piv ON y USING count(piv.*) ORDER BY 1 NULLS LAST; +-- +ok +== +SELECT min(r.*) FROM r; +-- +ok +== +SELECT count(DISTINCT r.*) FROM r; +-- +ok +== +SELECT count(r.* EXCLUDE (y)) FROM r; +-- +ok +== +SELECT count(r.* RENAME (y AS z)) FROM r; +-- +ok +== +SELECT count(* RENAME (y AS z)) FROM r; +-- +ok +== +SELECT l.id, count(*) FROM l GROUP BY l.* ORDER BY 1; +-- +ok +== +PRAGMA explain_output = OPTIMIZED_ONLY; +-- +ok +== +EXPLAIN SELECT count(*) FROM l LEFT JOIN r ON l.id = r.id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_count_star.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_count_star.test index 3f652e4..5d94671 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_count_star.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_count_star.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_count_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_covar.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_covar.test index 1d6da03..72a4ef5 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_covar.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_covar.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_covar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COVAR_POP() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_empty_aggregate.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_empty_aggregate.test index fd21f80..6608f3e 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_empty_aggregate.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_empty_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_empty_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*), COUNT(i), STDDEV_SAMP(i), SUM(i), SUM(DISTINCT i), FIRST(i), LAST(i), MAX(i), MIN(i) FROM integers WHERE i > 100 diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_entropy.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_entropy.test index 51ff5d4..865a30f 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_entropy.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_entropy.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_entropy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select entropy() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_first_last_any_ordered.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_first_last_any_ordered.test index 218e75d..746393a 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_first_last_any_ordered.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_first_last_any_ordered.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_first_last_any_ordered.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, grp INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_first_noninlined.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_first_noninlined.test index 206fb02..929949d 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_first_noninlined.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_first_noninlined.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_first_noninlined.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT FIRST(b) FROM tbl WHERE a=2 diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_group_on_expression.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_group_on_expression.test index 37c6da7..dec51ba 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_group_on_expression.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_group_on_expression.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_group_on_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integer(i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram.test index 6805fbb..6ad7953 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_histogram.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select histogram(NULL) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram_3529.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram_3529.test index c0c7a12..369edb7 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram_3529.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_histogram_3529.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_histogram_3529.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tmp (c0 integer, c1 integer); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_incorrect_aggregate.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_incorrect_aggregate.test index 8c58998..fea8044 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_incorrect_aggregate.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_incorrect_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_incorrect_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(1, 2, 3) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_avg.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_avg.test index d392173..e19c9e2 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_avg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_avg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_kahan_avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE doubles(n DOUBLE); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_combine.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_combine.test new file mode 100644 index 0000000..8c37eb2 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_combine.test @@ -0,0 +1,45 @@ +# source: test/sql/aggregate/aggregates/test_kahan_combine.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE doubles AS SELECT * FROM (VALUES (9007199254740992.0::DOUBLE), (1.0::DOUBLE)) t(x); +-- +ok +== +SELECT printf('%.17g', fsum(x)), + printf('%.17g', kahan_sum(x)), + printf('%.17g', sumkahan(x)), + printf('%.17g', sum(x)), + printf('%.17g', favg(x)), + printf('%.17g', avg(x)) +FROM doubles; +-- +ok +== +SELECT printf('%.17g', fsum(-x)), printf('%.17g', favg(-x)) +FROM doubles; +-- +ok +== +SELECT printf('%.17g', fsum(x)), printf('%.17g', favg(x)) +FROM (SELECT x FROM doubles UNION ALL SELECT 1.0::DOUBLE); +-- +ok +== +SELECT g, printf('%.17g', fsum(x)), printf('%.17g', favg(x)) +FROM (SELECT g, x * (CASE WHEN g = 1 THEN 1 ELSE -1 END) AS x FROM doubles, range(1, 3) r(g)) +GROUP BY g +ORDER BY g; +-- +ok +== +SELECT printf('%.17g', finalize(combine( + (SELECT fsum(x) EXPORT_STATE FROM doubles), + (SELECT fsum(x) EXPORT_STATE FROM doubles WHERE false)))), + printf('%.17g', finalize(combine( + (SELECT favg(x) EXPORT_STATE FROM doubles), + (SELECT favg(x) EXPORT_STATE FROM doubles WHERE false)))); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_sum.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_sum.test index b034fd4..af74cf7 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_sum.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_kahan_sum.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_kahan_sum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT FSUM(n)::BIGINT FROM doubles; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_kurtosis.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_kurtosis.test index a4f1f33..c4ada74 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_kurtosis.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_kurtosis.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_kurtosis.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select kurtosis() @@ -75,3 +75,34 @@ select kurtosis(v2) over (partition by v) -- ok == +SELECT count(*) FILTER (ku IS NOT NULL), count(*) FILTER (kp IS NOT NULL) FROM ( + SELECT n, kurtosis(x) AS ku, kurtosis_pop(x) AS kp + FROM (SELECT {val} AS x, n FROM range(1, 1001) r(n), range(0, 1001) k(k) WHERE k < n) + GROUP BY n +) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT kurtosis(x), kurtosis_pop(x) FROM (VALUES (1000000.0), (1000000.0), (1000000.0), (1000000.001)) t(x) +-- +ok +== +CREATE TABLE kurt_groups AS +SELECT n % 8 AS g, + (CASE WHEN n % 8 < 4 THEN 123456.78 ELSE 123456.78 + ((n * 7919) % 13) * ((n * 7919) % 13) END)::DOUBLE AS x +FROM range(200000) r(n); +-- +ok +== +SELECT g, kurtosis(x), kurtosis_pop(x) FROM kurt_groups GROUP BY g ORDER BY g +-- +ok +== +PRAGMA disable_verify_parallelism +-- +ok +== +SET threads=1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_last.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_last.test index 55b6ae3..e27247c 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_last.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_last.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_last.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT LAST(i) FROM five diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_last_noninlined.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_last_noninlined.test index 5c41ecd..7799d52 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_last_noninlined.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_last_noninlined.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_last_noninlined.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT LAST(b) FROM tbl WHERE a=2 diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_mad.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_mad.test index b9dddbc..0f2d10c 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_mad.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_mad.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_mad.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT mad(NULL), mad(1) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_mad_hugeint_range.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_mad_hugeint_range.test new file mode 100644 index 0000000..096dd80 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_mad_hugeint_range.test @@ -0,0 +1,13 @@ +# source: test/sql/aggregate/aggregates/test_mad_hugeint_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT mad(x) FROM (VALUES (99999999999999999999999999999999999999::DECIMAL(38,0)), (-99999999999999999999999999999999999999::DECIMAL(38,0)), (-99999999999999999999999999999999999999::DECIMAL(38,0))) t(x) +-- +ok +== +SELECT mad(x) FROM (VALUES (1::DECIMAL(38,0)), (2), (10)) t(x) +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_median.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_median.test index efd4d76..8e4776d 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_median.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_median.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_median.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT median(NULL), median(1) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax.test index 95fb3c0..be40549 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_minmax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table lists as select array[i] l from generate_series(0,5,1) tbl(i); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax_14145.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax_14145.test index c072341..2e93e5a 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax_14145.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_minmax_14145.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_minmax_14145.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DESCRIBE SELECT max(l) from (select unnest( [{'a':1}::JSON, [2]::JSON ]) as l); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_mode.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_mode.test index af35547..5294665 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_mode.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_mode.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select mode() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_null_aggregates.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_null_aggregates.test index c4669a1..e3455a5 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_null_aggregates.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_null_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_null_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 BIGINT, c1 SMALLINT); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_order_by_aggregate.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_order_by_aggregate.test index f0f580b..34d3757 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_order_by_aggregate.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_order_by_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_order_by_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(grp INTEGER, i INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregate_inner_error.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregate_inner_error.test new file mode 100644 index 0000000..30abc07 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregate_inner_error.test @@ -0,0 +1,17 @@ +# source: test/sql/aggregate/aggregates/test_ordered_aggregate_inner_error.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT approx_top_k(1, NULL ORDER BY i DESC) FROM range(5) t(i) +-- +ok +== +SELECT histogram(1, NULL ORDER BY i DESC) FROM range(5) t(i) +-- +ok +== +SELECT approx_top_k(i, 2 ORDER BY i DESC), list(i ORDER BY i DESC) FROM range(5) t(i) +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregates.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregates.test index dd4b899..510ae92 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregates.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_ordered_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_ordered_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE flights( diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_perfect_ht.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_perfect_ht.test index f463ecc..5c12c9b 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_perfect_ht.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_perfect_ht.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_perfect_ht.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA perfect_ht_threshold=20; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_product.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_product.test index 14541c3..c253fa2 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_product.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_product.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select product() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont.test index b5f8f62..99457fa 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_quantile_cont.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table quantile as select range r, random() from range(0,1000000,100) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2; @@ -92,6 +92,14 @@ FROM -- ok == +SELECT + percentile_cont(0.0) WITHIN GROUP (ORDER BY x DESC), + quantile_cont(x, [0.0] ORDER BY x DESC), +FROM + (VALUES (1), (2), (3), (4), (5)) _(x); +-- +ok +== SELECT quantile_cont(r, 0.1) FROM quantile WHERE 1=0 -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont_list.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont_list.test index 91b6c97..5ddb7e8 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont_list.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_cont_list.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_quantile_cont_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table quantiles as select range r, random() FROM range(0,1000000,100) union all values (NULL, 0.25), (NULL, 0.5), (NULL, 0.75) order by 2; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc.test index 4d2ce25..c74d912 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_quantile_disc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE quantile as @@ -73,6 +73,14 @@ FROM -- ok == +SELECT + percentile_disc(0.0) WITHIN GROUP (ORDER BY x DESC), + quantile_disc(x, [0.0] ORDER BY x DESC), +FROM + (VALUES (1), (2), (3), (4), (5)) _(x); +-- +ok +== SELECT quantile_disc(d::VARCHAR, 0.1), quantile_disc(d::VARCHAR, 0.5), quantile_disc(d::VARCHAR, 0.9) FROM range(0,100) tbl(d) -- diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc_list.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc_list.test index e4129c5..04047df 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc_list.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_disc_list.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_quantile_disc_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table quantiles as select range r, random() FROM range(10000) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2; diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_timetz.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_timetz.test new file mode 100644 index 0000000..f06d9fc --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_quantile_timetz.test @@ -0,0 +1,29 @@ +# source: test/sql/aggregate/aggregates/test_quantile_timetz.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE z AS FROM (VALUES ('10:00:00+05'::TIMETZ), ('09:00:00+00'::TIMETZ), ('07:00:00+00'::TIMETZ)) v(x); +-- +ok +== +SELECT quantile_disc(x, 0.5), median(x), quantile_cont(x, 0.25), quantile_disc(x, [0.0, 1.0]) FROM z +-- +ok +== +SELECT median(x) OVER (ORDER BY x ROWS BETWEEN 1 PRECEDING AND CURRENT ROW), quantile_disc(x, 0.5) OVER () FROM z ORDER BY x +-- +ok +== +SELECT finalize(median(x) EXPORT_STATE) FROM z +-- +ok +== +SELECT quantile_cont(x, 0.5)::VARCHAR FROM (VALUES (TIMETZ '00:00:00+15:59:59'), (TIMETZ '00:00:00.000001+15:59:59')) t(x) +-- +ok +== +SELECT median(x)::VARCHAR FROM (VALUES (TIMETZ '24:00:00-15:59:59'), (TIMETZ '24:00:00-15:59:59')) t(x) +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_regression.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_regression.test index b393c60..e88108f 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_regression.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_regression.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_regression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select regr_avgx(NULL,NULL) diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_reservoir_quantile_decimal.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_reservoir_quantile_decimal.test new file mode 100644 index 0000000..1a32163 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_reservoir_quantile_decimal.test @@ -0,0 +1,17 @@ +# source: test/sql/aggregate/aggregates/test_reservoir_quantile_decimal.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO decimals VALUES (1.10), (2.20), (3.30), (4.40), (5.50), (6.60), (7.70), (8.80), (9.90), (10.00); +-- +ok +== +SELECT reservoir_quantile(d, 0.5), typeof(reservoir_quantile(d, 0.5)) FROM decimals; +-- +ok +== +SELECT reservoir_quantile(d, [0.1, 0.5, 0.9]), typeof(reservoir_quantile(d, [0.1, 0.5, 0.9])) FROM decimals; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_scalar_aggr.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_scalar_aggr.test index afb5ca2..490b6ef 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_scalar_aggr.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_scalar_aggr.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_scalar_aggr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(1), MIN(1), FIRST(1), LAST(1),MAX(1), SUM(1), STRING_AGG('hello', ',') diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_sem.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_sem.test index c3f17e0..7b4fa2a 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_sem.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_sem.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_sem.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select sem() diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_simple_filter.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_simple_filter.test index 181f062..f00a2f9 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_simple_filter.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_simple_filter.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_simple_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_skewness.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_skewness.test index cab66bf..46aacc9 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_skewness.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_skewness.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_skewness.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select skewness() @@ -44,3 +44,32 @@ select skewness(v2) over (partition by v) -- ok == +SELECT count(*) FROM ( + SELECT n, skewness(x) AS sk + FROM (SELECT {val} AS x, n FROM range(1, 1001) r(n), range(0, 1001) k(k) WHERE k < n) + GROUP BY n +) WHERE sk IS NOT NULL +-- +error: Parser Error: syntax error at or near "}" +== +SELECT n, skewness(x) +FROM (SELECT 69.6::DECIMAL(7,2) AS x, n FROM range(1, 1001) r(n), range(0, 1001) k(k) WHERE k < n) +GROUP BY n HAVING n IN (3, 18, 19, 20, 100, 1000) ORDER BY n +-- +ok +== +SELECT skewness(x) FROM (VALUES (1000000.0), (1000000.0), (1000000.001)) t(x) +-- +ok +== +CREATE TABLE skew_groups AS +SELECT n % 8 AS g, + (CASE WHEN n % 8 < 4 THEN 123456.78 ELSE 123456.78 + ((n * 7919) % 13) * ((n * 7919) % 13) END)::DOUBLE AS x +FROM range(200000) r(n); +-- +ok +== +SELECT g, skewness(x) FROM skew_groups GROUP BY g ORDER BY g +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_stddev.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_stddev.test index 2b940c5..dc11500 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_stddev.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_stddev.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_stddev.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT stddev_samp(1) @@ -95,6 +95,10 @@ select stddev(0) from range(10) -- ok == +select stddev_pop(42) over () from range(3) +-- +ok +== select stddev(a) from (values (1e301), (-1e301)) tbl(a) -- ok diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg.test index 7ef615c..461e669 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_string_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT STRING_AGG('a', 'b', 'c') diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg_big.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg_big.test index 16fb25f..746e464 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg_big.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_string_agg_big.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_string_agg_big.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings AS SELECT c::VARCHAR g, (c*10+e)::VARCHAR x FROM range(0, 100, 1) t1(c), range(0, 100, 1) t2(e); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_sum.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_sum.test index a4380c6..d04ea45 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_sum.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_sum.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_sum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM range(0, 1000, 1); diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_sum_decimal_overflow.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_sum_decimal_overflow.test new file mode 100644 index 0000000..32e3600 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_sum_decimal_overflow.test @@ -0,0 +1,47 @@ +# source: test/sql/aggregate/aggregates/test_sum_decimal_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE decimals AS SELECT * FROM (VALUES + (1, 99999999999999999999999999999999999999::DECIMAL(38,0), 9999999999999999999999999999999999.9999::DECIMAL(38,4)), + (2, 1::DECIMAL(38,0), 0.0001::DECIMAL(38,4))) t(i, d, d4); +-- +ok +== +SELECT sum(d) FROM decimals; +-- +ok +== +SELECT sum(d4) FROM decimals; +-- +ok +== +SELECT -sum(-d) FROM decimals; +-- +ok +== +SELECT sum(d) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) FROM decimals; +-- +ok +== +SELECT sum(d), sum(d4) FROM decimals WHERE i = 1; +-- +ok +== +SELECT sum(x) FROM (VALUES (99999999999999999999999999999999999999::DECIMAL(38,0)), (-1::DECIMAL(38,0))) t(x); +-- +ok +== +SELECT finalize(to_aggregate_state(100000000000000000000000000000000000000, 'sum', ['DECIMAL(38,2)']))::DOUBLE; +-- +ok +== +SELECT finalize(to_aggregate_state(-100000000000000000000000000000000000000, 'sum', ['DECIMAL(18,2)'])); +-- +ok +== +SELECT finalize(to_aggregate_state(99999999999999999999999999999999999999, 'sum', ['DECIMAL(38,2)'])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_sum_fastpath.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_sum_fastpath.test new file mode 100644 index 0000000..f8c2eb0 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_sum_fastpath.test @@ -0,0 +1,21 @@ +# source: test/sql/aggregate/aggregates/test_sum_fastpath.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT sum(i) FROM range(9007199254738944, 9007199254740992) t(i); +-- +ok +== +SELECT sum(i) FROM generate_series(9007199254738944, 9007199254740991) t(i); +-- +ok +== +SELECT sum(i) FROM range(-9007199254740992, -9007199254738944) t(i); +-- +ok +== +SELECT sum(i) FROM range(9007199254736896, 9007199254740992) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/aggregates/test_weighted_avg.test b/parser/testdata/corpus/sql/aggregate/aggregates/test_weighted_avg.test index d00a420..c1a8a7d 100644 --- a/parser/testdata/corpus/sql/aggregate/aggregates/test_weighted_avg.test +++ b/parser/testdata/corpus/sql/aggregate/aggregates/test_weighted_avg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/aggregates/test_weighted_avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT weighted_avg(3, 3), weighted_avg(3, NULL), weighted_avg(NULL, 3), weighted_avg(NULL, NULL) diff --git a/parser/testdata/corpus/sql/aggregate/count_execution_paths.test b/parser/testdata/corpus/sql/aggregate/count_execution_paths.test new file mode 100644 index 0000000..1ad7990 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/count_execution_paths.test @@ -0,0 +1,30 @@ +# source: test/sql/aggregate/count_execution_paths.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE count_validity AS +SELECT i, + CASE + WHEN i < 64 THEN i + WHEN i < 128 THEN NULL + WHEN i % 2 = 0 THEN i + ELSE NULL + END AS v +FROM range(192) t(i); +-- +ok +== +SELECT count(v) FROM count_validity; +-- +ok +== +SELECT sum(c) FROM ( + SELECT count(*) FILTER (WHERE i % 3 = 0) OVER ( + ORDER BY i ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW + ) AS c + FROM range(10) t(i) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/distinct/distinct_limit.test b/parser/testdata/corpus/sql/aggregate/distinct/distinct_limit.test index 838709e..718fdab 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/distinct_limit.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/distinct_limit.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/distinct_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET profiling_renderer_settings = MAP {'operator_casing': 'upper'}; diff --git a/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_nulls.test b/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_nulls.test index 0e87caf..912be50 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_nulls.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/distinct_on_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (2, 3), (4, 5), (2, NULL), (NULL, NULL); diff --git a/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_order_by.test b/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_order_by.test index 83aaebc..0073df6 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_order_by.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/distinct_on_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/distinct_on_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j INTEGER, k INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/distinct/grouped/combined_with_grouping.test b/parser/testdata/corpus/sql/aggregate/distinct/grouped/combined_with_grouping.test index 355efff..bc7b419 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/grouped/combined_with_grouping.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/grouped/combined_with_grouping.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/grouped/combined_with_grouping.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table students ( diff --git a/parser/testdata/corpus/sql/aggregate/distinct/grouped/identical_inputs.test b/parser/testdata/corpus/sql/aggregate/distinct/grouped/identical_inputs.test index c0281ac..ba60778 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/grouped/identical_inputs.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/grouped/identical_inputs.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/grouped/identical_inputs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select i%50::BIGINT as i, i%5::BIGINT as j from range(1000000) tbl(i); diff --git a/parser/testdata/corpus/sql/aggregate/distinct/grouped/issue_5070.test b/parser/testdata/corpus/sql/aggregate/distinct/grouped/issue_5070.test index 9ecd34f..f2f71d3 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/grouped/issue_5070.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/grouped/issue_5070.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/grouped/issue_5070.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma verify_parallelism diff --git a/parser/testdata/corpus/sql/aggregate/distinct/grouped/multiple_grouping_sets.test b/parser/testdata/corpus/sql/aggregate/distinct/grouped/multiple_grouping_sets.test index 7645e1f..e470d01 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/grouped/multiple_grouping_sets.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/grouped/multiple_grouping_sets.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/grouped/multiple_grouping_sets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into students diff --git a/parser/testdata/corpus/sql/aggregate/distinct/grouped/string_agg.test b/parser/testdata/corpus/sql/aggregate/distinct/grouped/string_agg.test index 8da6dfa..f60e31e 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/grouped/string_agg.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/grouped/string_agg.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/grouped/string_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings( diff --git a/parser/testdata/corpus/sql/aggregate/distinct/issue19616.test b/parser/testdata/corpus/sql/aggregate/distinct/issue19616.test index 04e51da..fac6f27 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/issue19616.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/issue19616.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/issue19616.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/aggregate/distinct/issue2656.test b/parser/testdata/corpus/sql/aggregate/distinct/issue2656.test index 40899e7..5a7c1bb 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/issue2656.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/issue2656.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/issue2656.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T (t1 int, t2 int); diff --git a/parser/testdata/corpus/sql/aggregate/distinct/issue8505.test b/parser/testdata/corpus/sql/aggregate/distinct/issue8505.test index db80728..85fc6d3 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/issue8505.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/issue8505.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/issue8505.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test (id int, provider int, record_key int, record_rank int, record_date int) diff --git a/parser/testdata/corpus/sql/aggregate/distinct/issue9241.test b/parser/testdata/corpus/sql/aggregate/distinct/issue9241.test index 8465477..ec3dd35 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/issue9241.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/issue9241.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/issue9241.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table foo (a int, b int); diff --git a/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite.test b/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite.test index 0d7d544..beb0eba 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE distinct_rewrite AS diff --git a/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite_join_order.test b/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite_join_order.test new file mode 100644 index 0000000..3b1cd01 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite_join_order.test @@ -0,0 +1,55 @@ +# source: test/sql/aggregate/distinct/rewrite/distinct_aggregate_rewrite_join_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t1 (c1 INTEGER, c2 INTEGER[]); +-- +ok +== +INSERT INTO t1 VALUES (1, NULL), (2, NULL); +-- +ok +== +SELECT t1.c1, s3.a1 +FROM t1, ( + SELECT t1.c1 AS a0, max(s1.v1) AS a1, max(t1.c1)::BIGINT AS a2, count(DISTINCT t1.c1) AS a3 + FROM t1 + JOIN (SELECT c1 AS k1, [c1] AS v1 FROM t1) AS s1 ON (t1.c1 = s1.k1) + JOIN (SELECT DISTINCT c1 FROM t1) AS s2 ON (t1.c1 = s2.c1) + GROUP BY t1.c1 +) AS s3 +WHERE t1.c1 = s3.a0 +ORDER BY ALL +-- +ok +== +SELECT t1.c1, s3.a1 +FROM t1, ( + SELECT t1.c1 AS a0, max(s1.v1) AS a1, max(t1.c1)::BIGINT AS a2, count(DISTINCT t1.c1) AS a3 + FROM t1 + JOIN (SELECT c1 AS k1, [c1] AS v1 FROM t1) AS s1 ON (t1.c1 = s1.k1) + JOIN (SELECT DISTINCT c1 FROM t1) AS s2 ON (t1.c1 = s2.c1) + GROUP BY GROUPING SETS ((t1.c1), ()) +) AS s3 +WHERE t1.c1 = s3.a0 +ORDER BY ALL +-- +ok +== +UPDATE t1 SET c2 = s3.a1 +FROM ( + SELECT t1.c1 AS a0, max(s1.v1) AS a1, max(t1.c1)::BIGINT AS a2, count(DISTINCT t1.c1) AS a3 + FROM t1 + JOIN (SELECT c1 AS k1, [c1] AS v1 FROM t1) AS s1 ON (t1.c1 = s1.k1) + JOIN (SELECT DISTINCT c1 FROM t1) AS s2 ON (t1.c1 = s2.c1) + GROUP BY t1.c1 +) AS s3 +WHERE t1.c1 = s3.a0; +-- +ok +== +SELECT * FROM t1 ORDER BY c1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct.test b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct.test index db82424..5424bb2 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/test_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on.test b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on.test index 7f6c5d7..1c2dc55 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/test_distinct_on.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (2, 3, 5), (4, 5, 6), (2, 7, 6) diff --git a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on_columns.test b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on_columns.test index c096af4..8f3ba26 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on_columns.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_on_columns.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/test_distinct_on_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM (VALUES (1,1,2),(1,1,3)) AS t(key1,key2,v) diff --git a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_order_by.test b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_order_by.test index 094057e..ca8edf2 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_order_by.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/test_distinct_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/test_distinct_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT i%2 FROM integers ORDER BY 1 diff --git a/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped.test b/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped.test index f9b927f..6b678c1 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as diff --git a/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped_shared_input.test b/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped_shared_input.test index 5490fee..cb6dfed 100644 --- a/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped_shared_input.test +++ b/parser/testdata/corpus/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped_shared_input.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/distinct/ungrouped/test_distinct_ungrouped_shared_input.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select i%50 as i from range(1000000) tbl(i); diff --git a/parser/testdata/corpus/sql/aggregate/first_last_nested_vectors.test b/parser/testdata/corpus/sql/aggregate/first_last_nested_vectors.test new file mode 100644 index 0000000..67209ea --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/first_last_nested_vectors.test @@ -0,0 +1,31 @@ +# source: test/sql/aggregate/first_last_nested_vectors.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT first([i]) = CASE WHEN i >= 2500 THEN [2500] ELSE [0] END +FROM range(3000) r(i) +GROUP BY i >= 2500 +ORDER BY i >= 2500; +-- +ok +== +SELECT last([i]) = CASE WHEN i >= 2500 THEN [2999] ELSE [2499] END +FROM range(3000) r(i) +GROUP BY i >= 2500 +ORDER BY i >= 2500; +-- +ok +== +SELECT any_value(CASE WHEN i % 5 = 0 THEN {'value': i, 'items': [i, i + 1]} END) IS NOT NULL +FROM range(3000) r(i) +GROUP BY i >= 2500 +ORDER BY i >= 2500; +-- +ok +== +SELECT first(x), last(x), any_value(x) +FROM (VALUES (NULL::INTEGER[]), ([1, 2]), ([3])) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/group/group_by_all.test b/parser/testdata/corpus/sql/aggregate/group/group_by_all.test index e1373c8..dab9c92 100644 --- a/parser/testdata/corpus/sql/aggregate/group/group_by_all.test +++ b/parser/testdata/corpus/sql/aggregate/group/group_by_all.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/group_by_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(g integer, i integer); diff --git a/parser/testdata/corpus/sql/aggregate/group/group_by_all_having.test b/parser/testdata/corpus/sql/aggregate/group/group_by_all_having.test index 134dc49..ddfb039 100644 --- a/parser/testdata/corpus/sql/aggregate/group/group_by_all_having.test +++ b/parser/testdata/corpus/sql/aggregate/group/group_by_all_having.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/group_by_all_having.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (SELECT 1) t0(c0) GROUP BY c0 HAVING c0>0 diff --git a/parser/testdata/corpus/sql/aggregate/group/group_by_all_order.test b/parser/testdata/corpus/sql/aggregate/group/group_by_all_order.test index d2cf439..d33c255 100644 --- a/parser/testdata/corpus/sql/aggregate/group/group_by_all_order.test +++ b/parser/testdata/corpus/sql/aggregate/group/group_by_all_order.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/group_by_all_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(i) FROM integers diff --git a/parser/testdata/corpus/sql/aggregate/group/group_by_all_window.test b/parser/testdata/corpus/sql/aggregate/group/group_by_all_window.test new file mode 100644 index 0000000..5a9350a --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/group/group_by_all_window.test @@ -0,0 +1,33 @@ +# source: test/sql/aggregate/group/group_by_all_window.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT range % 3 AS g, range AS v FROM range(10); +-- +ok +== +SELECT g, sum(sum(v)) OVER () FROM t GROUP BY ALL ORDER BY g; +-- +ok +== +SELECT g, sum(v), rank() OVER (ORDER BY sum(v)) FROM t GROUP BY ALL ORDER BY g; +-- +ok +== +SELECT g, count(*) OVER () FROM t GROUP BY ALL ORDER BY g; +-- +ok +== +SELECT g, sum(v) AS s, lag(sum(v)) OVER (ORDER BY g) FROM t GROUP BY ALL; +-- +ok +== +SELECT g, rank() OVER (ORDER BY g) FROM t GROUP BY ALL; +-- +ok +== +SELECT g, sum(v) OVER () FROM t GROUP BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/group/group_by_limits.test b/parser/testdata/corpus/sql/aggregate/group/group_by_limits.test index 557dc4c..9d078c1 100644 --- a/parser/testdata/corpus/sql/aggregate/group/group_by_limits.test +++ b/parser/testdata/corpus/sql/aggregate/group/group_by_limits.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/group_by_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(t_k0 TINYINT); diff --git a/parser/testdata/corpus/sql/aggregate/group/perfect_hash_max_values.test b/parser/testdata/corpus/sql/aggregate/group/perfect_hash_max_values.test new file mode 100644 index 0000000..66b8a20 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/group/perfect_hash_max_values.test @@ -0,0 +1,21 @@ +# source: test/sql/aggregate/group/perfect_hash_max_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT 'infinity'::TIMESTAMP x UNION ALL SELECT 'infinity'::TIMESTAMP; +-- +ok +== +SELECT x, count(*) FROM t GROUP BY x +-- +ok +== +CREATE TABLE t2 AS SELECT 9223372036854775807::BIGINT x UNION ALL SELECT 9223372036854775806 UNION ALL SELECT NULL; +-- +ok +== +SELECT x, count(*) FROM t2 GROUP BY x ORDER BY x +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/group/perfect_ht_memory_limit.test b/parser/testdata/corpus/sql/aggregate/group/perfect_ht_memory_limit.test new file mode 100644 index 0000000..b0054fe --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/group/perfect_ht_memory_limit.test @@ -0,0 +1,25 @@ +# source: test/sql/aggregate/group/perfect_ht_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA explain_output='physical_only'; +-- +ok +== +PRAGMA memory_limit='100MB' +-- +ok +== +CREATE TABLE t AS SELECT (i%16)::INT g FROM range(300000) t(i); +-- +ok +== +EXPLAIN SELECT g, list(repeat('x', 1000)) FROM t GROUP BY g +-- +ok +== +SELECT g, list(repeat('x', 1000)) FROM t GROUP BY g +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by.test index ab7e5e3..27747a0 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (13, 22), (12, 21) diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_alias.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_alias.test index e383175..514cfc3 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by_alias.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_alias.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER) diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_error.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_error.test index 9c6f1bd..92ac648 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by_error.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_error.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INT) diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_large_string.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_large_string.test index a92f332..b167553 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by_large_string.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_large_string.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by_large_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a VARCHAR, b INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_multi_column.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_multi_column.test index ad5844f..bdb65ef 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by_multi_column.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_multi_column.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by_multi_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 1, 2), (1, 2, 2), (1, 1, 2), (2, 1, 2), (1, 2, 4), (1, 2, NULL); diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_nested.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_nested.test index be63930..1e8a806 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by_nested.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_nested.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE {storage_type} intlists AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_null_length.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_null_length.test index 9fa6ae6..a192898 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_by_null_length.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_null_length.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_by_null_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_by_skip_lookups.test b/parser/testdata/corpus/sql/aggregate/group/test_group_by_skip_lookups.test new file mode 100644 index 0000000..afd1089 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_by_skip_lookups.test @@ -0,0 +1,18 @@ +# source: test/sql/aggregate/group/test_group_by_skip_lookups.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET threads = 3; +-- +ok +== +SELECT count(*), sum(group_count) +FROM ( + SELECT CASE WHEN i < 1100000 THEN i ELSE i - 100000 END::HUGEINT AS group_key, count(*) AS group_count + FROM range(1200000) t(i) + GROUP BY group_key +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/group/test_group_null.test b/parser/testdata/corpus/sql/aggregate/group/test_group_null.test index 62e9b7c..5ed4118 100644 --- a/parser/testdata/corpus/sql/aggregate/group/test_group_null.test +++ b/parser/testdata/corpus/sql/aggregate/group/test_group_null.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/group/test_group_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (3, 4), (NULL, 4), (2, 4); diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/cube.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/cube.test index 6dac597..293f063 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/cube.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/cube.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/cube.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table students (course VARCHAR, type VARCHAR, highest_grade INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping.test index de86e87..a8da169 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/grouping.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table students (course VARCHAR, type VARCHAR); diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets.test index c60804a..55e122f 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/grouping_sets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 1 from students group by (); diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_filter.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_filter.test index b2a7cda..f24639a 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_filter.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_filter.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/grouping_sets_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT course, COUNT(*) FROM students GROUP BY GROUPING SETS ((), (course)) HAVING course LIKE 'C%' ORDER BY 1, 2; diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_many_sets.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_many_sets.test new file mode 100644 index 0000000..ecfbb5d --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_many_sets.test @@ -0,0 +1,25 @@ +# source: test/sql/aggregate/grouping_sets/grouping_sets_many_sets.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT i % 2 c0, i % 3 c1, i % 4 c2, i % 5 c3, i % 6 c4, i % 7 c5, i % 8 c6, i % 9 c7, i % 10 c8, i % 11 c9, i % 12 c10, i % 13 c11, i FROM range(100) r(i); +-- +ok +== +SELECT sum(s) FROM (SELECT sum(i) s FROM t GROUP BY CUBE (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11)); +-- +ok +== +SELECT count(DISTINCT g) FROM (SELECT grouping(c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11) g FROM t GROUP BY CUBE (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11)); +-- +ok +== +SELECT c0, c1, sum(i) FROM t GROUP BY ROLLUP (c0, c1) ORDER BY ALL; +-- +ok +== +SELECT count(*) FROM (SELECT 1 c0, 1 c1, 1 c2, 1 c3, 1 c4, 1 c5, 1 c6, 1 c7, 1 c8, 1 c9, 1 c10, 1 c11, 1 c12, 1 c13, 1 c14) t GROUP BY GROUPING SETS (CUBE (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14), CUBE (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14), CUBE (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14)); +-- +error: Parser Error: Maximum grouping set count of 65535 exceeded +== diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_sum_having.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_sum_having.test new file mode 100644 index 0000000..ea07f30 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/grouping_sets_sum_having.test @@ -0,0 +1,37 @@ +# source: test/sql/aggregate/grouping_sets/grouping_sets_sum_having.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT range i, range % 3 g, (range / 4)::DECIMAL(9,2) d FROM range(6); +-- +ok +== +SELECT g, sum(i) FROM t GROUP BY ROLLUP (g) HAVING sum(i) > 1 OR g IS NULL; +-- +ok +== +EXPLAIN SELECT g, sum(i) FROM t GROUP BY ROLLUP (g) HAVING sum(i) > 1 OR g IS NULL; +-- +ok +== +PRAGMA explain_output = PHYSICAL_ONLY; +-- +ok +== +SELECT g, sum(i::BIGINT) FROM t GROUP BY GROUPING SETS ((g), ()) HAVING sum(i) > 1 OR g IS NULL; +-- +ok +== +SELECT g, sum(i), avg(i) FROM t GROUP BY CUBE (g) HAVING sum(i) > 1 OR g IS NULL; +-- +ok +== +SELECT g, sum(i::INTEGER), sum(d) FROM t GROUP BY ROLLUP (g) HAVING sum(i) > 1 OR g IS NULL; +-- +ok +== +SELECT g, i % 2 h, sum(i) FROM t GROUP BY ROLLUP (g, h) HAVING sum(i) > 2 OR g IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/issue_3730.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/issue_3730.test index 22e16f2..48fded5 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/issue_3730.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/issue_3730.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/issue_3730.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE response( diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/multiple_empty_grouping_sets.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/multiple_empty_grouping_sets.test index b14ed31..902886e 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/multiple_empty_grouping_sets.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/multiple_empty_grouping_sets.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/multiple_empty_grouping_sets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) diff --git a/parser/testdata/corpus/sql/aggregate/grouping_sets/rollup.test b/parser/testdata/corpus/sql/aggregate/grouping_sets/rollup.test index a7427e4..b199fbd 100644 --- a/parser/testdata/corpus/sql/aggregate/grouping_sets/rollup.test +++ b/parser/testdata/corpus/sql/aggregate/grouping_sets/rollup.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/grouping_sets/rollup.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select course, count(*) from students group by rollup (course) order by 1, 2; diff --git a/parser/testdata/corpus/sql/aggregate/having/having_alias.test b/parser/testdata/corpus/sql/aggregate/having/having_alias.test index 4a28f4c..99cbae6 100644 --- a/parser/testdata/corpus/sql/aggregate/having/having_alias.test +++ b/parser/testdata/corpus/sql/aggregate/having/having_alias.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/having/having_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT b, sum(a) AS a diff --git a/parser/testdata/corpus/sql/aggregate/having/having_without_groupby.test b/parser/testdata/corpus/sql/aggregate/having/having_without_groupby.test index 207657d..18b4379 100644 --- a/parser/testdata/corpus/sql/aggregate/having/having_without_groupby.test +++ b/parser/testdata/corpus/sql/aggregate/having/having_without_groupby.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/having/having_without_groupby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 AS one FROM ( diff --git a/parser/testdata/corpus/sql/aggregate/having/test_having.test b/parser/testdata/corpus/sql/aggregate/having/test_having.test index ee7ea46..b5fe4fa 100644 --- a/parser/testdata/corpus/sql/aggregate/having/test_having.test +++ b/parser/testdata/corpus/sql/aggregate/having/test_having.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/having/test_having.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT b, SUM(a) AS sum FROM test GROUP BY b HAVING b=21 ORDER BY b; diff --git a/parser/testdata/corpus/sql/aggregate/having/test_scalar_having.test b/parser/testdata/corpus/sql/aggregate/having/test_scalar_having.test index 721345a..c53325e 100644 --- a/parser/testdata/corpus/sql/aggregate/having/test_scalar_having.test +++ b/parser/testdata/corpus/sql/aggregate/having/test_scalar_having.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/having/test_scalar_having.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42 HAVING 42 > 20 diff --git a/parser/testdata/corpus/sql/aggregate/qualify/test_qualify.test b/parser/testdata/corpus/sql/aggregate/qualify/test_qualify.test index 8cac183..cdf6c45 100644 --- a/parser/testdata/corpus/sql/aggregate/qualify/test_qualify.test +++ b/parser/testdata/corpus/sql/aggregate/qualify/test_qualify.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/qualify/test_qualify.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE qt (a INTEGER, b CHAR(1), c INTEGER); diff --git a/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_macro.test b/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_macro.test index e119770..9841353 100644 --- a/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_macro.test +++ b/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_macro.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/qualify/test_qualify_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA disable_checkpoint_on_shutdown diff --git a/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_view.test b/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_view.test index 66058fd..3da2dd9 100644 --- a/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_view.test +++ b/parser/testdata/corpus/sql/aggregate/qualify/test_qualify_view.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/qualify/test_qualify_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA test; diff --git a/parser/testdata/corpus/sql/aggregate/quantile_fun.test b/parser/testdata/corpus/sql/aggregate/quantile_fun.test index 5c5b31c..cdbe819 100644 --- a/parser/testdata/corpus/sql/aggregate/quantile_fun.test +++ b/parser/testdata/corpus/sql/aggregate/quantile_fun.test @@ -1,6 +1,6 @@ # source: test/sql/aggregate/quantile_fun.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table quantiles as select range r, random() FROM range(100) union all values (NULL, 0.1), (NULL, 0.5), (NULL, 0.9) order by 2; diff --git a/parser/testdata/corpus/sql/aggregate/sparse_clustered_aggregation.test b/parser/testdata/corpus/sql/aggregate/sparse_clustered_aggregation.test new file mode 100644 index 0000000..f9950e3 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/sparse_clustered_aggregation.test @@ -0,0 +1,135 @@ +# source: test/sql/aggregate/sparse_clustered_aggregation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET perfect_ht_threshold={threshold}; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE clustered_inputs AS +SELECT i, CASE WHEN i%257=0 THEN NULL ELSE (i//{run_length})%8 END AS g, + (i//{block})%7 AS day, + CASE WHEN (i//{run_length})%8=7 OR i%31=0 THEN NULL ELSE i%101-50 END::{type} AS v +FROM range({row_count}) t(i); +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE scatter_result AS SELECT g, + sum(v*1) FILTER (WHERE i>={dense_start} OR day=0) AS s0, + sum(v*2) FILTER (WHERE i>={dense_start} OR day=1) AS s1, + sum(v*3) FILTER (WHERE i>={dense_start} OR day=2) AS s2, + sum(v*4) FILTER (WHERE i>={dense_start} OR day=3) AS s3, + sum(v*5) FILTER (WHERE i>={dense_start} OR day=4) AS s4, + sum(v*6) FILTER (WHERE i>={dense_start} OR day=5) AS s5, + sum(v*7) FILTER (WHERE i>={dense_start} OR day=6) AS s6 +FROM clustered_inputs GROUP BY g; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE clustered_result AS SELECT g, + sum(CASE WHEN i>={dense_start} OR day=0 THEN v*1 END) AS s0, + sum(CASE WHEN i>={dense_start} OR day=1 THEN v*2 END) AS s1, + sum(CASE WHEN i>={dense_start} OR day=2 THEN v*3 END) AS s2, + sum(CASE WHEN i>={dense_start} OR day=3 THEN v*4 END) AS s3, + sum(CASE WHEN i>={dense_start} OR day=4 THEN v*5 END) AS s4, + sum(CASE WHEN i>={dense_start} OR day=5 THEN v*6 END) AS s5, + sum(CASE WHEN i>={dense_start} OR day=6 THEN v*7 END) AS s6 +FROM clustered_inputs GROUP BY g; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM ( + (TABLE clustered_result EXCEPT ALL TABLE scatter_result) + UNION ALL + (TABLE scatter_result EXCEPT ALL TABLE clustered_result) +); +-- +ok +== +RESET perfect_ht_threshold; +-- +ok +== +SELECT g, sum(v), sum(v*2), count(*) FROM clustered_inputs WHERE g=7 OR g IS NULL GROUP BY g ORDER BY g NULLS LAST; +-- +ok +== +WITH a AS ( + SELECT g, sum(CASE WHEN day=0 THEN v END), sum(CASE WHEN day=1 THEN v END), + count(*), count(v), first(NULL::INTEGER), stddev_samp(v), + sum(v) FILTER (WHERE day=2), sum(DISTINCT v) + FROM clustered_inputs GROUP BY g +), b AS ( + SELECT g, sum(v) FILTER (WHERE day=0), sum(v) FILTER (WHERE day=1), + count(*), count(v), first(NULL::INTEGER), stddev_samp(v), + sum(v) FILTER (WHERE day=2), sum(DISTINCT v) + FROM clustered_inputs GROUP BY g +) +SELECT count(*) FROM ( + (TABLE a EXCEPT ALL TABLE b) + UNION ALL + (TABLE b EXCEPT ALL TABLE a) +); +-- +ok +== +SELECT g, sum(NULL::BIGINT), sum(3), count(*) +FROM (VALUES (1),(1),(NULL),(NULL)) t(g) GROUP BY g ORDER BY g NULLS LAST; +-- +ok +== +SELECT g, sum(CASE WHEN i%4=0 THEN 9000000000000000000::BIGINT END), + sum(CASE WHEN i%4=1 THEN -9000000000000000000::BIGINT END) +FROM (SELECT i, (i//64)%2 AS g FROM range(8192) t(i)) t GROUP BY g ORDER BY g; +-- +ok +== +SELECT count(*) FROM (SELECT g,sum(v),sum(v*2) FROM clustered_inputs WHERE FALSE GROUP BY g); +-- +ok +== +WITH a AS ( + SELECT g, min(CASE WHEN i%7=0 THEN v END) AS lo, + max(CASE WHEN i%7=1 THEN v END) AS hi, + bit_xor(CASE WHEN i%7=2 THEN v::BIGINT END) AS bits + FROM clustered_inputs GROUP BY g +), b AS ( + SELECT g, min(v) FILTER (WHERE i%7=0) AS lo, + max(v) FILTER (WHERE i%7=1) AS hi, + bit_xor(v::BIGINT) FILTER (WHERE i%7=2) AS bits + FROM clustered_inputs GROUP BY g +) +SELECT count(*) FROM ( + (TABLE a EXCEPT ALL TABLE b) + UNION ALL + (TABLE b EXCEPT ALL TABLE a) +); +-- +ok +== +CREATE TABLE dictionary_inputs AS +SELECT i, (i//64)%8 AS g, CASE WHEN i%7=0 THEN i%101-50 END::INTEGER AS v +FROM range(16513) t(i); +-- +ok +== +CREATE TABLE flat_inputs AS SELECT * FROM dictionary_inputs WHERE i%3<>0; +-- +ok +== +WITH a AS ( + SELECT g, sum(v) AS s, min(v) AS lo, max(v) AS hi, bit_xor(v) AS bits + FROM dictionary_inputs WHERE i%3<>0 GROUP BY g +), b AS ( + SELECT g, sum(v) AS s, min(v) AS lo, max(v) AS hi, bit_xor(v) AS bits + FROM flat_inputs GROUP BY g +) +SELECT count(*) FROM ( + (TABLE a EXCEPT ALL TABLE b) + UNION ALL + (TABLE b EXCEPT ALL TABLE a) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/variant/variant_group_object.test b/parser/testdata/corpus/sql/aggregate/variant/variant_group_object.test new file mode 100644 index 0000000..3d14a09 --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/variant/variant_group_object.test @@ -0,0 +1,191 @@ +# source: test/sql/aggregate/variant/variant_group_object.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +select variant_group_object('duck', 'goose'::VARIANT); +-- +ok +== +select variant_group_object('duck', NULL::VARIANT); +-- +ok +== +select variant_group_object('duck', NULL); +-- +ok +== +select typeof(variant_group_object('duck', 42::VARIANT)); +-- +ok +== +select variant_group_object(NULL, 'goose'::VARIANT); +-- +ok +== +select variant_group_object(k, v) +from (values ('a', 1::VARIANT)) t(k, v) +where false; +-- +ok +== +select variant_group_object(k, v) +from (values ('valid', 1::VARIANT), (NULL, 2::VARIANT)) t(k, v); +-- +ok +== +select variant_group_object(k, v) filter (where include_row) +from (values + (NULL, 0::VARIANT, false), + ('kept', 1::VARIANT, true) +) t(k, v, include_row); +-- +ok +== +select variant_group_object(k, v) filter (where false) +from (values ('filtered', 1::VARIANT)) t(k, v); +-- +ok +== +create table base (k VARCHAR, v VARIANT); +-- +ok +== +insert into base values ('duck', {'nested': 12}::VARIANT), ('goose', [1,2,3,4]::VARIANT), ('pond', 26::VARIANT); +-- +ok +== +select variant_comparator(variant_group_object(k, v)) = variant_comparator({ + 'duck': {'nested': 12}, + 'goose': [1, 2, 3, 4], + 'pond': 26 +}::VARIANT) +from base; +-- +ok +== +select count(*) +from ( + select g, variant_group_object(k, v) as obj + from (values + (1, 'z', 10::VARIANT), + (1, 'a', 20::VARIANT), + (2, 'a', 30::VARIANT) + ) t(g, k, v) + group by g +) grouped +where (g = 1 and variant_comparator(obj) = variant_comparator({'a': 20, 'z': 10}::VARIANT)) + or (g = 2 and variant_comparator(obj) = variant_comparator({'a': 30}::VARIANT)); +-- +ok +== +with grouped as ( + select variant_group_object(k, v) as obj + from (values + ('', 'empty'::VARIANT), + ('A', 'upper'::VARIANT), + ('a', 'lower'::VARIANT), + ('ключ', 'unicode'::VARIANT), + (repeat('k', 32), 'long'::VARIANT), + (repeat('k', 31) || 'x', 'long_prefix'::VARIANT) + ) t(k, v) +) +select contains(variant_extract_string(obj, ''), '"":"empty"') + and variant_extract_string(obj, 'A') = 'upper' + and variant_extract_string(obj, 'a') = 'lower' + and variant_extract_string(obj, 'ключ') = 'unicode' + and variant_extract_string(obj, repeat('k', 32)) = 'long' + and variant_extract_string(obj, repeat('k', 31) || 'x') = 'long_prefix' +from grouped; +-- +ok +== +select variant_comparator(variant_group_object(k, v)) = variant_comparator({ + 'bool': true, + 'decimal': 1.25::DECIMAL(4, 2), + 'float': 1.5::DOUBLE, + 'nested': {'object_null': NULL, 'array_nulls': [1, NULL, 3]} +}::VARIANT) +from (values + ('bool', true::VARIANT), + ('decimal', 1.25::DECIMAL(4, 2)::VARIANT), + ('float', 1.5::DOUBLE::VARIANT), + ('nested', {'object_null': NULL, 'array_nulls': [1, NULL, 3]}::VARIANT) +) t(k, v); +-- +ok +== +select variant_comparator(variant_group_object(k, v)) = variant_comparator({ + 'date': DATE '2020-01-02', + 'timestamp': TIMESTAMP '2020-01-02 03:04:05', + 'blob': 'abc'::BLOB, + 'map': MAP {'x': 1, 'y': 2}::VARIANT +}::VARIANT) +from (values + ('date', DATE '2020-01-02'::VARIANT), + ('timestamp', TIMESTAMP '2020-01-02 03:04:05'::VARIANT), + ('blob', 'abc'::BLOB::VARIANT), + ('map', MAP {'x': 1, 'y': 2}::VARIANT) +) t(k, v); +-- +ok +== +select variant_comparator(variant_group_object(k, v)) = variant_comparator({ + 'null_value': NULL, + 'number': 2 +}::VARIANT) +from (values + ('null_value', NULL::VARIANT), + ('number', 2::VARIANT) +) t(k, v); +-- +ok +== +select variant_comparator(variant_group_object(DISTINCT k, v)) = variant_comparator({ + 'a': 1, + 'b': 2 +}::VARIANT) +from (values + ('a', 1::VARIANT), + ('a', 1::VARIANT), + ('b', 2::VARIANT) +) t(k, v); +-- +ok +== +select variant_group_object(DISTINCT k, v) +from (values ('a', 1::VARIANT), ('a', 2::VARIANT)) t(k, v); +-- +ok +== +insert into base values ('duck', 1::VARIANT); +-- +ok +== +select variant_group_object(k, v) from base; +-- +ok +== +select variant_group_object( + case when i in (0, 2048) then 'duplicate_key' else printf('key_%d', i) end, + i::VARIANT) +from range(4096) t(i); +-- +ok +== +select variant_group_object(); +-- +ok +== +select variant_group_object(1, 2); +-- +ok +== +SELECT finalize(to_aggregate_state([{'key': NULL, 'value': 1::VARIANT}], 'variant_group_object', ['VARCHAR', 'VARIANT'])); +-- +ok +== +SELECT finalize(to_aggregate_state([{'key': 'k', 'value': 1::VARIANT}], 'variant_group_object', ['VARCHAR', 'VARIANT'])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/aggregate/variant/variant_group_object_shredded.test b/parser/testdata/corpus/sql/aggregate/variant/variant_group_object_shredded.test new file mode 100644 index 0000000..ccb1caf --- /dev/null +++ b/parser/testdata/corpus/sql/aggregate/variant/variant_group_object_shredded.test @@ -0,0 +1,39 @@ +# source: test/sql/aggregate/variant/variant_group_object_shredded.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET variant_minimum_shredding_size = 0; +-- +ok +== +SET force_variant_shredding = 'STRUCT(b INTEGER, a INTEGER)'; +-- +ok +== +CREATE TABLE shredded_values(id INTEGER, k VARCHAR, v VARIANT); +-- +ok +== +INSERT INTO shredded_values VALUES + (1, 'first', {'a': 1, 'b': 2}::VARIANT), + (2, 'second', {'a': 3}::VARIANT), + (3, 'null_root', NULL::VARIANT), + (4, 'scalar', 42::VARIANT); +-- +ok +== +SELECT DISTINCT vector_type(v) FROM shredded_values; +-- +ok +== +SELECT variant_comparator(variant_group_object(k, v)) = variant_comparator({ + 'first': {'a': 1, 'b': 2}, + 'second': {'a': 3}, + 'null_root': NULL, + 'scalar': 42 +}::VARIANT) +FROM shredded_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col.test index 75c96d1..bbebee8 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_chain.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_chain.test index f5bd039..8ea6b7f 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_chain.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_chain.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_chain.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (3, 3) diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_compression.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_compression.test new file mode 100644 index 0000000..3b3f4a4 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_compression.test @@ -0,0 +1,33 @@ +# source: test/sql/alter/add_col/test_add_col_compression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE compression_test(i INTEGER) +-- +ok +== +ALTER TABLE compression_test ADD COLUMN invalid INTEGER USING COMPRESSION invalid +-- +ok +== +ALTER TABLE compression_test ADD COLUMN added INTEGER USING COMPRESSION UNCOMPRESSED DEFAULT 42 +-- +ok +== +INSERT INTO compression_test SELECT i, i FROM range(10000) t(i) +-- +ok +== +SELECT contains(sql, 'USING COMPRESSION Uncompressed') +FROM duckdb_tables() +WHERE table_name = 'compression_test' +-- +ok +== +SELECT DISTINCT compression +FROM pragma_storage_info('compression_test') +WHERE column_name = 'added' AND segment_type = 'INTEGER' +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_constraints.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_constraints.test new file mode 100644 index 0000000..a105143 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_constraints.test @@ -0,0 +1,29 @@ +# source: test/sql/alter/add_col/test_add_col_constraints.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t1(i INTEGER) +-- +ok +== +CREATE TABLE t2(i INTEGER PRIMARY KEY) +-- +ok +== +ALTER TABLE t1 ADD COLUMN j INTEGER PRIMARY KEY +-- +error: Parser Error: Adding columns with PRIMARY KEY constraints is not supported yet +== +ALTER TABLE t1 ADD COLUMN j INTEGER CHECK (j > 0) +-- +error: Parser Error: Adding columns with CHECK constraints is not supported yet +== +ALTER TABLE t1 ADD COLUMN j INTEGER REFERENCES t2(i) +-- +error: Parser Error: Adding columns with FOREIGN KEY constraints is not supported yet +== +SELECT count(*) FROM pragma_table_info('t1') +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_default.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_default.test index 27b4d74..1278c8b 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_default.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_default.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ADD COLUMN l INTEGER DEFAULT 3 diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_default_seq.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_default_seq.test index cfad151..51b365d 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_default_seq.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_default_seq.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_default_seq.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ADD COLUMN m INTEGER DEFAULT nextval('seq') diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_distinct_stats.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_distinct_stats.test new file mode 100644 index 0000000..1379b36 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_distinct_stats.test @@ -0,0 +1,21 @@ +# source: test/sql/alter/add_col/test_add_col_distinct_stats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT range AS i FROM range(100000); +-- +ok +== +ALTER TABLE t ADD COLUMN IF NOT EXISTS u VARCHAR DEFAULT (nextval('seq') * 7919 % 2001)::VARCHAR; +-- +ok +== +SELECT s.approx_unique BETWEEN 1000 AND 10000 FROM (SELECT stats(u) s FROM t LIMIT 1); +-- +ok +== +INSERT INTO t SELECT 100000 + range, (nextval('seq') * 7919 % 2001)::VARCHAR FROM range(10); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_if_not_exists_default.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_if_not_exists_default.test index 0629e9b..1227d24 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_if_not_exists_default.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_if_not_exists_default.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_if_not_exists_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (i INTEGER) diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_incorrect.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_incorrect.test index e39850d..f1ad171 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_incorrect.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ADD COLUMN i INTEGER diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_index.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_index.test index abecefc..adf3ade 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_index.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_index.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ADD COLUMN k INTEGER DEFAULT 2 diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_not_null.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_not_null.test new file mode 100644 index 0000000..309aa9d --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_not_null.test @@ -0,0 +1,33 @@ +# source: test/sql/alter/add_col/test_add_col_not_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INTEGER); +-- +ok +== +INSERT INTO t VALUES (1); +-- +ok +== +ALTER TABLE t ADD COLUMN b INTEGER NOT NULL; +-- +ok +== +DELETE FROM t; +-- +ok +== +INSERT INTO t VALUES (2, NULL); +-- +ok +== +INSERT INTO t VALUES (2, 42); +-- +ok +== +SELECT * FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_stats.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_stats.test index 54bcfbe..6426fca 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_stats.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_stats.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM test WHERE m=2 diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_transactions.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_transactions.test index d1917eb..8132ed7 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_transactions.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP TABLE test diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_unique.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_unique.test new file mode 100644 index 0000000..e45c3eb --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_unique.test @@ -0,0 +1,21 @@ +# source: test/sql/alter/add_col/test_add_col_unique.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ALTER TABLE t ADD COLUMN b INTEGER UNIQUE; +-- +ok +== +INSERT INTO t VALUES (2, 5); +-- +ok +== +INSERT INTO t VALUES (3, 5); +-- +ok +== +INSERT INTO t VALUES (4, NULL), (5, NULL); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_col/test_add_col_user_type.test b/parser/testdata/corpus/sql/alter/add_col/test_add_col_user_type.test index 83a131d..9903fe1 100644 --- a/parser/testdata/corpus/sql/alter/add_col/test_add_col_user_type.test +++ b/parser/testdata/corpus/sql/alter/add_col/test_add_col_user_type.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_col/test_add_col_user_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA test_schema; diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_multi_column_pk.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_multi_column_pk.test index 5348476..2df3c5f 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_multi_column_pk.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_multi_column_pk.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_multi_column_pk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (i INTEGER, j INTEGER, d TEXT); diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk.test index 2216a73..74571b0 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_alter_in_tx.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_alter_in_tx.test index bf974c2..846af59 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_alter_in_tx.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_alter_in_tx.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_alter_in_tx.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ADD PRIMARY KEY (j); diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_attach.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_attach.test index 2929173..584a1e3 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_attach.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_attach.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_attach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' as memory diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_catalog_error.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_catalog_error.test index 34f2b26..efaf062 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_catalog_error.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_catalog_error.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_catalog_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ADD PRIMARY KEY (i_do_not_exist) diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_gaps_in_rowids.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_gaps_in_rowids.test index 1d94359..0dce1f1 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_gaps_in_rowids.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_gaps_in_rowids.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_gaps_in_rowids.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i integer) diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_data.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_data.test index 6bd9824..d6f8098 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_data.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_data.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_invalid_data.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE duplicates (i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_type.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_type.test index ce25d5e..a36b571 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_type.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_invalid_type.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_invalid_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER[], b INTEGER) diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_local_null.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_local_null.test new file mode 100644 index 0000000..2e9d3a0 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_local_null.test @@ -0,0 +1,13 @@ +# source: test/sql/alter/add_pk/test_add_pk_local_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO t VALUES (NULL); +-- +ok +== +ALTER TABLE t ADD PRIMARY KEY (a); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_naming_conflict.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_naming_conflict.test index 311465d..8da7a71 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_naming_conflict.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_naming_conflict.test @@ -1,24 +1,8 @@ # source: test/sql/alter/add_pk/test_add_pk_naming_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE TABLE tbl (i INTEGER); --- -ok -== -INSERT INTO tbl VALUES (1); --- -ok -== -CREATE INDEX PRIMARY_tbl_i ON tbl(i); --- -ok -== -ALTER TABLE tbl ADD PRIMARY KEY (i); --- -ok -== CREATE TABLE test (i INTEGER) -- ok diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_rollback.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_rollback.test index cafbcef..d277d44 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_rollback.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal.test index fb3edcd..175861c 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (1, 2), (3, 4); diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal_generated.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal_generated.test new file mode 100644 index 0000000..45f0067 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_wal_generated.test @@ -0,0 +1,73 @@ +# source: test/sql/alter/add_pk/test_add_pk_wal_generated.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t_lead(g INTEGER GENERATED ALWAYS AS (a + 1), a INTEGER); +-- +ok +== +INSERT INTO t_lead(a) VALUES (1), (2); +-- +ok +== +ALTER TABLE t_lead ADD PRIMARY KEY (a); +-- +ok +== +CREATE TABLE t_mid(a INTEGER, g INTEGER GENERATED ALWAYS AS (a + 1), c INTEGER); +-- +ok +== +INSERT INTO t_mid(a, c) VALUES (1, 10), (2, 20); +-- +ok +== +ALTER TABLE t_mid ADD PRIMARY KEY (c); +-- +ok +== +CREATE TABLE t_uq(g INTEGER GENERATED ALWAYS AS (a + 1), a INTEGER); +-- +ok +== +INSERT INTO t_uq(a) VALUES (1); +-- +ok +== +ALTER TABLE t_uq ADD UNIQUE (a); +-- +ok +== +SELECT g, a FROM t_lead ORDER BY a; +-- +ok +== +SELECT a FROM t_lead WHERE a = 2; +-- +ok +== +INSERT INTO t_lead(a) VALUES (3); +-- +ok +== +INSERT INTO t_lead(a) VALUES (1); +-- +ok +== +SELECT a, g, c FROM t_mid ORDER BY c; +-- +ok +== +INSERT INTO t_mid(a, c) VALUES (3, 30); +-- +ok +== +INSERT INTO t_mid(a, c) VALUES (4, 10); +-- +ok +== +INSERT INTO t_uq(a) VALUES (2); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_with_generated_column.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_with_generated_column.test index c197f59..e832fbd 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_with_generated_column.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_pk_with_generated_column.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_pk_with_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_simultaneously.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_simultaneously.test index 82d88e8..318cf24 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_simultaneously.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_simultaneously.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_same_pk_simultaneously.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (1, 1), (1, 1) diff --git a/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_twice.test b/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_twice.test index 6508c7b..a4aa644 100644 --- a/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_twice.test +++ b/parser/testdata/corpus/sql/alter/add_pk/test_add_same_pk_twice.test @@ -1,6 +1,6 @@ # source: test/sql/alter/add_pk/test_add_same_pk_twice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE other (i INTEGER PRIMARY KEY, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/add_unique/test_add_unique.test b/parser/testdata/corpus/sql/alter/add_unique/test_add_unique.test new file mode 100644 index 0000000..f68afeb --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_unique/test_add_unique.test @@ -0,0 +1,65 @@ +# source: test/sql/alter/add_unique/test_add_unique.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(c INT); +-- +ok +== +ALTER TABLE t ADD UNIQUE (c); +-- +ok +== +CREATE TABLE d(i INT); +-- +ok +== +INSERT INTO d VALUES (1), (1); +-- +ok +== +ALTER TABLE d ADD UNIQUE (i); +-- +ok +== +CREATE TABLE r(i INT); +-- +ok +== +ALTER TABLE r ADD UNIQUE (i); +-- +ok +== +INSERT INTO r VALUES (1), (1); +-- +ok +== +CREATE TABLE g(a INT, g INT GENERATED ALWAYS AS (a + 1)); +-- +ok +== +ALTER TABLE g ADD UNIQUE (g); +-- +ok +== +ALTER TABLE g ADD PRIMARY KEY (g); +-- +ok +== +CREATE TABLE dup(i INT UNIQUE, j INT); +-- +ok +== +ALTER TABLE dup ADD UNIQUE (i); +-- +ok +== +ALTER TABLE dup ADD UNIQUE (j); +-- +ok +== +ALTER TABLE dup ADD PRIMARY KEY (i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/add_unique/test_add_unique_wal.test b/parser/testdata/corpus/sql/alter/add_unique/test_add_unique_wal.test new file mode 100644 index 0000000..802fa9f --- /dev/null +++ b/parser/testdata/corpus/sql/alter/add_unique/test_add_unique_wal.test @@ -0,0 +1,65 @@ +# source: test/sql/alter/add_unique/test_add_unique_wal.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(i INTEGER, j INTEGER, k INTEGER); +-- +ok +== +INSERT INTO t VALUES (1, 10, 100); +-- +ok +== +ALTER TABLE t ADD PRIMARY KEY (j); +-- +ok +== +ALTER TABLE t ADD UNIQUE (i); +-- +ok +== +ALTER TABLE t RENAME TO renamed_t; +-- +ok +== +ALTER TABLE renamed_t RENAME COLUMN i TO id; +-- +ok +== +INSERT INTO renamed_t VALUES (1, 20, 200); +-- +ok +== +INSERT INTO renamed_t VALUES (2, 10, 200); +-- +ok +== +ALTER TABLE renamed_t RENAME TO t; +-- +ok +== +ALTER TABLE t RENAME COLUMN id TO i; +-- +ok +== +ALTER TABLE t ADD UNIQUE (k); +-- +ok +== +INSERT INTO renamed_t VALUES (2, 20, 100); +-- +ok +== +INSERT INTO renamed_t VALUES (3, 10, 300); +-- +ok +== +INSERT INTO renamed_t VALUES (1, 30, 300); +-- +ok +== +INSERT INTO renamed_t VALUES (3, 30, 100); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null.test b/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null.test index 7868fda..3597a0b 100644 --- a/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null.test +++ b/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_col/test_drop_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER, j INTEGER NOT NULL) diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null_primary_key.test b/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null_primary_key.test new file mode 100644 index 0000000..a4f7f6c --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_col/test_drop_not_null_primary_key.test @@ -0,0 +1,13 @@ +# source: test/sql/alter/alter_col/test_drop_not_null_primary_key.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE pk_col(i INTEGER PRIMARY KEY, j INTEGER); +-- +ok +== +ALTER TABLE pk_col ALTER COLUMN i DROP NOT NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_not_null_in_tran.test b/parser/testdata/corpus/sql/alter/alter_col/test_not_null_in_tran.test index 5449934..ba4b99b 100644 --- a/parser/testdata/corpus/sql/alter/alter_col/test_not_null_in_tran.test +++ b/parser/testdata/corpus/sql/alter/alter_col/test_not_null_in_tran.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_col/test_not_null_in_tran.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_not_null_multi_tran.test b/parser/testdata/corpus/sql/alter/alter_col/test_not_null_multi_tran.test index c97e6ae..5b984fa 100644 --- a/parser/testdata/corpus/sql/alter/alter_col/test_not_null_multi_tran.test +++ b/parser/testdata/corpus/sql/alter/alter_col/test_not_null_multi_tran.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_col/test_not_null_multi_tran.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t VALUES(7777, NULL) diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_set_collate.test b/parser/testdata/corpus/sql/alter/alter_col/test_set_collate.test new file mode 100644 index 0000000..bcfa5a1 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_col/test_set_collate.test @@ -0,0 +1,77 @@ +# source: test/sql/alter/alter_col/test_set_collate.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(id INT, s VARCHAR); +-- +ok +== +INSERT INTO t VALUES (1, 'hello'), (2, 'HELLO'), (3, 'World'); +-- +ok +== +ALTER TABLE t ALTER COLUMN s TYPE VARCHAR COLLATE nocase; +-- +ok +== +SELECT id FROM t WHERE s = 'hello' ORDER BY id +-- +ok +== +SELECT s FROM t ORDER BY s, id +-- +ok +== +ALTER TABLE t ALTER COLUMN id TYPE VARCHAR COLLATE nocase USING 'x' || id::VARCHAR; +-- +ok +== +SELECT count(*) FROM t WHERE id = 'X1' +-- +ok +== +ALTER TABLE t ALTER COLUMN s TYPE INTEGER COLLATE nocase; +-- +error: Parser Error: Only VARCHAR columns can have collations! +== +ALTER TABLE t ALTER COLUMN s COLLATE nocase; +-- +error: Parser Error: syntax error at or near "COLLATE" +== +ALTER TABLE t ALTER COLUMN s TYPE COLLATE nocase USING s; +-- +error: Parser Error: Specify the VARCHAR type to set a collation +== +ALTER TABLE t ALTER COLUMN s TYPE VARCHAR COLLATE nonexistent_collation; +-- +ok +== +SELECT sql LIKE '%s VARCHAR COLLATE nocase%' FROM duckdb_tables() WHERE table_name = 't' +-- +ok +== +ALTER TABLE t ADD COLUMN c VARCHAR COLLATE nocase; +-- +ok +== +UPDATE t SET c = s; +-- +ok +== +SELECT id FROM t WHERE c = 'HELLO' ORDER BY id +-- +ok +== +SELECT sql LIKE '%c VARCHAR COLLATE nocase%' FROM duckdb_tables() WHERE table_name = 't' +-- +ok +== +ALTER TABLE t ADD COLUMN d INTEGER COLLATE nocase; +-- +error: Parser Error: Only VARCHAR columns can have collations! +== +ALTER TABLE t ADD COLUMN d VARCHAR COLLATE nonexistent_collation; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null.test b/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null.test index f2bff4b..322cb29 100644 --- a/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null.test +++ b/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_col/test_set_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t VALUES (1, 1), (2, 2) diff --git a/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null_after_delete.test b/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null_after_delete.test new file mode 100644 index 0000000..8705844 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_col/test_set_not_null_after_delete.test @@ -0,0 +1,25 @@ +# source: test/sql/alter/alter_col/test_set_not_null_after_delete.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(i INTEGER); +-- +ok +== +INSERT INTO t VALUES (NULL), (42); +-- +ok +== +BEGIN TRANSACTION; +-- +ok +== +DELETE FROM t WHERE i IS NULL; +-- +ok +== +ALTER TABLE t ALTER COLUMN i SET NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_schema_set_schema_options.test b/parser/testdata/corpus/sql/alter/alter_schema_set_schema_options.test new file mode 100644 index 0000000..56a9835 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_schema_set_schema_options.test @@ -0,0 +1,125 @@ +# source: test/sql/alter/alter_schema_set_schema_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +set variable location='my/location/path'; +-- +ok +== +ALTER SCHEMA s1 SET ('foo'='baz', 'buzz'='wizz'); +-- +ok +== +ALTER SCHEMA s1 SET (foo='baz', buzz='wizz'); +-- +ok +== +ALTER SCHEMA s1 SET (foo=getvariable('location')); +-- +ok +== +ALTER SCHEMA s1 RESET ('foo', 'buzz'); +-- +ok +== +ALTER SCHEMA s1 RESET (foo, buzz); +-- +ok +== +ALTER SCHEMA s1 RESET ('foo'='baz', 'buzz'='wizz'); +-- +error: Parser Error: Reset option "buzz" cannot set any value. Did you mean to use SET? +== +ALTER SCHEMA s1 RESET (foo='baz', buzz='wizz'); +-- +error: Parser Error: Reset option "buzz" cannot set any value. Did you mean to use SET? +== +ALTER SCHEMA s1 RESET (); +-- +error: Parser Error: syntax error at or near ")" +== +ALTER SCHEMA s1 SET (); +-- +error: Parser Error: syntax error at or near ")" +== +ALTER SCHEMA s2 SET (foo='baz'); +-- +ok +== +ALTER SCHEMA s2 RESET (foo); +-- +ok +== +ALTER SCHEMA IF EXISTS s2 SET (foo='baz'); +-- +ok +== +ALTER SCHEMA IF EXISTS s2 RESET (foo); +-- +ok +== +ALTER SCHEMA IF EXISTS s1 SET (foo='baz'); +-- +ok +== +ATTACH ':memory:' AS other_db +-- +ok +== +CREATE SCHEMA other_db.s3 +-- +ok +== +ALTER SCHEMA other_db.s3 SET (foo='baz'); +-- +ok +== +ALTER SCHEMA other_db.s3 RESET (foo); +-- +ok +== +ALTER SCHEMA IF EXISTS other_db.s1 SET (foo='baz'); +-- +ok +== +CREATE SCHEMA s1.child +-- +ok +== +CREATE SCHEMA s1.child.grandchild +-- +ok +== +ALTER SCHEMA s1.child SET (foo='baz'); +-- +ok +== +CREATE SCHEMA other_db.s3.child +-- +ok +== +CREATE SCHEMA other_db.s3.child.grandchild +-- +ok +== +ALTER SCHEMA other_db.s3.child.grandchild RESET (foo); +-- +ok +== +ALTER SCHEMA s1.missing SET (foo='baz'); +-- +ok +== +ALTER SCHEMA IF EXISTS s1.missing SET (foo='baz'); +-- +ok +== +ALTER SCHEMA IF EXISTS s1.missing_parent.child RESET (foo); +-- +ok +== +ALTER SCHEMA s1 RENAME TO s4; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_table_nullability_requires_column.test b/parser/testdata/corpus/sql/alter/alter_table_nullability_requires_column.test new file mode 100644 index 0000000..991c4ed --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_table_nullability_requires_column.test @@ -0,0 +1,25 @@ +# source: test/sql/alter/alter_table_nullability_requires_column.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t (a INTEGER); +-- +ok +== +ALTER TABLE t SET NOT NULL; +-- +error: Parser Error: syntax error at or near "NOT" +== +ALTER TABLE t DROP NOT NULL; +-- +error: Parser Error: syntax error at or near "NOT" +== +ALTER TABLE t ALTER a SET NOT NULL; +-- +ok +== +ALTER TABLE t ALTER COLUMN a DROP NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_table_set_partitioned_by.test b/parser/testdata/corpus/sql/alter/alter_table_set_partitioned_by.test index 6c91e72..ee4f49d 100644 --- a/parser/testdata/corpus/sql/alter/alter_table_set_partitioned_by.test +++ b/parser/testdata/corpus/sql/alter/alter_table_set_partitioned_by.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_table_set_partitioned_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INTEGER); diff --git a/parser/testdata/corpus/sql/alter/alter_table_set_sorted_by.test b/parser/testdata/corpus/sql/alter/alter_table_set_sorted_by.test index 6943552..d747e74 100644 --- a/parser/testdata/corpus/sql/alter/alter_table_set_sorted_by.test +++ b/parser/testdata/corpus/sql/alter/alter_table_set_sorted_by.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_table_set_sorted_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE tbl SET SORTED BY (i DESC NULLS FIRST) diff --git a/parser/testdata/corpus/sql/alter/alter_table_set_table_options.test b/parser/testdata/corpus/sql/alter/alter_table_set_table_options.test index e5f53c8..8424443 100644 --- a/parser/testdata/corpus/sql/alter/alter_table_set_table_options.test +++ b/parser/testdata/corpus/sql/alter/alter_table_set_table_options.test @@ -1,16 +1,12 @@ # source: test/sql/alter/alter_table_set_table_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1(i INTEGER); -- ok == -set variable location='my/location/path'; --- -ok -== ALTER TABLE tbl1 SET ('foo'='baz', 'buzz'='wizz'); -- ok diff --git a/parser/testdata/corpus/sql/alter/alter_type/alter_type_concurrent_committed_update.test b/parser/testdata/corpus/sql/alter/alter_type/alter_type_concurrent_committed_update.test new file mode 100644 index 0000000..de90377 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_type/alter_type_concurrent_committed_update.test @@ -0,0 +1,29 @@ +# source: test/sql/alter/alter_type/alter_type_concurrent_committed_update.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(id INTEGER, v INTEGER) +-- +ok +== +INSERT INTO t VALUES (1, 0) +-- +ok +== +SELECT v FROM t +-- +ok +== +UPDATE t SET v = 7 +-- +ok +== +ALTER TABLE t ALTER COLUMN v SET DATA TYPE BIGINT +-- +ok +== +SELECT typeof(v) FROM t +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_type/alter_type_distinct_stats.test b/parser/testdata/corpus/sql/alter/alter_type/alter_type_distinct_stats.test new file mode 100644 index 0000000..1c98e4c --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_type/alter_type_distinct_stats.test @@ -0,0 +1,21 @@ +# source: test/sql/alter/alter_type/alter_type_distinct_stats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE c AS SELECT hash(range) % 2000 AS v FROM range(100000); +-- +ok +== +ALTER TABLE c ALTER COLUMN v SET DATA TYPE VARCHAR USING v::VARCHAR; +-- +ok +== +SELECT s.approx_unique BETWEEN 1000 AND 10000 FROM (SELECT stats(v) s FROM c LIMIT 1); +-- +ok +== +INSERT INTO c SELECT (hash(range) % 2000)::VARCHAR FROM range(100); +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_type/alter_type_failed_cast_keeps_table_usable.test b/parser/testdata/corpus/sql/alter/alter_type/alter_type_failed_cast_keeps_table_usable.test new file mode 100644 index 0000000..ea07d12 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_type/alter_type_failed_cast_keeps_table_usable.test @@ -0,0 +1,33 @@ +# source: test/sql/alter/alter_type/alter_type_failed_cast_keeps_table_usable.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(v VARCHAR) +-- +ok +== +INSERT INTO t VALUES ('not a number') +-- +ok +== +ALTER TABLE t ALTER COLUMN v SET DATA TYPE INTEGER +-- +ok +== +INSERT INTO t VALUES ('still works') +-- +ok +== +SELECT count(*) FROM t +-- +ok +== +UPDATE t SET v = 'updated' +-- +ok +== +SELECT count(*) FROM t WHERE v = 'updated' +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_type/alter_type_struct.test b/parser/testdata/corpus/sql/alter/alter_type/alter_type_struct.test index edc67d5..9106528 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/alter_type_struct.test +++ b/parser/testdata/corpus/sql/alter/alter_type/alter_type_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/alter_type_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT {'t': 42} t diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type.test index dd664ce..d300538 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER i SET DATA TYPE VARCHAR diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_active_transaction_visibility.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_active_transaction_visibility.test index f3ce9ef..fb80f80 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_active_transaction_visibility.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_active_transaction_visibility.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_active_transaction_visibility.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER) diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_check.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_check.test index 8021f11..dfc2dba 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_check.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_check.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_check.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER CHECK(i < 10), j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_dependencies.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_dependencies.test index 097a1be..d9852dd 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_dependencies.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT * FROM test diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_expression.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_expression.test index 92d2185..b166e39 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_expression.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_expression.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER i TYPE BIGINT USING i+100 diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_incorrect.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_incorrect.test index 08a48d0..9e5d240 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_incorrect.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER blabla SET TYPE VARCHAR diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_index.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_index.test index 4745cd7..c1ccfe2 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_index.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_index.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX i_index ON test(i) diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_local.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_local.test index 4c554c4..7717913 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_local.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_local.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_local.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER i SET DATA TYPE BIGINT diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_multi_column.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_multi_column.test index 68de6c0..cfec689 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_multi_column.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_multi_column.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_multi_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER i TYPE INTEGER USING 2*(i+j) diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_not_null.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_not_null.test index 3edff8c..a110192 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_not_null.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER NOT NULL, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_rollback.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_rollback.test index 0ba41e8..85847d9 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_rollback.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET i='hello' diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_transactions.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_transactions.test index d0b7f3a..adbb525 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_transactions.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER j TYPE VARCHAR diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_unique.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_unique.test index 6d1391f..5f20fb5 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_unique.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_unique.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_unique.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER UNIQUE, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_using_not_null.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_using_not_null.test new file mode 100644 index 0000000..9a7225f --- /dev/null +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_using_not_null.test @@ -0,0 +1,21 @@ +# source: test/sql/alter/alter_type/test_alter_type_using_not_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INTEGER NOT NULL, b INTEGER); +-- +ok +== +INSERT INTO t VALUES (1, 10), (2, 20); +-- +ok +== +ALTER TABLE t ALTER a SET DATA TYPE INTEGER USING NULL +-- +ok +== +SELECT a, b FROM t ORDER BY a +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_with_generated_column.test b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_with_generated_column.test index 96bcef5..67c86d8 100644 --- a/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_with_generated_column.test +++ b/parser/testdata/corpus/sql/alter/alter_type/test_alter_type_with_generated_column.test @@ -1,6 +1,6 @@ # source: test/sql/alter/alter_type/test_alter_type_with_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i AS (1), j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/default/drop_default.test b/parser/testdata/corpus/sql/alter/default/drop_default.test index a501792..47728cd 100644 --- a/parser/testdata/corpus/sql/alter/default/drop_default.test +++ b/parser/testdata/corpus/sql/alter/default/drop_default.test @@ -1,6 +1,6 @@ # source: test/sql/alter/default/drop_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE data(id INTEGER, x INTEGER); diff --git a/parser/testdata/corpus/sql/alter/default/test_set_default.test b/parser/testdata/corpus/sql/alter/default/test_set_default.test index f29dab1..5cdaea7 100644 --- a/parser/testdata/corpus/sql/alter/default/test_set_default.test +++ b/parser/testdata/corpus/sql/alter/default/test_set_default.test @@ -1,6 +1,6 @@ # source: test/sql/alter/default/test_set_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER j SET DEFAULT 3 diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col.test index 5c5b58e..014fe13 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN j diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check.test index 3a709a2..43ef7c7 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_check.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER, j INTEGER CHECK(j < 10)) diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check_next.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check_next.test index 10b3f81..65a5742 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check_next.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_check_next.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_check_next.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN i diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_concurrent_dml_conflict.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_concurrent_dml_conflict.test index 4cc1f3d..62fd13b 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_concurrent_dml_conflict.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_concurrent_dml_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_concurrent_dml_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET immediate_transaction_mode=true diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_dotted_name.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_dotted_name.test new file mode 100644 index 0000000..5273135 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_dotted_name.test @@ -0,0 +1,29 @@ +# source: test/sql/alter/drop_col/test_drop_col_dotted_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_blocks=true +-- +ok +== +CREATE TABLE t AS SELECT i::VARCHAR AS "a.b", i::VARCHAR AS a FROM range(100000) t(i); +-- +ok +== +ALTER TABLE t DROP COLUMN t.a +-- +ok +== +ALTER TABLE t DROP COLUMN main.t.a +-- +ok +== +ALTER TABLE t DROP COLUMN drop_col_dotted_name.main.t.a +-- +ok +== +ALTER TABLE t DROP COLUMN "a.b" +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_failure.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_failure.test index c17c0fa..54831e1 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_failure.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_failure.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_failure.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN blabla @@ -23,3 +23,35 @@ ALTER TABLE test2 DROP COLUMN age -- ok == +ALTER TABLE test2 DROP COLUMN id +-- +ok +== +CREATE TABLE test3 (a INT, b INT, c INT, PRIMARY KEY(a, b)) +-- +ok +== +ALTER TABLE test3 DROP COLUMN a +-- +ok +== +CREATE TABLE gen(a INT PRIMARY KEY, b INT GENERATED ALWAYS AS (a + 1), c INT, d INT GENERATED ALWAYS AS (c * 2)) +-- +ok +== +INSERT INTO gen(a, c) VALUES (1, 10) +-- +ok +== +ALTER TABLE gen DROP COLUMN a CASCADE +-- +ok +== +ALTER TABLE gen DROP COLUMN c CASCADE +-- +ok +== +SELECT * FROM gen +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_not_null_next.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_not_null_next.test index 7a05c0d..6e29698 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_not_null_next.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_not_null_next.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_not_null_next.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER, j INTEGER, k INTEGER NOT NULL) diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_operations.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_operations.test index c70cc82..03f46f7 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_operations.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_operations.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_operations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT i, i FROM range(100) tbl(i); diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_pk.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_pk.test index 40de29a..5d1de56 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_pk.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_pk.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_pk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER PRIMARY KEY, j INTEGER) diff --git a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_with_generated_cols.test b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_with_generated_cols.test index 4f43e74..2dcb1cf 100644 --- a/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_with_generated_cols.test +++ b/parser/testdata/corpus/sql/alter/drop_col/test_drop_col_with_generated_cols.test @@ -1,6 +1,6 @@ # source: test/sql/alter/drop_col/test_drop_col_with_generated_cols.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t(i int, j as (2), k int, m as (3), n int); diff --git a/parser/testdata/corpus/sql/alter/drop_constraint.test b/parser/testdata/corpus/sql/alter/drop_constraint.test new file mode 100644 index 0000000..2d90d4c --- /dev/null +++ b/parser/testdata/corpus/sql/alter/drop_constraint.test @@ -0,0 +1,13 @@ +# source: test/sql/alter/drop_constraint.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ALTER TABLE t DROP CONSTRAINT pk; +-- +ok +== +ALTER TABLE t DROP CONSTRAINT IF EXISTS pk CASCADE; +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/list/add_column_in_struct.test b/parser/testdata/corpus/sql/alter/list/add_column_in_struct.test index 8bad536..6a723cf 100644 --- a/parser/testdata/corpus/sql/alter/list/add_column_in_struct.test +++ b/parser/testdata/corpus/sql/alter/list/add_column_in_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/list/add_column_in_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte AS ( diff --git a/parser/testdata/corpus/sql/alter/list/drop_column_in_struct.test b/parser/testdata/corpus/sql/alter/list/drop_column_in_struct.test index c0633e6..9f269e8 100644 --- a/parser/testdata/corpus/sql/alter/list/drop_column_in_struct.test +++ b/parser/testdata/corpus/sql/alter/list/drop_column_in_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/list/drop_column_in_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN s.element diff --git a/parser/testdata/corpus/sql/alter/list/rename_column_in_struct.test b/parser/testdata/corpus/sql/alter/list/rename_column_in_struct.test index d81fe8d..1f54436 100644 --- a/parser/testdata/corpus/sql/alter/list/rename_column_in_struct.test +++ b/parser/testdata/corpus/sql/alter/list/rename_column_in_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/list/rename_column_in_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test( diff --git a/parser/testdata/corpus/sql/alter/map/add_column_in_struct.test b/parser/testdata/corpus/sql/alter/map/add_column_in_struct.test index 36e012e..5fbbf0c 100644 --- a/parser/testdata/corpus/sql/alter/map/add_column_in_struct.test +++ b/parser/testdata/corpus/sql/alter/map/add_column_in_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/map/add_column_in_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte as ( diff --git a/parser/testdata/corpus/sql/alter/map/drop_column_in_struct.test b/parser/testdata/corpus/sql/alter/map/drop_column_in_struct.test index bfaeb91..8f161d8 100644 --- a/parser/testdata/corpus/sql/alter/map/drop_column_in_struct.test +++ b/parser/testdata/corpus/sql/alter/map/drop_column_in_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/map/drop_column_in_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN s.key diff --git a/parser/testdata/corpus/sql/alter/map/rename_column_in_struct.test b/parser/testdata/corpus/sql/alter/map/rename_column_in_struct.test index f102499..48e101d 100644 --- a/parser/testdata/corpus/sql/alter/map/rename_column_in_struct.test +++ b/parser/testdata/corpus/sql/alter/map/rename_column_in_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/map/rename_column_in_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME COLUMN s.key to anything diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col.test index 367b531..d3e2aac 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME COLUMN i TO k diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_check.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_check.test index 25e2f81..7750d66 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_check.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_check.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_check.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test (i, j) VALUES (1, 2), (2, 3) diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_dependencies.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_dependencies.test index 92bd91b..100cc50 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_dependencies.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT i, j FROM test diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_failure.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_failure.test index 1079af6..7e7da9c 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_failure.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_failure.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_failure.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME COLUMN blablabla TO k diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_not_null.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_not_null.test index a9f43b7..b131642 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_not_null.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test (i, j) VALUES (NULL, 2) diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_rollback.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_rollback.test index 4a23958..2102c37 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_rollback.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET default_transaction_invalidation_policy='SYNTACTIC_ERRORS_DO_NOT_INVALIDATE'; diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_transactions.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_transactions.test index bb6b060..21035cf 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_transactions.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test( diff --git a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_unique.test b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_unique.test index 9da80c6..f8d716a 100644 --- a/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_unique.test +++ b/parser/testdata/corpus/sql/alter/rename_col/test_rename_col_unique.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_col/test_rename_col_unique.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER, j INTEGER, PRIMARY KEY(i, j)) diff --git a/parser/testdata/corpus/sql/alter/rename_schema/rename_schema.test b/parser/testdata/corpus/sql/alter/rename_schema/rename_schema.test index 858bd1f..6a298f8 100644 --- a/parser/testdata/corpus/sql/alter/rename_schema/rename_schema.test +++ b/parser/testdata/corpus/sql/alter/rename_schema/rename_schema.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_schema/rename_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER SCHEMA a RENAME TO b; diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_bug4455_schema.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_bug4455_schema.test index e58f3ed..b9a3b8b 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_bug4455_schema.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_bug4455_schema.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_bug4455_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create schema public; diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table.test index a73d2e9..77dee74 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl VALUES (999), (100); @@ -23,10 +23,6 @@ SELECT * FROM tbl; -- ok == -BEGIN TRANSACTION; --- -ok -== ALTER TABLE tbl2 RENAME TO tbl3 -- ok diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_case.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_case.test index bd1ebfa..3459131 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_case.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_case.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table MY_TABLE (i integer); diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_chain_commit.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_chain_commit.test index 1e30fe8..31cacaf 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_chain_commit.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_chain_commit.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_chain_commit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE entry(i INTEGER); diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_collision.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_collision.test index 1155e05..8b13bc7 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_collision.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_collision.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_collision.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(i INTEGER); diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_conflict_storage_name.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_conflict_storage_name.test new file mode 100644 index 0000000..d951a7c --- /dev/null +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_conflict_storage_name.test @@ -0,0 +1,41 @@ +# source: test/sql/alter/rename_table/test_rename_table_conflict_storage_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA wal_autocheckpoint='1TB' +-- +ok +== +ALTER TABLE t RENAME TO ta +-- +ok +== +ALTER TABLE t RENAME TO tb +-- +ok +== +INSERT INTO ta VALUES (42) +-- +ok +== +CREATE TABLE rollback_table(i INTEGER) +-- +ok +== +ALTER TABLE rollback_table RENAME TO rollback_table_new +-- +ok +== +INSERT INTO rollback_table VALUES (84) +-- +ok +== +SELECT * FROM ta ORDER BY i +-- +ok +== +SELECT * FROM rollback_table ORDER BY i +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_constraints.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_constraints.test index fb706a2..3f69831 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_constraints.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INTEGER PRIMARY KEY, j INTEGER CHECK(j < 10)) diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_incorrect.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_incorrect.test index f15a135..db0a166 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_incorrect.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl2(i INTEGER) diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_many_transactions.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_many_transactions.test index 153b56f..2c66028 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_many_transactions.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_many_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_many_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1(i INTEGER) diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_transactions.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_transactions.test index 712439c..b06c4f0 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_transactions.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl VALUES (999), (100) diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_view.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_view.test index 793b146..cf540fa 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_view.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_view.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT * FROM tbl diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_dependency_check.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_dependency_check.test index 3092ca4..aa07583 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_dependency_check.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_dependency_check.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_with_dependency_check.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX i1 ON t0 (c0); diff --git a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_insert_transaction.test b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_insert_transaction.test index 49a9f3a..31909cf 100644 --- a/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_insert_transaction.test +++ b/parser/testdata/corpus/sql/alter/rename_table/test_rename_table_with_insert_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_table/test_rename_table_with_insert_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (i INTEGER) diff --git a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view.test b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view.test index 5ce63a8..ccd008a 100644 --- a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view.test +++ b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_view/test_rename_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INTEGER); diff --git a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_incorrect.test b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_incorrect.test index 6846b79..fc047dd 100644 --- a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_incorrect.test +++ b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_view/test_rename_view_incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW vw AS SELECT * FROM tbl diff --git a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_many_transactions.test b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_many_transactions.test index 3c6d8dd..24e768e 100644 --- a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_many_transactions.test +++ b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_many_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_view/test_rename_view_many_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW vw1 AS SELECT * FROM tbl1 diff --git a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_table.test b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_table.test index 55c5798..e774030 100644 --- a/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_table.test +++ b/parser/testdata/corpus/sql/alter/rename_view/test_rename_view_table.test @@ -1,6 +1,6 @@ # source: test/sql/alter/rename_view/test_rename_view_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER VIEW tbl RENAME TO tbl2 diff --git a/parser/testdata/corpus/sql/alter/struct/add_col_nested_struct.test b/parser/testdata/corpus/sql/alter/struct/add_col_nested_struct.test index 589f807..9708afa 100644 --- a/parser/testdata/corpus/sql/alter/struct/add_col_nested_struct.test +++ b/parser/testdata/corpus/sql/alter/struct/add_col_nested_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/add_col_nested_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(s STRUCT(s2 STRUCT(v1 INT, v2 INT))) diff --git a/parser/testdata/corpus/sql/alter/struct/add_col_struct.test b/parser/testdata/corpus/sql/alter/struct/add_col_struct.test index 6e61766..a0c0ec7 100644 --- a/parser/testdata/corpus/sql/alter/struct/add_col_struct.test +++ b/parser/testdata/corpus/sql/alter/struct/add_col_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/add_col_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(s STRUCT(i INTEGER, j INTEGER)) diff --git a/parser/testdata/corpus/sql/alter/struct/alter_nested_struct_field_not_implemented.test b/parser/testdata/corpus/sql/alter/struct/alter_nested_struct_field_not_implemented.test new file mode 100644 index 0000000..2a08a75 --- /dev/null +++ b/parser/testdata/corpus/sql/alter/struct/alter_nested_struct_field_not_implemented.test @@ -0,0 +1,57 @@ +# source: test/sql/alter/struct/alter_nested_struct_field_not_implemented.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE test(s STRUCT(a INTEGER, b INTEGER)) +-- +ok +== +INSERT INTO test VALUES ({'a': NULL, 'b': 1}) +-- +ok +== +ALTER TABLE test ALTER s.a SET NOT NULL +-- +ok +== +ALTER TABLE test ALTER s.a DROP NOT NULL +-- +ok +== +ALTER TABLE test ALTER s.a SET DEFAULT 5 +-- +ok +== +ALTER TABLE test ALTER s.a TYPE BIGINT +-- +ok +== +CREATE TABLE simple(a INTEGER, b INTEGER) +-- +ok +== +INSERT INTO simple VALUES (1, 1) +-- +ok +== +ALTER TABLE simple ALTER a SET NOT NULL +-- +ok +== +INSERT INTO simple VALUES (NULL, 2) +-- +ok +== +ALTER TABLE simple ALTER a DROP NOT NULL +-- +ok +== +ALTER TABLE simple ALTER a SET DEFAULT 42 +-- +ok +== +ALTER TABLE simple ALTER a TYPE BIGINT +-- +ok +== diff --git a/parser/testdata/corpus/sql/alter/struct/drop_col_nested_struct.test b/parser/testdata/corpus/sql/alter/struct/drop_col_nested_struct.test index af128e0..7402fc2 100644 --- a/parser/testdata/corpus/sql/alter/struct/drop_col_nested_struct.test +++ b/parser/testdata/corpus/sql/alter/struct/drop_col_nested_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/drop_col_nested_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(s STRUCT(i INT, s2 STRUCT(v1 INT, v2 INT))) diff --git a/parser/testdata/corpus/sql/alter/struct/drop_col_struct.test b/parser/testdata/corpus/sql/alter/struct/drop_col_struct.test index 81b4fb6..a12664d 100644 --- a/parser/testdata/corpus/sql/alter/struct/drop_col_struct.test +++ b/parser/testdata/corpus/sql/alter/struct/drop_col_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/drop_col_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN s.i diff --git a/parser/testdata/corpus/sql/alter/struct/rename_col_nested_struct.test b/parser/testdata/corpus/sql/alter/struct/rename_col_nested_struct.test index 5c95937..50dedab 100644 --- a/parser/testdata/corpus/sql/alter/struct/rename_col_nested_struct.test +++ b/parser/testdata/corpus/sql/alter/struct/rename_col_nested_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/rename_col_nested_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME s.s2.v1 TO i diff --git a/parser/testdata/corpus/sql/alter/struct/rename_col_struct.test b/parser/testdata/corpus/sql/alter/struct/rename_col_struct.test index 20dc395..3c64e11 100644 --- a/parser/testdata/corpus/sql/alter/struct/rename_col_struct.test +++ b/parser/testdata/corpus/sql/alter/struct/rename_col_struct.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/rename_col_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME s.i TO v1 diff --git a/parser/testdata/corpus/sql/alter/struct/rename_col_struct_case_insensitive.test b/parser/testdata/corpus/sql/alter/struct/rename_col_struct_case_insensitive.test index f7331d7..6a0318a 100644 --- a/parser/testdata/corpus/sql/alter/struct/rename_col_struct_case_insensitive.test +++ b/parser/testdata/corpus/sql/alter/struct/rename_col_struct_case_insensitive.test @@ -1,6 +1,6 @@ # source: test/sql/alter/struct/rename_col_struct_case_insensitive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(S STRUCT(i INTEGER, j INTEGER)) diff --git a/parser/testdata/corpus/sql/alter/test_alter_database_rename.test b/parser/testdata/corpus/sql/alter/test_alter_database_rename.test index ff90c5c..d7dc95b 100644 --- a/parser/testdata/corpus/sql/alter/test_alter_database_rename.test +++ b/parser/testdata/corpus/sql/alter/test_alter_database_rename.test @@ -1,6 +1,6 @@ # source: test/sql/alter/test_alter_database_rename.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS test_db; diff --git a/parser/testdata/corpus/sql/alter/test_alter_if_exists.test b/parser/testdata/corpus/sql/alter/test_alter_if_exists.test index a5d3fc3..2e28e46 100644 --- a/parser/testdata/corpus/sql/alter/test_alter_if_exists.test +++ b/parser/testdata/corpus/sql/alter/test_alter_if_exists.test @@ -1,6 +1,6 @@ # source: test/sql/alter/test_alter_if_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER SEQUENCE IF EXISTS seq OWNED BY x; diff --git a/parser/testdata/corpus/sql/attach/attach_all_types.test b/parser/testdata/corpus/sql/attach/attach_all_types.test index 5eae63e..2bb0361 100644 --- a/parser/testdata/corpus/sql/attach/attach_all_types.test +++ b/parser/testdata/corpus/sql/attach/attach_all_types.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_all_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_all_types.db' AS db1 (STORAGE_VERSION 'v2.0.0') diff --git a/parser/testdata/corpus/sql/attach/attach_catalog_error_early_out.test b/parser/testdata/corpus/sql/attach/attach_catalog_error_early_out.test index 760470b..fb84324 100644 --- a/parser/testdata/corpus/sql/attach/attach_catalog_error_early_out.test +++ b/parser/testdata/corpus/sql/attach/attach_catalog_error_early_out.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_catalog_error_early_out.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET catalog_error_max_schemas = 0; diff --git a/parser/testdata/corpus/sql/attach/attach_checkpoint_on_detach.test b/parser/testdata/corpus/sql/attach/attach_checkpoint_on_detach.test index 37cb88b..b070969 100644 --- a/parser/testdata/corpus/sql/attach/attach_checkpoint_on_detach.test +++ b/parser/testdata/corpus/sql/attach/attach_checkpoint_on_detach.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_checkpoint_on_detach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET wal_autocheckpoint = '1TB'; diff --git a/parser/testdata/corpus/sql/attach/attach_checkpoint_vacuum.test b/parser/testdata/corpus/sql/attach/attach_checkpoint_vacuum.test index 82480e4..1925a3a 100644 --- a/parser/testdata/corpus/sql/attach/attach_checkpoint_vacuum.test +++ b/parser/testdata/corpus/sql/attach/attach_checkpoint_vacuum.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_checkpoint_vacuum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_vacuum.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_conflicting_options.test b/parser/testdata/corpus/sql/attach/attach_conflicting_options.test new file mode 100644 index 0000000..6f266cf --- /dev/null +++ b/parser/testdata/corpus/sql/attach/attach_conflicting_options.test @@ -0,0 +1,9 @@ +# source: test/sql/attach/attach_conflicting_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH OR REPLACE IF NOT EXISTS ':memory:' AS conflicting_options; +-- +error: Parser Error: Cannot specify both OR REPLACE and IF NOT EXISTS at the same time +== diff --git a/parser/testdata/corpus/sql/attach/attach_copy.test b/parser/testdata/corpus/sql/attach/attach_copy.test index 955d7cf..b83b1e0 100644 --- a/parser/testdata/corpus/sql/attach/attach_copy.test +++ b/parser/testdata/corpus/sql/attach/attach_copy.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE ':memory:' AS db1; diff --git a/parser/testdata/corpus/sql/attach/attach_create_index.test b/parser/testdata/corpus/sql/attach/attach_create_index.test index ce962f0..099d11c 100644 --- a/parser/testdata/corpus/sql/attach/attach_create_index.test +++ b/parser/testdata/corpus/sql/attach/attach_create_index.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_create_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '' AS tmp; diff --git a/parser/testdata/corpus/sql/attach/attach_cross_catalog.test b/parser/testdata/corpus/sql/attach/attach_cross_catalog.test index 42439ed..b341ef2 100644 --- a/parser/testdata/corpus/sql/attach/attach_cross_catalog.test +++ b/parser/testdata/corpus/sql/attach/attach_cross_catalog.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_cross_catalog.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a INTEGER); diff --git a/parser/testdata/corpus/sql/attach/attach_custom_block_size.test b/parser/testdata/corpus/sql/attach/attach_custom_block_size.test index ebc8029..5a21f7f 100644 --- a/parser/testdata/corpus/sql/attach/attach_custom_block_size.test +++ b/parser/testdata/corpus/sql/attach/attach_custom_block_size.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_custom_block_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/not_pow_of_two.db' (BLOCK_SIZE 123456); diff --git a/parser/testdata/corpus/sql/attach/attach_database_options.test b/parser/testdata/corpus/sql/attach/attach_database_options.test index b3dddff..06f06e2 100644 --- a/parser/testdata/corpus/sql/attach/attach_database_options.test +++ b/parser/testdata/corpus/sql/attach/attach_database_options.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_database_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE ':memory:' AS new_database (BLOCK_SIZE 262144, ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/attach/attach_database_size.test b/parser/testdata/corpus/sql/attach/attach_database_size.test index 60617d3..88f3e7a 100644 --- a/parser/testdata/corpus/sql/attach/attach_database_size.test +++ b/parser/testdata/corpus/sql/attach/attach_database_size.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_database_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_database_size.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_dbname_quotes.test b/parser/testdata/corpus/sql/attach/attach_dbname_quotes.test index 56bc5dd..3f0a95f 100644 --- a/parser/testdata/corpus/sql/attach/attach_dbname_quotes.test +++ b/parser/testdata/corpus/sql/attach/attach_dbname_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_dbname_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' as "my""db"; diff --git a/parser/testdata/corpus/sql/attach/attach_default_database_case.test b/parser/testdata/corpus/sql/attach/attach_default_database_case.test index c279853..3d4a733 100644 --- a/parser/testdata/corpus/sql/attach/attach_default_database_case.test +++ b/parser/testdata/corpus/sql/attach/attach_default_database_case.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_default_database_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS MyDB; diff --git a/parser/testdata/corpus/sql/attach/attach_default_table.test b/parser/testdata/corpus/sql/attach/attach_default_table.test index 13da0d9..22b0afa 100644 --- a/parser/testdata/corpus/sql/attach/attach_default_table.test +++ b/parser/testdata/corpus/sql/attach/attach_default_table.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_default_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/test.db' as ddb (default_table 'my_table') diff --git a/parser/testdata/corpus/sql/attach/attach_defaults.test b/parser/testdata/corpus/sql/attach/attach_defaults.test index 7b131e6..8b42964 100644 --- a/parser/testdata/corpus/sql/attach/attach_defaults.test +++ b/parser/testdata/corpus/sql/attach/attach_defaults.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_defaults.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE ':memory:' AS new_database; diff --git a/parser/testdata/corpus/sql/attach/attach_dependencies.test b/parser/testdata/corpus/sql/attach/attach_dependencies.test index 5c31226..29235aa 100644 --- a/parser/testdata/corpus/sql/attach/attach_dependencies.test +++ b/parser/testdata/corpus/sql/attach/attach_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pk_tbl (id INTEGER PRIMARY KEY, name VARCHAR UNIQUE); diff --git a/parser/testdata/corpus/sql/attach/attach_detach_reattach_transaction.test b/parser/testdata/corpus/sql/attach/attach_detach_reattach_transaction.test new file mode 100644 index 0000000..b59ee41 --- /dev/null +++ b/parser/testdata/corpus/sql/attach/attach_detach_reattach_transaction.test @@ -0,0 +1,21 @@ +# source: test/sql/attach/attach_detach_reattach_transaction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH ':memory:' AS a; +-- +ok +== +DETACH a; +-- +ok +== +CREATE TABLE a.t AS SELECT 42 i; +-- +ok +== +SELECT i FROM a.t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/attach_did_you_mean.test b/parser/testdata/corpus/sql/attach/attach_did_you_mean.test index aa4bd99..0e48926 100644 --- a/parser/testdata/corpus/sql/attach/attach_did_you_mean.test +++ b/parser/testdata/corpus/sql/attach/attach_did_you_mean.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_did_you_mean.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hello(i INTEGER); diff --git a/parser/testdata/corpus/sql/attach/attach_different_alias.test b/parser/testdata/corpus/sql/attach/attach_different_alias.test index e6644a5..784b911 100644 --- a/parser/testdata/corpus/sql/attach/attach_different_alias.test +++ b/parser/testdata/corpus/sql/attach/attach_different_alias.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_different_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_alias.db' AS alias1 diff --git a/parser/testdata/corpus/sql/attach/attach_duckdb_type.test b/parser/testdata/corpus/sql/attach/attach_duckdb_type.test index d0f2f68..5f48c80 100644 --- a/parser/testdata/corpus/sql/attach/attach_duckdb_type.test +++ b/parser/testdata/corpus/sql/attach/attach_duckdb_type.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_duckdb_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/first.db' (TYPE DUCKDB); diff --git a/parser/testdata/corpus/sql/attach/attach_enable_external_access.test b/parser/testdata/corpus/sql/attach/attach_enable_external_access.test index db0cabd..d261749 100644 --- a/parser/testdata/corpus/sql/attach/attach_enable_external_access.test +++ b/parser/testdata/corpus/sql/attach/attach_enable_external_access.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_enable_external_access.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_access1.db' AS a1 diff --git a/parser/testdata/corpus/sql/attach/attach_encrypted_db_key_test.test b/parser/testdata/corpus/sql/attach/attach_encrypted_db_key_test.test index f32def6..7781d24 100644 --- a/parser/testdata/corpus/sql/attach/attach_encrypted_db_key_test.test +++ b/parser/testdata/corpus/sql/attach/attach_encrypted_db_key_test.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_encrypted_db_key_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted.duckdb' AS encrypted (ENCRYPTION_KEY); diff --git a/parser/testdata/corpus/sql/attach/attach_encryption_block_header.test b/parser/testdata/corpus/sql/attach/attach_encryption_block_header.test index 4ed636b..cfffe92 100644 --- a/parser/testdata/corpus/sql/attach/attach_encryption_block_header.test +++ b/parser/testdata/corpus/sql/attach/attach_encryption_block_header.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_encryption_block_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted.duckdb' AS encrypted (ENCRYPTION_KEY 42); diff --git a/parser/testdata/corpus/sql/attach/attach_encryption_downgrade_prevention.test b/parser/testdata/corpus/sql/attach/attach_encryption_downgrade_prevention.test index c5a3142..2c07d32 100644 --- a/parser/testdata/corpus/sql/attach/attach_encryption_downgrade_prevention.test +++ b/parser/testdata/corpus/sql/attach/attach_encryption_downgrade_prevention.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_encryption_downgrade_prevention.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH 'data/attach_test/encrypted_ctr_key=abcde.db' as enc (ENCRYPTION_KEY 'abcde'); diff --git a/parser/testdata/corpus/sql/attach/attach_encryption_fallback_readonly.test b/parser/testdata/corpus/sql/attach/attach_encryption_fallback_readonly.test index aba9302..0703a7a 100644 --- a/parser/testdata/corpus/sql/attach/attach_encryption_fallback_readonly.test +++ b/parser/testdata/corpus/sql/attach/attach_encryption_fallback_readonly.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_encryption_fallback_readonly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set autoinstall_known_extensions=false @@ -11,11 +11,16 @@ set autoload_known_extensions=false -- ok == -ATTACH 'data/attach_test/encrypted_gcm_key=abcde.db' as enc (ENCRYPTION_KEY 'abcde', ENCRYPTION_CIPHER 'GCM'); +COPY (SELECT content FROM read_blob('data/attach_test/encrypted_gcm_key=abcde.db')) +TO '{TEST_DIR}/encrypted_gcm.db' (FORMAT BLOB); -- ok == -ATTACH 'data/attach_test/encrypted_gcm_key=abcde.db' as enc (ENCRYPTION_KEY 'abcde', ENCRYPTION_CIPHER 'GCM', READ_ONLY); +ATTACH '{TEST_DIR}/encrypted_gcm.db' as enc (ENCRYPTION_KEY 'abcde', ENCRYPTION_CIPHER 'GCM'); +-- +ok +== +ATTACH '{TEST_DIR}/encrypted_gcm.db' as enc (ENCRYPTION_KEY 'abcde', ENCRYPTION_CIPHER 'GCM', READ_ONLY); -- ok == @@ -23,6 +28,10 @@ FROM enc.test ORDER BY value -- ok == +SELECT count(*) FROM duckdb_extensions() WHERE extension_name='httpfs' AND loaded; +-- +ok +== DETACH enc -- ok diff --git a/parser/testdata/corpus/sql/attach/attach_enums.test b/parser/testdata/corpus/sql/attach/attach_enums.test index 21a29a4..9cc439d 100644 --- a/parser/testdata/corpus/sql/attach/attach_enums.test +++ b/parser/testdata/corpus/sql/attach/attach_enums.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_enums.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_enums.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_export_import.test b/parser/testdata/corpus/sql/attach/attach_export_import.test index 558fa93..f3599c9 100644 --- a/parser/testdata/corpus/sql/attach/attach_export_import.test +++ b/parser/testdata/corpus/sql/attach/attach_export_import.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_export_import.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_expr.test b/parser/testdata/corpus/sql/attach/attach_expr.test index 8abaa81..bb8a2a9 100644 --- a/parser/testdata/corpus/sql/attach/attach_expr.test +++ b/parser/testdata/corpus/sql/attach/attach_expr.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_expr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET VARIABLE db_type='DUCKDB' diff --git a/parser/testdata/corpus/sql/attach/attach_external_access.test b/parser/testdata/corpus/sql/attach/attach_external_access.test index 2b5e989..9b57e92 100644 --- a/parser/testdata/corpus/sql/attach/attach_external_access.test +++ b/parser/testdata/corpus/sql/attach/attach_external_access.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_external_access.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH 'mydb.db' AS db2 diff --git a/parser/testdata/corpus/sql/attach/attach_filepath_roundtrip.test b/parser/testdata/corpus/sql/attach/attach_filepath_roundtrip.test index 1ea789c..740d3b7 100644 --- a/parser/testdata/corpus/sql/attach/attach_filepath_roundtrip.test +++ b/parser/testdata/corpus/sql/attach/attach_filepath_roundtrip.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_filepath_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/concurrent.db'; diff --git a/parser/testdata/corpus/sql/attach/attach_foreign_key.test b/parser/testdata/corpus/sql/attach/attach_foreign_key.test index be4094b..97505cc 100644 --- a/parser/testdata/corpus/sql/attach/attach_foreign_key.test +++ b/parser/testdata/corpus/sql/attach/attach_foreign_key.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_foreign_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE album(artistid INTEGER, albumname TEXT, albumcover TEXT, UNIQUE (artistid, albumname)); diff --git a/parser/testdata/corpus/sql/attach/attach_foreign_key_external_catalog.test b/parser/testdata/corpus/sql/attach/attach_foreign_key_external_catalog.test index cdeb2c7..9d1389d 100644 --- a/parser/testdata/corpus/sql/attach/attach_foreign_key_external_catalog.test +++ b/parser/testdata/corpus/sql/attach/attach_foreign_key_external_catalog.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_foreign_key_external_catalog.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/fk_external.duckdb' AS ext; diff --git a/parser/testdata/corpus/sql/attach/attach_fsspec.test b/parser/testdata/corpus/sql/attach/attach_fsspec.test index 784c5f8..5846776 100644 --- a/parser/testdata/corpus/sql/attach/attach_fsspec.test +++ b/parser/testdata/corpus/sql/attach/attach_fsspec.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_fsspec.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH 'dummy_extension:/hello.world'; diff --git a/parser/testdata/corpus/sql/attach/attach_hidden.test b/parser/testdata/corpus/sql/attach/attach_hidden.test index 53ec331..6cbf5c3 100644 --- a/parser/testdata/corpus/sql/attach/attach_hidden.test +++ b/parser/testdata/corpus/sql/attach/attach_hidden.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_hidden.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS hidden_db (HIDDEN true); @@ -15,6 +15,10 @@ SELECT database_name FROM duckdb_tables() WHERE database_name = 'hidden_db' -- ok == +SELECT database_name FROM pragma_database_size() WHERE database_name = 'hidden_db' +-- +ok +== CREATE TABLE hidden_db.main.tbl AS SELECT 42 AS i; -- ok @@ -23,6 +27,22 @@ SELECT * FROM hidden_db.main.tbl -- ok == +ATTACH ':memory:' AS shown_db; +-- +ok +== +CREATE TABLE shown_db.main.shown_tbl AS SELECT 42 AS i; +-- +ok +== +SELECT * FROM shown_tbl +-- +ok +== +DETACH shown_db; +-- +ok +== DETACH hidden_db; -- ok diff --git a/parser/testdata/corpus/sql/attach/attach_home_directory.test b/parser/testdata/corpus/sql/attach/attach_home_directory.test index c41d557..4467e88 100644 --- a/parser/testdata/corpus/sql/attach/attach_home_directory.test +++ b/parser/testdata/corpus/sql/attach/attach_home_directory.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_home_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/home_dir.db' AS s1 diff --git a/parser/testdata/corpus/sql/attach/attach_huggingface_index.test b/parser/testdata/corpus/sql/attach/attach_huggingface_index.test index 65aff21..b7f6d5c 100644 --- a/parser/testdata/corpus/sql/attach/attach_huggingface_index.test +++ b/parser/testdata/corpus/sql/attach/attach_huggingface_index.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_huggingface_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/huggingface_index.db' diff --git a/parser/testdata/corpus/sql/attach/attach_icu_collation.test b/parser/testdata/corpus/sql/attach/attach_icu_collation.test index e3e2f3e..bdfc47e 100644 --- a/parser/testdata/corpus/sql/attach/attach_icu_collation.test +++ b/parser/testdata/corpus/sql/attach/attach_icu_collation.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_icu_collation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/german_collation.db' AS db diff --git a/parser/testdata/corpus/sql/attach/attach_if_not_exists.test b/parser/testdata/corpus/sql/attach/attach_if_not_exists.test index 0ead967..8fb4552 100644 --- a/parser/testdata/corpus/sql/attach/attach_if_not_exists.test +++ b/parser/testdata/corpus/sql/attach/attach_if_not_exists.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_if_not_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_if_not_exists.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_if_not_exists_detach.test b/parser/testdata/corpus/sql/attach/attach_if_not_exists_detach.test index 66f3524..fc0b02b 100644 --- a/parser/testdata/corpus/sql/attach/attach_if_not_exists_detach.test +++ b/parser/testdata/corpus/sql/attach/attach_if_not_exists_detach.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_if_not_exists_detach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_if_not_exists_detach.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_index.test b/parser/testdata/corpus/sql/attach/attach_index.test index 03bab70..f8a13fe 100644 --- a/parser/testdata/corpus/sql/attach/attach_index.test +++ b/parser/testdata/corpus/sql/attach/attach_index.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_index_db.db' diff --git a/parser/testdata/corpus/sql/attach/attach_issue16122.test b/parser/testdata/corpus/sql/attach/attach_issue16122.test index 4f68418..e2b813b 100644 --- a/parser/testdata/corpus/sql/attach/attach_issue16122.test +++ b/parser/testdata/corpus/sql/attach/attach_issue16122.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_issue16122.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table mytable (C1 VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/attach/attach_issue7567.test b/parser/testdata/corpus/sql/attach/attach_issue7567.test index 18dd390..3acf525 100644 --- a/parser/testdata/corpus/sql/attach/attach_issue7567.test +++ b/parser/testdata/corpus/sql/attach/attach_issue7567.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_issue7567.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach ':memory:' as test; diff --git a/parser/testdata/corpus/sql/attach/attach_issue7711.test b/parser/testdata/corpus/sql/attach/attach_issue7711.test index d78472c..2567ec3 100644 --- a/parser/testdata/corpus/sql/attach/attach_issue7711.test +++ b/parser/testdata/corpus/sql/attach/attach_issue7711.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_issue7711.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit detach test; diff --git a/parser/testdata/corpus/sql/attach/attach_issue_21491.test b/parser/testdata/corpus/sql/attach/attach_issue_21491.test index a853419..e020425 100644 --- a/parser/testdata/corpus/sql/attach/attach_issue_21491.test +++ b/parser/testdata/corpus/sql/attach/attach_issue_21491.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_issue_21491.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH unknown_scalar('test.db') AS db; diff --git a/parser/testdata/corpus/sql/attach/attach_issue_7660.test b/parser/testdata/corpus/sql/attach/attach_issue_7660.test index 5125bcf..014ef8f 100644 --- a/parser/testdata/corpus/sql/attach/attach_issue_7660.test +++ b/parser/testdata/corpus/sql/attach/attach_issue_7660.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_issue_7660.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl1 as select 1 as a; diff --git a/parser/testdata/corpus/sql/attach/attach_lambda_view.test b/parser/testdata/corpus/sql/attach/attach_lambda_view.test index 1aadbff..8c5dca6 100644 --- a/parser/testdata/corpus/sql/attach/attach_lambda_view.test +++ b/parser/testdata/corpus/sql/attach/attach_lambda_view.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_lambda_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/version_1_{i}_0.db' (STORAGE_VERSION 'v1.{i}.0'); diff --git a/parser/testdata/corpus/sql/attach/attach_macros.test b/parser/testdata/corpus/sql/attach/attach_macros.test index a86fdcb..e12a072 100644 --- a/parser/testdata/corpus/sql/attach/attach_macros.test +++ b/parser/testdata/corpus/sql/attach/attach_macros.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_macros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS db1; diff --git a/parser/testdata/corpus/sql/attach/attach_modify_multiple_databases.test b/parser/testdata/corpus/sql/attach/attach_modify_multiple_databases.test index 3ea4ec9..8fe3905 100644 --- a/parser/testdata/corpus/sql/attach/attach_modify_multiple_databases.test +++ b/parser/testdata/corpus/sql/attach/attach_modify_multiple_databases.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_modify_multiple_databases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE ':memory:' AS database; @@ -19,3 +19,19 @@ INSERT INTO integers SELECT * FROM range(10); -- ok == +CREATE TEMP TABLE tmp AS SELECT * FROM range(3) t(i); +-- +ok +== +INSERT INTO database.integers SELECT * FROM tmp; +-- +ok +== +INSERT INTO tmp VALUES (3); +-- +ok +== +INSERT INTO integers SELECT * FROM tmp; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/attach_multi_identifiers.test b/parser/testdata/corpus/sql/attach/attach_multi_identifiers.test index 8c694fe..5e22fa5 100644 --- a/parser/testdata/corpus/sql/attach/attach_multi_identifiers.test +++ b/parser/testdata/corpus/sql/attach/attach_multi_identifiers.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_multi_identifiers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS db2; diff --git a/parser/testdata/corpus/sql/attach/attach_nested_types.test b/parser/testdata/corpus/sql/attach/attach_nested_types.test index 3676edb..2296155 100644 --- a/parser/testdata/corpus/sql/attach/attach_nested_types.test +++ b/parser/testdata/corpus/sql/attach/attach_nested_types.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_nested_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA database.schema; diff --git a/parser/testdata/corpus/sql/attach/attach_new_compression.test b/parser/testdata/corpus/sql/attach/attach_new_compression.test index c027254..57607e6 100644 --- a/parser/testdata/corpus/sql/attach/attach_new_compression.test +++ b/parser/testdata/corpus/sql/attach/attach_new_compression.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_new_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_new_compression.db' AS db1 (STORAGE_VERSION 'v1.0.0'); diff --git a/parser/testdata/corpus/sql/attach/attach_no_wal_writes_mode.test b/parser/testdata/corpus/sql/attach/attach_no_wal_writes_mode.test index ec814c4..df86878 100644 --- a/parser/testdata/corpus/sql/attach/attach_no_wal_writes_mode.test +++ b/parser/testdata/corpus/sql/attach/attach_no_wal_writes_mode.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_no_wal_writes_mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads = 1; diff --git a/parser/testdata/corpus/sql/attach/attach_null.test b/parser/testdata/corpus/sql/attach/attach_null.test index 5b58481..ea64525 100644 --- a/parser/testdata/corpus/sql/attach/attach_null.test +++ b/parser/testdata/corpus/sql/attach/attach_null.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_new_compression.db' AS db1 (TYPE NULL); diff --git a/parser/testdata/corpus/sql/attach/attach_or_replace.test b/parser/testdata/corpus/sql/attach/attach_or_replace.test index ed41c4d..a3d6323 100644 --- a/parser/testdata/corpus/sql/attach/attach_or_replace.test +++ b/parser/testdata/corpus/sql/attach/attach_or_replace.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_or_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_or_replace.db' AS db1 (STORAGE_VERSION 'v2.0.0'); diff --git a/parser/testdata/corpus/sql/attach/attach_persistent.test b/parser/testdata/corpus/sql/attach/attach_persistent.test index bad89cf..be30e9c 100644 --- a/parser/testdata/corpus/sql/attach/attach_persistent.test +++ b/parser/testdata/corpus/sql/attach/attach_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/persistent_attach.db' diff --git a/parser/testdata/corpus/sql/attach/attach_pragma_storage_info.test b/parser/testdata/corpus/sql/attach/attach_pragma_storage_info.test index b5da5e5..3ac6f1b 100644 --- a/parser/testdata/corpus/sql/attach/attach_pragma_storage_info.test +++ b/parser/testdata/corpus/sql/attach/attach_pragma_storage_info.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_pragma_storage_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/database.db' as persistent; diff --git a/parser/testdata/corpus/sql/attach/attach_prefetch_header.test b/parser/testdata/corpus/sql/attach/attach_prefetch_header.test index 1054f2f..7fe04a1 100644 --- a/parser/testdata/corpus/sql/attach/attach_prefetch_header.test +++ b/parser/testdata/corpus/sql/attach/attach_prefetch_header.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_prefetch_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_prefetch_header.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_read_only.test b/parser/testdata/corpus/sql/attach/attach_read_only.test index e6f5ba0..44b1564 100644 --- a/parser/testdata/corpus/sql/attach/attach_read_only.test +++ b/parser/testdata/corpus/sql/attach/attach_read_only.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_read_only.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS db1 (READONLY 1) diff --git a/parser/testdata/corpus/sql/attach/attach_read_only_transaction.test b/parser/testdata/corpus/sql/attach/attach_read_only_transaction.test index 6e412e5..dc2a012 100644 --- a/parser/testdata/corpus/sql/attach/attach_read_only_transaction.test +++ b/parser/testdata/corpus/sql/attach/attach_read_only_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_read_only_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO db1.integers VALUES (42); diff --git a/parser/testdata/corpus/sql/attach/attach_remote_http_logging.test b/parser/testdata/corpus/sql/attach/attach_remote_http_logging.test new file mode 100644 index 0000000..87fe3b6 --- /dev/null +++ b/parser/testdata/corpus/sql/attach/attach_remote_http_logging.test @@ -0,0 +1,25 @@ +# source: test/sql/attach/attach_remote_http_logging.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL enable_logging('HTTP') +-- +ok +== +ATTACH 'https://blobs.duckdb.org/databases/stations.duckdb' AS stations (READ_ONLY) +-- +ok +== +SELECT count(*) FROM stations.stations +-- +ok +== +SELECT count(*) > 1 FROM duckdb_logs_parsed('HTTP') WHERE request.type = 'GET' +-- +ok +== +DETACH stations +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/attach_replay_with_no_wal_writes.test b/parser/testdata/corpus/sql/attach/attach_replay_with_no_wal_writes.test index 2aa1ac9..5bfaa44 100644 --- a/parser/testdata/corpus/sql/attach/attach_replay_with_no_wal_writes.test +++ b/parser/testdata/corpus/sql/attach/attach_replay_with_no_wal_writes.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_replay_with_no_wal_writes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/wal_writes.db' AS wal_writes; diff --git a/parser/testdata/corpus/sql/attach/attach_reserved.test b/parser/testdata/corpus/sql/attach/attach_reserved.test index 5d7ce2f..58ec6fd 100644 --- a/parser/testdata/corpus/sql/attach/attach_reserved.test +++ b/parser/testdata/corpus/sql/attach/attach_reserved.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_reserved.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE '{TEST_DIR}/temp.db'; diff --git a/parser/testdata/corpus/sql/attach/attach_row_group_size.test b/parser/testdata/corpus/sql/attach/attach_row_group_size.test index 4585675..3f9ac7c 100644 --- a/parser/testdata/corpus/sql/attach/attach_row_group_size.test +++ b/parser/testdata/corpus/sql/attach/attach_row_group_size.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_row_group_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_row_group_size.db' AS db1 (STORAGE_VERSION 'v1.0.0', ROW_GROUP_SIZE 245760); diff --git a/parser/testdata/corpus/sql/attach/attach_row_group_size_decreasing.test b/parser/testdata/corpus/sql/attach/attach_row_group_size_decreasing.test index e961a04..eb62520 100644 --- a/parser/testdata/corpus/sql/attach/attach_row_group_size_decreasing.test +++ b/parser/testdata/corpus/sql/attach/attach_row_group_size_decreasing.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_row_group_size_decreasing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_row_group_size_decreasing.db' as test (ROW_GROUP_SIZE 4096); diff --git a/parser/testdata/corpus/sql/attach/attach_same_db.test b/parser/testdata/corpus/sql/attach/attach_same_db.test index c45c3a7..4d400de 100644 --- a/parser/testdata/corpus/sql/attach/attach_same_db.test +++ b/parser/testdata/corpus/sql/attach/attach_same_db.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_same_db.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_same_db.db' AS db1 diff --git a/parser/testdata/corpus/sql/attach/attach_schema.test b/parser/testdata/corpus/sql/attach/attach_schema.test index 5d07a0a..3b2b538 100644 --- a/parser/testdata/corpus/sql/attach/attach_schema.test +++ b/parser/testdata/corpus/sql/attach/attach_schema.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA new_database.s1.xxx; diff --git a/parser/testdata/corpus/sql/attach/attach_sequence.test b/parser/testdata/corpus/sql/attach/attach_sequence.test index 2c585ec..4d80272 100644 --- a/parser/testdata/corpus/sql/attach/attach_sequence.test +++ b/parser/testdata/corpus/sql/attach/attach_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE '{TEST_DIR}/attach_seq.db' AS db1; diff --git a/parser/testdata/corpus/sql/attach/attach_serialize_dependency.test b/parser/testdata/corpus/sql/attach/attach_serialize_dependency.test index e99b34e..9ce6027 100644 --- a/parser/testdata/corpus/sql/attach/attach_serialize_dependency.test +++ b/parser/testdata/corpus/sql/attach/attach_serialize_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_serialize_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set storage_compatibility_version='latest'; diff --git a/parser/testdata/corpus/sql/attach/attach_show_all_tables.test b/parser/testdata/corpus/sql/attach/attach_show_all_tables.test index 916544a..362b57b 100644 --- a/parser/testdata/corpus/sql/attach/attach_show_all_tables.test +++ b/parser/testdata/corpus/sql/attach/attach_show_all_tables.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_show_all_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a INTEGER); diff --git a/parser/testdata/corpus/sql/attach/attach_show_table.test b/parser/testdata/corpus/sql/attach/attach_show_table.test index 23e2c62..531a84f 100644 --- a/parser/testdata/corpus/sql/attach/attach_show_table.test +++ b/parser/testdata/corpus/sql/attach/attach_show_table.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_show_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE db1.table_in_db1(i int); diff --git a/parser/testdata/corpus/sql/attach/attach_storage_version.test b/parser/testdata/corpus/sql/attach/attach_storage_version.test index 3e2a987..3a9a5ec 100644 --- a/parser/testdata/corpus/sql/attach/attach_storage_version.test +++ b/parser/testdata/corpus/sql/attach/attach_storage_version.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_storage_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/version_1_2_0.db' (STORAGE_VERSION 'v1.2.0'); diff --git a/parser/testdata/corpus/sql/attach/attach_table_constraints.test b/parser/testdata/corpus/sql/attach/attach_table_constraints.test index e561ca7..c3b0044 100644 --- a/parser/testdata/corpus/sql/attach/attach_table_constraints.test +++ b/parser/testdata/corpus/sql/attach/attach_table_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_table_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/constraint_test.db' as test diff --git a/parser/testdata/corpus/sql/attach/attach_table_ddl.test b/parser/testdata/corpus/sql/attach/attach_table_ddl.test index e2b8b97..b94273a 100644 --- a/parser/testdata/corpus/sql/attach/attach_table_ddl.test +++ b/parser/testdata/corpus/sql/attach/attach_table_ddl.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_table_ddl.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE {prefix}.integers(i INTEGER) diff --git a/parser/testdata/corpus/sql/attach/attach_table_info.test b/parser/testdata/corpus/sql/attach/attach_table_info.test index 05de953..8430178 100644 --- a/parser/testdata/corpus/sql/attach/attach_table_info.test +++ b/parser/testdata/corpus/sql/attach/attach_table_info.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_table_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE new_database.integers(i INTEGER) diff --git a/parser/testdata/corpus/sql/attach/attach_to_external_resource.test b/parser/testdata/corpus/sql/attach/attach_to_external_resource.test new file mode 100644 index 0000000..8e9980d --- /dev/null +++ b/parser/testdata/corpus/sql/attach/attach_to_external_resource.test @@ -0,0 +1,228 @@ +# source: test/sql/attach/attach_to_external_resource.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL quack_serve(token='test_token'); +-- +ok +== +CREATE MACRO qk_create(p) AS TABLE SELECT MAP {'id': 'q1'} AS handle; +-- +ok +== +CREATE MACRO qk_status(h) AS TABLE + SELECT 'ready' AS state, MAP {'uri': 'localhost', 'attached_db_type': 'quack', 'token': 'test_token'} AS result; +-- +ok +== +CREATE MACRO qk_destroy(h) AS TABLE SELECT 'destroyed' AS status; +-- +ok +== +CALL register_external_resource_type('quack@local', kind := 'catalog', create_function := 'qk_create', + status_function := 'qk_status', destroy_function := 'qk_destroy'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' AS qk; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'qk'; +-- +ok +== +DETACH qk; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' (INSTANCE 'r7i.16xlarge', REGION 'eu-west-1', SPOT, ANYTHING 'else') AS qk2; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'qk2'; +-- +ok +== +DETACH qk2; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS shared_res; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE shared_res AS qk3; +-- +ok +== +DETACH qk3; +-- +ok +== +SELECT count(*) FROM duckdb_external_resources() WHERE name = 'shared_res'; +-- +ok +== +DESTROY EXTERNAL RESOURCE shared_res; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' (REGION NULL) AS qknull; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local'; +-- +error: Parser Error: syntax error at or near ";" +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' (READ_ONLY); +-- +error: Parser Error: syntax error at or near ";" +== +ATTACH TO EXTERNAL RESOURCE shared_res; +-- +error: Parser Error: syntax error at or near ";" +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'does-not-exist' AS bad; +-- +ok +== +CONNECT TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' AS y; +-- +error: Parser Error: syntax error at or near "AS" +== +CREATE MACRO qk_status_null(h) AS TABLE + SELECT 'ready' AS state, MAP {'uri': NULL, 'attached_db_type': 'quack'} AS result; +-- +ok +== +CALL register_external_resource_type('quacknull@local', kind := 'catalog', create_function := 'qk_create', + status_function := 'qk_status_null', destroy_function := 'qk_destroy'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quacknull@local' AS qkn; +-- +ok +== +CONNECT TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local'; +-- +ok +== +DISCONNECT; +-- +ok +== +CREATE MACRO qk_destroy_fail(h) AS TABLE SELECT CAST('boom' AS INTEGER) AS x; +-- +ok +== +CALL register_external_resource_type('quackfail@local', kind := 'catalog', create_function := 'qk_create', + status_function := 'qk_status', destroy_function := 'qk_destroy_fail'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackfail@local' AS qkf; +-- +ok +== +DETACH qkf; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'qkf'; +-- +ok +== +CREATE TABLE victim(x INTEGER); +-- +ok +== +CALL register_external_resource_type('quackinj@local', kind := 'catalog', create_function := 'qk_create', + status_function := 'qk_status', destroy_function := 'qk_destroy(1); DROP TABLE victim; --'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackinj@local' AS qki; +-- +ok +== +DETACH qki; +-- +ok +== +SELECT count(*) FROM duckdb_tables() WHERE table_name = 'victim'; +-- +ok +== +CREATE SEQUENCE destroy_seq; +-- +ok +== +CREATE MACRO qk_destroy_count(h) AS TABLE SELECT nextval('destroy_seq') AS status; +-- +ok +== +CALL register_external_resource_type('quackcount@local', kind := 'catalog', create_function := 'qk_create', + status_function := 'qk_status', destroy_function := 'qk_destroy_count'); +-- +ok +== +ATTACH ':memory:' AS taken; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackcount@local' AS taken; +-- +ok +== +SELECT currval('destroy_seq'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackcount@local' AS qkr; +-- +ok +== +ATTACH OR REPLACE ':memory:' AS qkr; +-- +ok +== +DETACH qkr; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackfail@local' AS qkr2; +-- +ok +== +ATTACH OR REPLACE ':memory:' AS qkr2; +-- +ok +== +DETACH qkr2; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackcount@local' AS qtx; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'qtx'; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackcount@local' AS qtx2; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'qtx2'; +-- +ok +== +DETACH qtx2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/attach_transactionality.test b/parser/testdata/corpus/sql/attach/attach_transactionality.test index 759f92c..755c098 100644 --- a/parser/testdata/corpus/sql/attach/attach_transactionality.test +++ b/parser/testdata/corpus/sql/attach/attach_transactionality.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_transactionality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_transaction.db' diff --git a/parser/testdata/corpus/sql/attach/attach_use_rollback.test b/parser/testdata/corpus/sql/attach/attach_use_rollback.test index 2ad03ec..63aaa84 100644 --- a/parser/testdata/corpus/sql/attach/attach_use_rollback.test +++ b/parser/testdata/corpus/sql/attach/attach_use_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_use_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit begin; diff --git a/parser/testdata/corpus/sql/attach/attach_use_string_literal.test b/parser/testdata/corpus/sql/attach/attach_use_string_literal.test new file mode 100644 index 0000000..d0e9d89 --- /dev/null +++ b/parser/testdata/corpus/sql/attach/attach_use_string_literal.test @@ -0,0 +1,101 @@ +# source: test/sql/attach/attach_use_string_literal.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA db2.s2; +-- +ok +== +ATTACH ':memory:' AS "my db"; +-- +ok +== +ATTACH ':memory:' AS "it's"; +-- +ok +== +ATTACH ':memory:' AS "my""db"; +-- +ok +== +ATTACH ':memory:' AS db3; +-- +ok +== +USE 'db2' +-- +ok +== +SELECT current_catalog(), current_schema() +-- +ok +== +USE 's2' +-- +ok +== +USE 'db3' +-- +ok +== +USE "db2" +-- +ok +== +USE "db2"."s2" +-- +ok +== +USE 'my db' +-- +ok +== +USE "it's" +-- +ok +== +USE 'it''s' +-- +ok +== +USE 'my"db' +-- +ok +== +USE "my""db" +-- +ok +== +USE 'db2.s2' +-- +ok +== +USE 'db2'.s2 +-- +error: Parser Error: syntax error at or near "." +== +USE 'db2'.'s2' +-- +error: Parser Error: syntax error at or near "." +== +USE db2.'s2' +-- +error: Parser Error: syntax error at or near "'s2'" +== +USE db2.s2.'x' +-- +error: Parser Error: syntax error at or near "'x'" +== +USE '' +-- +error: Parser Error: Unexpected dot - empty CatalogSearchEntry +== +USE 'temp' +-- +ok +== +USE 'nonexistent' +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test.metadata.json b/parser/testdata/corpus/sql/attach/attach_use_string_literal.test.metadata.json similarity index 74% rename from parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test.metadata.json rename to parser/testdata/corpus/sql/attach/attach_use_string_literal.test.metadata.json index c329fb4..0f25e7c 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test.metadata.json +++ b/parser/testdata/corpus/sql/attach/attach_use_string_literal.test.metadata.json @@ -1,5 +1,5 @@ { "todo": { - "c2d50285cb7509bb": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + "ad09cf5c4ad64e48": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" } } diff --git a/parser/testdata/corpus/sql/attach/attach_view_search_path.test b/parser/testdata/corpus/sql/attach/attach_view_search_path.test index 371f1af..8a0f49d 100644 --- a/parser/testdata/corpus/sql/attach/attach_view_search_path.test +++ b/parser/testdata/corpus/sql/attach/attach_view_search_path.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_view_search_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE '{TEST_DIR}/view_search_path.db' AS view_search_path; diff --git a/parser/testdata/corpus/sql/attach/attach_views.test b/parser/testdata/corpus/sql/attach/attach_views.test index ce1220e..d928be8 100644 --- a/parser/testdata/corpus/sql/attach/attach_views.test +++ b/parser/testdata/corpus/sql/attach/attach_views.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT 42 i diff --git a/parser/testdata/corpus/sql/attach/attach_volatile_expression.test b/parser/testdata/corpus/sql/attach/attach_volatile_expression.test new file mode 100644 index 0000000..5615bb1 --- /dev/null +++ b/parser/testdata/corpus/sql/attach/attach_volatile_expression.test @@ -0,0 +1,29 @@ +# source: test/sql/attach/attach_volatile_expression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH (CASE WHEN random() < 2 THEN ':memory:' END) AS volatile_db; +-- +ok +== +CREATE TABLE volatile_db.t AS SELECT 42 AS i; +-- +ok +== +SELECT i FROM volatile_db.t; +-- +ok +== +DETACH volatile_db; +-- +ok +== +ATTACH ':memory:' AS volatile_opt (BLOCK_SIZE (262144 + (random() * 0)::INTEGER)); +-- +ok +== +DETACH volatile_opt; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/attach_wal_alter.test b/parser/testdata/corpus/sql/attach/attach_wal_alter.test index 16e93b1..6146080 100644 --- a/parser/testdata/corpus/sql/attach/attach_wal_alter.test +++ b/parser/testdata/corpus/sql/attach/attach_wal_alter.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_wal_alter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE '{TEST_DIR}/wal_crash.db' as db1; diff --git a/parser/testdata/corpus/sql/attach/attach_wal_alter_sequence.test b/parser/testdata/corpus/sql/attach/attach_wal_alter_sequence.test index 496f64f..5461ba0 100644 --- a/parser/testdata/corpus/sql/attach/attach_wal_alter_sequence.test +++ b/parser/testdata/corpus/sql/attach/attach_wal_alter_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/attach/attach_wal_alter_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/attach_wal_with_sequence.db' as db1; diff --git a/parser/testdata/corpus/sql/attach/detach_keyword.test b/parser/testdata/corpus/sql/attach/detach_keyword.test index f5da9ae..3ee194d 100644 --- a/parser/testdata/corpus/sql/attach/detach_keyword.test +++ b/parser/testdata/corpus/sql/attach/detach_keyword.test @@ -1,6 +1,6 @@ # source: test/sql/attach/detach_keyword.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH DATABASE ':memory:' AS varchar; diff --git a/parser/testdata/corpus/sql/attach/detach_manager_default_database.test b/parser/testdata/corpus/sql/attach/detach_manager_default_database.test index 709874d..1899b53 100644 --- a/parser/testdata/corpus/sql/attach/detach_manager_default_database.test +++ b/parser/testdata/corpus/sql/attach/detach_manager_default_database.test @@ -1,6 +1,6 @@ # source: test/sql/attach/detach_manager_default_database.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS other; diff --git a/parser/testdata/corpus/sql/attach/external_resource_attach_failure.test b/parser/testdata/corpus/sql/attach/external_resource_attach_failure.test new file mode 100644 index 0000000..2738870 --- /dev/null +++ b/parser/testdata/corpus/sql/attach/external_resource_attach_failure.test @@ -0,0 +1,162 @@ +# source: test/sql/attach/external_resource_attach_failure.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL enable_logging('ExternalResource', storage='memory'); +-- +ok +== +ATTACH '{TEST_DIR}/er_taken.db' AS seed; +-- +ok +== +CREATE TABLE seed.t AS SELECT 42 AS x; +-- +ok +== +DETACH seed; +-- +ok +== +CREATE MACRO t_create(p) AS TABLE SELECT MAP {'id': 't1'} AS handle; +-- +ok +== +CREATE MACRO t_status(h) AS TABLE SELECT 'ready' AS state, + MAP {'uri': '{TEST_DIR}/er_taken.db', 'attached_db_type': 'duckdb'} AS result; +-- +ok +== +CREATE MACRO t_destroy(h) AS TABLE SELECT nextval('destroy_seq') AS status; +-- +ok +== +CALL register_external_resource_type('taken@local', kind := 'catalog', create_function := 't_create', + status_function := 't_status', destroy_function := 't_destroy'); +-- +ok +== +ATTACH '{TEST_DIR}/er_taken.db' AS holder; +-- +ok +== +CALL truncate_duckdb_logs(); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'taken@local' AS blocked; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'blocked'; +-- +ok +== +SELECT operation, outcome FROM duckdb_logs_parsed('ExternalResource') ORDER BY timestamp; +-- +ok +== +DETACH holder; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'taken@local' AS ok_now; +-- +ok +== +SELECT x FROM ok_now.t; +-- +ok +== +DETACH ok_now; +-- +ok +== +CREATE MACRO bad_status(h) AS TABLE SELECT 'ready' AS state, + MAP {'uri': '{TEST_DIR}/er_taken.db', 'attached_db_type': 'duckdb', 'recovery_mode': 'bogus'} AS result; +-- +ok +== +CALL register_external_resource_type('badopt@local', kind := 'catalog', create_function := 't_create', + status_function := 'bad_status', destroy_function := 't_destroy'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'badopt@local' AS rejected; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'rejected'; +-- +ok +== +CREATE EXTERNAL RESOURCE 'taken@local' AS shared; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE shared AS b1 (READ_ONLY); +-- +ok +== +ATTACH TO EXTERNAL RESOURCE shared AS b2 (READ_ONLY); +-- +ok +== +ATTACH ':memory:' AS unrelated; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name IN ('b1', 'b2', 'unrelated'); +-- +ok +== +DESTROY EXTERNAL RESOURCE shared; +-- +ok +== +SELECT count(*) FILTER (database_name IN ('b1', 'b2')), count(*) FILTER (database_name = 'unrelated') +FROM duckdb_databases(); +-- +ok +== +CREATE EXTERNAL RESOURCE 'taken@local' AS borrowed; +-- +ok +== +ATTACH ':memory:' AS occupied; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE borrowed AS occupied; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE borrowed AS other (VACUUM_REBUILD_INDEXES 'notanumber'); +-- +ok +== +SELECT count(*) FROM duckdb_logs_parsed('ExternalResource') WHERE operation = 'destroy'; +-- +ok +== +SELECT count(*) FROM duckdb_external_resources() WHERE name = 'borrowed'; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE borrowed AS still_works (READ_ONLY); +-- +ok +== +SELECT x FROM still_works.t; +-- +ok +== +DETACH still_works; +-- +ok +== +DESTROY EXTERNAL RESOURCE borrowed; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/external_resource_discovery.test b/parser/testdata/corpus/sql/attach/external_resource_discovery.test index 4454790..dcd29f0 100644 --- a/parser/testdata/corpus/sql/attach/external_resource_discovery.test +++ b/parser/testdata/corpus/sql/attach/external_resource_discovery.test @@ -1,12 +1,8 @@ # source: test/sql/attach/external_resource_discovery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE MACRO qk_create(p) AS TABLE SELECT MAP {'id': 'q1'} AS handle; --- -ok -== CREATE MACRO qk_status(h) AS TABLE SELECT 'ready' AS state, MAP {'uri': 'localhost', 'attached_db_type': 'quack'} AS result; -- diff --git a/parser/testdata/corpus/sql/attach/external_resource_lifecycle.test b/parser/testdata/corpus/sql/attach/external_resource_lifecycle.test new file mode 100644 index 0000000..61a604d --- /dev/null +++ b/parser/testdata/corpus/sql/attach/external_resource_lifecycle.test @@ -0,0 +1,170 @@ +# source: test/sql/attach/external_resource_lifecycle.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO qk_destroy(h) AS TABLE SELECT 'gone' AS status; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS beefy; +-- +ok +== +DESTROY EXTERNAL RESOURCE beefy; +-- +ok +== +REGISTER EXTERNAL RESOURCE 'quack@local' AS adopted FROM MAP {'id': 'q1'}; +-- +ok +== +DESTROY EXTERNAL RESOURCE adopted; +-- +ok +== +SELECT resource_name, outcome FROM duckdb_logs_parsed('ExternalResource') +WHERE operation = 'destroy' ORDER BY timestamp; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local'; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS r1; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS r2; +-- +ok +== +SELECT name, type, uri, attached_db_type FROM duckdb_external_resources() ORDER BY name; +-- +ok +== +DESTROY EXTERNAL RESOURCE r1; +-- +ok +== +SELECT name FROM duckdb_external_resources() ORDER BY name; +-- +ok +== +SHOW EXTERNAL RESOURCES; +-- +ok +== +SELECT name, type, managed FROM duckdb_external_resources(discover := true) ORDER BY name; +-- +ok +== +DESTROY EXTERNAL RESOURCE r2; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS shared; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE shared AS borrow1; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'borrow1'; +-- +ok +== +DETACH borrow1; +-- +ok +== +SELECT count(*) FROM duckdb_external_resources() WHERE name = 'shared'; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE shared AS borrow2; +-- +ok +== +DETACH borrow2; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE ghost AS z; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS busy; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE busy AS still_here1; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE busy AS still_here2; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS bystander; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE bystander AS untouched; +-- +ok +== +DESTROY EXTERNAL RESOURCE busy; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name IN ('still_here1', 'still_here2'); +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'untouched'; +-- +ok +== +DESTROY EXTERNAL RESOURCE bystander; +-- +ok +== +CREATE EXTERNAL RESOURCE 'quack@local' AS pinned; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned AS in_use; +-- +ok +== +USE in_use; +-- +ok +== +DESTROY EXTERNAL RESOURCE pinned; +-- +ok +== +SELECT count(*) FROM duckdb_external_resources() WHERE name = 'pinned'; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'in_use'; +-- +ok +== +ATTACH ':memory:' AS scratch; +-- +ok +== +USE scratch; +-- +ok +== +DETACH in_use; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/external_resource_logging.test b/parser/testdata/corpus/sql/attach/external_resource_logging.test new file mode 100644 index 0000000..1e086cd --- /dev/null +++ b/parser/testdata/corpus/sql/attach/external_resource_logging.test @@ -0,0 +1,84 @@ +# source: test/sql/attach/external_resource_logging.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE EXTERNAL RESOURCE 'quack@local' AS yoooo; +-- +ok +== +DESTROY EXTERNAL RESOURCE yoooo; +-- +ok +== +SELECT operation, outcome, coalesce(resource_type, ''), coalesce(resource_name, ''), + coalesce(error, ''), extra_info['state'] +FROM duckdb_logs_parsed('ExternalResource') +ORDER BY timestamp; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' AS anon; +-- +ok +== +DETACH anon; +-- +ok +== +SELECT operation, resource_name FROM duckdb_logs_parsed('ExternalResource') ORDER BY timestamp; +-- +ok +== +SELECT operation, resource_name IS NULL FROM duckdb_logs_parsed('ExternalResource') ORDER BY timestamp; +-- +ok +== +CREATE MACRO qk_create_fail(p) AS TABLE SELECT CAST('boom' AS INTEGER) AS handle; +-- +ok +== +CALL register_external_resource_type('quackfail@local', kind := 'catalog', create_function := 'qk_create_fail', + status_function := 'qk_status', destroy_function := 'qk_destroy'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quackfail@local' AS bad; +-- +ok +== +SELECT operation, outcome, error IS NOT NULL +FROM duckdb_logs_parsed('ExternalResource') +WHERE resource_type = 'quackfail@local'; +-- +ok +== +CREATE MACRO nouri_status(h) AS TABLE SELECT 'ready' AS state, MAP {'foo': 'bar'} AS result; +-- +ok +== +CALL register_external_resource_type('nouri@local', kind := 'compute', create_function := 'qk_create', + status_function := 'nouri_status', destroy_function := 'qk_destroy'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'nouri@local' AS nouri; +-- +ok +== +REGISTER EXTERNAL RESOURCE 'nouri@local' AS adopted FROM MAP {'id': 'q1'}; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'quack@local' AS repl_db; +-- +ok +== +ATTACH OR REPLACE ':memory:' AS repl_db; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'repl_db'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/external_resource_null_handle.test b/parser/testdata/corpus/sql/attach/external_resource_null_handle.test new file mode 100644 index 0000000..f18905e --- /dev/null +++ b/parser/testdata/corpus/sql/attach/external_resource_null_handle.test @@ -0,0 +1,45 @@ +# source: test/sql/attach/external_resource_null_handle.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SEQUENCE cseq; +-- +ok +== +CREATE SEQUENCE dseq; +-- +ok +== +CREATE MACRO c1(p) AS TABLE SELECT CASE WHEN nextval('cseq') > 0 THEN NULL::MAP(VARCHAR, VARCHAR) END AS handle; +-- +ok +== +CREATE MACRO d1(h) AS TABLE SELECT nextval('dseq') AS status; +-- +ok +== +CREATE MACRO s1(h) AS TABLE SELECT 'ready' AS state, MAP {'uri': ':memory:', 'attached_db_type': 'duckdb'} AS result; +-- +ok +== +CALL register_external_resource_type('t', kind := 'catalog', create_function := 'c1', status_function := 's1', destroy_function := 'd1'); +-- +ok +== +CREATE EXTERNAL RESOURCE 't' AS r; +-- +ok +== +FROM create_external_resource('t'); +-- +ok +== +CALL register_external_resource('t', 'n1', NULL); +-- +ok +== +SELECT count(*) FROM duckdb_external_resources() WHERE name IN ('r', 'n1'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/external_resource_option_collision.test b/parser/testdata/corpus/sql/attach/external_resource_option_collision.test new file mode 100644 index 0000000..fe20edd --- /dev/null +++ b/parser/testdata/corpus/sql/attach/external_resource_option_collision.test @@ -0,0 +1,111 @@ +# source: test/sql/attach/external_resource_option_collision.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/er_collision.db' AS seed; +-- +ok +== +CREATE MACRO c_create(p) AS TABLE SELECT MAP {'id': 'c1'} AS handle; +-- +ok +== +CREATE MACRO c_destroy(h) AS TABLE SELECT nextval('destroy_seq') AS status; +-- +ok +== +CREATE MACRO ro_status(h) AS TABLE SELECT 'ready' AS state, + MAP {'uri': '{TEST_DIR}/er_collision.db', 'attached_db_type': 'duckdb', 'read_only': 'true'} AS result; +-- +ok +== +CALL register_external_resource_type('ro@local', kind := 'catalog', create_function := 'c_create', + status_function := 'ro_status', destroy_function := 'c_destroy'); +-- +ok +== +CREATE EXTERNAL RESOURCE 'ro@local' AS pinned_ro; +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned_ro AS b1 (READ_ONLY 0); +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned_ro AS b1 (READ_ONLY 1); +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned_ro AS b1 (READONLY 0); +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned_ro AS b1 (READWRITE 1); +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned_ro AS b1 (READ_WRITE 0); +-- +ok +== +ATTACH TO EXTERNAL RESOURCE pinned_ro AS b1 (TYPE 'duckdb'); +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'b1'; +-- +ok +== +DESTROY EXTERNAL RESOURCE pinned_ro; +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'ro@local' AS fresh (READ_ONLY 0); +-- +ok +== +CREATE MACRO null_status(h) AS TABLE SELECT 'ready' AS state, + MAP {'uri': '{TEST_DIR}/er_collision.db', 'attached_db_type': 'duckdb', 'read_only': NULL} AS result; +-- +ok +== +CALL register_external_resource_type('null@local', kind := 'catalog', create_function := 'c_create', + status_function := 'null_status', destroy_function := 'c_destroy'); +-- +ok +== +ATTACH TO NEW TEMPORARY EXTERNAL RESOURCE 'null@local' AS nulled; +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name = 'nulled'; +-- +ok +== +CREATE MACRO plain_status(h) AS TABLE SELECT 'ready' AS state, + MAP {'uri': '{TEST_DIR}/er_collision.db', 'attached_db_type': 'duckdb'} AS result; +-- +ok +== +CALL register_external_resource_type('plain@local', kind := 'catalog', create_function := 'c_create', + status_function := 'plain_status', destroy_function := 'c_destroy'); +-- +ok +== +CREATE EXTERNAL RESOURCE 'plain@local' AS shared; +-- +ok +== +SELECT (SELECT x FROM b1.t), (SELECT x FROM b2.t); +-- +ok +== +SELECT count(*), bool_and(readonly) FROM duckdb_databases() WHERE database_name IN ('b1', 'b2'); +-- +ok +== +SELECT count(*) FROM duckdb_databases() WHERE database_name IN ('b1', 'b2'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/external_resource_statements.test b/parser/testdata/corpus/sql/attach/external_resource_statements.test index 6591436..604b94a 100644 --- a/parser/testdata/corpus/sql/attach/external_resource_statements.test +++ b/parser/testdata/corpus/sql/attach/external_resource_statements.test @@ -1,6 +1,6 @@ # source: test/sql/attach/external_resource_statements.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE EXTERNAL RESOURCE 'aws:ec2:quack' AS x (SPOT, REGION 'eu-west-1'); @@ -15,10 +15,6 @@ DESTROY EXTERNAL RESOURCE nope; -- ok == -SHOW EXTERNAL RESOURCES; --- -ok -== SHOW ALL EXTERNAL RESOURCES; -- ok @@ -31,10 +27,6 @@ REGISTER EXTERNAL RESOURCE 'aws:ec2:quack' AS x; -- error: Parser Error: syntax error at or near ";" == -CREATE TABLE t(i INTEGER); --- -ok -== SHOW ALL TABLES; -- ok diff --git a/parser/testdata/corpus/sql/attach/in_memory_attach.test b/parser/testdata/corpus/sql/attach/in_memory_attach.test index 0e6dee6..613c159 100644 --- a/parser/testdata/corpus/sql/attach/in_memory_attach.test +++ b/parser/testdata/corpus/sql/attach/in_memory_attach.test @@ -1,6 +1,6 @@ # source: test/sql/attach/in_memory_attach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO new_database.integers VALUES (42); diff --git a/parser/testdata/corpus/sql/attach/reattach_schema.test b/parser/testdata/corpus/sql/attach/reattach_schema.test index 7b68302..e320521 100644 --- a/parser/testdata/corpus/sql/attach/reattach_schema.test +++ b/parser/testdata/corpus/sql/attach/reattach_schema.test @@ -1,6 +1,6 @@ # source: test/sql/attach/reattach_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/reattach_schema.db' AS new_db; @@ -31,7 +31,7 @@ CREATE MACRO new_db.my_schema.one() AS (SELECT 1); -- ok == -CREATE MACRO new_db.my_schema.range(a) as TABLE SELECT * FROM range(a) +CREATE MACRO new_db.my_schema.range(a) as TABLE SELECT * FROM system.main.range(a) -- ok == @@ -99,3 +99,15 @@ SELECT * FROM range(3) -- ok == +CREATE MACRO recursive_range(a) AS TABLE SELECT * FROM system.main.range(a) +-- +ok +== +CREATE OR REPLACE MACRO recursive_range(a) AS TABLE SELECT * FROM recursive_range(a) +-- +ok +== +SELECT * FROM recursive_range(3) +-- +ok +== diff --git a/parser/testdata/corpus/sql/attach/remote_file_concurrently.test b/parser/testdata/corpus/sql/attach/remote_file_concurrently.test index e30fc8d..416ef34 100644 --- a/parser/testdata/corpus/sql/attach/remote_file_concurrently.test +++ b/parser/testdata/corpus/sql/attach/remote_file_concurrently.test @@ -1,6 +1,6 @@ # source: test/sql/attach/remote_file_concurrently.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH 'https://raw.githubusercontent.com/duckdb/duckdb/main/data/attach_test/attach.db' AS db; diff --git a/parser/testdata/corpus/sql/attach/searchpath_fallback.test b/parser/testdata/corpus/sql/attach/searchpath_fallback.test index f790dca..11b00c9 100644 --- a/parser/testdata/corpus/sql/attach/searchpath_fallback.test +++ b/parser/testdata/corpus/sql/attach/searchpath_fallback.test @@ -1,6 +1,6 @@ # source: test/sql/attach/searchpath_fallback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS view_path_c1; diff --git a/parser/testdata/corpus/sql/attach/show_databases.test b/parser/testdata/corpus/sql/attach/show_databases.test index 46673a2..a859d55 100644 --- a/parser/testdata/corpus/sql/attach/show_databases.test +++ b/parser/testdata/corpus/sql/attach/show_databases.test @@ -1,6 +1,6 @@ # source: test/sql/attach/show_databases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SHOW DATABASES diff --git a/parser/testdata/corpus/sql/attach/show_schemas.test b/parser/testdata/corpus/sql/attach/show_schemas.test index 430a291..437166b 100644 --- a/parser/testdata/corpus/sql/attach/show_schemas.test +++ b/parser/testdata/corpus/sql/attach/show_schemas.test @@ -1,6 +1,6 @@ # source: test/sql/attach/show_schemas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SHOW SCHEMAS diff --git a/parser/testdata/corpus/sql/attach/system_catalog.test b/parser/testdata/corpus/sql/attach/system_catalog.test index e7d1b25..a9a6b70 100644 --- a/parser/testdata/corpus/sql/attach/system_catalog.test +++ b/parser/testdata/corpus/sql/attach/system_catalog.test @@ -1,6 +1,6 @@ # source: test/sql/attach/system_catalog.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DETACH DATABASE system diff --git a/parser/testdata/corpus/sql/binder/alias_error_10057.test b/parser/testdata/corpus/sql/binder/alias_error_10057.test index fcdb59b..4809d41 100644 --- a/parser/testdata/corpus/sql/binder/alias_error_10057.test +++ b/parser/testdata/corpus/sql/binder/alias_error_10057.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_error_10057.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with test_data as ( diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_errors.test b/parser/testdata/corpus/sql/binder/alias_qualification_errors.test index 9156e2f..bf6253d 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_errors.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_errors.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT alias.x + 1 AS y, 1 AS x diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_group_by.test b/parser/testdata/corpus/sql/binder/alias_qualification_group_by.test index a363d9a..5ab6e65 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_group_by.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_group_by.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a % 2 AS x, COUNT(*) AS cnt diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_having.test b/parser/testdata/corpus/sql/binder/alias_qualification_having.test index 81e3c5a..26aabea 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_having.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_having.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_having.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a % 2 AS x, SUM(a) AS s diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_order_by.test b/parser/testdata/corpus/sql/binder/alias_qualification_order_by.test index aba1382..dae734c 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_order_by.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a AS x FROM (VALUES (3),(1),(2)) t(a) diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_qualify.test b/parser/testdata/corpus/sql/binder/alias_qualification_qualify.test index 0b55587..b1012b4 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_qualify.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_qualify.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_qualify.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a, row_number() OVER (ORDER BY a) AS rn diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_select_projection.test b/parser/testdata/corpus/sql/binder/alias_qualification_select_projection.test index 6556244..37d1351 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_select_projection.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_select_projection.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_select_projection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/binder/alias_qualification_where.test b/parser/testdata/corpus/sql/binder/alias_qualification_where.test index 953758f..686e694 100644 --- a/parser/testdata/corpus/sql/binder/alias_qualification_where.test +++ b/parser/testdata/corpus/sql/binder/alias_qualification_where.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_qualification_where.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a AS x FROM (VALUES (1),(2),(3)) t(a) diff --git a/parser/testdata/corpus/sql/binder/alias_where_side_effects.test b/parser/testdata/corpus/sql/binder/alias_where_side_effects.test index 0722ed4..404f1eb 100644 --- a/parser/testdata/corpus/sql/binder/alias_where_side_effects.test +++ b/parser/testdata/corpus/sql/binder/alias_where_side_effects.test @@ -1,6 +1,6 @@ # source: test/sql/binder/alias_where_side_effects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from (select random() as num from range(20) where num > 0.9) where num <= 0.9 diff --git a/parser/testdata/corpus/sql/binder/column_ref_as_alias.test b/parser/testdata/corpus/sql/binder/column_ref_as_alias.test index aef20e9..d2299ac 100644 --- a/parser/testdata/corpus/sql/binder/column_ref_as_alias.test +++ b/parser/testdata/corpus/sql/binder/column_ref_as_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/column_ref_as_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table ss_items as select 1 item_id, 10 ss_item_rev; diff --git a/parser/testdata/corpus/sql/binder/column_value_alias_group.test b/parser/testdata/corpus/sql/binder/column_value_alias_group.test index c7b37a4..b266159 100644 --- a/parser/testdata/corpus/sql/binder/column_value_alias_group.test +++ b/parser/testdata/corpus/sql/binder/column_value_alias_group.test @@ -1,6 +1,6 @@ # source: test/sql/binder/column_value_alias_group.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test(a int); diff --git a/parser/testdata/corpus/sql/binder/default_expression_errors.test b/parser/testdata/corpus/sql/binder/default_expression_errors.test new file mode 100644 index 0000000..3c7364b --- /dev/null +++ b/parser/testdata/corpus/sql/binder/default_expression_errors.test @@ -0,0 +1,13 @@ +# source: test/sql/binder/default_expression_errors.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1 WHERE DEFAULT; +-- +ok +== +CREATE TABLE default_expression_error(i INTEGER DEFAULT DEFAULT); +-- +ok +== diff --git a/parser/testdata/corpus/sql/binder/duplicate_alias.test b/parser/testdata/corpus/sql/binder/duplicate_alias.test index 8b53832..4e310c0 100644 --- a/parser/testdata/corpus/sql/binder/duplicate_alias.test +++ b/parser/testdata/corpus/sql/binder/duplicate_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/duplicate_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t(i int); diff --git a/parser/testdata/corpus/sql/binder/empty_column_alias.test b/parser/testdata/corpus/sql/binder/empty_column_alias.test new file mode 100644 index 0000000..b53f829 --- /dev/null +++ b/parser/testdata/corpus/sql/binder/empty_column_alias.test @@ -0,0 +1,45 @@ +# source: test/sql/binder/empty_column_alias.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH x('') AS (SELECT 1) SELECT * FROM x; +-- +ok +== +SELECT * FROM (SELECT 1) t(''); +-- +ok +== +SELECT * FROM (SELECT 1, 2) t(a, ''); +-- +ok +== +WITH RECURSIVE r('') AS (SELECT 1 UNION ALL SELECT 2) SELECT * FROM r; +-- +ok +== +CREATE TABLE tbl(i INT); +-- +ok +== +SELECT * FROM tbl t(''); +-- +ok +== +SELECT * FROM range(3) t(''); +-- +ok +== +CREATE VIEW v('') AS SELECT 1; +-- +error: Parser Error: syntax error at or near "''" +== +SELECT * FROM (SELECT 1, 2) t(a, "b c"); +-- +ok +== +WITH x(a) AS (SELECT 42) SELECT a FROM x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/binder/expression_binder_coverage.test b/parser/testdata/corpus/sql/binder/expression_binder_coverage.test new file mode 100644 index 0000000..b21920f --- /dev/null +++ b/parser/testdata/corpus/sql/binder/expression_binder_coverage.test @@ -0,0 +1,79 @@ +# source: test/sql/binder/expression_binder_coverage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE binder_values(i INTEGER, j INTEGER); +-- +ok +== +ALTER TABLE binder_values ALTER i TYPE BIGINT USING (SELECT 1); +-- +ok +== +CREATE TABLE check_window(i INTEGER CHECK (row_number() OVER () > 0)); +-- +ok +== +CREATE INDEX index_window ON binder_values ((row_number() OVER ())); +-- +ok +== +CREATE INDEX index_subquery ON binder_values (((SELECT 1))); +-- +ok +== +CREATE INDEX index_aggregate ON binder_values ((sum(i))); +-- +ok +== +INSERT INTO binder_values VALUES (row_number() OVER (), 1); +-- +ok +== +INSERT INTO binder_values VALUES (sum(1), 1); +-- +ok +== +UPDATE binder_values SET i = row_number() OVER (); +-- +ok +== +UPDATE binder_values SET i = sum(j); +-- +ok +== +PREPARE group_parameter AS SELECT 1 AS i GROUP BY $1; +-- +ok +== +SELECT count(*) FROM binder_values GROUP BY ALL HAVING missing > 1; +-- +ok +== +SELECT (SELECT first((j + 0) -> struct_pack(x := 1))) FROM (VALUES (1)) t(j); +-- +ok +== +CREATE TABLE merge_target(i INTEGER); +-- +ok +== +CREATE TABLE merge_source(i INTEGER); +-- +ok +== +MERGE INTO merge_target t USING merge_source s ON t.i = s.i +WHEN MATCHED AND row_number() OVER () = 1 THEN UPDATE SET i = s.i; +-- +ok +== +MERGE INTO merge_target t USING merge_source s ON t.i = s.i +WHEN MATCHED AND sum(s.i) > 0 THEN UPDATE SET i = s.i; +-- +ok +== +SELECT * FROM read_csv(DEFAULT); +-- +ok +== diff --git a/parser/testdata/corpus/sql/binder/function_chaining_19035.test b/parser/testdata/corpus/sql/binder/function_chaining_19035.test index 1848487..21b4329 100644 --- a/parser/testdata/corpus/sql/binder/function_chaining_19035.test +++ b/parser/testdata/corpus/sql/binder/function_chaining_19035.test @@ -1,6 +1,6 @@ # source: test/sql/binder/function_chaining_19035.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with stage as ( diff --git a/parser/testdata/corpus/sql/binder/group_by_incremental_alias.test b/parser/testdata/corpus/sql/binder/group_by_incremental_alias.test index ed7aa5a..77cff31 100644 --- a/parser/testdata/corpus/sql/binder/group_by_incremental_alias.test +++ b/parser/testdata/corpus/sql/binder/group_by_incremental_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/group_by_incremental_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table my_functions as select 'my_name' as function_name; diff --git a/parser/testdata/corpus/sql/binder/group_by_qualification.test b/parser/testdata/corpus/sql/binder/group_by_qualification.test index 1da64f3..847fbaa 100644 --- a/parser/testdata/corpus/sql/binder/group_by_qualification.test +++ b/parser/testdata/corpus/sql/binder/group_by_qualification.test @@ -1,6 +1,6 @@ # source: test/sql/binder/group_by_qualification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA IF NOT EXISTS prd; diff --git a/parser/testdata/corpus/sql/binder/integer_literal_binding.test b/parser/testdata/corpus/sql/binder/integer_literal_binding.test index c843257..86065ea 100644 --- a/parser/testdata/corpus/sql/binder/integer_literal_binding.test +++ b/parser/testdata/corpus/sql/binder/integer_literal_binding.test @@ -1,6 +1,6 @@ # source: test/sql/binder/integer_literal_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(100::{type} + 1) == '{type}'; diff --git a/parser/testdata/corpus/sql/binder/legacy_null_type.test b/parser/testdata/corpus/sql/binder/legacy_null_type.test index 1c6f917..27e59fe 100644 --- a/parser/testdata/corpus/sql/binder/legacy_null_type.test +++ b/parser/testdata/corpus/sql/binder/legacy_null_type.test @@ -1,6 +1,6 @@ # source: test/sql/binder/legacy_null_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET legacy_disable_null_type=true; diff --git a/parser/testdata/corpus/sql/binder/missing_column_error.test b/parser/testdata/corpus/sql/binder/missing_column_error.test index f22097a..315b81e 100644 --- a/parser/testdata/corpus/sql/binder/missing_column_error.test +++ b/parser/testdata/corpus/sql/binder/missing_column_error.test @@ -1,6 +1,6 @@ # source: test/sql/binder/missing_column_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table customers (name varchar, age integer, something_easy_to_type_wrong integer, city varchar); diff --git a/parser/testdata/corpus/sql/binder/named_parameter_cast.test b/parser/testdata/corpus/sql/binder/named_parameter_cast.test new file mode 100644 index 0000000..a7338b2 --- /dev/null +++ b/parser/testdata/corpus/sql/binder/named_parameter_cast.test @@ -0,0 +1,21 @@ +# source: test/sql/binder/named_parameter_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET TimeZone='America/Los_Angeles'; +-- +ok +== +COPY (SELECT 42 AS a) TO '__TEST_DIR__/named_parameter_cast.csv' (HEADER false); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT * FROM read_csv('__TEST_DIR__/named_parameter_cast.csv', names => [TIMESTAMPTZ '2024-01-01 12:00:00+00'])); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT * FROM read_csv('__TEST_DIR__/named_parameter_cast.csv', names => [TIMESTAMPTZ '2024-01-01 12:00:00+00'::VARCHAR])); +-- +ok +== diff --git a/parser/testdata/corpus/sql/binder/not_similar_to.test b/parser/testdata/corpus/sql/binder/not_similar_to.test index 50c33bf..c4960f2 100644 --- a/parser/testdata/corpus/sql/binder/not_similar_to.test +++ b/parser/testdata/corpus/sql/binder/not_similar_to.test @@ -1,6 +1,6 @@ # source: test/sql/binder/not_similar_to.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table foo as select 'd' as a, 'e' as b, 'f' as c; diff --git a/parser/testdata/corpus/sql/binder/old_implicit_cast.test b/parser/testdata/corpus/sql/binder/old_implicit_cast.test index a429b1f..3102636 100644 --- a/parser/testdata/corpus/sql/binder/old_implicit_cast.test +++ b/parser/testdata/corpus/sql/binder/old_implicit_cast.test @@ -1,6 +1,6 @@ # source: test/sql/binder/old_implicit_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT 42 AS i, '5' AS v; diff --git a/parser/testdata/corpus/sql/binder/old_implicit_cast_template.test b/parser/testdata/corpus/sql/binder/old_implicit_cast_template.test index bf71903..a4cd688 100644 --- a/parser/testdata/corpus/sql/binder/old_implicit_cast_template.test +++ b/parser/testdata/corpus/sql/binder/old_implicit_cast_template.test @@ -1,6 +1,6 @@ # source: test/sql/binder/old_implicit_cast_template.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select * from values ('1-2', '3-4', 'a-z', NULL) as r(v); diff --git a/parser/testdata/corpus/sql/binder/order_by_view.test b/parser/testdata/corpus/sql/binder/order_by_view.test index efe7411..37d70ee 100644 --- a/parser/testdata/corpus/sql/binder/order_by_view.test +++ b/parser/testdata/corpus/sql/binder/order_by_view.test @@ -1,6 +1,6 @@ # source: test/sql/binder/order_by_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE src("Name" VARCHAR, CreatedAt TIMESTAMP, userID VARCHAR, "Version" VARCHAR, Clients BIGINT, HasDocumentation BOOLEAN, HasCustomAddress BOOLEAN, HasHostname BOOLEAN, RunningContainers BIGINT, HasActions BOOLEAN); diff --git a/parser/testdata/corpus/sql/binder/qualified_alias_method_call.test b/parser/testdata/corpus/sql/binder/qualified_alias_method_call.test index f4b7b1e..87f570c 100644 --- a/parser/testdata/corpus/sql/binder/qualified_alias_method_call.test +++ b/parser/testdata/corpus/sql/binder/qualified_alias_method_call.test @@ -1,6 +1,6 @@ # source: test/sql/binder/qualified_alias_method_call.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_alias(a INT, b VARCHAR); diff --git a/parser/testdata/corpus/sql/binder/separate_schema_tables.test b/parser/testdata/corpus/sql/binder/separate_schema_tables.test index 33206c1..98dee48 100644 --- a/parser/testdata/corpus/sql/binder/separate_schema_tables.test +++ b/parser/testdata/corpus/sql/binder/separate_schema_tables.test @@ -1,6 +1,6 @@ # source: test/sql/binder/separate_schema_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA IF NOT EXISTS s1; @@ -27,10 +27,6 @@ CREATE TABLE s3.tbl(i INT); -- ok == -CREATE TABLE tbl(i INT); --- -ok -== INSERT INTO s1.tbl VALUES (10); -- ok @@ -43,6 +39,10 @@ INSERT INTO s3.tbl VALUES (1000); -- ok == +INSERT INTO tbl VALUES (1); +-- +ok +== SELECT * FROM tbl, s1.tbl, s2.tbl -- ok diff --git a/parser/testdata/corpus/sql/binder/similar_to.test b/parser/testdata/corpus/sql/binder/similar_to.test index dc7c695..5fe03e2 100644 --- a/parser/testdata/corpus/sql/binder/similar_to.test +++ b/parser/testdata/corpus/sql/binder/similar_to.test @@ -1,6 +1,6 @@ # source: test/sql/binder/similar_to.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE depdelay_minutes(depdelay_minutes INTEGER); diff --git a/parser/testdata/corpus/sql/binder/string_literal_binding.test b/parser/testdata/corpus/sql/binder/string_literal_binding.test index 1ae178f..f4784a1 100644 --- a/parser/testdata/corpus/sql/binder/string_literal_binding.test +++ b/parser/testdata/corpus/sql/binder/string_literal_binding.test @@ -1,6 +1,6 @@ # source: test/sql/binder/string_literal_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '01'=1; diff --git a/parser/testdata/corpus/sql/binder/table_alias_single_quotes.test b/parser/testdata/corpus/sql/binder/table_alias_single_quotes.test index 89dfe86..8868708 100644 --- a/parser/testdata/corpus/sql/binder/table_alias_single_quotes.test +++ b/parser/testdata/corpus/sql/binder/table_alias_single_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/binder/table_alias_single_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT t.k FROM integers AS 't'('k') ORDER BY ALL diff --git a/parser/testdata/corpus/sql/binder/table_view_alias.test b/parser/testdata/corpus/sql/binder/table_view_alias.test index 0bb1252..ad1d6fe 100644 --- a/parser/testdata/corpus/sql/binder/table_view_alias.test +++ b/parser/testdata/corpus/sql/binder/table_view_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/table_view_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW s1.v AS SELECT 42 c; diff --git a/parser/testdata/corpus/sql/binder/test_alias.test b/parser/testdata/corpus/sql/binder/test_alias.test index bd6ed53..2095ac0 100644 --- a/parser/testdata/corpus/sql/binder/test_alias.test +++ b/parser/testdata/corpus/sql/binder/test_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i % 2 AS p, SUM(i) AS sum_i FROM integers GROUP BY p ORDER BY 1 diff --git a/parser/testdata/corpus/sql/binder/test_alias_map_in_subquery.test b/parser/testdata/corpus/sql/binder/test_alias_map_in_subquery.test index 2d43b3b..363c453 100644 --- a/parser/testdata/corpus/sql/binder/test_alias_map_in_subquery.test +++ b/parser/testdata/corpus/sql/binder/test_alias_map_in_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_alias_map_in_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE tbl (example VARCHAR); diff --git a/parser/testdata/corpus/sql/binder/test_case_insensitive_binding.test b/parser/testdata/corpus/sql/binder/test_case_insensitive_binding.test index f4750d0..b8ab866 100644 --- a/parser/testdata/corpus/sql/binder/test_case_insensitive_binding.test +++ b/parser/testdata/corpus/sql/binder/test_case_insensitive_binding.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_case_insensitive_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ("HeLlO" INTEGER) diff --git a/parser/testdata/corpus/sql/binder/test_duplicate_in_set_operation.test b/parser/testdata/corpus/sql/binder/test_duplicate_in_set_operation.test index 2961a20..3eed239 100644 --- a/parser/testdata/corpus/sql/binder/test_duplicate_in_set_operation.test +++ b/parser/testdata/corpus/sql/binder/test_duplicate_in_set_operation.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_duplicate_in_set_operation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(col1 varchar collate nocase); diff --git a/parser/testdata/corpus/sql/binder/test_function_chaining_alias.test b/parser/testdata/corpus/sql/binder/test_function_chaining_alias.test index 69f4e0c..602fe20 100644 --- a/parser/testdata/corpus/sql/binder/test_function_chaining_alias.test +++ b/parser/testdata/corpus/sql/binder/test_function_chaining_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_function_chaining_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'test' || ' more testing' AS added, added.substr(5) AS my_substr diff --git a/parser/testdata/corpus/sql/binder/test_having_alias.test b/parser/testdata/corpus/sql/binder/test_having_alias.test index 35ee99f..47a379f 100644 --- a/parser/testdata/corpus/sql/binder/test_having_alias.test +++ b/parser/testdata/corpus/sql/binder/test_having_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_having_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(5) tbl(i); diff --git a/parser/testdata/corpus/sql/binder/test_implicit_struct_pack.test b/parser/testdata/corpus/sql/binder/test_implicit_struct_pack.test index 9315537..00116e7 100644 --- a/parser/testdata/corpus/sql/binder/test_implicit_struct_pack.test +++ b/parser/testdata/corpus/sql/binder/test_implicit_struct_pack.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_implicit_struct_pack.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select range i from range(3) diff --git a/parser/testdata/corpus/sql/binder/test_in_with_collate.test b/parser/testdata/corpus/sql/binder/test_in_with_collate.test index 0fb54a7..0672710 100644 --- a/parser/testdata/corpus/sql/binder/test_in_with_collate.test +++ b/parser/testdata/corpus/sql/binder/test_in_with_collate.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_in_with_collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (str varchar); diff --git a/parser/testdata/corpus/sql/binder/test_null_type_propagation.test b/parser/testdata/corpus/sql/binder/test_null_type_propagation.test index 8e7c532..b3ba470 100644 --- a/parser/testdata/corpus/sql/binder/test_null_type_propagation.test +++ b/parser/testdata/corpus/sql/binder/test_null_type_propagation.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_null_type_propagation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL diff --git a/parser/testdata/corpus/sql/binder/test_postitional_ref_order_binding.test b/parser/testdata/corpus/sql/binder/test_postitional_ref_order_binding.test index c648f5f..352db18 100644 --- a/parser/testdata/corpus/sql/binder/test_postitional_ref_order_binding.test +++ b/parser/testdata/corpus/sql/binder/test_postitional_ref_order_binding.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_postitional_ref_order_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select * from (values (42, 43), (44, 45)) v(i, j); diff --git a/parser/testdata/corpus/sql/binder/test_select_clause_alias.test b/parser/testdata/corpus/sql/binder/test_select_clause_alias.test index 1e43d5e..8a4c098 100644 --- a/parser/testdata/corpus/sql/binder/test_select_clause_alias.test +++ b/parser/testdata/corpus/sql/binder/test_select_clause_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_select_clause_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1), (2), (3); diff --git a/parser/testdata/corpus/sql/binder/test_string_alias.test b/parser/testdata/corpus/sql/binder/test_string_alias.test index ac73ba3..b84d72a 100644 --- a/parser/testdata/corpus/sql/binder/test_string_alias.test +++ b/parser/testdata/corpus/sql/binder/test_string_alias.test @@ -1,6 +1,6 @@ # source: test/sql/binder/test_string_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i AS 'hello world' FROM integers diff --git a/parser/testdata/corpus/sql/cast/array_to_varchar_quoting.test b/parser/testdata/corpus/sql/cast/array_to_varchar_quoting.test new file mode 100644 index 0000000..d89d0ec --- /dev/null +++ b/parser/testdata/corpus/sql/cast/array_to_varchar_quoting.test @@ -0,0 +1,37 @@ +# source: test/sql/cast/array_to_varchar_quoting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT ['a,b', 'x"y']::VARCHAR[2]::VARCHAR v, v::VARCHAR[2] = ['a,b', 'x"y']; +-- +ok +== +SELECT ['NULL', NULL]::VARCHAR[2]::VARCHAR v, v::VARCHAR[2]; +-- +ok +== +SELECT [['a b', ''], ['[x]', NULL]]::VARCHAR[2][2]::VARCHAR v, v::VARCHAR[2][2] = [['a b', ''], ['[x]', NULL]]; +-- +ok +== +SELECT [1, 2, 3]::INT[3]::VARCHAR v, v::INT[3]; +-- +ok +== +SELECT MAP{'\':''}::VARCHAR v, v::MAP(VARCHAR, VARCHAR) = MAP{'\':''}; +-- +ok +== +SELECT ['a\b', '\']::VARCHAR v, v::VARCHAR[] = ['a\b', '\']; +-- +ok +== +SELECT {'k': 'x\'}::VARCHAR v, v::STRUCT(k VARCHAR) = {'k': 'x\'}; +-- +ok +== +SELECT ['\x00a'::BLOB]::VARCHAR v, v::BLOB[] = ['\x00a'::BLOB]; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/boolean_autocast.test b/parser/testdata/corpus/sql/cast/boolean_autocast.test index c23bfc2..4a31ec1 100644 --- a/parser/testdata/corpus/sql/cast/boolean_autocast.test +++ b/parser/testdata/corpus/sql/cast/boolean_autocast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/boolean_autocast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT true=1; diff --git a/parser/testdata/corpus/sql/cast/cast_error_location.test b/parser/testdata/corpus/sql/cast/cast_error_location.test index da57acb..e7a4e76 100644 --- a/parser/testdata/corpus/sql/cast/cast_error_location.test +++ b/parser/testdata/corpus/sql/cast/cast_error_location.test @@ -1,6 +1,6 @@ # source: test/sql/cast/cast_error_location.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1::STRUCT(i INTEGER) diff --git a/parser/testdata/corpus/sql/cast/cast_error_logical_types.test b/parser/testdata/corpus/sql/cast/cast_error_logical_types.test new file mode 100644 index 0000000..f14f00a --- /dev/null +++ b/parser/testdata/corpus/sql/cast/cast_error_logical_types.test @@ -0,0 +1,37 @@ +# source: test/sql/cast/cast_error_logical_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 'x'::UUID; +-- +ok +== +SELECT 'abc'::BIGNUM; +-- +ok +== +CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); +-- +ok +== +SELECT 'nope'::mood; +-- +ok +== +CREATE TYPE empty_enum AS ENUM (); +-- +ok +== +SELECT ''::empty_enum; +-- +ok +== +CREATE TYPE ab AS ENUM ('a', 'b'); +-- +ok +== +SELECT 'sad'::mood::ab; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/cast_sign_only_whitespace.test b/parser/testdata/corpus/sql/cast/cast_sign_only_whitespace.test new file mode 100644 index 0000000..e860239 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/cast_sign_only_whitespace.test @@ -0,0 +1,41 @@ +# source: test/sql/cast/cast_sign_only_whitespace.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST('- ' AS BIGINT), TRY_CAST('+ ' AS INTEGER), TRY_CAST('-' || chr(9) AS SMALLINT), TRY_CAST('- ' AS HUGEINT) +-- +ok +== +SELECT TRY_CAST('- ' AS DECIMAL(10,2)), TRY_CAST('+ ' AS DECIMAL(18,3)) +-- +ok +== +SELECT TRY_CAST('+' || chr(9) AS UINTEGER), TRY_CAST('+ ' AS UHUGEINT), TRY_CAST('- ' AS DECIMAL(4,2)), TRY_CAST('+ ' AS DECIMAL(38,3)) +-- +ok +== +SELECT TRY_CAST('1e ' AS INTEGER), TRY_CAST('1e+ ' AS BIGINT), TRY_CAST('1e-' || chr(9) AS HUGEINT) +-- +ok +== +SELECT '- '::BIGINT +-- +ok +== +SELECT '+ '::DECIMAL(10,2) +-- +ok +== +SELECT '-1 '::BIGINT, '+2 '::INTEGER, '-3.50 '::DECIMAL(10,2) +-- +ok +== +SELECT ' -4'::INTEGER, TRY_CAST('-' AS INTEGER) +-- +ok +== +SELECT '1e+1 '::INTEGER, '-1e2 '::BIGINT, '0 '::DECIMAL(4,2) +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/common_operator_coverage.test b/parser/testdata/corpus/sql/cast/common_operator_coverage.test new file mode 100644 index 0000000..60e7b52 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/common_operator_coverage.test @@ -0,0 +1,43 @@ +# source: test/sql/cast/common_operator_coverage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE temporal_cast_input(id INTEGER, value VARCHAR) +-- +ok +== +INSERT INTO temporal_cast_input VALUES + (1, 'not-a-temporal-value'), + (2, '294247-01-10 04:00:54.775806'), + (3, '24:00:00.000000001') +-- +ok +== +SELECT + TRY_CAST(value AS TIMESTAMP_S) IS NULL, + TRY_CAST(value AS TIMESTAMP_MS) IS NULL, + TRY_CAST(value AS TIMESTAMPTZ_NS) IS NULL +FROM temporal_cast_input +WHERE id = 1 +-- +ok +== +SELECT TRY_CAST(value AS TIMESTAMPTZ_NS) IS NULL +FROM temporal_cast_input +WHERE id = 2 +-- +ok +== +SELECT id, TRY_CAST(value AS TIME_NS) IS NULL +FROM temporal_cast_input +WHERE id IN (1, 3) +ORDER BY id +-- +ok +== +SELECT value::FLOAT, value::DOUBLE +FROM (SELECT 0::DECIMAL(38, 38) AS value) +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/decimal_cast.test b/parser/testdata/corpus/sql/cast/decimal_cast.test index 4019b37..1e43541 100644 --- a/parser/testdata/corpus/sql/cast/decimal_cast.test +++ b/parser/testdata/corpus/sql/cast/decimal_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/decimal_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '9.90'::DECIMAL(4,3)::DECIMAL(3,2); diff --git a/parser/testdata/corpus/sql/cast/decimal_constexpr_limits.test b/parser/testdata/corpus/sql/cast/decimal_constexpr_limits.test new file mode 100644 index 0000000..7ce3c4a --- /dev/null +++ b/parser/testdata/corpus/sql/cast/decimal_constexpr_limits.test @@ -0,0 +1,22 @@ +# source: test/sql/cast/decimal_constexpr_limits.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST('{sign}' || repeat('9', {width}) AS DECIMAL({width},0))::VARCHAR = + CASE WHEN '{sign}' = '-' THEN '-' ELSE '' END || repeat('9', {width}), + TRY_CAST('{sign}' || '1' || repeat('0', {width}) AS DECIMAL({width},0)) IS NULL; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT CAST('{sign}00012345.6789012345e1' AS DECIMAL({width},10)) = + CAST('{sign}123456.7890123450' AS DECIMAL({width},10)); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT TRY_CAST('{sign}' || repeat('9', {width}) || '.5' AS DECIMAL({width},0)) IS NULL, + CAST('{sign}' || repeat('9', {width}) || '.4' AS DECIMAL({width},0)) = + CAST('{sign}' || repeat('9', {width}) AS DECIMAL({width},0)); +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/cast/decimal_float_cast.test b/parser/testdata/corpus/sql/cast/decimal_float_cast.test index 7834605..aabe4b3 100644 --- a/parser/testdata/corpus/sql/cast/decimal_float_cast.test +++ b/parser/testdata/corpus/sql/cast/decimal_float_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/decimal_float_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select cast(100000000000000000000 as double) < cast(99999999999999999999.99999 as double); diff --git a/parser/testdata/corpus/sql/cast/decimal_integer_cast.test b/parser/testdata/corpus/sql/cast/decimal_integer_cast.test index 1c0ac49..f601cc1 100644 --- a/parser/testdata/corpus/sql/cast/decimal_integer_cast.test +++ b/parser/testdata/corpus/sql/cast/decimal_integer_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/decimal_integer_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST(0.55 AS {datatype}) as x; diff --git a/parser/testdata/corpus/sql/cast/dot_function_missing_error.test b/parser/testdata/corpus/sql/cast/dot_function_missing_error.test index a5d44c3..a0f9878 100644 --- a/parser/testdata/corpus/sql/cast/dot_function_missing_error.test +++ b/parser/testdata/corpus/sql/cast/dot_function_missing_error.test @@ -1,6 +1,6 @@ # source: test/sql/cast/dot_function_missing_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select file.replace('a', 'b') from (values ('xxxx')) t("filename"); diff --git a/parser/testdata/corpus/sql/cast/double_float_cast.test b/parser/testdata/corpus/sql/cast/double_float_cast.test index 0b0811c..55e470c 100644 --- a/parser/testdata/corpus/sql/cast/double_float_cast.test +++ b/parser/testdata/corpus/sql/cast/double_float_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/double_float_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 1e308::float; diff --git a/parser/testdata/corpus/sql/cast/float_decimal_cast.test b/parser/testdata/corpus/sql/cast/float_decimal_cast.test index 55a9213..e289cd3 100644 --- a/parser/testdata/corpus/sql/cast/float_decimal_cast.test +++ b/parser/testdata/corpus/sql/cast/float_decimal_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/float_decimal_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 1.35::{src}::decimal(3, 1), 1.45::{src}::decimal(3, 1) diff --git a/parser/testdata/corpus/sql/cast/float_integer_cast.test b/parser/testdata/corpus/sql/cast/float_integer_cast.test index 2156717..595b656 100644 --- a/parser/testdata/corpus/sql/cast/float_integer_cast.test +++ b/parser/testdata/corpus/sql/cast/float_integer_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/float_integer_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select cast(0.5::{src} as {dst}) as x; diff --git a/parser/testdata/corpus/sql/cast/signed_cast_repro.test b/parser/testdata/corpus/sql/cast/signed_cast_repro.test index 178889c..fda137e 100644 --- a/parser/testdata/corpus/sql/cast/signed_cast_repro.test +++ b/parser/testdata/corpus/sql/cast/signed_cast_repro.test @@ -1,6 +1,6 @@ # source: test/sql/cast/signed_cast_repro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER) diff --git a/parser/testdata/corpus/sql/cast/string_to_integer_decimal_cast.test b/parser/testdata/corpus/sql/cast/string_to_integer_decimal_cast.test index 0ef29f4..07e84a9 100644 --- a/parser/testdata/corpus/sql/cast/string_to_integer_decimal_cast.test +++ b/parser/testdata/corpus/sql/cast/string_to_integer_decimal_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_integer_decimal_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '0.000005'::{type}; diff --git a/parser/testdata/corpus/sql/cast/string_to_integer_exponent_cast.test b/parser/testdata/corpus/sql/cast/string_to_integer_exponent_cast.test index 9fe62a3..d0d1b31 100644 --- a/parser/testdata/corpus/sql/cast/string_to_integer_exponent_cast.test +++ b/parser/testdata/corpus/sql/cast/string_to_integer_exponent_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_integer_exponent_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '1e2'::{type}; @@ -211,3 +211,79 @@ select '0e32767'::int; -- ok == +select '1.1111111111111111111e0'::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select '1.5000000000000000000e0'::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select '0.50000000000000000000e0'::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select '0.10000000000000000000e0'::UBIGINT; +-- +ok +== +select '0.10000000000000000000e0'::BIGINT; +-- +ok +== +select '1.5000000000000000000e0'::UBIGINT; +-- +ok +== +select ('0.' || repeat('0', 32768) || '5e0')::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select ('0.' || repeat('0', 65536) || '5')::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select ('0.' || repeat('0', 65536) || '5e0')::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select ('0.' || repeat('0', 32767) || '5e32767')::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select ('0.' || repeat('0', 32768) || '5e32767')::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select ('1.' || repeat('0', 40000) || '9e0')::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +select ('-0.' || repeat('0', 32768) || '5e0')::INTEGER; +-- +ok +== +select ('-0.' || repeat('0', 32767) || '5e32767')::INTEGER; +-- +ok +== +select ('0.' || repeat('0', 65536) || '5')::BIGNUM; +-- +ok +== +select ('0.1' || repeat('0', 25) || '1')::BIGNUM; +-- +ok +== +select ('0.5' || repeat('0', 65536) || '1')::BIGNUM; +-- +ok +== +select ('-1.' || repeat('0', 40000) || '9')::BIGNUM; +-- +ok +== +select ('-2.5' || repeat('0', 40000))::BIGNUM; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/string_to_integer_many_decimals.test b/parser/testdata/corpus/sql/cast/string_to_integer_many_decimals.test new file mode 100644 index 0000000..b2c27c0 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/string_to_integer_many_decimals.test @@ -0,0 +1,25 @@ +# source: test/sql/cast/string_to_integer_many_decimals.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST('0.' || repeat('0', 65536) || '5' AS INT), CAST('0.' || repeat('0', 65536) || '5' AS HUGEINT), CAST('-0.' || repeat('0', 65536) || '5' AS BIGINT); +-- +ok +== +SELECT CAST('7.' || repeat('0', 70000) || '9' AS UBIGINT), CAST('7.' || repeat('0', 70000) || '9' AS UHUGEINT), CAST('-7.' || repeat('0', 131072) || '9' AS SMALLINT), CAST('7.' || repeat('9', 70000) AS INT); +-- +ok +== +SELECT CAST('0.' || repeat('0', 70000) || '5e30000' AS INT), CAST('0.' || repeat('0', 100) || '5e101' AS INT); +-- +ok +== +SELECT CAST('0.5' || repeat('0', 70000) AS BIGINT); +-- +ok +== +SELECT CAST('0.5' AS INT), CAST('2.5e0' AS HUGEINT); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/string_to_list_cast.test b/parser/testdata/corpus/sql/cast/string_to_list_cast.test index ec1df87..9b19757 100644 --- a/parser/testdata/corpus/sql/cast/string_to_list_cast.test +++ b/parser/testdata/corpus/sql/cast/string_to_list_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_list_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '[12,13,14]'::INT[]; @@ -339,6 +339,18 @@ SELECT '[{a: hii}, {a: "{" }]'::STRUCT(a VARCHAR)[] FROM struct_tbl1; -- ok == +SELECT '[{''name'':''a}b''}]'::STRUCT(name VARCHAR)[]; +-- +ok +== +SELECT '[{"name":"a}b"}]'::STRUCT(name VARCHAR)[]; +-- +ok +== +SELECT CAST(list_value(struct_pack(name := 'a}b')) AS VARCHAR)::STRUCT(name VARCHAR)[]; +-- +ok +== CREATE TABLE struct_tbl2(col VARCHAR); -- ok diff --git a/parser/testdata/corpus/sql/cast/string_to_list_escapes.test b/parser/testdata/corpus/sql/cast/string_to_list_escapes.test index 4179a29..9f9f78a 100644 --- a/parser/testdata/corpus/sql/cast/string_to_list_escapes.test +++ b/parser/testdata/corpus/sql/cast/string_to_list_escapes.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_list_escapes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT $$[hello, world]$$::VARCHAR[]; diff --git a/parser/testdata/corpus/sql/cast/string_to_list_roundtrip.test b/parser/testdata/corpus/sql/cast/string_to_list_roundtrip.test index e201372..b46c3e8 100644 --- a/parser/testdata/corpus/sql/cast/string_to_list_roundtrip.test +++ b/parser/testdata/corpus/sql/cast/string_to_list_roundtrip.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_list_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select $$[\"abc\", def, ghi]$$::VARCHAR[] a, a::VARCHAR::VARCHAR[] b, a == b diff --git a/parser/testdata/corpus/sql/cast/string_to_map_escapes.test b/parser/testdata/corpus/sql/cast/string_to_map_escapes.test new file mode 100644 index 0000000..8122c03 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/string_to_map_escapes.test @@ -0,0 +1,11 @@ +# source: test/sql/cast/string_to_map_escapes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT + TRY_CAST('{x=1}' AS MAP(INTEGER, INTEGER)), + TRY_CAST('{1=x}' AS MAP(INTEGER, INTEGER)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/string_to_map_invalid_entries.test b/parser/testdata/corpus/sql/cast/string_to_map_invalid_entries.test new file mode 100644 index 0000000..ea9bc3c --- /dev/null +++ b/parser/testdata/corpus/sql/cast/string_to_map_invalid_entries.test @@ -0,0 +1,45 @@ +# source: test/sql/cast/string_to_map_invalid_entries.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST('{null=1,k=2}' AS MAP(VARCHAR, INTEGER)); +-- +ok +== +SELECT TRY_CAST('{a=1,null=2,c=3}' AS MAP(VARCHAR, INTEGER)); +-- +ok +== +SELECT TRY_CAST('{a=' AS MAP(VARCHAR, INTEGER)); +-- +ok +== +SELECT TRY_CAST('{a=1,b=' AS MAP(VARCHAR, INTEGER)); +-- +ok +== +SELECT TRY_CAST(s AS MAP(VARCHAR, INTEGER)) FROM (VALUES ('{a=1}'), ('{null=1,k=2}'), ('{a=1,b='), ('{x=5, y=6}')) t(s); +-- +ok +== +SELECT CAST('{null=1,k=2}' AS MAP(VARCHAR, INTEGER)); +-- +ok +== +SELECT TRY_CAST('{a=1,a=2}' AS MAP(VARCHAR, INTEGER)); +-- +ok +== +SELECT TRY_CAST('{1=a,01=b}' AS MAP(INTEGER, VARCHAR)); +-- +ok +== +SELECT TRY_CAST(s AS MAP(VARCHAR, INTEGER)) FROM (VALUES ('{a=1,a=2}'), ('{b=1}'), (NULL), ('{x=1,y=2,x=3}'), ('{x=1,y=2}')) t(s); +-- +ok +== +SELECT CAST('{a=1,a=2}' AS MAP(VARCHAR, INTEGER)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/string_to_map_null_keys.test b/parser/testdata/corpus/sql/cast/string_to_map_null_keys.test new file mode 100644 index 0000000..6dde5fd --- /dev/null +++ b/parser/testdata/corpus/sql/cast/string_to_map_null_keys.test @@ -0,0 +1,29 @@ +# source: test/sql/cast/string_to_map_null_keys.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 a, 2 b) TO '__TEST_DIR__/string_to_map_null_keys.csv'; +-- +ok +== +FROM '__TEST_DIR__/string_to_map_null_keys.csv' EXCEPT SELECT 'bla' AS a, MAP {} AS b; +-- +ok +== +SELECT TRY_CAST('{1=2}' AS MAP("NULL", "NULL")) +-- +ok +== +SELECT CAST('{1=2}' AS MAP("NULL", "NULL")) +-- +ok +== +SELECT TRY_CAST(x AS MAP("NULL", "NULL")) FROM (VALUES ('{1=1}'), ('{}'), (NULL)) t(x) +-- +ok +== +SELECT TRY_CAST(x AS MAP(INT, INT)) FROM (VALUES ('{1=1}'), ('{x=1}'), ('{NULL=1}'), (NULL), ('{2=NULL}')) t(x) +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/string_to_struct_cast.test b/parser/testdata/corpus/sql/cast/string_to_struct_cast.test index 9c2302a..ac26cb9 100644 --- a/parser/testdata/corpus/sql/cast/string_to_struct_cast.test +++ b/parser/testdata/corpus/sql/cast/string_to_struct_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_struct_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{key_A:0}'::STRUCT(key_A INT); diff --git a/parser/testdata/corpus/sql/cast/string_to_struct_escapes.test b/parser/testdata/corpus/sql/cast/string_to_struct_escapes.test index 4603387..dd84ce2 100644 --- a/parser/testdata/corpus/sql/cast/string_to_struct_escapes.test +++ b/parser/testdata/corpus/sql/cast/string_to_struct_escapes.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_struct_escapes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select $$[{'a': test}, {'a': NULL}, {'a': 'null'}, {'a': 'nUlL'}, {'a': NULL}, {'a': NULLz}, {'a': 'NULL'}]$$::STRUCT(a VARCHAR)[] a, a::VARCHAR::STRUCT(a VARCHAR)[] b, a IS NOT DISTINCT FROM b diff --git a/parser/testdata/corpus/sql/cast/string_to_struct_variant_child.test b/parser/testdata/corpus/sql/cast/string_to_struct_variant_child.test new file mode 100644 index 0000000..8a36dd4 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/string_to_struct_variant_child.test @@ -0,0 +1,45 @@ +# source: test/sql/cast/string_to_struct_variant_child.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT '{"v":"hello"}'::STRUCT(v VARIANT); +-- +ok +== +SELECT '{"v":42}'::STRUCT(v VARIANT); +-- +ok +== +SELECT '{"a":"x","b":"y"}'::STRUCT(a VARIANT, b VARIANT); +-- +ok +== +SELECT '{"v":null}'::STRUCT(v VARIANT); +-- +ok +== +SELECT NULL::VARCHAR::STRUCT(v VARIANT); +-- +ok +== +SELECT '{"s":{"v":"deep"}}'::STRUCT(s STRUCT(v VARIANT)); +-- +ok +== +CREATE TABLE s(x VARCHAR); +-- +ok +== +INSERT INTO s VALUES ('{"v":"one"}'), ('{"v":"two"}'), (NULL), ('{"v":"three"}'); +-- +ok +== +SELECT x::STRUCT(v VARIANT) FROM s; +-- +ok +== +SELECT '{"v":"a","n":"1"}'::STRUCT(v VARIANT, n INTEGER); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/string_to_unnamed_struct.test b/parser/testdata/corpus/sql/cast/string_to_unnamed_struct.test index d79e262..c17fa89 100644 --- a/parser/testdata/corpus/sql/cast/string_to_unnamed_struct.test +++ b/parser/testdata/corpus/sql/cast/string_to_unnamed_struct.test @@ -1,6 +1,6 @@ # source: test/sql/cast/string_to_unnamed_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select [row('a'), $$(abc)$$] diff --git a/parser/testdata/corpus/sql/cast/struct_to_map.test b/parser/testdata/corpus/sql/cast/struct_to_map.test index 1d815c0..f31b54c 100644 --- a/parser/testdata/corpus/sql/cast/struct_to_map.test +++ b/parser/testdata/corpus/sql/cast/struct_to_map.test @@ -1,6 +1,6 @@ # source: test/sql/cast/struct_to_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {"name": 'Alice', "city": 'NYC'}::MAP(VARCHAR, VARCHAR); diff --git a/parser/testdata/corpus/sql/cast/test_bit_cast.test b/parser/testdata/corpus/sql/cast/test_bit_cast.test index 22ad7dd..d990e91 100644 --- a/parser/testdata/corpus/sql/cast/test_bit_cast.test +++ b/parser/testdata/corpus/sql/cast/test_bit_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/test_bit_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bits (b bit); diff --git a/parser/testdata/corpus/sql/cast/test_boolean_cast.test b/parser/testdata/corpus/sql/cast/test_boolean_cast.test index 4d9d4af..82b88ba 100644 --- a/parser/testdata/corpus/sql/cast/test_boolean_cast.test +++ b/parser/testdata/corpus/sql/cast/test_boolean_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/test_boolean_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST(1=1 AS VARCHAR) diff --git a/parser/testdata/corpus/sql/cast/test_copy_constant_vector_offset.test b/parser/testdata/corpus/sql/cast/test_copy_constant_vector_offset.test new file mode 100644 index 0000000..e392ce8 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/test_copy_constant_vector_offset.test @@ -0,0 +1,45 @@ +# source: test/sql/cast/test_copy_constant_vector_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM (SELECT TRY_CAST(l AS MAP(VARCHAR, INTEGER)[]) x FROM (SELECT list({'a': [i::INT]}) l FROM range(3000) t(i))); +-- +ok +== +SELECT bool_and(x[1]['a'] IS NULL) FROM (SELECT TRY_CAST(l AS MAP(VARCHAR, INTEGER)[]) x FROM (SELECT list({'a': [i::INT]}) l FROM range(2049) t(i))); +-- +ok +== +SELECT bool_and(x[2999]['a'] IS NULL) FROM (SELECT TRY_CAST(l AS MAP(VARCHAR, UUID)[]) x FROM (SELECT list({'a': i::INT, 'b': i::INT}) l FROM range(3000) t(i))); +-- +ok +== +SELECT max(length(x::VARCHAR)) FROM (SELECT TRY_CAST(l AS MAP(VARCHAR, INT)[][]) x FROM (SELECT list([{'a': [i::INT]}]) l FROM range(3000) t(i))); +-- +ok +== +SELECT max(length(u::MAP(VARCHAR, VARCHAR)[]::VARCHAR)) FROM (SELECT TRY_CAST(l AS STRUCT(a INT, b VARCHAR)[]) u FROM (SELECT list(i) l FROM range(5000) t(i))); +-- +ok +== +SELECT m['2048'] IS NULL FROM (SELECT TRY_CAST(map_from_entries(list({'k': i::VARCHAR, 'v': i::INT})) AS MAP(VARCHAR, UUID)) m FROM range(2049) t(i)); +-- +ok +== +SELECT x[2049]['b'] FROM (SELECT list({'a': NULL, 'b': i})::MAP(VARCHAR, INT)[] x FROM range(2049) t(i)); +-- +ok +== +SELECT x[2049]['a'] IS NULL FROM (SELECT list({'a': NULL, 'b': i})::MAP(VARCHAR, INT)[] x FROM range(2049) t(i)); +-- +ok +== +SELECT m['2048'] IS NULL FROM (SELECT map(list(i::VARCHAR), list(NULL))::MAP(VARCHAR, INT) m FROM range(2049) t(i)); +-- +ok +== +SELECT len(list({'a': NULL, 'b': i})::MAP(VARCHAR, INT)[]::VARCHAR) FROM range(3000) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/test_exponent_in_cast.test b/parser/testdata/corpus/sql/cast/test_exponent_in_cast.test index ba44244..1ad53b8 100644 --- a/parser/testdata/corpus/sql/cast/test_exponent_in_cast.test +++ b/parser/testdata/corpus/sql/cast/test_exponent_in_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/test_exponent_in_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST('e1' AS INTEGER); diff --git a/parser/testdata/corpus/sql/cast/test_string_binary_cast.test b/parser/testdata/corpus/sql/cast/test_string_binary_cast.test index 77552d1..85ae1cc 100644 --- a/parser/testdata/corpus/sql/cast/test_string_binary_cast.test +++ b/parser/testdata/corpus/sql/cast/test_string_binary_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/test_string_binary_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{prefix}'::INT diff --git a/parser/testdata/corpus/sql/cast/test_string_cast.test b/parser/testdata/corpus/sql/cast/test_string_cast.test index 616b11e..111b572 100644 --- a/parser/testdata/corpus/sql/cast/test_string_cast.test +++ b/parser/testdata/corpus/sql/cast/test_string_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/test_string_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (1=1)::VARCHAR, (1=0)::VARCHAR, NULL::BOOLEAN::VARCHAR diff --git a/parser/testdata/corpus/sql/cast/test_try_cast.test b/parser/testdata/corpus/sql/cast/test_try_cast.test index 3bc0f8a..550aacd 100644 --- a/parser/testdata/corpus/sql/cast/test_try_cast.test +++ b/parser/testdata/corpus/sql/cast/test_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/test_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRY_CAST('hello' as INTEGER) diff --git a/parser/testdata/corpus/sql/cast/timestamp_casts.test b/parser/testdata/corpus/sql/cast/timestamp_casts.test index 1f73a8a..11f476e 100644 --- a/parser/testdata/corpus/sql/cast/timestamp_casts.test +++ b/parser/testdata/corpus/sql/cast/timestamp_casts.test @@ -1,6 +1,6 @@ # source: test/sql/cast/timestamp_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tss AS @@ -44,6 +44,10 @@ SELECT CAST(TIMESTAMPTZ '2262-04-11 23:47:16.854776+00' AS TIMESTAMP_NS); -- ok == +SELECT CAST(TIMESTAMPTZ '2262-04-11 23:47:16.854776+00' AS TIMESTAMPTZ_NS); +-- +ok +== SELECT CAST(TIMESTAMP_MS '2262-04-11 23:47:16.855' AS TIMESTAMP_NS); -- ok @@ -117,3 +121,43 @@ SELECT -- ok == +SELECT typeof(CAST(now() AS TIMESTAMPTZ_NS)); +-- +ok +== +SELECT + CAST(TIMESTAMPTZ '2026-01-01 12:34:56.123456+00' AS TIMESTAMPTZ_NS), + CAST(TIMESTAMPTZ '2026-01-01 12:34:56.123456+00' AS TIMESTAMPTZ_NS) = '2026-01-01 12:34:56.123456000+00'::TIMESTAMPTZ_NS; +-- +ok +== +SELECT CAST(TIMESTAMPTZ '2026-01-01 12:34:56.123456+00' AS TIMESTAMPTZ_NS) = + CAST(TIMESTAMPTZ '2026-01-01 12:34:56.123456+00'::VARCHAR AS TIMESTAMPTZ_NS); +-- +ok +== +SELECT + CAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS), + CAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS), + CAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS) = 'infinity'::TIMESTAMPTZ_NS, + CAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS) = '-infinity'::TIMESTAMPTZ_NS; +-- +ok +== +SELECT + TRY_CAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS), + TRY_CAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS); +-- +ok +== +SELECT TRY_CAST(TIMESTAMPTZ '2262-04-11 23:47:16.854776+00' AS TIMESTAMPTZ_NS); +-- +ok +== +SELECT + CAST(TIMESTAMPTZ '2026-04-09 11:48:07.123456+00' AS TIMESTAMP_MS), + CAST(TIMESTAMPTZ '2026-04-09 11:48:07.123456+00' AS TIMESTAMP_S), + CAST(TIMESTAMPTZ_NS '2026-04-09 11:48:07.123456789+00' AS TIMESTAMP_NS); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/timestamp_casts_icu.test b/parser/testdata/corpus/sql/cast/timestamp_casts_icu.test new file mode 100644 index 0000000..35b0365 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/timestamp_casts_icu.test @@ -0,0 +1,56 @@ +# source: test/sql/cast/timestamp_casts_icu.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tstz_us AS + FROM VALUES + (1, TIMESTAMPTZ '2026-01-01 12:34:56.123456+00'), + (2, TIMESTAMPTZ '1970-01-01 00:00:00.000001+00'), + (3, TIMESTAMPTZ '1969-12-31 23:59:59.999999+00'), + (4, TIMESTAMPTZ '1900-06-15 08:00:00.5+00'), + (5, TIMESTAMPTZ '2262-04-11 23:47:16.854775+00'), + (6, TIMESTAMPTZ 'infinity'), + (7, TIMESTAMPTZ '-infinity'), + (8, NULL) + tbl(i, t); +-- +ok +== +SELECT i, t::TIMESTAMPTZ_NS, t::TIMESTAMPTZ_NS::TIMESTAMPTZ = t +FROM tstz_us +ORDER BY i; +-- +ok +== +SET Calendar = 'gregorian'; +-- +ok +== +SET TimeZone = 'America/Los_Angeles'; +-- +ok +== +SELECT + CAST(TIMESTAMPTZ '2026-07-01 12:34:56.654321+00' AS TIMESTAMPTZ_NS), + CAST(TIMESTAMPTZ '2026-07-01 12:34:56.654321+00' AS TIMESTAMPTZ_NS) = '2026-07-01 12:34:56.654321000+00'::TIMESTAMPTZ_NS; +-- +ok +== +SELECT CAST(TIMESTAMPTZ '2026-07-01 12:34:56.654321+00' AS TIMESTAMPTZ_NS) = + CAST(TIMESTAMPTZ '2026-07-01 12:34:56.654321+00'::VARCHAR AS TIMESTAMPTZ_NS); +-- +ok +== +SET TimeZone = 'Asia/Kathmandu'; +-- +ok +== +SELECT + CAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS), + CAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS), + TRY_CAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS), + TRY_CAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS); +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/timestamp_date_cast.test b/parser/testdata/corpus/sql/cast/timestamp_date_cast.test index 5187414..b722640 100644 --- a/parser/testdata/corpus/sql/cast/timestamp_date_cast.test +++ b/parser/testdata/corpus/sql/cast/timestamp_date_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/timestamp_date_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as diff --git a/parser/testdata/corpus/sql/cast/try_cast_blob_to_bit.test b/parser/testdata/corpus/sql/cast/try_cast_blob_to_bit.test new file mode 100644 index 0000000..0f4ccde --- /dev/null +++ b/parser/testdata/corpus/sql/cast/try_cast_blob_to_bit.test @@ -0,0 +1,29 @@ +# source: test/sql/cast/try_cast_blob_to_bit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST(''::BLOB AS BIT); +-- +ok +== +SELECT TRY_CAST([''::BLOB] AS BIT[]); +-- +ok +== +CREATE TABLE t(b BLOB); +-- +ok +== +INSERT INTO t VALUES (''), ('\x01'); +-- +ok +== +SELECT TRY_CAST(b AS BIT) IS NULL FROM t ORDER BY 1; +-- +ok +== +SELECT '\x41'::BLOB::BIT; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cast/union_cast.test b/parser/testdata/corpus/sql/cast/union_cast.test index d6eef38..71f723b 100644 --- a/parser/testdata/corpus/sql/cast/union_cast.test +++ b/parser/testdata/corpus/sql/cast/union_cast.test @@ -1,6 +1,6 @@ # source: test/sql/cast/union_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (i UNION(a INT)); diff --git a/parser/testdata/corpus/sql/cast/union_member_variant_cast.test b/parser/testdata/corpus/sql/cast/union_member_variant_cast.test new file mode 100644 index 0000000..450b2c1 --- /dev/null +++ b/parser/testdata/corpus/sql/cast/union_member_variant_cast.test @@ -0,0 +1,45 @@ +# source: test/sql/cast/union_member_variant_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT union_value(a := 42)::UNION(a VARIANT); +-- +ok +== +SELECT union_value(a := 'hello')::UNION(a VARIANT); +-- +ok +== +SELECT union_value(a := 42)::UNION(a VARIANT, b INTEGER); +-- +ok +== +SELECT union_tag(union_value(a := 42)::UNION(a VARIANT, b INTEGER)); +-- +ok +== +SELECT union_value(a := NULL::INTEGER)::UNION(a VARIANT); +-- +ok +== +SELECT union_value(a := {'v': 42})::UNION(a STRUCT(v VARIANT)); +-- +ok +== +SELECT union_value(a := 42)::UNION(a VARIANT, b VARIANT); +-- +ok +== +CREATE TABLE union_tbl AS SELECT * FROM (VALUES (union_value(a := 42)), (union_value(a := 7)), (NULL)) t(u); +-- +ok +== +SELECT u::UNION(a VARIANT) FROM union_tbl; +-- +ok +== +SELECT variant_typeof((u::UNION(a VARIANT)).a) FROM union_tbl; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/case_insensitive_alter.test b/parser/testdata/corpus/sql/catalog/case_insensitive_alter.test index 45c3ad0..cffa364 100644 --- a/parser/testdata/corpus/sql/catalog/case_insensitive_alter.test +++ b/parser/testdata/corpus/sql/catalog/case_insensitive_alter.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/case_insensitive_alter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "MyTable"(i integer, "BigColumn" integer); diff --git a/parser/testdata/corpus/sql/catalog/case_insensitive_binder.test b/parser/testdata/corpus/sql/catalog/case_insensitive_binder.test index 2b0de1f..6528265 100644 --- a/parser/testdata/corpus/sql/catalog/case_insensitive_binder.test +++ b/parser/testdata/corpus/sql/catalog/case_insensitive_binder.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/case_insensitive_binder.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "MyTable"(i integer); diff --git a/parser/testdata/corpus/sql/catalog/case_insensitive_caps.test b/parser/testdata/corpus/sql/catalog/case_insensitive_caps.test index 1e715b5..aace8b9 100644 --- a/parser/testdata/corpus/sql/catalog/case_insensitive_caps.test +++ b/parser/testdata/corpus/sql/catalog/case_insensitive_caps.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/case_insensitive_caps.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE mytable(mycolumn INTEGER, myothercolumn INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/case_insensitive_cte.test b/parser/testdata/corpus/sql/catalog/case_insensitive_cte.test index 09b0884..9bdf59d 100644 --- a/parser/testdata/corpus/sql/catalog/case_insensitive_cte.test +++ b/parser/testdata/corpus/sql/catalog/case_insensitive_cte.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/case_insensitive_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte AS (SELECT 42 "A") diff --git a/parser/testdata/corpus/sql/catalog/case_insensitive_operations.test b/parser/testdata/corpus/sql/catalog/case_insensitive_operations.test index ba2187c..e74eda1 100644 --- a/parser/testdata/corpus/sql/catalog/case_insensitive_operations.test +++ b/parser/testdata/corpus/sql/catalog/case_insensitive_operations.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/case_insensitive_operations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE INTEGERS(I INTEGER); @@ -97,7 +97,7 @@ DROP TABLE structs; -- ok == -PRAGMA preserve_identifier_case=false; +PRAGMA preserve_identifier_case='lowercase'; -- ok == diff --git a/parser/testdata/corpus/sql/catalog/case_insensitive_using.test b/parser/testdata/corpus/sql/catalog/case_insensitive_using.test index 7fea62c..46a9f35 100644 --- a/parser/testdata/corpus/sql/catalog/case_insensitive_using.test +++ b/parser/testdata/corpus/sql/catalog/case_insensitive_using.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/case_insensitive_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table A as select 1 as "X", 2 as "Y"; diff --git a/parser/testdata/corpus/sql/catalog/comment_on.test b/parser/testdata/corpus/sql/catalog/comment_on.test index 962a0f9..d77db2d 100644 --- a/parser/testdata/corpus/sql/catalog/comment_on.test +++ b/parser/testdata/corpus/sql/catalog/comment_on.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/comment_on.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COMMENT ON TABLE test IS 1337 diff --git a/parser/testdata/corpus/sql/catalog/comment_on_column.test b/parser/testdata/corpus/sql/catalog/comment_on_column.test index 2440225..fd7b5d0 100644 --- a/parser/testdata/corpus/sql/catalog/comment_on_column.test +++ b/parser/testdata/corpus/sql/catalog/comment_on_column.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/comment_on_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW test_view AS SELECT test_table_column as test_view_column FROM test_table; @@ -67,3 +67,15 @@ COMMENT ON COLUMN aliased_view.nonexistent IS 'bad' -- ok == +CREATE VIEW swapped_view(b, a) AS SELECT 1 AS a, 2 AS b; +-- +ok +== +COMMENT ON COLUMN swapped_view.a IS 'visible a' +-- +ok +== +SELECT column_name, comment FROM duckdb_columns() WHERE table_name='swapped_view' ORDER BY column_index; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/comment_on_column_remote_catalog.test b/parser/testdata/corpus/sql/catalog/comment_on_column_remote_catalog.test new file mode 100644 index 0000000..673ab49 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/comment_on_column_remote_catalog.test @@ -0,0 +1,45 @@ +# source: test/sql/catalog/comment_on_column_remote_catalog.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH 'quack:localhost' AS qk (TOKEN 'test_token'); +-- +ok +== +CREATE TABLE tbl(i INTEGER, j INTEGER); +-- +ok +== +COMMENT ON COLUMN tbl.i IS 'local column comment'; +-- +ok +== +SELECT comment FROM duckdb_columns() WHERE table_name = 'tbl' AND column_name = 'i'; +-- +ok +== +CREATE VIEW v AS SELECT i AS vi, j AS vj FROM tbl; +-- +ok +== +COMMENT ON COLUMN v.vi IS 'local view column comment'; +-- +ok +== +SELECT comment FROM duckdb_columns() WHERE table_name = 'v' AND column_name = 'vi'; +-- +ok +== +COMMENT ON COLUMN memory.main.tbl.j IS 'qualified local column comment'; +-- +ok +== +SELECT comment FROM duckdb_columns() WHERE table_name = 'tbl' AND column_name = 'j'; +-- +ok +== +COMMENT ON COLUMN missing_tbl.i IS 'no such table'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/comment_on_dependencies.test b/parser/testdata/corpus/sql/catalog/comment_on_dependencies.test index e06aed2..cdf6ed9 100644 --- a/parser/testdata/corpus/sql/catalog/comment_on_dependencies.test +++ b/parser/testdata/corpus/sql/catalog/comment_on_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/comment_on_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT 1 as c1 diff --git a/parser/testdata/corpus/sql/catalog/comment_on_extended.test b/parser/testdata/corpus/sql/catalog/comment_on_extended.test index 424af97..95a7b42 100644 --- a/parser/testdata/corpus/sql/catalog/comment_on_extended.test +++ b/parser/testdata/corpus/sql/catalog/comment_on_extended.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/comment_on_extended.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/comment_on_extended_1.db' AS db1 @@ -11,10 +11,6 @@ ATTACH '{TEST_DIR}/comment_on_extended_2.db' AS db2 -- ok == -CREATE SCHEMA db2.s2; --- -ok -== CREATE TABLE db1.s1.t1 AS SELECT 1 as c1 -- ok @@ -93,7 +89,7 @@ ok == COMMENT ON COLUMN col1 IS 'no bueno' -- -error: Parser Error: Invalid column reference: 'col1' +error: Parser Error: Invalid column reference: col1 == COMMENT ON COLUMN galaxy.db.schema.table.col1 IS 'no bueno' -- diff --git a/parser/testdata/corpus/sql/catalog/comment_on_pg_description.test b/parser/testdata/corpus/sql/catalog/comment_on_pg_description.test index e89005a..2f7f552 100644 --- a/parser/testdata/corpus/sql/catalog/comment_on_pg_description.test +++ b/parser/testdata/corpus/sql/catalog/comment_on_pg_description.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/comment_on_pg_description.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT 1 as a; diff --git a/parser/testdata/corpus/sql/catalog/comment_on_wal.test b/parser/testdata/corpus/sql/catalog/comment_on_wal.test index 3bf1254..d766434 100644 --- a/parser/testdata/corpus/sql/catalog/comment_on_wal.test +++ b/parser/testdata/corpus/sql/catalog/comment_on_wal.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/comment_on_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold = '10.0 GB'; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_fk.test b/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_fk.test index cf08706..1966360 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_fk.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_fk.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/add_column_to_table_referenced_by_fk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(a varchar primary key); diff --git a/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_macro.test b/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_macro.test index aa04a62..4f5aa84 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_macro.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/add_column_to_table_referenced_by_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(a varchar default 'abc'); diff --git a/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_view.test b/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_view.test index b869380..0d91ec4 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_view.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/add_column_to_table_referenced_by_view.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/add_column_to_table_referenced_by_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view vw as select * from tbl; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/alter_table_keeps_schema_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/alter_table_keeps_schema_dependency.test new file mode 100644 index 0000000..b322b26 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/dependencies/alter_table_keeps_schema_dependency.test @@ -0,0 +1,53 @@ +# source: test/sql/catalog/dependencies/alter_table_keeps_schema_dependency.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_skip_checkpoint_on_commit=true +-- +ok +== +CREATE SCHEMA s +-- +ok +== +CREATE TABLE s.t AS SELECT range AS i, range::VARCHAR AS v FROM range(1000) +-- +ok +== +ALTER TABLE s.t ADD COLUMN j INTEGER +-- +ok +== +ALTER TABLE s.t DROP COLUMN v +-- +ok +== +ALTER TABLE s.t RENAME COLUMN j TO k +-- +ok +== +ALTER TABLE s.t ALTER COLUMN k SET DEFAULT 42 +-- +ok +== +DROP SCHEMA s +-- +ok +== +SELECT count(*) FROM duckdb_tables() WHERE schema_name = 's' +-- +ok +== +DROP SCHEMA s CASCADE +-- +ok +== +CREATE TABLE s.t(i INTEGER) +-- +ok +== +DROP TABLE s.t +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/dependencies/change_type_of_table_column_referenced_by_index.test b/parser/testdata/corpus/sql/catalog/dependencies/change_type_of_table_column_referenced_by_index.test index 882096f..46e9f44 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/change_type_of_table_column_referenced_by_index.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/change_type_of_table_column_referenced_by_index.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/change_type_of_table_column_referenced_by_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(a varchar, b integer); diff --git a/parser/testdata/corpus/sql/catalog/dependencies/drop_recreate_schema_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/drop_recreate_schema_dependency.test index 23920ca..519e670 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/drop_recreate_schema_dependency.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/drop_recreate_schema_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/drop_recreate_schema_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE documents(id VARCHAR, body VARCHAR); diff --git a/parser/testdata/corpus/sql/catalog/dependencies/remove_table_column_referenced_by_index.test b/parser/testdata/corpus/sql/catalog/dependencies/remove_table_column_referenced_by_index.test index 40fdf97..63c4316 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/remove_table_column_referenced_by_index.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/remove_table_column_referenced_by_index.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/remove_table_column_referenced_by_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit alter table tbl drop column a; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/rename_table_column_referenced_by_index.test b/parser/testdata/corpus/sql/catalog/dependencies/rename_table_column_referenced_by_index.test index 538fad2..7859b6d 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/rename_table_column_referenced_by_index.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/rename_table_column_referenced_by_index.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/rename_table_column_referenced_by_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(a varchar); diff --git a/parser/testdata/corpus/sql/catalog/dependencies/rename_view_referenced_by_table_macro.test b/parser/testdata/corpus/sql/catalog/dependencies/rename_view_referenced_by_table_macro.test index 20a7abf..058fa74 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/rename_view_referenced_by_table_macro.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/rename_view_referenced_by_table_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/rename_view_referenced_by_table_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (a varchar); diff --git a/parser/testdata/corpus/sql/catalog/dependencies/set_default_of_table_column_referenced_by_index.test b/parser/testdata/corpus/sql/catalog/dependencies/set_default_of_table_column_referenced_by_index.test index 4153e50..c1ce636 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/set_default_of_table_column_referenced_by_index.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/set_default_of_table_column_referenced_by_index.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/set_default_of_table_column_referenced_by_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit alter table tbl alter a set default 'test'; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_alter_dependency_ownership.test b/parser/testdata/corpus/sql/catalog/dependencies/test_alter_dependency_ownership.test index cf6226d..1f63e5e 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_alter_dependency_ownership.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_alter_dependency_ownership.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_alter_dependency_ownership.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE sequence1; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owned_by.test b/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owned_by.test index 517e6da..6489dfa 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owned_by.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owned_by.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_alter_owned_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 ( diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owning_table.test b/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owning_table.test index 1c71a7f..b86585f 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owning_table.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_alter_owning_table.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_alter_owning_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create sequence seq; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_alter.test b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_alter.test index efffad0..8bc1b8d 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_alter.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_alter.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_concurrent_alter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit alter sequence seq owned by t2; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_drop.test b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_drop.test index 4a9b45f..2646614 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_drop.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_drop.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_concurrent_drop.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl{i} ( diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_index_creation.test b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_index_creation.test index fc9b4df..5af66f2 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_index_creation.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_index_creation.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_concurrent_index_creation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/concurrent_index_creation.db' AS source; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_schema_creation.test b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_schema_creation.test index 2e5f8a0..439bb95 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_schema_creation.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_concurrent_schema_creation.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_concurrent_schema_creation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create schema schema{i}; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_default_value_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/test_default_value_dependency.test index 06ccb2d..31075bd 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_default_value_dependency.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_default_value_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_default_value_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER DEFAULT nextval('seq'), j INTEGER) diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_drop_column_sequence_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/test_drop_column_sequence_dependency.test index 340706b..06d44f9 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_drop_column_sequence_dependency.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_drop_column_sequence_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_drop_column_sequence_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE seq2 START 1; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_drop_default_referencing_sequence.test b/parser/testdata/corpus/sql/catalog/dependencies/test_drop_default_referencing_sequence.test index 48d1ab4..c575cb1 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_drop_default_referencing_sequence.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_drop_default_referencing_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_drop_default_referencing_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set wal_autocheckpoint = '10gb'; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_prepare_dependencies_transactions.test b/parser/testdata/corpus/sql/catalog/dependencies/test_prepare_dependencies_transactions.test index 9339dde..c6fd7e6 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_prepare_dependencies_transactions.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_prepare_dependencies_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_prepare_dependencies_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1), (2), (3), (4), (5) diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_prepared_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/test_prepared_dependency.test index 8641ae6..81b4249 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_prepared_dependency.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_prepared_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_prepared_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v AS SELECT * FROM integers diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_schema_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/test_schema_dependency.test index a75d205..9f62f9c 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_schema_dependency.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_schema_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_schema_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA s1 diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_set_default_sequence_dependency.test b/parser/testdata/corpus/sql/catalog/dependencies/test_set_default_sequence_dependency.test index fe7edbe..a6052e2 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_set_default_sequence_dependency.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_set_default_sequence_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_set_default_sequence_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE id_sequence START 1; diff --git a/parser/testdata/corpus/sql/catalog/dependencies/test_write_after_rename.test b/parser/testdata/corpus/sql/catalog/dependencies/test_write_after_rename.test index 819f041..abba075 100644 --- a/parser/testdata/corpus/sql/catalog/dependencies/test_write_after_rename.test +++ b/parser/testdata/corpus/sql/catalog/dependencies/test_write_after_rename.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/dependencies/test_write_after_rename.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (i integer); diff --git a/parser/testdata/corpus/sql/catalog/did_you_mean.test b/parser/testdata/corpus/sql/catalog/did_you_mean.test index 894bce9..bcaeff4 100644 --- a/parser/testdata/corpus/sql/catalog/did_you_mean.test +++ b/parser/testdata/corpus/sql/catalog/did_you_mean.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/did_you_mean.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test.bye(i INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/drop_create_rollback.test b/parser/testdata/corpus/sql/catalog/drop_create_rollback.test index ad696fb..8a9052a 100644 --- a/parser/testdata/corpus/sql/catalog/drop_create_rollback.test +++ b/parser/testdata/corpus/sql/catalog/drop_create_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/drop_create_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c1 CHAR(5)); diff --git a/parser/testdata/corpus/sql/catalog/function/attached_macro.test b/parser/testdata/corpus/sql/catalog/function/attached_macro.test index 588615d..b2927cb 100644 --- a/parser/testdata/corpus/sql/catalog/function/attached_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/attached_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/attached_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS checksum_macro; diff --git a/parser/testdata/corpus/sql/catalog/function/builtin_macro_parser_settings.test b/parser/testdata/corpus/sql/catalog/function/builtin_macro_parser_settings.test new file mode 100644 index 0000000..6eca651 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/function/builtin_macro_parser_settings.test @@ -0,0 +1,25 @@ +# source: test/sql/catalog/function/builtin_macro_parser_settings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET integer_division = true; +-- +ok +== +SELECT 3 / 2, weighted_avg(x, w) FROM (VALUES (1, 1), (2, 1)) t(x, w); +-- +ok +== +SET preserve_identifier_case = 'uppercase'; +-- +ok +== +SELECT weighted_avg(x, w) FROM (VALUES (1, 1), (2, 1)) t(x, w); +-- +ok +== +SELECT name FROM pragma_table_info('information_schema.tables') WHERE cid = 0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/function/information_schema_macro.test b/parser/testdata/corpus/sql/catalog/function/information_schema_macro.test index f4b2240..4782df2 100644 --- a/parser/testdata/corpus/sql/catalog/function/information_schema_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/information_schema_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/information_schema_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create macro information_schema.foo(a) as a; diff --git a/parser/testdata/corpus/sql/catalog/function/macro_query_table.test b/parser/testdata/corpus/sql/catalog/function/macro_query_table.test index 1f19b80..d72e9cd 100644 --- a/parser/testdata/corpus/sql/catalog/function/macro_query_table.test +++ b/parser/testdata/corpus/sql/catalog/function/macro_query_table.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/macro_query_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create macro min_from_tbl(tbl, col) as (select min(col) from query_table(tbl::VARCHAR)); diff --git a/parser/testdata/corpus/sql/catalog/function/python_style_macro_parameters.test b/parser/testdata/corpus/sql/catalog/function/python_style_macro_parameters.test index 20b8dd6..eccf075 100644 --- a/parser/testdata/corpus/sql/catalog/function/python_style_macro_parameters.test +++ b/parser/testdata/corpus/sql/catalog/function/python_style_macro_parameters.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/python_style_macro_parameters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace macro m(a := 'a', b := 'b') as a || b diff --git a/parser/testdata/corpus/sql/catalog/function/query_function.test b/parser/testdata/corpus/sql/catalog/function/query_function.test index d00202d..1e9127b 100644 --- a/parser/testdata/corpus/sql/catalog/function/query_function.test +++ b/parser/testdata/corpus/sql/catalog/function/query_function.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/query_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM query('SELECT 42'); @@ -61,7 +61,7 @@ ok == SELECT * FROM query(NULL); -- -ok +error: Parser Error: syntax error at or near "NULL" == SELECT * FROM query(' '); -- @@ -149,7 +149,11 @@ ok == FROM query_table(['']); -- -error: Parser Error: syntax error at or near "FROM" +error: Parser Error: Zero-length identifier in qualified name! (input: ) +== +FROM query_table('main..tbl_int'); +-- +error: Parser Error: Zero-length identifier in qualified name! (input: main..tbl_int) == FROM query_table('tbl_int', 'tbl_varchar', tbl2_varchar); -- diff --git a/parser/testdata/corpus/sql/catalog/function/query_function.test.metadata.json b/parser/testdata/corpus/sql/catalog/function/query_function.test.metadata.json index 83bd821..bda74b1 100644 --- a/parser/testdata/corpus/sql/catalog/function/query_function.test.metadata.json +++ b/parser/testdata/corpus/sql/catalog/function/query_function.test.metadata.json @@ -1,11 +1,13 @@ { "skip": { "5f81be9e9bc42318": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", + "b239297cf4a74a7c": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", "f84558899aa09cea": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it" }, "todo": { "2dbe98fbfd26e976": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "6849cf25332caa00": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "7549873c3611e82d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "aa55a1e51d55e50f": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "b1a7071252780b40": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "c0ff2e8320e39445": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", diff --git a/parser/testdata/corpus/sql/catalog/function/query_table_file_paths.test b/parser/testdata/corpus/sql/catalog/function/query_table_file_paths.test new file mode 100644 index 0000000..cdac8c2 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/function/query_table_file_paths.test @@ -0,0 +1,45 @@ +# source: test/sql/catalog/function/query_table_file_paths.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 42 AS x) TO '{TEST_DIR}/query_table_path.parquet' +-- +ok +== +FROM query_table('{TEST_DIR}/query_table_path.parquet') +-- +ok +== +FROM query_table('{TEST_DIR}/./query_table_path.parquet') +-- +ok +== +FROM query_table(['{TEST_DIR}/query_table_path.parquet', '{TEST_DIR}/../' || parse_filename('{TEST_DIR}') || '/query_table_path.parquet']) +-- +ok +== +FROM query_table('nonexistent://blobs.duckdb.org/data/query_table_path.parquet') +-- +ok +== +CREATE SCHEMA "a/b" +-- +ok +== +CREATE TABLE "a/b".t AS SELECT 7 AS i +-- +ok +== +FROM query_table('"a/b".t') +-- +ok +== +COPY (SELECT 1 AS y) TO '{TEST_DIR}/a.b.c.parquet' +-- +ok +== +FROM "{TEST_DIR}/a".b.c.parquet +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/function/struct_extract_macro.test b/parser/testdata/corpus/sql/catalog/function/struct_extract_macro.test index c1608ed..6b90b60 100644 --- a/parser/testdata/corpus/sql/catalog/function/struct_extract_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/struct_extract_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/struct_extract_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO my_extract(x) AS x.a.b diff --git a/parser/testdata/corpus/sql/catalog/function/test_complex_macro.test b/parser/testdata/corpus/sql/catalog/function/test_complex_macro.test index 7c872cb..108ca90 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_complex_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_complex_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_complex_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers (a INT) diff --git a/parser/testdata/corpus/sql/catalog/function/test_cross_catalog_macros.test b/parser/testdata/corpus/sql/catalog/function/test_cross_catalog_macros.test index ce39bae..8e3a120 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_cross_catalog_macros.test +++ b/parser/testdata/corpus/sql/catalog/function/test_cross_catalog_macros.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_cross_catalog_macros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO my_first_macro() AS (84) diff --git a/parser/testdata/corpus/sql/catalog/function/test_cte_macro.test b/parser/testdata/corpus/sql/catalog/function/test_cte_macro.test index 2ec8c72..19b324e 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_cte_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_cte_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_cte_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO parameterized_cte(a) AS (WITH cte AS (SELECT a AS answer) SELECT answer FROM cte) diff --git a/parser/testdata/corpus/sql/catalog/function/test_drop_macro.test b/parser/testdata/corpus/sql/catalog/function/test_drop_macro.test index 0415679..78db4df 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_drop_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_drop_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_drop_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create macro m() as 42; diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_correlated_cte.test b/parser/testdata/corpus/sql/catalog/function/test_macro_correlated_cte.test index 344d8df..af7f6aa 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_correlated_cte.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_correlated_cte.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_correlated_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE MACRO test_21890_macro(q) AS TABLE diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg.test b/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg.test index ade3aec..7212bcb 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_default_arg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO f(x := NULL) AS x+1; diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg_with_dependencies.test b/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg_with_dependencies.test index f6d21da..c79f12e 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg_with_dependencies.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_default_arg_with_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_default_arg_with_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/macro_default_arg.db' (STORAGE_VERSION 'v1.0.0'); diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_13104.test b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_13104.test index f51d6a7..0f6138c 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_13104.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_13104.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_issue_13104.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace macro my_macro(a:=true) as a; diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_14276.test b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_14276.test index c452990..9ee7594 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_14276.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_14276.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_issue_14276.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE MACRO extract_many(x, y) AS (SELECT struct_pack(*COLUMNS(z -> z in y)) FROM (SELECT unnest(x))); diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_18927.test b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_18927.test index 1d02141..489d3d5 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_18927.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_18927.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_issue_18927.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE MACRO my(s) AS s.lower().split('').aggregate('count'); diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_19119.test b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_19119.test index 17fb4b4..238c639 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_issue_19119.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_issue_19119.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_issue_19119.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (x INT); diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_overloads.test b/parser/testdata/corpus/sql/catalog/function/test_macro_overloads.test index d1c09fa..f1d0f86 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_overloads.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_overloads.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_overloads.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO multi_add diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_positional_reference.test b/parser/testdata/corpus/sql/catalog/function/test_macro_positional_reference.test new file mode 100644 index 0000000..6499bf5 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_positional_reference.test @@ -0,0 +1,61 @@ +# source: test/sql/catalog/function/test_macro_positional_reference.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO subtract_args(x, y) AS x - y; +-- +ok +== +SELECT subtract_args(#1, #2), #1 - #2 +FROM (VALUES (10, 3)) AS t(y, x); +-- +ok +== +SELECT subtract_args(#1, #2) FROM (VALUES (10, 3)) AS t(a, b); +-- +ok +== +SELECT subtract_args(x := #1, y := #2), + subtract_args(y := #1, x := #2), + subtract_args(#1, y := #2) +FROM (VALUES (10, 3)) AS t(y, x); +-- +ok +== +SELECT subtract_args(#1, #2) FROM (VALUES (NULL::INTEGER, 3)) AS t(y, x); +-- +ok +== +CREATE MACRO join_args(x, y := 'default') AS coalesce(x, 'null') || ':' || y; +-- +ok +== +SELECT join_args(#1, #2) FROM (VALUES ('left', 'right')) AS t(y, x); +-- +ok +== +SELECT join_args(#1, #2) FROM (VALUES (NULL::VARCHAR, 'right')) AS t(y, x); +-- +ok +== +SELECT join_args(#1) FROM (VALUES ('left')) AS t(y); +-- +ok +== +SELECT pg_typeof(#1) FROM (SELECT 1); +-- +ok +== +SELECT a FROM (SELECT #1 FROM (VALUES (42)) AS t(a)); +-- +ok +== +SELECT renamed FROM (SELECT #1 AS renamed FROM (VALUES (42)) AS t(a)); +-- +ok +== +SELECT subtract_args(#3, #1) FROM (VALUES (10, 3)) AS t(y, x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_relpersistence_conflict.test b/parser/testdata/corpus/sql/catalog/function/test_macro_relpersistence_conflict.test index 23ee3b4..fd75a18 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_relpersistence_conflict.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_relpersistence_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_relpersistence_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create macro test(a, b) as a + b diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_type_overloads.test b/parser/testdata/corpus/sql/catalog/function/test_macro_type_overloads.test index f7f46bf..5c24a5c 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_type_overloads.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_type_overloads.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_type_overloads.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach ':memory:' AS inmemorydb diff --git a/parser/testdata/corpus/sql/catalog/function/test_macro_with_unknown_types.test b/parser/testdata/corpus/sql/catalog/function/test_macro_with_unknown_types.test index fe30add..ff9d7a2 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_macro_with_unknown_types.test +++ b/parser/testdata/corpus/sql/catalog/function/test_macro_with_unknown_types.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_macro_with_unknown_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP MACRO m1(x, y) AS ( diff --git a/parser/testdata/corpus/sql/catalog/function/test_recursive_macro.test b/parser/testdata/corpus/sql/catalog/function/test_recursive_macro.test index 9ef98d6..48275cb 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_recursive_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_recursive_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_recursive_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO "sum"(x) AS (CASE WHEN sum(x) IS NULL THEN 0 ELSE sum(x) END); diff --git a/parser/testdata/corpus/sql/catalog/function/test_recursive_table_macro.test b/parser/testdata/corpus/sql/catalog/function/test_recursive_table_macro.test new file mode 100644 index 0000000..6b9bb41 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/function/test_recursive_table_macro.test @@ -0,0 +1,49 @@ +# source: test/sql/catalog/function/test_recursive_table_macro.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO u(x) AS TABLE SELECT 1 a +-- +ok +== +CREATE MACRO t(x) AS TABLE SELECT * FROM u(x) +-- +ok +== +SELECT * FROM t(1), t(2) +-- +ok +== +CREATE MACRO w(x) AS TABLE SELECT * FROM u(x) JOIN u(x) USING (a) +-- +ok +== +SELECT * FROM w(1) +-- +ok +== +CREATE OR REPLACE MACRO u(x) AS TABLE SELECT * FROM t(x) +-- +ok +== +SELECT * FROM t(1) +-- +ok +== +CREATE MACRO u2(x) AS TABLE SELECT 1 a +-- +ok +== +CREATE MACRO t2(x) AS TABLE SELECT * FROM u2(x) +-- +ok +== +CREATE OR REPLACE MACRO u2(x) AS TABLE SELECT (SELECT count(*) FROM t2(x)) a +-- +ok +== +SELECT * FROM t2(1) +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/function/test_sequence_macro.test b/parser/testdata/corpus/sql/catalog/function/test_sequence_macro.test index 0470b5c..f925c7f 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_sequence_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_sequence_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_sequence_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers (i INT) diff --git a/parser/testdata/corpus/sql/catalog/function/test_simple_macro.test b/parser/testdata/corpus/sql/catalog/function/test_simple_macro.test index 5af8713..03e06d8 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_simple_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_simple_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_simple_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO one() AS (SELECT 1); @@ -165,7 +165,7 @@ ok == CREATE MACRO conflict(i, i) AS i + 1 -- -error: Parser Error: Duplicate parameter 'i' in macro definition +error: Parser Error: Duplicate parameter "i" in macro definition == CREATE MACRO myavg(x) AS SUM(x) / COUNT(x) -- @@ -193,7 +193,7 @@ ok == CREATE MACRO conflict(a, a := 1) AS a + a -- -error: Parser Error: Duplicate parameter 'a' in macro definition +error: Parser Error: Duplicate parameter "a" in macro definition == CREATE MACRO add_default5(a, b := 5) AS a + b -- @@ -241,7 +241,7 @@ ok == CREATE MACRO two_default_params(a := 4, a := 2) AS a + a -- -error: Parser Error: Duplicate parameter 'a' in macro definition +error: Parser Error: Duplicate parameter "a" in macro definition == CREATE MACRO two_default_params(a := 4, b := 2) AS a + b -- diff --git a/parser/testdata/corpus/sql/catalog/function/test_subquery_macro.test b/parser/testdata/corpus/sql/catalog/function/test_subquery_macro.test index 3655e89..7832b2f 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_subquery_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_subquery_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_subquery_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO subquery(a) AS (SELECT a) diff --git a/parser/testdata/corpus/sql/catalog/function/test_table_macro.test b/parser/testdata/corpus/sql/catalog/function/test_table_macro.test index fff027e..d2e0a66 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_table_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_table_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_table_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_tbl (id INT, name string); diff --git a/parser/testdata/corpus/sql/catalog/function/test_table_macro_args.test b/parser/testdata/corpus/sql/catalog/function/test_table_macro_args.test index a9e94d4..6ee973f 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_table_macro_args.test +++ b/parser/testdata/corpus/sql/catalog/function/test_table_macro_args.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_table_macro_args.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE cards_tbl (val int, name string, suit string); @@ -112,5 +112,5 @@ error: Parser Error: Parameter without a default follows parameter with a defaul == CREATE MACRO card_select_val(_val_min, _val_min) as TABLE SELECT * FROM cards_tbl WHERE val>=_val_min AND val<=_val_max; -- -error: Parser Error: Duplicate parameter '_val_min' in macro definition +error: Parser Error: Duplicate parameter "_val_min" in macro definition == diff --git a/parser/testdata/corpus/sql/catalog/function/test_table_macro_complex.test b/parser/testdata/corpus/sql/catalog/function/test_table_macro_complex.test index 9f9303f..43b067c 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_table_macro_complex.test +++ b/parser/testdata/corpus/sql/catalog/function/test_table_macro_complex.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_table_macro_complex.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO my_values(m,s) as TABLE select * from (values (1.0*m+s,'adam'), (2.0*m+s,'ben'), diff --git a/parser/testdata/corpus/sql/catalog/function/test_table_macro_copy.test b/parser/testdata/corpus/sql/catalog/function/test_table_macro_copy.test index 9d4f31f..a42b982 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_table_macro_copy.test +++ b/parser/testdata/corpus/sql/catalog/function/test_table_macro_copy.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_table_macro_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/table_macro2.db' diff --git a/parser/testdata/corpus/sql/catalog/function/test_table_macro_groups.test b/parser/testdata/corpus/sql/catalog/function/test_table_macro_groups.test index 4668ba8..78c460e 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_table_macro_groups.test +++ b/parser/testdata/corpus/sql/catalog/function/test_table_macro_groups.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_table_macro_groups.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE car_pool ( diff --git a/parser/testdata/corpus/sql/catalog/function/test_window_macro.test b/parser/testdata/corpus/sql/catalog/function/test_window_macro.test index db7a677..41001e1 100644 --- a/parser/testdata/corpus/sql/catalog/function/test_window_macro.test +++ b/parser/testdata/corpus/sql/catalog/function/test_window_macro.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/function/test_window_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE MACRO my_agg(x) AS SUM(CASE WHEN x THEN 1 END); diff --git a/parser/testdata/corpus/sql/catalog/identifier_embedded_nul.test b/parser/testdata/corpus/sql/catalog/identifier_embedded_nul.test new file mode 100644 index 0000000..54f0786 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/identifier_embedded_nul.test @@ -0,0 +1,45 @@ +# source: test/sql/catalog/identifier_embedded_nul.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE secret(x INT); +-- +ok +== +INSERT INTO secret VALUES (42); +-- +ok +== +SELECT * FROM query_table('secret' || chr(0) || 'other'); +-- +ok +== +SELECT * FROM query('SELECT * FROM "secret' || chr(0) || 'other"'); +-- +ok +== +SELECT * FROM query('SELECT "abs' || chr(0) || 'zz"(-5)'); +-- +ok +== +CREATE SCHEMA s; +-- +ok +== +CREATE TABLE s.t(x INT); +-- +ok +== +SELECT * FROM query('SELECT * FROM "s' || chr(0) || 'zz"."t' || chr(0) || 'qq"'); +-- +ok +== +SELECT x FROM secret; +-- +ok +== +SELECT x FROM SECRET; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/information_schema_read_only.test b/parser/testdata/corpus/sql/catalog/information_schema_read_only.test index 18ae8e4..b71539e 100644 --- a/parser/testdata/corpus/sql/catalog/information_schema_read_only.test +++ b/parser/testdata/corpus/sql/catalog/information_schema_read_only.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/information_schema_read_only.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE system.information_schema.tbl(i INT) diff --git a/parser/testdata/corpus/sql/catalog/issue_9459.test b/parser/testdata/corpus/sql/catalog/issue_9459.test index 725ca2c..d723db2 100644 --- a/parser/testdata/corpus/sql/catalog/issue_9459.test +++ b/parser/testdata/corpus/sql/catalog/issue_9459.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/issue_9459.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create schema """cursed_schema"; diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/create_nested_schema.test b/parser/testdata/corpus/sql/catalog/nested_schema/create_nested_schema.test index 2964b46..573446d 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/create_nested_schema.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/create_nested_schema.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/create_nested_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA memory.s2; diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/deeply_nested_entries.test b/parser/testdata/corpus/sql/catalog/nested_schema/deeply_nested_entries.test new file mode 100644 index 0000000..9de5a23 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/nested_schema/deeply_nested_entries.test @@ -0,0 +1,173 @@ +# source: test/sql/catalog/nested_schema/deeply_nested_entries.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA s1.s2; +-- +ok +== +CREATE SCHEMA s1.s2.s3; +-- +ok +== +CREATE SCHEMA s1.s2.s3.s4; +-- +ok +== +SELECT schema_name, parent_schema FROM duckdb_schemas() WHERE schema_name IN ('s1','s2','s3','s4') ORDER BY schema_name; +-- +ok +== +CREATE TABLE s1.s2.s3.tbl(i INTEGER, s STRUCT(a INTEGER)); +-- +ok +== +INSERT INTO s1.s2.s3.tbl VALUES (42, {'a': 7}); +-- +ok +== +SELECT i FROM s1.s2.s3.tbl; +-- +ok +== +SELECT i FROM memory.s1.s2.s3.tbl; +-- +ok +== +SELECT 1 FROM s1.s2.s3.missing; +-- +ok +== +SELECT s1.s2.s3.tbl.i FROM s1.s2.s3.tbl; +-- +ok +== +SELECT memory.s1.s2.s3.tbl.i FROM s1.s2.s3.tbl; +-- +ok +== +SELECT memory.s1.s2.s3.tbl.s.a FROM s1.s2.s3.tbl; +-- +ok +== +SELECT s3.tbl.i FROM s1.s2.s3.tbl; +-- +ok +== +UPDATE memory.s1.s2.s3.tbl SET i = i + 1; +-- +ok +== +DELETE FROM s1.s2.s3.tbl WHERE i = 43; +-- +ok +== +SELECT count(*) FROM s1.s2.s3.tbl; +-- +ok +== +ALTER TABLE s1.s2.s3.tbl RENAME TO tbl_renamed; +-- +ok +== +SELECT database_name, schema_name, table_name FROM duckdb_tables() WHERE table_name = 'tbl_renamed'; +-- +ok +== +DROP TABLE memory.s1.s2.s3.tbl_renamed; +-- +ok +== +CREATE VIEW s1.s2.s3.s4.v AS SELECT 42 AS x; +-- +ok +== +SELECT * FROM s1.s2.s3.s4.v; +-- +ok +== +SELECT * FROM memory.s1.s2.s3.s4.v; +-- +ok +== +CREATE MACRO s1.s2.s3.dbl(a) AS a * 2; +-- +ok +== +SELECT s1.s2.s3.dbl(21), memory.s1.s2.s3.dbl(10); +-- +ok +== +CREATE MACRO s1.s2.s3.tbl_macro() AS TABLE SELECT 99 AS x; +-- +ok +== +SELECT * FROM s1.s2.s3.tbl_macro(); +-- +ok +== +SELECT * FROM memory.s1.s2.s3.tbl_macro(); +-- +ok +== +CREATE TYPE s1.s2.s3.mood AS ENUM ('happy'); +-- +ok +== +SELECT 'happy'::s1.s2.s3.mood, 'happy'::memory.s1.s2.s3.mood; +-- +ok +== +CREATE SEQUENCE s1.s2.s3.seq START 5; +-- +ok +== +SELECT nextval('s1.s2.s3.seq'), nextval('memory.s1.s2.s3.seq'); +-- +ok +== +CREATE TABLE s1.s2.s3.s4.info_tbl(i INTEGER, j VARCHAR); +-- +ok +== +SELECT name FROM pragma_table_info('s1.s2.s3.s4.info_tbl'); +-- +ok +== +SELECT name FROM pragma_table_info('memory.s1.s2.s3.s4.info_tbl'); +-- +ok +== +CREATE SCHEMA db2.a; +-- +ok +== +CREATE SCHEMA db2.a.b; +-- +ok +== +CREATE SCHEMA db2.a.b.c; +-- +ok +== +CREATE TABLE db2.a.b.c.t(i INTEGER); +-- +ok +== +INSERT INTO db2.a.b.c.t VALUES (1); +-- +ok +== +SELECT i FROM db2.a.b.c.t; +-- +ok +== +CREATE TABLE s1.s2.nope.t(i INTEGER); +-- +ok +== +SELECT * FROM s1.nope.s3.tbl; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema.test b/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema.test index 080c02d..db50d13 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/drop_nested_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA s1.sibling; @@ -70,14 +70,6 @@ WHERE database_name = 'memory' AND schema_name IN ('s1','child','grandchild','si -- ok == -CREATE SCHEMA db2.a; --- -ok -== -CREATE SCHEMA db2.a.b; --- -ok -== DROP SCHEMA db2.a; -- ok diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema_persist.test b/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema_persist.test index d57646d..5854b91 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema_persist.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/drop_nested_schema_persist.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/drop_nested_schema_persist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA parent; diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_alter.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_alter.test index 9765b84..6667268 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_alter.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_alter.test @@ -1,12 +1,8 @@ # source: test/sql/catalog/nested_schema/nested_alter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE SCHEMA s1.s2; --- -ok -== CREATE TABLE s1.s2.t(i INTEGER, j INTEGER); -- ok diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_constraints.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_constraints.test index e656f6c..a348050 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_constraints.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE s1.s2.pk(i INTEGER PRIMARY KEY, s VARCHAR UNIQUE); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test index bb9b23b..2d0b8f2 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_entries.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE s1.s2.t(i INTEGER); @@ -39,9 +39,9 @@ SELECT nextval('s1.s2.seq'); -- ok == -SELECT nextval('memory.s1.s2.seq'); +SELECT currval('memory.s1.s2.seq'); -- -error: Parser Error: Expected catalog.entry, schema.entry or entry: too many entries found (input: memory.s1.s2.seq) +ok == SELECT schema_name, sequence_name FROM duckdb_sequences() WHERE sequence_name = 'seq'; -- diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries_persist.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries_persist.test index c01d061..131d85c 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries_persist.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_entries_persist.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_entries_persist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE parent.child.t(i INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_export.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_export.test index 22664b8..f9863a7 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_export.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_export.test @@ -1,12 +1,8 @@ # source: test/sql/catalog/nested_schema/nested_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE SCHEMA s1.s2.s3; --- -ok -== CREATE TABLE s1.s2.t(i INTEGER PRIMARY KEY, s VARCHAR); -- ok diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_limits.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_limits.test index 45ae643..9f9ec1a 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_limits.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_limits.test @@ -1,20 +1,12 @@ # source: test/sql/catalog/nested_schema/nested_schema_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO s1.s2.t VALUES (1); -- ok == -SELECT * FROM memory.s1.s2.t; --- -error: Parser Error: syntax error at or near "." -== -CREATE TABLE memory.s1.s2.t2(i INTEGER); --- -error: Parser Error: syntax error at or near "." -== USE s1.s2; -- ok diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_storage_version.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_storage_version.test index d101be3..7f59238 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_storage_version.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_schema_storage_version.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_schema_storage_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS mem; diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table.test index fe39b19..ca114bb 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE s1.child.t1(i INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_columnref.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_columnref.test index 00e325e..8116355 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_columnref.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_columnref.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_table_columnref.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE s1.s2.tbl(i INTEGER, s STRUCT(a INTEGER, b INTEGER)); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml.test index 6c11b9c..b630759 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_table_dml.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE s1.child.t1(i INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml_persist.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml_persist.test index 38a69a0..773a229 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml_persist.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_dml_persist.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_table_dml_persist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE parent.child.t1(i INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_persist.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_persist.test index 4a41103..0ccd614 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_persist.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_table_persist.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_table_persist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE parent.child.t1(i INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_view_attached.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_view_attached.test new file mode 100644 index 0000000..73f44e7 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_view_attached.test @@ -0,0 +1,77 @@ +# source: test/sql/catalog/nested_schema/nested_view_attached.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE mem; +-- +ok +== +ATTACH '{TEST_DIR}/nested_view_attached.db' AS db (STORAGE_VERSION 'v2.0.0'); +-- +ok +== +CREATE SCHEMA db.s1; +-- +ok +== +CREATE SCHEMA db.s1.s2; +-- +ok +== +CREATE TABLE db.s1.s2.t AS SELECT 42 AS i; +-- +ok +== +CREATE VIEW db.s1.s2.v AS SELECT i FROM db.s1.s2.t; +-- +ok +== +SELECT * FROM db.s1.s2.v; +-- +ok +== +CREATE TABLE s1.s2.t AS SELECT 1 AS i; +-- +ok +== +CREATE VIEW db.s1.s2.v_unqualified AS SELECT i FROM s1.s2.t; +-- +ok +== +SELECT * FROM db.s1.s2.v_unqualified; +-- +ok +== +CREATE SCHEMA s3.s4; +-- +ok +== +CREATE TABLE s3.s4.t AS SELECT 7 AS i; +-- +ok +== +CREATE VIEW db.s1.s2.v_default AS SELECT i FROM s3.s4.t; +-- +ok +== +SELECT * FROM db.s1.s2.v_default; +-- +ok +== +DROP VIEW db.s1.s2.v_default; +-- +ok +== +DETACH db; +-- +ok +== +ATTACH '{TEST_DIR}/nested_view_attached.db' AS other; +-- +ok +== +SELECT * FROM other.s1.s2.v; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay.test index 4707500..8f016bd 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/nested_wal_replay.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO parent.child.tm() AS TABLE SELECT 42 AS x; diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay_index.test b/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay_index.test new file mode 100644 index 0000000..49b5162 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/nested_schema/nested_wal_replay_index.test @@ -0,0 +1,53 @@ +# source: test/sql/catalog/nested_schema/nested_wal_replay_index.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA s1.x; +-- +ok +== +CREATE SCHEMA s2.x; +-- +ok +== +CREATE TABLE s1.x.t(i INTEGER); +-- +ok +== +CREATE TABLE s2.x.t(i INTEGER); +-- +ok +== +INSERT INTO s2.x.t VALUES (1); +-- +ok +== +CREATE UNIQUE INDEX idx ON s1.x.t(i); +-- +ok +== +CREATE UNIQUE INDEX idx ON s2.x.t(i); +-- +ok +== +DROP TABLE s1.x.t; +-- +ok +== +SELECT schema_name, index_name FROM duckdb_indexes(); +-- +ok +== +CREATE UNIQUE INDEX idx2 ON s1.x.t(i); +-- +ok +== +DROP INDEX s2.x.idx; +-- +ok +== +INSERT INTO s1.x.t VALUES (1), (1); +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/nested_schema/persist.test b/parser/testdata/corpus/sql/catalog/nested_schema/persist.test index c388312..78d5c15 100644 --- a/parser/testdata/corpus/sql/catalog/nested_schema/persist.test +++ b/parser/testdata/corpus/sql/catalog/nested_schema/persist.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/nested_schema/persist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT schema_name, parent_schema FROM duckdb_schemas() WHERE schema_name IN ('parent','child','grandchild') ORDER BY schema_name; diff --git a/parser/testdata/corpus/sql/catalog/quoted_search_path.test b/parser/testdata/corpus/sql/catalog/quoted_search_path.test new file mode 100644 index 0000000..0cd3450 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/quoted_search_path.test @@ -0,0 +1,37 @@ +# source: test/sql/catalog/quoted_search_path.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA "sch,ema""name"; +-- +ok +== +SET search_path = '"sch,ema""name"'; +-- +ok +== +CREATE TABLE t AS SELECT 42 AS i; +-- +ok +== +SELECT * FROM "sch,ema""name".t; +-- +ok +== +SELECT current_schema(); +-- +ok +== +CREATE SCHEMA prequotedsuffix; +-- +ok +== +SET search_path = 'pre"quoted"suffix,"sch,ema""name"'; +-- +ok +== +SET search_path = '"unterminated'; +-- +error: Parser Error: Unterminated quote in qualified name! +== diff --git a/parser/testdata/corpus/sql/json/issues/issue22764.test.metadata.json b/parser/testdata/corpus/sql/catalog/quoted_search_path.test.metadata.json similarity index 74% rename from parser/testdata/corpus/sql/json/issues/issue22764.test.metadata.json rename to parser/testdata/corpus/sql/catalog/quoted_search_path.test.metadata.json index 3d0ca24..d4d0ed5 100644 --- a/parser/testdata/corpus/sql/json/issues/issue22764.test.metadata.json +++ b/parser/testdata/corpus/sql/catalog/quoted_search_path.test.metadata.json @@ -1,5 +1,5 @@ { "todo": { - "c23202e0f507dfbc": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + "215981715b78d5cc": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" } } diff --git a/parser/testdata/corpus/sql/catalog/sequence/prepared_currval_dropped_sequence.test b/parser/testdata/corpus/sql/catalog/sequence/prepared_currval_dropped_sequence.test new file mode 100644 index 0000000..633071b --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/sequence/prepared_currval_dropped_sequence.test @@ -0,0 +1,17 @@ +# source: test/sql/catalog/sequence/prepared_currval_dropped_sequence.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PREPARE stmt AS SELECT currval(concat('se', 'q')); +-- +ok +== +EXECUTE stmt; +-- +ok +== +CREATE SEQUENCE seq START 10; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_not_supported.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_not_supported.test deleted file mode 100644 index bf1cb9e..0000000 --- a/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_not_supported.test +++ /dev/null @@ -1,21 +0,0 @@ -# source: test/sql/catalog/sequence/sequence_currval_before_nextval_not_supported.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -SET storage_compatibility_version = 'v1.5.2'; --- -ok -== -CREATE SEQUENCE IF NOT EXISTS scenario_id START 1 INCREMENT BY 1; --- -ok -== -SELECT currval('scenario_id'); --- -ok -== -SELECT nextval('scenario_id'); --- -ok -== diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_supported.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_supported.test index 7991565..9d9faea 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_supported.test +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_supported.test @@ -1,9 +1,21 @@ # source: test/sql/catalog/sequence/sequence_currval_before_nextval_supported.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version = 'v2.0.0'; -- ok == +CREATE SEQUENCE IF NOT EXISTS scenario_id START 1 INCREMENT BY 1; +-- +ok +== +SELECT currval('scenario_id'); +-- +ok +== +SELECT nextval('scenario_id'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_v1_5_storage.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_v1_5_storage.test new file mode 100644 index 0000000..528195d --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_currval_before_nextval_v1_5_storage.test @@ -0,0 +1,9 @@ +# source: test/sql/catalog/sequence/sequence_currval_before_nextval_v1_5_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET storage_compatibility_version = 'v1.5.2'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_cycle.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_cycle.test index 42fff74..fd4ad2c 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/sequence_cycle.test +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_cycle.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/sequence_cycle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create sequence minseq INCREMENT BY -1 MINVALUE -5 MAXVALUE 5 CYCLE; diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_derive_last_value_v1_5_storage.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_derive_last_value_v1_5_storage.test new file mode 100644 index 0000000..3910009 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_derive_last_value_v1_5_storage.test @@ -0,0 +1,93 @@ +# source: test/sql/catalog/sequence/sequence_derive_last_value_v1_5_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '__TEST_DIR__/sequence_last_value_v1_5.db' AS v15 (STORAGE_VERSION 'v1.5.0'); +-- +ok +== +ATTACH '__TEST_DIR__/sequence_last_value_v2_0.db' AS v20 (STORAGE_VERSION 'v2.0.0'); +-- +ok +== +CREATE SEQUENCE {db}.seq_incr INCREMENT BY 5 START WITH 10; +-- +error: Parser Error: syntax error at or near "{" +== +CREATE SEQUENCE {db}.seq_desc INCREMENT BY -2 START WITH -3; +-- +error: Parser Error: syntax error at or near "{" +== +CREATE SEQUENCE {db}.seq_cycle MAXVALUE 3 CYCLE; +-- +error: Parser Error: syntax error at or near "{" +== +CREATE SEQUENCE {db}.seq_unused; +-- +error: Parser Error: syntax error at or near "{" +== +CREATE SEQUENCE {db}.seq_setval; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT max(nextval('{db}.seq_incr')), min(nextval('{db}.seq_desc')), max(nextval('{db}.seq_cycle')) FROM range(3) +-- +ok +== +SELECT setval('{db}.seq_setval', 5, false) +-- +ok +== +DETACH v15 +-- +ok +== +DETACH v20 +-- +ok +== +ATTACH '__TEST_DIR__/sequence_last_value_v1_5.db' AS v15 +-- +ok +== +ATTACH '__TEST_DIR__/sequence_last_value_v2_0.db' AS v20 +-- +ok +== +SELECT currval('{db}.seq_incr'), currval('{db}.seq_desc') +-- +ok +== +SELECT currval('{db}.seq_unused') +-- +ok +== +SELECT currval('v15.seq_cycle') +-- +ok +== +SELECT currval('v20.seq_cycle') +-- +ok +== +SELECT currval('v15.seq_setval') +-- +ok +== +SELECT currval('v20.seq_setval') +-- +ok +== +CHECKPOINT v15 +-- +ok +== +CHECKPOINT v20 +-- +ok +== +SELECT nextval('v15.seq_incr'), nextval('v15.seq_desc'), nextval('v15.seq_cycle') +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_empty_name.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_empty_name.test new file mode 100644 index 0000000..52c95a1 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_empty_name.test @@ -0,0 +1,25 @@ +# source: test/sql/catalog/sequence/sequence_empty_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT nextval({name}); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT currval({name}); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT setval({name}, 1); +-- +error: Parser Error: syntax error at or near "}" +== +CREATE TABLE t(i INT DEFAULT nextval({name})); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT * FROM pragma_table_info({name}); +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_offset_increment.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_offset_increment.test index 2b1a7d1..33afa0b 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/sequence_offset_increment.test +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_offset_increment.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/sequence_offset_increment.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create sequence xx start 100 increment by 2; diff --git a/parser/testdata/corpus/sql/catalog/sequence/sequence_overflow.test b/parser/testdata/corpus/sql/catalog/sequence/sequence_overflow.test index 187db60..1b70964 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/sequence_overflow.test +++ b/parser/testdata/corpus/sql/catalog/sequence/sequence_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/sequence_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create sequence seq1 INCREMENT BY 1 MINVALUE 9223372036854775800 MAXVALUE 9223372036854775807 CYCLE; @@ -59,3 +59,27 @@ SELECT nextval('seq7') from generate_series(0,20); -- ok == +create sequence seq8 MINVALUE -9223372036854775808 MAXVALUE 9223372036854775807 INCREMENT 1 NO CYCLE; +-- +ok +== +SELECT setval('seq8', 9223372036854775807, false); +-- +ok +== +SELECT nextval('seq8'); +-- +ok +== +create sequence seq9 MINVALUE -9223372036854775808 MAXVALUE 9223372036854775807 INCREMENT -1 NO CYCLE; +-- +ok +== +SELECT setval('seq9', -9223372036854775808, false); +-- +ok +== +SELECT nextval('seq9'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/sequence/setval.test b/parser/testdata/corpus/sql/catalog/sequence/setval.test index 117a0f2..09e069b 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/setval.test +++ b/parser/testdata/corpus/sql/catalog/sequence/setval.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/setval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE myseq; diff --git a/parser/testdata/corpus/sql/catalog/sequence/test_duckdb_sequences.test b/parser/testdata/corpus/sql/catalog/sequence/test_duckdb_sequences.test index a0530f7..2fd869c 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/test_duckdb_sequences.test +++ b/parser/testdata/corpus/sql/catalog/sequence/test_duckdb_sequences.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/test_duckdb_sequences.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create sequence my_seq; diff --git a/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test b/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test index a72812f..e85680b 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test +++ b/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/test_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE IF NOT EXISTS seq; @@ -129,7 +129,7 @@ error: Parser Error: Unterminated quote in qualified name! (input: "a"."seq) == SELECT nextval('a.b.c.d'); -- -error: Parser Error: Expected catalog.entry, schema.entry or entry: too many entries found (input: a.b.c.d) +ok == CREATE SEQUENCE seq MAXVALUE 5 START WITH 6; -- diff --git a/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test.metadata.json b/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test.metadata.json index 04032af..41c4c08 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test.metadata.json +++ b/parser/testdata/corpus/sql/catalog/sequence/test_sequence.test.metadata.json @@ -1,6 +1,5 @@ { "todo": { - "49e80f12d8463a99": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "9646d43ed9a210ab": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" } } diff --git a/parser/testdata/corpus/sql/catalog/sequence/test_sequence_dependency.test b/parser/testdata/corpus/sql/catalog/sequence/test_sequence_dependency.test index 808019a..fc1c81b 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/test_sequence_dependency.test +++ b/parser/testdata/corpus/sql/catalog/sequence/test_sequence_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/test_sequence_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers(i integer default nextval('seq')); diff --git a/parser/testdata/corpus/sql/catalog/sequence/test_sequence_google_fuzz.test b/parser/testdata/corpus/sql/catalog/sequence/test_sequence_google_fuzz.test index dd4d3e4..8e00380 100644 --- a/parser/testdata/corpus/sql/catalog/sequence/test_sequence_google_fuzz.test +++ b/parser/testdata/corpus/sql/catalog/sequence/test_sequence_google_fuzz.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/sequence/test_sequence_google_fuzz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ;creAte diff --git a/parser/testdata/corpus/sql/catalog/table/create_table_parameters.test b/parser/testdata/corpus/sql/catalog/table/create_table_parameters.test index 9af966c..894fcd6 100644 --- a/parser/testdata/corpus/sql/catalog/table/create_table_parameters.test +++ b/parser/testdata/corpus/sql/catalog/table/create_table_parameters.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/create_table_parameters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 ( c1 INT DEFAULT ? ); diff --git a/parser/testdata/corpus/sql/catalog/table/long_identifier.test b/parser/testdata/corpus/sql/catalog/table/long_identifier.test index 3d1083f..1124646 100644 --- a/parser/testdata/corpus/sql/catalog/table/long_identifier.test +++ b/parser/testdata/corpus/sql/catalog/table/long_identifier.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/long_identifier.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" integer); diff --git a/parser/testdata/corpus/sql/catalog/table/test_create_table_parallelism.test b/parser/testdata/corpus/sql/catalog/table/test_create_table_parallelism.test index e8c0c57..8da159f 100644 --- a/parser/testdata/corpus/sql/catalog/table/test_create_table_parallelism.test +++ b/parser/testdata/corpus/sql/catalog/table/test_create_table_parallelism.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/test_create_table_parallelism.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS (SELECT string_agg(range::VARCHAR, '🦆 ') AS s, mod(range, 10000) xx FROM range(50000) GROUP BY xx) diff --git a/parser/testdata/corpus/sql/catalog/table/test_default.test b/parser/testdata/corpus/sql/catalog/table/test_default.test index e81333d..6713da9 100644 --- a/parser/testdata/corpus/sql/catalog/table/test_default.test +++ b/parser/testdata/corpus/sql/catalog/table/test_default.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/test_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test (b) VALUES (3); diff --git a/parser/testdata/corpus/sql/catalog/table/test_default_not_null.test b/parser/testdata/corpus/sql/catalog/table/test_default_not_null.test index 9c07ae2..a3df277 100644 --- a/parser/testdata/corpus/sql/catalog/table/test_default_not_null.test +++ b/parser/testdata/corpus/sql/catalog/table/test_default_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/test_default_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uuids(u UUID DEFAULT gen_random_uuid() NOT NULL, a INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/table/test_default_values.test b/parser/testdata/corpus/sql/catalog/table/test_default_values.test index 7adbeae..53914dd 100644 --- a/parser/testdata/corpus/sql/catalog/table/test_default_values.test +++ b/parser/testdata/corpus/sql/catalog/table/test_default_values.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/test_default_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table x (i int default 1, j int default 2) diff --git a/parser/testdata/corpus/sql/catalog/table/test_many_columns.test b/parser/testdata/corpus/sql/catalog/table/test_many_columns.test index e95c431..d167e4e 100644 --- a/parser/testdata/corpus/sql/catalog/table/test_many_columns.test +++ b/parser/testdata/corpus/sql/catalog/table/test_many_columns.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/table/test_many_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers (i0, j) VALUES (2, 3), (3, 4), (5, 6) diff --git a/parser/testdata/corpus/sql/catalog/test_alter_oid_stability.test b/parser/testdata/corpus/sql/catalog/test_alter_oid_stability.test index 7daeddb..71ba5f5 100644 --- a/parser/testdata/corpus/sql/catalog/test_alter_oid_stability.test +++ b/parser/testdata/corpus/sql/catalog/test_alter_oid_stability.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_alter_oid_stability.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE oid_ref AS SELECT table_oid AS id FROM duckdb_tables() WHERE table_name='t'; diff --git a/parser/testdata/corpus/sql/catalog/test_catalog_errors.test b/parser/testdata/corpus/sql/catalog/test_catalog_errors.test index 51dda6e..3007f07 100644 --- a/parser/testdata/corpus/sql/catalog/test_catalog_errors.test +++ b/parser/testdata/corpus/sql/catalog/test_catalog_errors.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_catalog_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW vintegers AS SELECT 42; diff --git a/parser/testdata/corpus/sql/catalog/test_create_from_select.test b/parser/testdata/corpus/sql/catalog/test_create_from_select.test index 4704d1a..2346cbf 100644 --- a/parser/testdata/corpus/sql/catalog/test_create_from_select.test +++ b/parser/testdata/corpus/sql/catalog/test_create_from_select.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_create_from_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (3), (4), (5) diff --git a/parser/testdata/corpus/sql/catalog/test_extension_suggestion.test b/parser/testdata/corpus/sql/catalog/test_extension_suggestion.test index ea36713..13b4c64 100644 --- a/parser/testdata/corpus/sql/catalog/test_extension_suggestion.test +++ b/parser/testdata/corpus/sql/catalog/test_extension_suggestion.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_extension_suggestion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT from_json('{DATA_DIR}/json/array_of_empty_arrays.json'); diff --git a/parser/testdata/corpus/sql/catalog/test_if_not_exists.test b/parser/testdata/corpus/sql/catalog/test_if_not_exists.test index 0f5ada5..80aff25 100644 --- a/parser/testdata/corpus/sql/catalog/test_if_not_exists.test +++ b/parser/testdata/corpus/sql/catalog/test_if_not_exists.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_if_not_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS integers(i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/catalog/test_incorrect_table_creation.test b/parser/testdata/corpus/sql/catalog/test_incorrect_table_creation.test index 8018a2e..5fb3df5 100644 --- a/parser/testdata/corpus/sql/catalog/test_incorrect_table_creation.test +++ b/parser/testdata/corpus/sql/catalog/test_incorrect_table_creation.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_incorrect_table_creation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, PRIMARY KEY(j)) @@ -9,7 +9,7 @@ ok == CREATE TABLE integers(i INTEGER, PRIMARY KEY(i, i)) -- -error: Parser Error: column "i" appears twice in primary key constraint +error: Parser Error: column ""i"" appears twice in primary key constraint == CREATE TABLE integers(i INTEGER, PRIMARY KEY(i), PRIMARY KEY(i)) -- diff --git a/parser/testdata/corpus/sql/catalog/test_querying_from_detached_catalog.test b/parser/testdata/corpus/sql/catalog/test_querying_from_detached_catalog.test index 5838f95..9c46fdb 100644 --- a/parser/testdata/corpus/sql/catalog/test_querying_from_detached_catalog.test +++ b/parser/testdata/corpus/sql/catalog/test_querying_from_detached_catalog.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_querying_from_detached_catalog.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE db2.tbl (i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/test_quoted_column_name.test b/parser/testdata/corpus/sql/catalog/test_quoted_column_name.test index 2c993be..36227a0 100644 --- a/parser/testdata/corpus/sql/catalog/test_quoted_column_name.test +++ b/parser/testdata/corpus/sql/catalog/test_quoted_column_name.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_quoted_column_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers("42" INTEGER) @@ -27,3 +27,19 @@ SELECT "table ""."."col "".", "col ""." FROM "table ""."; -- ok == +CREATE TABLE "'QuotedName'"(i INTEGER) +-- +ok +== +INSERT INTO "'QuotedName'" VALUES (7) +-- +ok +== +SELECT * FROM "'QuotedName'"; +-- +ok +== +SELECT count(*) FROM duckdb_tables WHERE table_name = '''QuotedName'''; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/test_schema.test b/parser/testdata/corpus/sql/catalog/test_schema.test index 392a834..f597e07 100644 --- a/parser/testdata/corpus/sql/catalog/test_schema.test +++ b/parser/testdata/corpus/sql/catalog/test_schema.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE SCHEMA test; diff --git a/parser/testdata/corpus/sql/catalog/test_set_schema.test b/parser/testdata/corpus/sql/catalog/test_set_schema.test index 220ba7a..8c75071 100644 --- a/parser/testdata/corpus/sql/catalog/test_set_schema.test +++ b/parser/testdata/corpus/sql/catalog/test_set_schema.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_set_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA out_of_path; diff --git a/parser/testdata/corpus/sql/catalog/test_set_search_path.test b/parser/testdata/corpus/sql/catalog/test_set_search_path.test index 5c8f23b..5b9e747 100644 --- a/parser/testdata/corpus/sql/catalog/test_set_search_path.test +++ b/parser/testdata/corpus/sql/catalog/test_set_search_path.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_set_search_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE main_table(i INTEGER); @@ -103,10 +103,6 @@ SELECT pg_catalog.CURRENT_SCHEMA(); -- ok == -SELECT current_schema(); --- -ok -== SELECT current_schemas(true); -- ok diff --git a/parser/testdata/corpus/sql/catalog/test_standard_schema.test b/parser/testdata/corpus/sql/catalog/test_standard_schema.test index 34cc61b..e987fac 100644 --- a/parser/testdata/corpus/sql/catalog/test_standard_schema.test +++ b/parser/testdata/corpus/sql/catalog/test_standard_schema.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_standard_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP SCHEMA main CASCADE; diff --git a/parser/testdata/corpus/sql/catalog/test_temporary.test b/parser/testdata/corpus/sql/catalog/test_temporary.test index a88a8fc..94e93c9 100644 --- a/parser/testdata/corpus/sql/catalog/test_temporary.test +++ b/parser/testdata/corpus/sql/catalog/test_temporary.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_temporary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY TABLE integers(i INTEGER) ON COMMIT PRESERVE ROWS @@ -11,6 +11,10 @@ CREATE TEMPORARY TABLE integersx(i INTEGER) -- ok == +CREATE TEMPORARY SCHEMA asdf +-- +ok +== CREATE TEMPORARY TABLE main.integersy(i INTEGER) -- ok diff --git a/parser/testdata/corpus/sql/catalog/test_temporary_index.test b/parser/testdata/corpus/sql/catalog/test_temporary_index.test new file mode 100644 index 0000000..68e33ed --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/test_temporary_index.test @@ -0,0 +1,41 @@ +# source: test/sql/catalog/test_temporary_index.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TEMPORARY TABLE tmp(i INTEGER) +-- +ok +== +CREATE TEMPORARY INDEX i1 ON t(i) +-- +error: Parser Error: Temporary indexes are not supported +== +CREATE TEMP INDEX i1 ON t(i) +-- +error: Parser Error: Temporary indexes are not supported +== +CREATE TEMPORARY INDEX i1 ON tmp(i) +-- +error: Parser Error: Temporary indexes are not supported +== +CREATE TEMPORARY INDEX IF NOT EXISTS i1 ON t(i) +-- +error: Parser Error: Temporary indexes are not supported +== +SELECT count(*) FROM duckdb_indexes() +-- +ok +== +CREATE INDEX i1 ON t(i) +-- +ok +== +CREATE INDEX i2 ON tmp(i) +-- +ok +== +SELECT index_name, database_name='temp' FROM duckdb_indexes() ORDER BY index_name +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/test_temporary_schema.test b/parser/testdata/corpus/sql/catalog/test_temporary_schema.test new file mode 100644 index 0000000..a3476ca --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/test_temporary_schema.test @@ -0,0 +1,33 @@ +# source: test/sql/catalog/test_temporary_schema.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TEMPORARY SCHEMA zzz +-- +ok +== +CREATE TEMP SCHEMA zzz +-- +ok +== +CREATE TEMPORARY SCHEMA IF NOT EXISTS zzz +-- +ok +== +CREATE OR REPLACE TEMPORARY SCHEMA zzz +-- +ok +== +CREATE TEMPORARY SCHEMA temp.zzz +-- +ok +== +SELECT count(*) FROM duckdb_schemas() WHERE schema_name='zzz' +-- +ok +== +CREATE SCHEMA zzz +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/test_unicode_schema.test b/parser/testdata/corpus/sql/catalog/test_unicode_schema.test index e31e3f3..78d5345 100644 --- a/parser/testdata/corpus/sql/catalog/test_unicode_schema.test +++ b/parser/testdata/corpus/sql/catalog/test_unicode_schema.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/test_unicode_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE 👤(🔑 INTEGER PRIMARY KEY, 🗣 varchar(64), 🗓 DATE); diff --git a/parser/testdata/corpus/sql/catalog/view/deferred_binding.test b/parser/testdata/corpus/sql/catalog/view/deferred_binding.test index 2735f1e..94efffe 100644 --- a/parser/testdata/corpus/sql/catalog/view/deferred_binding.test +++ b/parser/testdata/corpus/sql/catalog/view/deferred_binding.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/deferred_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 WITH (DEFER_BINDING) AS SELECT * FROM tbl; diff --git a/parser/testdata/corpus/sql/catalog/view/nested_view_search_path.test b/parser/testdata/corpus/sql/catalog/view/nested_view_search_path.test new file mode 100644 index 0000000..981d1d1 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/view/nested_view_search_path.test @@ -0,0 +1,29 @@ +# source: test/sql/catalog/view/nested_view_search_path.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH ':memory:' AS nested_view_db; +-- +ok +== +CREATE SCHEMA nested_view_db.outer_schema; +-- +ok +== +CREATE SCHEMA nested_view_db.outer_schema.inner_schema; +-- +ok +== +CREATE TABLE nested_view_db.outer_schema.inner_schema.t AS SELECT 42 AS i; +-- +ok +== +CREATE VIEW nested_view_db.outer_schema.inner_schema.v AS SELECT * FROM nested_view_db.outer_schema.inner_schema.t; +-- +ok +== +SELECT * FROM nested_view_db.outer_schema.inner_schema.v; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/view/recursive_view.test b/parser/testdata/corpus/sql/catalog/view/recursive_view.test index 97bd8c2..6ae5afd 100644 --- a/parser/testdata/corpus/sql/catalog/view/recursive_view.test +++ b/parser/testdata/corpus/sql/catalog/view/recursive_view.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/recursive_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS test (val INTEGER); diff --git a/parser/testdata/corpus/sql/catalog/view/recursive_view_with_dependencies.test b/parser/testdata/corpus/sql/catalog/view/recursive_view_with_dependencies.test index 87cf375..2002e0b 100644 --- a/parser/testdata/corpus/sql/catalog/view/recursive_view_with_dependencies.test +++ b/parser/testdata/corpus/sql/catalog/view/recursive_view_with_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/recursive_view_with_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set storage_compatibility_version='v1.0.0' diff --git a/parser/testdata/corpus/sql/catalog/view/secure_view.test b/parser/testdata/corpus/sql/catalog/view/secure_view.test new file mode 100644 index 0000000..30e5ae7 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/view/secure_view.test @@ -0,0 +1,113 @@ +# source: test/sql/catalog/view/secure_view.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO integers VALUES (1, 10), (2, 20), (3, 30); +-- +ok +== +CREATE SECURE VIEW v1 AS SELECT * FROM integers; +-- +ok +== +SELECT * FROM v1 WHERE i = 2 +-- +ok +== +SELECT SUM(j) FROM v1 +-- +ok +== +SELECT * FROM v1 ORDER BY i DESC LIMIT 1 +-- +ok +== +CREATE SECURE VIEW v2(a, b) AS SELECT i, j FROM integers; +-- +ok +== +SELECT * FROM v2 WHERE a = 1 +-- +ok +== +CREATE VIEW v3 AS SELECT * FROM v1; +-- +ok +== +CREATE SECURE VIEW v4 AS SELECT * FROM v3 WHERE i > 1; +-- +ok +== +SELECT * FROM v4 WHERE j = 30 +-- +ok +== +CREATE OR REPLACE SECURE VIEW v1 AS SELECT i FROM integers; +-- +ok +== +SELECT * FROM v1 ORDER BY i +-- +ok +== +CREATE SECURE VIEW IF NOT EXISTS v1 AS SELECT 42 +-- +ok +== +CREATE TEMP SECURE VIEW tv AS SELECT * FROM integers +-- +ok +== +SELECT * FROM tv WHERE i = 1 +-- +ok +== +CREATE SECURE RECURSIVE VIEW rv(n) AS SELECT 1 UNION ALL SELECT n + 1 FROM rv WHERE n < 3 +-- +ok +== +SELECT * FROM rv ORDER BY n +-- +ok +== +CREATE TABLE other(i INTEGER, k INTEGER); +-- +ok +== +INSERT INTO other VALUES (1, 100), (3, 300); +-- +ok +== +SELECT v2.a, v2.b, other.k FROM v2 JOIN other ON v2.a = other.i ORDER BY 1 +-- +ok +== +SELECT i, (SELECT SUM(b) FROM v2 WHERE v2.a = other.i) FROM other ORDER BY 1 +-- +ok +== +SELECT other.i, other.k, l.b FROM other, LATERAL (SELECT b FROM v2 WHERE v2.a = other.i) l ORDER BY 1 +-- +ok +== +SELECT sql FROM duckdb_views() WHERE view_name = 'v2' +-- +ok +== +CREATE TABLE secure(secure INTEGER); +-- +ok +== +SELECT secure FROM secure; +-- +ok +== +CREATE SECURE TABLE t2(i INTEGER) +-- +error: Parser Error: syntax error at or near "TABLE" +== +CREATE SECURE SCHEMA s2 +-- +error: Parser Error: syntax error at or near "SCHEMA" +== diff --git a/parser/testdata/corpus/sql/catalog/view/secure_view_persistence.test b/parser/testdata/corpus/sql/catalog/view/secure_view_persistence.test new file mode 100644 index 0000000..2b4a017 --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/view/secure_view_persistence.test @@ -0,0 +1,53 @@ +# source: test/sql/catalog/view/secure_view_persistence.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE integers AS SELECT i, i % 10 AS j FROM range(10000) t(i); +-- +ok +== +CREATE SECURE VIEW sv AS SELECT * FROM integers; +-- +ok +== +CREATE VIEW rv AS SELECT * FROM integers; +-- +ok +== +SELECT sql FROM duckdb_views() WHERE view_name = 'sv' +-- +ok +== +SELECT sql FROM duckdb_views() WHERE view_name = 'rv' +-- +ok +== +EXPLAIN SELECT * FROM sv WHERE i = 42 +-- +ok +== +EXPLAIN SELECT * FROM rv WHERE i = 42 +-- +ok +== +SELECT * FROM sv WHERE i = 42 +-- +ok +== +CREATE TABLE integers AS SELECT i FROM range(10) t(i); +-- +ok +== +CREATE SECURE VIEW sv AS SELECT * FROM integers +-- +ok +== +CREATE VIEW rv AS SELECT * FROM integers +-- +ok +== +SELECT count(*) FROM tv +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/view/test_loosely_qualified_view_sql.test b/parser/testdata/corpus/sql/catalog/view/test_loosely_qualified_view_sql.test index 25e860c..60155bc 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_loosely_qualified_view_sql.test +++ b/parser/testdata/corpus/sql/catalog/view/test_loosely_qualified_view_sql.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_loosely_qualified_view_sql.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach ':memory:' as db1; diff --git a/parser/testdata/corpus/sql/catalog/view/test_stacked_view.test b/parser/testdata/corpus/sql/catalog/view/test_stacked_view.test index c6a99bd..a358f13 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_stacked_view.test +++ b/parser/testdata/corpus/sql/catalog/view/test_stacked_view.test @@ -1,12 +1,8 @@ # source: test/sql/catalog/view/test_stacked_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE TABLE t1(i INTEGER) --- -ok -== INSERT INTO t1 VALUES (41), (42), (43), (44) -- ok diff --git a/parser/testdata/corpus/sql/catalog/view/test_view.test b/parser/testdata/corpus/sql/catalog/view/test_view.test index c745ea3..90054a8 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t1 VALUES (41), (42), (43) diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_alias.test b/parser/testdata/corpus/sql/catalog/view/test_view_alias.test index c052439..281b666 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_alias.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_alias.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 (j, "j2") AS SELECT * FROM t1 diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_delete_update.test b/parser/testdata/corpus/sql/catalog/view/test_view_delete_update.test index 8ba1a12..bd41e7a 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_delete_update.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_delete_update.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_delete_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT i AS j FROM t1 WHERE i < 43 diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_drop_concurrent.test b/parser/testdata/corpus/sql/catalog/view/test_view_drop_concurrent.test index 38c1194..e782193 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_drop_concurrent.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_drop_concurrent.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_drop_concurrent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY VIEW df AS select 0,0,0 from range(10); diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_duplicate_columns.test b/parser/testdata/corpus/sql/catalog/view/test_view_duplicate_columns.test index d844c55..ce015b3 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_duplicate_columns.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_duplicate_columns.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_duplicate_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table basic_table_a as select 42 as column_a; diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_schema_change.test b/parser/testdata/corpus/sql/catalog/view/test_view_schema_change.test index edc3723..967cea4 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_schema_change.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_schema_change.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_schema_change.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT * FROM t1 diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_schema_change_with_dependencies.test b/parser/testdata/corpus/sql/catalog/view/test_view_schema_change_with_dependencies.test index be24b5f..818fcab 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_schema_change_with_dependencies.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_schema_change_with_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_schema_change_with_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP TABLE t1 CASCADE diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_sql.test b/parser/testdata/corpus/sql/catalog/view/test_view_sql.test index 2ee5950..203e22a 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_sql.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_sql.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_sql.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create schema my_schema; diff --git a/parser/testdata/corpus/sql/catalog/view/test_view_sql_with_dependencies.test b/parser/testdata/corpus/sql/catalog/view/test_view_sql_with_dependencies.test index 6b16383..379f290 100644 --- a/parser/testdata/corpus/sql/catalog/view/test_view_sql_with_dependencies.test +++ b/parser/testdata/corpus/sql/catalog/view/test_view_sql_with_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/test_view_sql_with_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW vw AS SELECT * FROM tbl; diff --git a/parser/testdata/corpus/sql/catalog/view/view_catalog_alias.test b/parser/testdata/corpus/sql/catalog/view/view_catalog_alias.test new file mode 100644 index 0000000..024127b --- /dev/null +++ b/parser/testdata/corpus/sql/catalog/view/view_catalog_alias.test @@ -0,0 +1,113 @@ +# source: test/sql/catalog/view/view_catalog_alias.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/view_catalog_alias.db' AS db1; +-- +ok +== +CREATE TABLE db1.t(i INTEGER); +-- +ok +== +INSERT INTO db1.t VALUES (42); +-- +ok +== +CREATE TABLE db1.s1.t(i INTEGER); +-- +ok +== +INSERT INTO db1.s1.t VALUES (84); +-- +ok +== +CREATE VIEW db1.v_base AS SELECT * FROM db1.t; +-- +ok +== +CREATE VIEW db1.v_full AS SELECT * FROM db1.main.t; +-- +ok +== +CREATE VIEW db1.v_colref AS SELECT db1.t.i FROM db1.t; +-- +ok +== +CREATE VIEW db1.v_subquery AS SELECT (SELECT max(i) FROM db1.t) AS i; +-- +ok +== +CREATE VIEW db1.v_cte AS WITH c AS (SELECT * FROM db1.t) SELECT * FROM c; +-- +ok +== +CREATE VIEW db1.s1.v_schema AS SELECT * FROM db1.s1.t; +-- +ok +== +CREATE VIEW db1.v_deferred WITH (DEFER_BINDING) AS SELECT * FROM db1.t; +-- +ok +== +SELECT view_name, trim(sql, chr(10)) FROM duckdb_views() WHERE database_name='db1' ORDER BY view_name; +-- +ok +== +ATTACH '{TEST_DIR}/view_catalog_alias.db' AS db2; +-- +ok +== +SELECT * FROM db2.v_base; +-- +ok +== +SELECT * FROM db2.v_full; +-- +ok +== +SELECT * FROM db2.v_colref; +-- +ok +== +SELECT * FROM db2.v_subquery; +-- +ok +== +SELECT * FROM db2.v_cte; +-- +ok +== +SELECT * FROM db2.s1.v_schema; +-- +ok +== +SELECT * FROM db2.v_deferred; +-- +ok +== +ATTACH '{TEST_DIR}/view_catalog_alias_other.db' AS other; +-- +ok +== +CREATE TABLE other.t(i INTEGER); +-- +ok +== +INSERT INTO other.t VALUES (7); +-- +ok +== +CREATE VIEW db2.v_other AS SELECT * FROM db2.t UNION ALL SELECT * FROM other.t; +-- +ok +== +SELECT trim(sql, chr(10)) FROM duckdb_views() WHERE view_name='v_other'; +-- +ok +== +SELECT * FROM db2.v_other ORDER BY 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/catalog/view/view_if_not_exists.test b/parser/testdata/corpus/sql/catalog/view/view_if_not_exists.test index c532403..693e310 100644 --- a/parser/testdata/corpus/sql/catalog/view/view_if_not_exists.test +++ b/parser/testdata/corpus/sql/catalog/view/view_if_not_exists.test @@ -1,6 +1,6 @@ # source: test/sql/catalog/view/view_if_not_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT 42 diff --git a/parser/testdata/corpus/sql/collate/collate_distinct_aggregate.test b/parser/testdata/corpus/sql/collate/collate_distinct_aggregate.test new file mode 100644 index 0000000..a707fc0 --- /dev/null +++ b/parser/testdata/corpus/sql/collate/collate_distinct_aggregate.test @@ -0,0 +1,146 @@ +# source: test/sql/collate/collate_distinct_aggregate.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tbl(g INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO tbl VALUES (1, 'a'), (1, 'A'), (1, 'Z'), (2, 'b'), (2, 'B'); +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE) FROM tbl +-- +ok +== +SELECT count(DISTINCT s) FROM tbl +-- +ok +== +SELECT len(list(DISTINCT s COLLATE NOCASE)), len(list(DISTINCT s)), + len(list(DISTINCT s COLLATE NOCASE)) +FROM tbl; +-- +ok +== +SELECT count(DISTINCT row(s)), len(list(DISTINCT row(s COLLATE NOCASE))) +FROM tbl; +-- +ok +== +SELECT len(list(DISTINCT row(s COLLATE NOCASE))), len(list(DISTINCT row(s))), + len(list(DISTINCT row(s COLLATE NOCASE))) +FROM tbl; +-- +ok +== +SELECT len(list(DISTINCT row(s))), len(list(DISTINCT row(s COLLATE NOCASE))) +FROM tbl; +-- +ok +== +SELECT len(list(DISTINCT {'values': [s COLLATE NOCASE]})), + len(list(DISTINCT {'values': [s]})) +FROM tbl; +-- +ok +== +SELECT count(DISTINCT v), len(list(DISTINCT v)), typeof(list(DISTINCT v)) +FROM (VALUES (1::INTEGER::VARIANT), (1::BIGINT::VARIANT)) t(v); +-- +ok +== +SELECT g, len(list(DISTINCT s COLLATE NOCASE) FILTER (WHERE keep)), + len(list(DISTINCT s) FILTER (WHERE keep)) +FROM (VALUES (1, 'a', true), (1, 'A', true), (1, 'z', false), + (2, 'b', false), (2, 'B', NULL)) t(g, s, keep) +GROUP BY g ORDER BY g; +-- +ok +== +SELECT count(DISTINCT v), len(list(DISTINCT v)), len(list(DISTINCT row(v))) +FROM (VALUES (row('a' COLLATE NOCASE)), (row('A' COLLATE NOCASE)), + (row(NULL)), (NULL)) t(v); +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE), len(list(DISTINCT s COLLATE NOCASE)), + len(list(DISTINCT row(s COLLATE NOCASE))) +FROM tbl WHERE false; +-- +ok +== +CREATE SEQUENCE collation_sequence; +-- +ok +== +SELECT len(list(DISTINCT nextval('collation_sequence')::VARCHAR COLLATE NOCASE)) +FROM range(3); +-- +ok +== +SELECT currval('collation_sequence'); +-- +ok +== +PREPARE distinct_rows AS +SELECT len(list(DISTINCT row(s COLLATE NOCASE))), len(list(DISTINCT row(s))) +FROM (VALUES ($1::VARCHAR), ($2::VARCHAR)) t(s); +-- +ok +== +EXECUTE distinct_rows('a', 'A'); +-- +ok +== +EXECUTE distinct_rows('a', 'b'); +-- +ok +== +SELECT g, count(DISTINCT s COLLATE NOCASE) FROM tbl GROUP BY g ORDER BY g +-- +ok +== +SELECT list_sort(list(DISTINCT s COLLATE NOCASE)) FROM (VALUES ('x'), ('Z')) t(s) +-- +ok +== +SELECT string_agg(DISTINCT s COLLATE NOCASE, ',' ORDER BY s COLLATE NOCASE) FROM (VALUES ('x'), ('Z')) t(s) +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE), count(DISTINCT s) FROM (VALUES ('a'), ('A'), ('Z')) t(s) +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE) FILTER (WHERE g = 1) FROM tbl +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE) FROM (VALUES ('a'), ('A'), (NULL)) t(s) +-- +ok +== +SELECT list_sort(list(DISTINCT s COLLATE NOCASE)) FROM (VALUES ('x'), (NULL), ('Z')) t(s) +-- +ok +== +SET default_collation='nocase' +-- +ok +== +SELECT count(DISTINCT s), len(list(DISTINCT s)), len(list(DISTINCT lower(s))) +FROM tbl; +-- +ok +== +SELECT list_sort(list(DISTINCT s)) FROM (VALUES ('x'), ('Z')) t(s) +-- +ok +== +SET default_collation='binary' +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/collate_distinct_aggregate_icu.test b/parser/testdata/corpus/sql/collate/collate_distinct_aggregate_icu.test new file mode 100644 index 0000000..566c4a5 --- /dev/null +++ b/parser/testdata/corpus/sql/collate/collate_distinct_aggregate_icu.test @@ -0,0 +1,46 @@ +# source: test/sql/collate/collate_distinct_aggregate_icu.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(DISTINCT s COLLATE de), len(list(DISTINCT s COLLATE de)), len(list(DISTINCT s)) +FROM (VALUES ('ä'), ('ä'), ('Z')) t(s); +-- +ok +== +SELECT count(*) +FROM (SELECT unnest(list(DISTINCT s COLLATE de)) AS s + FROM (VALUES ('ä'), ('ä'), ('Z')) t(s)) result +WHERE s COLLATE "binary" IN ('ä', 'ä', 'Z'); +-- +ok +== +SELECT list(DISTINCT s COLLATE de ORDER BY s COLLATE de), + string_agg(DISTINCT s COLLATE de, ',' ORDER BY s COLLATE de) +FROM (VALUES ('GÖTHE'), ('Z'), ('GÖTHE')) t(s); +-- +ok +== +SELECT count(DISTINCT row(s COLLATE de)), len(list(DISTINCT row(s COLLATE de))), + len(list(DISTINCT row(s))) +FROM (VALUES ('ä'), ('ä'), ('Z')) t(s); +-- +ok +== +SET default_collation = 'de'; +-- +ok +== +SELECT count(DISTINCT s), len(list(DISTINCT s)), len(list(DISTINCT row(s))) +FROM (VALUES ('ä'), ('ä'), ('Z')) t(s); +-- +ok +== +SELECT list(DISTINCT s ORDER BY s) FROM (VALUES ('GÖTHE'), ('Z'), ('GÖTHE')) t(s); +-- +ok +== +SET default_collation = 'binary'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/collate_filter_pushdown.test b/parser/testdata/corpus/sql/collate/collate_filter_pushdown.test index cd0f048..b49b6b6 100644 --- a/parser/testdata/corpus/sql/collate/collate_filter_pushdown.test +++ b/parser/testdata/corpus/sql/collate/collate_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 BOOLEAN, PRIMARY KEY(c0)); diff --git a/parser/testdata/corpus/sql/collate/collate_in_subquery.test b/parser/testdata/corpus/sql/collate/collate_in_subquery.test index a8a4f0b..31ef9b1 100644 --- a/parser/testdata/corpus/sql/collate/collate_in_subquery.test +++ b/parser/testdata/corpus/sql/collate/collate_in_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_in_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 'ABC' collate nocase in (select 'aBc'); diff --git a/parser/testdata/corpus/sql/collate/collate_like.test b/parser/testdata/corpus/sql/collate/collate_like.test index 3df0bf7..2c8a920 100644 --- a/parser/testdata/corpus/sql/collate/collate_like.test +++ b/parser/testdata/corpus/sql/collate/collate_like.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_like.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'a' LIKE 'A' COLLATE NOCASE diff --git a/parser/testdata/corpus/sql/collate/collate_nested.test b/parser/testdata/corpus/sql/collate/collate_nested.test new file mode 100644 index 0000000..4ed8a59 --- /dev/null +++ b/parser/testdata/corpus/sql/collate/collate_nested.test @@ -0,0 +1,162 @@ +# source: test/sql/collate/collate_nested.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT NULL::STRUCT(x VARCHAR) = {'x': 'a' COLLATE NOCASE} +-- +ok +== +SELECT NULL::STRUCT(x VARCHAR) IS DISTINCT FROM {'x': NULL::VARCHAR COLLATE NOCASE} +-- +ok +== +SELECT {'x': NULL::VARCHAR COLLATE NOCASE} = {'x': NULL::VARCHAR} +-- +ok +== +SELECT [{'x': 'a' COLLATE NOCASE}, NULL::STRUCT(x VARCHAR)] = [{'x': 'A'}, NULL::STRUCT(x VARCHAR)] +-- +ok +== +CREATE SEQUENCE collate_sequence +-- +ok +== +SELECT {'x': nextval('collate_sequence')::VARCHAR COLLATE NOCASE, + 'y': nextval('collate_sequence')::VARCHAR COLLATE NOCASE} = {'x': '1', 'y': '2'} +-- +ok +== +SELECT currval('collate_sequence') +-- +ok +== +DROP SEQUENCE collate_sequence +-- +ok +== +SELECT 'a' COLLATE NOCASE < 'B' +-- +ok +== +SELECT ('a' COLLATE NOCASE, 0) < ('B', 0) +-- +ok +== +SELECT {'x': 'b' COLLATE NOCASE} = {'x': 'B'} +-- +ok +== +SELECT {'x': 'b' COLLATE NOCASE} != {'x': 'B'} +-- +ok +== +SELECT {'x': 'a' COLLATE NOCASE} < {'x': 'B'} +-- +ok +== +SELECT {'x': 'B' COLLATE NOCASE} >= {'x': 'a'} +-- +ok +== +SELECT {'x': '10:00:00+00'::TIMETZ} < {'x': '09:00:00-05'::TIMETZ} +-- +ok +== +SELECT {'x': 'a' COLLATE NOCASE, 'y': 2} < {'x': 'A', 'y': 1} +-- +ok +== +SELECT {'x': 'B' COLLATE NOCASE, 'y': 2} < {'x': 'a', 'y': 1} +-- +ok +== +SELECT {'x': 'héllo' COLLATE NOACCENT.NOCASE} = {'x': 'HELLO'} +-- +ok +== +SELECT {'x': 'b'} = {'x': 'B'} +-- +ok +== +SELECT ('b', 0) < ('B', 0) +-- +ok +== +SELECT [{'x': 'a' COLLATE NOCASE}] < [{'x': 'B'}] +-- +ok +== +SELECT {'x': ['a' COLLATE NOCASE]} < {'x': ['B']} +-- +ok +== +SELECT {'x': {'y': 'b' COLLATE NOCASE}} = {'x': {'y': 'B'}} +-- +ok +== +SELECT {'x': {'y': {'z': 'HELLO' COLLATE NOCASE}}} = {'x': {'y': {'z': 'hello'}}} +-- +ok +== +SELECT {'x': ['HELLO' COLLATE NOCASE]} = {'x': ['hello']} +-- +ok +== +SELECT [{'x': 'HELLO' COLLATE NOCASE}] = [{'x': 'hello'}] +-- +ok +== +CREATE TABLE t(id INTEGER, s VARCHAR COLLATE NOCASE) +-- +ok +== +INSERT INTO t VALUES (1, 'B'), (2, 'a'), (3, 'b') +-- +ok +== +SELECT id FROM t ORDER BY {'x': s}, id +-- +ok +== +SELECT count(*) FROM (SELECT DISTINCT {'x': s} FROM t) +-- +ok +== +SELECT count(*) FROM (SELECT {'x': s} AS g, count(*) FROM t GROUP BY g) +-- +ok +== +SELECT count(*) FROM t AS l JOIN t AS r ON {'x': l.s} = {'x': r.s} +-- +ok +== +CREATE TABLE tz(t TIMETZ) +-- +ok +== +INSERT INTO tz VALUES ('10:00:00+00'), ('09:00:00-05') +-- +ok +== +SELECT string_agg(t::VARCHAR, ',' ORDER BY t) FROM tz +-- +ok +== +SELECT string_agg(t::VARCHAR, ',' ORDER BY {'x': t}) FROM tz +-- +ok +== +SELECT {'x': 'a' COLLATE NOCASE} IN [{'x': 'A'}, {'x': 'z'}] +-- +ok +== +PRAGMA default_collation=NOCASE +-- +ok +== +SELECT ('b', 0) = ('B', 0) +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/collate_non_varchar.test b/parser/testdata/corpus/sql/collate/collate_non_varchar.test index a3b7f88..8b158e8 100644 --- a/parser/testdata/corpus/sql/collate/collate_non_varchar.test +++ b/parser/testdata/corpus/sql/collate/collate_non_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_non_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA default_collation=NOCASE; diff --git a/parser/testdata/corpus/sql/collate/collate_order_by_alias.test b/parser/testdata/corpus/sql/collate/collate_order_by_alias.test index 4c63155..67d0830 100644 --- a/parser/testdata/corpus/sql/collate/collate_order_by_alias.test +++ b/parser/testdata/corpus/sql/collate/collate_order_by_alias.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_order_by_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE CreditCardTable(id BIGINT, creditCard_number VARCHAR); diff --git a/parser/testdata/corpus/sql/collate/collate_ordered_aggregate.test b/parser/testdata/corpus/sql/collate/collate_ordered_aggregate.test index e8990df..1cd4657 100644 --- a/parser/testdata/corpus/sql/collate/collate_ordered_aggregate.test +++ b/parser/testdata/corpus/sql/collate/collate_ordered_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_ordered_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(id int, val varchar); diff --git a/parser/testdata/corpus/sql/collate/collate_string_col.test b/parser/testdata/corpus/sql/collate/collate_string_col.test index b3ab256..cade04e 100644 --- a/parser/testdata/corpus/sql/collate/collate_string_col.test +++ b/parser/testdata/corpus/sql/collate/collate_string_col.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_string_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/collate/collate_struct_minmax.test b/parser/testdata/corpus/sql/collate/collate_struct_minmax.test new file mode 100644 index 0000000..290fbc3 --- /dev/null +++ b/parser/testdata/corpus/sql/collate/collate_struct_minmax.test @@ -0,0 +1,37 @@ +# source: test/sql/collate/collate_struct_minmax.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tuples AS SELECT * FROM (VALUES ('a' COLLATE NOCASE, 0), ('B', 0)) v(s, i) +-- +ok +== +SELECT (s, i) FROM tuples ORDER BY (s, i) DESC LIMIT 1 +-- +ok +== +SELECT max((s, i)) FROM tuples +-- +ok +== +SELECT min((s, i)) FROM tuples +-- +ok +== +CREATE TABLE structs AS SELECT * FROM (VALUES ({'x': 'a' COLLATE NOCASE}), ({'x': 'B'})) v(s) +-- +ok +== +SELECT s FROM structs ORDER BY s DESC LIMIT 1 +-- +ok +== +SELECT max(s) FROM structs +-- +ok +== +SELECT min(s) FROM structs +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/collate_subquery.test b/parser/testdata/corpus/sql/collate/collate_subquery.test index 1bd6c0e..dd10105 100644 --- a/parser/testdata/corpus/sql/collate/collate_subquery.test +++ b/parser/testdata/corpus/sql/collate/collate_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collate_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t0(c1 varchar); diff --git a/parser/testdata/corpus/sql/collate/collation_invalid_utf8.test b/parser/testdata/corpus/sql/collate/collation_invalid_utf8.test new file mode 100644 index 0000000..e986dab --- /dev/null +++ b/parser/testdata/corpus/sql/collate/collation_invalid_utf8.test @@ -0,0 +1,37 @@ +# source: test/sql/collate/collation_invalid_utf8.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verification_mode='none'; +-- +ok +== +SET disabled_optimizers='statistics_propagation'; +-- +ok +== +LOAD icu +-- +ok +== +SELECT s1 COLLATE de = 'x' COLLATE de FROM t +-- +ok +== +SELECT s2 COLLATE de = 'x' COLLATE de FROM t +-- +ok +== +SELECT s1 COLLATE de = s1 COLLATE de FROM t +-- +ok +== +SELECT s2 COLLATE de = s2 COLLATE de FROM t +-- +ok +== +SELECT s1 COLLATE de = s2 COLLATE de FROM t +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/collation_sort_keys.test b/parser/testdata/corpus/sql/collate/collation_sort_keys.test index e44e739..26d5d3c 100644 --- a/parser/testdata/corpus/sql/collate/collation_sort_keys.test +++ b/parser/testdata/corpus/sql/collate/collation_sort_keys.test @@ -1,6 +1,6 @@ # source: test/sql/collate/collation_sort_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT icu_sort_key('a', 'en') diff --git a/parser/testdata/corpus/sql/collate/count_distinct_collation.test b/parser/testdata/corpus/sql/collate/count_distinct_collation.test new file mode 100644 index 0000000..524e6a1 --- /dev/null +++ b/parser/testdata/corpus/sql/collate/count_distinct_collation.test @@ -0,0 +1,64 @@ +# source: test/sql/collate/count_distinct_collation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE strings(g INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO strings VALUES (1, 'a'), (1, 'A'), (1, 'Z'), (1, NULL), (2, 'b'), (2, 'B'), (2, 'B'), (2, NULL); +-- +ok +== +SET disabled_optimizers = {disabled}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(DISTINCT s COLLATE NOCASE), count(DISTINCT s), count(s), count(*) FROM strings; +-- +ok +== +SELECT g, count(DISTINCT s COLLATE NOCASE), count(DISTINCT s) +FROM strings GROUP BY g ORDER BY g; +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE) FILTER (WHERE g = 1), + count(DISTINCT s) FILTER (WHERE g = 1) +FROM strings; +-- +ok +== +SELECT count(DISTINCT row(s COLLATE NOCASE)), count(DISTINCT row(s)) FROM strings; +-- +ok +== +SET disabled_optimizers = ''; +-- +ok +== +SELECT DISTINCT g, count(DISTINCT s COLLATE NOCASE) OVER (PARTITION BY g), + count(DISTINCT s) OVER (PARTITION BY g) +FROM strings ORDER BY g; +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE), count(DISTINCT s) +FROM strings WHERE s IS NULL; +-- +ok +== +SELECT count(DISTINCT s COLLATE NOCASE), count(DISTINCT s) +FROM strings WHERE false; +-- +ok +== +SET default_collation = 'nocase'; +-- +ok +== +SELECT count(DISTINCT s), count(s) FROM strings; +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/icu_collation_propagation.test b/parser/testdata/corpus/sql/collate/icu_collation_propagation.test index aa813e7..e98c782 100644 --- a/parser/testdata/corpus/sql/collate/icu_collation_propagation.test +++ b/parser/testdata/corpus/sql/collate/icu_collation_propagation.test @@ -1,6 +1,6 @@ # source: test/sql/collate/icu_collation_propagation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (a varchar, b varchar); diff --git a/parser/testdata/corpus/sql/collate/nop_collation_join_filter_pushdown.test b/parser/testdata/corpus/sql/collate/nop_collation_join_filter_pushdown.test index 14f1acf..733ab4e 100644 --- a/parser/testdata/corpus/sql/collate/nop_collation_join_filter_pushdown.test +++ b/parser/testdata/corpus/sql/collate/nop_collation_join_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/collate/nop_collation_join_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA explain_output='optimized_only' diff --git a/parser/testdata/corpus/sql/collate/test_collate_accent_insensitive.test b/parser/testdata/corpus/sql/collate/test_collate_accent_insensitive.test index 3d58cec..2c03d08 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_accent_insensitive.test +++ b/parser/testdata/corpus/sql/collate/test_collate_accent_insensitive.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_accent_insensitive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE collate_test(s VARCHAR COLLATE NOACCENT) diff --git a/parser/testdata/corpus/sql/collate/test_collate_and_grouping_sets.test b/parser/testdata/corpus/sql/collate/test_collate_and_grouping_sets.test index e973818..16156e9 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_and_grouping_sets.test +++ b/parser/testdata/corpus/sql/collate/test_collate_and_grouping_sets.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_and_grouping_sets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set default_collation=c; diff --git a/parser/testdata/corpus/sql/collate/test_collate_between.test b/parser/testdata/corpus/sql/collate/test_collate_between.test index fdbfc97..d3c4b96 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_between.test +++ b/parser/testdata/corpus/sql/collate/test_collate_between.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_between.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE collate_test(s VARCHAR, t VARCHAR) diff --git a/parser/testdata/corpus/sql/collate/test_collate_case_insensitive.test b/parser/testdata/corpus/sql/collate/test_collate_case_insensitive.test index 5e324e9..23f7c4a 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_case_insensitive.test +++ b/parser/testdata/corpus/sql/collate/test_collate_case_insensitive.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_case_insensitive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE collate_test(s VARCHAR COLLATE NOCASE) diff --git a/parser/testdata/corpus/sql/collate/test_collate_expression.test b/parser/testdata/corpus/sql/collate/test_collate_expression.test index 049c22d..cfc5241 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_expression.test +++ b/parser/testdata/corpus/sql/collate/test_collate_expression.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE collate_test(s VARCHAR) diff --git a/parser/testdata/corpus/sql/collate/test_collate_list.test b/parser/testdata/corpus/sql/collate/test_collate_list.test index 87b700a..309229e 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_list.test +++ b/parser/testdata/corpus/sql/collate/test_collate_list.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA collations diff --git a/parser/testdata/corpus/sql/collate/test_collate_list_contains.test b/parser/testdata/corpus/sql/collate/test_collate_list_contains.test index 7bc648e..186f33d 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_list_contains.test +++ b/parser/testdata/corpus/sql/collate/test_collate_list_contains.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_list_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_contains(['hello', 'world'], 'HELLO' COLLATE NOCASE) @@ -83,3 +83,98 @@ SELECT list_contains([1, 2, 3], 2) -- ok == +SELECT list_contains([{'x': 'hello'}, {'x': 'world'}], {'x': 'HELLO' COLLATE NOCASE}) +-- +ok +== +SELECT list_position([{'x': 'hello'}, {'x': 'world'}], {'x': 'WORLD' COLLATE NOCASE}) +-- +ok +== +SELECT contains([{'x': 'hello'}], {'x': 'HELLO' COLLATE NOCASE}) +-- +ok +== +SELECT list_contains([{'x': 'héllo'}], {'x': 'HELLO' COLLATE NOACCENT.NOCASE}) +-- +ok +== +SELECT list_contains([{'x': ['hello']}], {'x': ['HELLO' COLLATE NOCASE]}) +-- +ok +== +SELECT list_contains([{'x': 'hello'}], {'x': 'HELLO'}) +-- +ok +== +SELECT id, list_contains([{'x': 'Apple'}, {'x': 'Banana'}], {'x': needle}) +FROM t ORDER BY id +-- +ok +== +SELECT id, list_position([{'x': 'Apple'}, {'x': 'Banana'}], {'x': needle}) +FROM t ORDER BY id +-- +ok +== +SELECT id, list_contains([{'x': needle}], {'x': 'BANANA'}) +FROM t ORDER BY id +-- +ok +== +SELECT list_contains([{'x': 'a', 'y': 'b'}], {'x': 'A' COLLATE NOCASE, 'y': 'B'}) +-- +ok +== +SELECT list_contains([{'x': 'a', 'y': 'é'}], {'x': 'A' COLLATE NOCASE, 'y': 'e' COLLATE NOACCENT}) +-- +ok +== +SELECT list_contains([{'x': 'A' COLLATE NOCASE, 'y': 'e' COLLATE NOACCENT}], {'x': 'a', 'y': 'é'}) +-- +ok +== +SELECT list_contains([{'x': 'HELLO' COLLATE NOCASE, 'y': 'é'}], {'x': 'hello', 'y': 'e' COLLATE NOACCENT}) +-- +ok +== +SELECT list_position([{'x': 'hello', 'y': 'e' COLLATE NOACCENT}], {'x': 'HELLO' COLLATE NOCASE, 'y': 'é'}) +-- +ok +== +SELECT list_contains([{'x': 'HELLO', 'y': 'é'}], {'y': 'e' COLLATE NOACCENT, 'x': 'hello' COLLATE NOCASE}) +-- +ok +== +SELECT list_contains([('HELLO', 'é')], ('hello' COLLATE NOCASE, 'e' COLLATE NOACCENT)) +-- +ok +== +SELECT list_contains([{'x': 'HELLO'}]::STRUCT(x VARCHAR)[1], {'x': 'hello' COLLATE NOCASE}) +-- +ok +== +SELECT list_position([{'x': '10:00:00+00'::TIMETZ}], {'x': '10:00:00+00'::TIMETZ}) +-- +ok +== +SELECT list_position([('hello' COLLATE NOCASE, 1), NULL], NULL) +-- +ok +== +SELECT len([{'x': 'hello' COLLATE NOCASE}, {'x': 'hello' COLLATE NOACCENT}]) +-- +ok +== +SELECT list_contains([{'x': 'hello' COLLATE NOCASE}], {'x': 'hello' COLLATE NOACCENT}) +-- +ok +== +SELECT list_position([{'x': 'hello' COLLATE NOACCENT}], {'x': 'hello' COLLATE NOCASE}) +-- +ok +== +SELECT list_contains([{'x': ['hello' COLLATE NOCASE]}], {'x': ['hello' COLLATE NOACCENT]}) +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/test_collate_null_constant.test b/parser/testdata/corpus/sql/collate/test_collate_null_constant.test index 56fbd69..d40b29a 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_null_constant.test +++ b/parser/testdata/corpus/sql/collate/test_collate_null_constant.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_null_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT AGE(NULL, NULL) GROUP BY AGE(NULL, NULL); @@ -15,10 +15,6 @@ SELECT NULL::{type} GROUP BY NULL::{type}; -- error: Parser Error: syntax error at or near "{" == -SET default_collation='nocase' --- -ok -== SELECT NULL::VARCHAR GROUP BY NULL::VARCHAR; -- ok @@ -103,7 +99,7 @@ SELECT AGE(TIMESTAMP '2014-04-25', TIMESTAMP '2014-04-17') GROUP BY AGE(TIMESTAM -- ok == -SELECT i, count(*) FROM (VALUES (INTERVAL '30' DAY), (INTERVAL '1' MONTH), (INTERVAL '720' HOUR)) t(i) GROUP BY i; +SELECT count(*) FROM (VALUES (INTERVAL '30' DAY), (INTERVAL '1' MONTH), (INTERVAL '720' HOUR)) t(i) GROUP BY i; -- ok == diff --git a/parser/testdata/corpus/sql/collate/test_collate_orderby_column_number.test b/parser/testdata/corpus/sql/collate/test_collate_orderby_column_number.test index 0fca129..ad7af7a 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_orderby_column_number.test +++ b/parser/testdata/corpus/sql/collate/test_collate_orderby_column_number.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_orderby_column_number.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'a' AS c1 ORDER BY 1 COLLATE NOCASE; diff --git a/parser/testdata/corpus/sql/collate/test_collate_pivot.test b/parser/testdata/corpus/sql/collate/test_collate_pivot.test index 79fe4da..028dd4c 100644 --- a/parser/testdata/corpus/sql/collate/test_collate_pivot.test +++ b/parser/testdata/corpus/sql/collate/test_collate_pivot.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collate_pivot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA default_collation=NOACCENT; diff --git a/parser/testdata/corpus/sql/collate/test_collation_propagation.test b/parser/testdata/corpus/sql/collate/test_collation_propagation.test index 9520ad0..b534212 100644 --- a/parser/testdata/corpus/sql/collate/test_collation_propagation.test +++ b/parser/testdata/corpus/sql/collate/test_collation_propagation.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_collation_propagation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select a from tbl where contains(b collate nocase, 'O') order by all diff --git a/parser/testdata/corpus/sql/collate/test_combined_collation.test b/parser/testdata/corpus/sql/collate/test_combined_collation.test index fdd23a0..d468119 100644 --- a/parser/testdata/corpus/sql/collate/test_combined_collation.test +++ b/parser/testdata/corpus/sql/collate/test_combined_collation.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_combined_collation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE collate_test(s VARCHAR COLLATE NOACCENT.NOCASE) diff --git a/parser/testdata/corpus/sql/collate/test_default_collations.test b/parser/testdata/corpus/sql/collate/test_default_collations.test index aff22fa..6ec2750 100644 --- a/parser/testdata/corpus/sql/collate/test_default_collations.test +++ b/parser/testdata/corpus/sql/collate/test_default_collations.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_default_collations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA default_collation='NOCASE' diff --git a/parser/testdata/corpus/sql/collate/test_icu_collate.test b/parser/testdata/corpus/sql/collate/test_icu_collate.test index fc8d8b6..49bfd63 100644 --- a/parser/testdata/corpus/sql/collate/test_icu_collate.test +++ b/parser/testdata/corpus/sql/collate/test_icu_collate.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_icu_collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO strings VALUES ('Gabel'), ('Göbel'), ('Goethe'), ('Goldmann'), ('Göthe'), ('Götz'); diff --git a/parser/testdata/corpus/sql/collate/test_pragma_collations.test b/parser/testdata/corpus/sql/collate/test_pragma_collations.test index 7102c13..3b5c19b 100644 --- a/parser/testdata/corpus/sql/collate/test_pragma_collations.test +++ b/parser/testdata/corpus/sql/collate/test_pragma_collations.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_pragma_collations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from pragma_collations() diff --git a/parser/testdata/corpus/sql/collate/test_strpos_collate.test b/parser/testdata/corpus/sql/collate/test_strpos_collate.test index 723c693..302bd21 100644 --- a/parser/testdata/corpus/sql/collate/test_strpos_collate.test +++ b/parser/testdata/corpus/sql/collate/test_strpos_collate.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_strpos_collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT strpos('HELLO' COLLATE NOCASE, 'el') diff --git a/parser/testdata/corpus/sql/collate/test_unsupported_collations.test b/parser/testdata/corpus/sql/collate/test_unsupported_collations.test index a121805..08fd8c3 100644 --- a/parser/testdata/corpus/sql/collate/test_unsupported_collations.test +++ b/parser/testdata/corpus/sql/collate/test_unsupported_collations.test @@ -1,6 +1,6 @@ # source: test/sql/collate/test_unsupported_collations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE collate_test(s VARCHAR COLLATE blabla) @@ -11,10 +11,18 @@ CREATE TABLE collate_test(s INTEGER COLLATE blabla) -- error: Parser Error: Only VARCHAR columns can have collations! == +CREATE TABLE collate_test(s COLLATE nocase) +-- +error: Parser Error: Column s must have a type or be defined as a GENERATED column. +== CREATE TABLE collate_test(s VARCHAR COLLATE NOACCENT.NOACCENT) -- ok == +CREATE TABLE collate_test_duplicate(s VARCHAR COLLATE NOCASE COLLATE NOACCENT) +-- +error: Parser Error: multiple COLLATE clauses not allowed +== CREATE TABLE collate_test(s VARCHAR COLLATE 1) -- error: Parser Error: syntax error at or near "1" diff --git a/parser/testdata/corpus/sql/conjunction/or_between.test b/parser/testdata/corpus/sql/conjunction/or_between.test index 6d5d3ad..6cb8754 100644 --- a/parser/testdata/corpus/sql/conjunction/or_between.test +++ b/parser/testdata/corpus/sql/conjunction/or_between.test @@ -1,6 +1,6 @@ # source: test/sql/conjunction/or_between.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 VARCHAR, col3 INTEGER, col4 FLOAT, col5 VARCHAR); diff --git a/parser/testdata/corpus/sql/conjunction/or_comparison.test b/parser/testdata/corpus/sql/conjunction/or_comparison.test index 68ba232..8e69c9e 100644 --- a/parser/testdata/corpus/sql/conjunction/or_comparison.test +++ b/parser/testdata/corpus/sql/conjunction/or_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/conjunction/or_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 VARCHAR, col3 INTEGER, col4 FLOAT, col5 VARCHAR);; diff --git a/parser/testdata/corpus/sql/connect/concurrent_connect_detach.test b/parser/testdata/corpus/sql/connect/concurrent_connect_detach.test index 935ccda..31cf3af 100644 --- a/parser/testdata/corpus/sql/connect/concurrent_connect_detach.test +++ b/parser/testdata/corpus/sql/connect/concurrent_connect_detach.test @@ -1,24 +1,8 @@ # source: test/sql/connect/concurrent_connect_detach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CALL quack_serve(token='test_token'); --- -ok -== -ATTACH 'quack:localhost' AS qk (TOKEN 'test_token'); --- -ok -== -DETACH qk; --- -ok -== -DISCONNECT; --- -ok -== CONNECT qk; -- ok diff --git a/parser/testdata/corpus/sql/connect/connect_passthrough_quack.test b/parser/testdata/corpus/sql/connect/connect_passthrough_quack.test new file mode 100644 index 0000000..77499d8 --- /dev/null +++ b/parser/testdata/corpus/sql/connect/connect_passthrough_quack.test @@ -0,0 +1,36 @@ +# source: test/sql/connect/connect_passthrough_quack.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +LOAD quack; +-- +ok +== +CALL enable_logging('Quack'); +-- +ok +== +CREATE GRANT; +-- +error: Parser Error: syntax error at or near "GRANT" +== +CONNECT no_such_db; +-- +ok +== +SELECT count(*) > 0 FROM duckdb_logs WHERE type = 'Quack' AND message LIKE '%''server'': NULL%' + AND message LIKE '%''query'': CONNECT no_such_db;%'; +-- +ok +== +SELECT count(*) FROM duckdb_logs WHERE type = 'Quack' AND message LIKE '%''server'': NULL%' + AND message LIKE '%''query'': CREATE GRANT;%' AND message LIKE '%''error'': ''Parser Error: syntax error at or near "GRANT"%'; +-- +ok +== +SELECT count(*) FROM duckdb_logs WHERE type = 'Quack' AND message LIKE '%''server'': NULL%' + AND message LIKE '%''query'': CREATE GRANT;%'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/connect/connect_quack.test b/parser/testdata/corpus/sql/connect/connect_quack.test index bc4b6b0..86c660d 100644 --- a/parser/testdata/corpus/sql/connect/connect_quack.test +++ b/parser/testdata/corpus/sql/connect/connect_quack.test @@ -1,12 +1,16 @@ # source: test/sql/connect/connect_quack.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT range AS x, range * 2 AS y FROM range(3); -- ok == +SELECT 7; +-- +ok +== SELECT 1 + 1; -- ok diff --git a/parser/testdata/corpus/sql/connect/connect_string_ephemeral.test b/parser/testdata/corpus/sql/connect/connect_string_ephemeral.test index 72118b9..3b59a31 100644 --- a/parser/testdata/corpus/sql/connect/connect_string_ephemeral.test +++ b/parser/testdata/corpus/sql/connect/connect_string_ephemeral.test @@ -1,6 +1,6 @@ # source: test/sql/connect/connect_string_ephemeral.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CONNECT ':memory:'; diff --git a/parser/testdata/corpus/sql/connect/connect_syntax.test b/parser/testdata/corpus/sql/connect/connect_syntax.test index 1bb3008..1d73343 100644 --- a/parser/testdata/corpus/sql/connect/connect_syntax.test +++ b/parser/testdata/corpus/sql/connect/connect_syntax.test @@ -1,6 +1,6 @@ # source: test/sql/connect/connect_syntax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CONNECT; diff --git a/parser/testdata/corpus/sql/constraints/check/check_qualified_names.test b/parser/testdata/corpus/sql/constraints/check/check_qualified_names.test new file mode 100644 index 0000000..8a010af --- /dev/null +++ b/parser/testdata/corpus/sql/constraints/check/check_qualified_names.test @@ -0,0 +1,137 @@ +# source: test/sql/constraints/check/check_qualified_names.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE c(x STRUCT(y INT), y STRUCT(x INT), CHECK (x.y < 10)); +-- +ok +== +INSERT INTO c VALUES ({'y': 1}, {'x': 100}); +-- +ok +== +INSERT INTO c VALUES ({'y': 50}, {'x': 1}); +-- +ok +== +CREATE TABLE s1(s STRUCT(a INT), CHECK (s.a > 0)); +-- +ok +== +INSERT INTO s1 VALUES ({'a': 1}); +-- +ok +== +INSERT INTO s1 VALUES ({'a': -1}); +-- +ok +== +CREATE TABLE s2(s STRUCT(a STRUCT(x INT)), CHECK (s2.s.a.x > 0)); +-- +ok +== +INSERT INTO s2 VALUES ({'a': {'x': 1}}); +-- +ok +== +INSERT INTO s2 VALUES ({'a': {'x': -1}}); +-- +ok +== +CREATE TABLE t(x STRUCT(y INT), y STRUCT(x INT), z INT); +-- +ok +== +INSERT INTO t VALUES ({'y': 1}, {'x': 100}, 0); +-- +ok +== +ALTER TABLE t ALTER z TYPE INT USING x.y; +-- +ok +== +SELECT z FROM t +-- +ok +== +CREATE TABLE rc(a STRUCT(a INT), b STRUCT(a INT), CHECK (b.a > 0)); +-- +ok +== +ALTER TABLE rc RENAME COLUMN a TO c; +-- +ok +== +INSERT INTO rc VALUES ({'a': -1}, {'a': 1}); +-- +ok +== +INSERT INTO rc VALUES ({'a': 1}, {'a': -1}); +-- +ok +== +CREATE TABLE rq(x INT, CHECK (rq.x > 0)); +-- +ok +== +ALTER TABLE rq RENAME COLUMN x TO y; +-- +ok +== +INSERT INTO rq VALUES (-1); +-- +ok +== +ATTACH '__TEST_DIR__/check_rename.db' AS d +-- +ok +== +CREATE TABLE d.u(x INT, CHECK (u.x > 0)); +-- +ok +== +ALTER TABLE d.u RENAME TO u2; +-- +ok +== +INSERT INTO d.u2 VALUES (1); +-- +ok +== +INSERT INTO d.u2 VALUES (-1); +-- +ok +== +ALTER TABLE d.u2 ADD COLUMN y INT +-- +ok +== +CREATE TABLE d.r(x STRUCT(r INT), CHECK (r.x IS NOT NULL)); +-- +ok +== +ALTER TABLE d.r RENAME TO r2; +-- +ok +== +INSERT INTO d.r2 VALUES ({'r': NULL}); +-- +ok +== +INSERT INTO d.r2 VALUES (NULL); +-- +ok +== +DETACH d +-- +ok +== +INSERT INTO d.u2 VALUES (2, 3); +-- +ok +== +INSERT INTO d.u2 VALUES (-2, 3); +-- +ok +== diff --git a/parser/testdata/corpus/sql/constraints/check/check_struct.test b/parser/testdata/corpus/sql/constraints/check/check_struct.test index d6ef269..70c52ae 100644 --- a/parser/testdata/corpus/sql/constraints/check/check_struct.test +++ b/parser/testdata/corpus/sql/constraints/check/check_struct.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/check/check_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(t ROW(t INTEGER) CHECK(t.t=42)); diff --git a/parser/testdata/corpus/sql/constraints/check/test_check.test b/parser/testdata/corpus/sql/constraints/check/test_check.test index 464283e..1745a68 100644 --- a/parser/testdata/corpus/sql/constraints/check/test_check.test +++ b/parser/testdata/corpus/sql/constraints/check/test_check.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/check/test_check.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER CHECK(i < 5)) diff --git a/parser/testdata/corpus/sql/constraints/check/test_update_check_non_updated_columns.test b/parser/testdata/corpus/sql/constraints/check/test_update_check_non_updated_columns.test index 0987f95..e8b4745 100644 --- a/parser/testdata/corpus/sql/constraints/check/test_update_check_non_updated_columns.test +++ b/parser/testdata/corpus/sql/constraints/check/test_update_check_non_updated_columns.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/check/test_update_check_non_updated_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v0 ( diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_19469.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_19469.test index 2f90691..71bb94f 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/fk_19469.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_19469.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/fk_19469.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE B (b1 INTEGER, @@ -113,3 +113,19 @@ INSERT INTO fk_19990_data BY NAME -- ok == +CREATE TABLE fk_local_p(id INT PRIMARY KEY); +-- +ok +== +CREATE TABLE fk_local_c(pid INT, FOREIGN KEY (pid) REFERENCES fk_local_p(id)); +-- +ok +== +INSERT INTO fk_local_p VALUES (10), (20); +-- +ok +== +INSERT INTO fk_local_c VALUES (10), (30), (20); +-- +ok +== diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_20530.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_20530.test index 0910d4d..545deb8 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/fk_20530.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_20530.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/fk_20530.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA freddy; diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_4309.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_4309.test index e62897e..c5b81fb 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/fk_4309.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_4309.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/fk_4309.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tf_1 ( diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_4365.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_4365.test index fac4499..0dbc571 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/fk_4365.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_4365.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/fk_4365.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table x (c1 integer, primary key (c1)); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_case_insensitivity.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_case_insensitivity.test index 1c6294e..720c69d 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/fk_case_insensitivity.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_case_insensitivity.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/fk_case_insensitivity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a (a int not null, constraint pk_a primary key (A)); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_implicit_primary_key.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_implicit_primary_key.test index d97f85f..41bd359 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/fk_implicit_primary_key.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_implicit_primary_key.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/fk_implicit_primary_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table b (i int references a); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/fk_self_reference_tostring.test b/parser/testdata/corpus/sql/constraints/foreignkey/fk_self_reference_tostring.test new file mode 100644 index 0000000..162caab --- /dev/null +++ b/parser/testdata/corpus/sql/constraints/foreignkey/fk_self_reference_tostring.test @@ -0,0 +1,19 @@ +# source: test/sql/constraints/foreignkey/fk_self_reference_tostring.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(id INT PRIMARY KEY, parent INT REFERENCES t(id)); +-- +ok +== +SELECT constraint_type, constraint_text +FROM duckdb_constraints() +WHERE table_name = 't' AND constraint_type = 'FOREIGN KEY'; +-- +ok +== +SELECT sql FROM duckdb_tables() WHERE table_name = 't'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/foreign_key_matching_columns.test b/parser/testdata/corpus/sql/constraints/foreignkey/foreign_key_matching_columns.test index 5dba587..9aa2a47 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/foreign_key_matching_columns.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/foreign_key_matching_columns.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/foreign_key_matching_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE routes ( diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_action.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_action.test index 657c4a6..b432185 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_action.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_action.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_action.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(id INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_alter.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_alter.test index aea2c3f..2319a48 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_alter.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_alter.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_alter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE departments ( diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_chain.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_chain.test index 405064b..67552ba 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_chain.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_chain.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_chain.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(i1 INTEGER UNIQUE) diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_concurrency_conflicts.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_concurrency_conflicts.test index 344675e..bdf924d 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_concurrency_conflicts.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_concurrency_conflicts.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_concurrency_conflicts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pk_integers(i INTEGER PRIMARY KEY) diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_or_replace.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_or_replace.test new file mode 100644 index 0000000..3850345 --- /dev/null +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_or_replace.test @@ -0,0 +1,45 @@ +# source: test/sql/constraints/foreignkey/test_fk_create_or_replace.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE parent (id INTEGER PRIMARY KEY) +-- +ok +== +INSERT INTO parent VALUES (1), (2) +-- +ok +== +CREATE TABLE child (fk INTEGER REFERENCES parent(id)) +-- +ok +== +CREATE OR REPLACE TABLE parent (id INTEGER PRIMARY KEY) +-- +ok +== +CREATE OR REPLACE TABLE child (fk INTEGER) +-- +ok +== +DROP TABLE parent +-- +ok +== +DELETE FROM parent WHERE id = 1 +-- +ok +== +DROP TABLE child +-- +ok +== +CREATE OR REPLACE TABLE child (fk INTEGER REFERENCES parent(id)) +-- +ok +== +CREATE OR REPLACE TABLE child AS SELECT 1 AS fk +-- +ok +== diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_type.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_type.test index 3417bcd..2aca9f7 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_type.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_create_type.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_create_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create type custom_type as integer; diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_cross_schema.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_cross_schema.test index d9c31a4..ba1f08c 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_cross_schema.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_cross_schema.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_cross_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA s2 diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_eager_constraint_checking.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_eager_constraint_checking.test index 0ad6e13..d73b0b1 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_eager_constraint_checking.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_eager_constraint_checking.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_eager_constraint_checking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version = 'v0.10.3'; diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_export.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_export.test index 6c8eb91..e64a343 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_export.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_export.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPORT DATABASE '{TEST_DIR}/fk_constraint' diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_key_multiple_key_actions.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_key_multiple_key_actions.test new file mode 100644 index 0000000..75100bc --- /dev/null +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_key_multiple_key_actions.test @@ -0,0 +1,64 @@ +# source: test/sql/constraints/foreignkey/test_fk_key_multiple_key_actions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE parent (id INT PRIMARY KEY); +-- +ok +== +CREATE TABLE child ( + parent_id INT REFERENCES parent(id) + ON DELETE NO ACTION + ON UPDATE NO ACTION +); +-- +ok +== +CREATE TABLE sibling ( + parent_id INT REFERENCES parent(id) + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +-- +ok +== +CREATE TABLE elders ( + parent_id INT REFERENCES parent(id) + ON UPDATE NO ACTION + ON DELETE NO ACTION + ON DELETE NO ACTION +); +-- +error: Parser Error: syntax error at or near "ON" +== +CREATE TABLE relatives ( + parent_id INT REFERENCES parent(id) + ON UPDATE NO ACTION + ON DELETE NO ACTION + ON UPDATE NO ACTION +); +-- +error: Parser Error: syntax error at or near "ON" +== +CREATE TABLE cousin ( + parent_id INT, + FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE RESTRICT ON UPDATE NO ACTION +); +-- +ok +== +CREATE TABLE nephew ( + parent_id INT, + FOREIGN KEY (parent_id) REFERENCES parent(id) ON UPDATE RESTRICT ON DELETE NO ACTION +); +-- +ok +== +CREATE TABLE niece ( + parent_id INT, + FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE RESTRICT ON DELETE RESTRICT +); +-- +error: Parser Error: syntax error at or near "DELETE" +== diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_multiple.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_multiple.test index 3f28750..6ed950a 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_multiple.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_multiple.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_multiple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pkt1( diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_on_view_error.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_on_view_error.test index 52bb37d..8cf93d3 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_on_view_error.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_on_view_error.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_on_view_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE vdata AS SELECT * FROM (VALUES ('v2',)) v(id); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_pk_multi_transaction_delete.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_pk_multi_transaction_delete.test index 6c087fc..a22b660 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_pk_multi_transaction_delete.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_pk_multi_transaction_delete.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_pk_multi_transaction_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE primary_table (id INT PRIMARY KEY) diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_rollback.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_rollback.test index 97c0542..df2c41b 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_rollback.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO pk_integers VALUES (1); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_reference_export.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_reference_export.test index 2de05a2..dbb2050 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_reference_export.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_reference_export.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_self_reference_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE self_ref(id INTEGER PRIMARY KEY, parent_id INTEGER REFERENCES self_ref(id)); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_referencing.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_referencing.test index ece7a70..64676d1 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_referencing.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_self_referencing.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_self_referencing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE employee( diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_temporary.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_temporary.test index b3d59e0..ddcedaa 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_temporary.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_temporary.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_temporary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY TABLE album (artistid INTEGER, albumname TEXT, albumcover TEXT, UNIQUE (artistid, albumname)); diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_transaction.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_transaction.test index 40b649b..878af8f 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_transaction.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pkt(i INTEGER PRIMARY KEY) @@ -75,3 +75,39 @@ DELETE FROM a -- ok == +CREATE TABLE cross_fk_parent(id INTEGER PRIMARY KEY) +-- +ok +== +CREATE TABLE cross_fk_child(pid INTEGER, FOREIGN KEY (pid) REFERENCES cross_fk_parent(id)) +-- +ok +== +INSERT INTO cross_fk_parent VALUES (1) +-- +ok +== +DELETE FROM cross_fk_parent WHERE id = 1 +-- +ok +== +INSERT INTO cross_fk_child VALUES (1) +-- +ok +== +SELECT count(*) FROM cross_fk_parent +-- +ok +== +SELECT count(*) FROM cross_fk_child +-- +ok +== +DROP TABLE cross_fk_child +-- +ok +== +DROP TABLE cross_fk_parent +-- +ok +== diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_with_attached_db.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_with_attached_db.test index 79f9a0e..eea2264 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_with_attached_db.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_fk_with_attached_db.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_fk_with_attached_db.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_fk_db.db' AS db1; diff --git a/parser/testdata/corpus/sql/constraints/foreignkey/test_foreignkey.test b/parser/testdata/corpus/sql/constraints/foreignkey/test_foreignkey.test index 3443404..d3a30e2 100644 --- a/parser/testdata/corpus/sql/constraints/foreignkey/test_foreignkey.test +++ b/parser/testdata/corpus/sql/constraints/foreignkey/test_foreignkey.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/foreignkey/test_foreignkey.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE song(songid INTEGER, songartist INTEGER, songalbum TEXT, songname TEXT, FOREIGN KEY(songartist, songalbum) REFERENCES album(artistid)); diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_bool.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_bool.test index 4ef554d..1173354 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_bool.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_bool.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j BOOLEAN, PRIMARY KEY(i, j)) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_col_subset.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_col_subset.test index 99eedfa..571c69a 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_col_subset.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_col_subset.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_col_subset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(a integer, b integer, c integer, d integer, e integer, PRIMARY KEY(a,b)) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_concurrency_conflicts.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_concurrency_conflicts.test index 6f22506..8c29869 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_concurrency_conflicts.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_concurrency_conflicts.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_concurrency_conflicts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER PRIMARY KEY) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_many_columns.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_many_columns.test index 59b5257..cad0a47 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_many_columns.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_many_columns.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_many_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(a integer, b integer, c integer, d integer, e integer, PRIMARY KEY(a,b,c,d,e)) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_column.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_column.test index ab9b865..e305961 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_column.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_column.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_multi_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j VARCHAR, PRIMARY KEY(i, j)) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_string.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_string.test index 4611e47..eaa9a4b 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_string.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_multi_string.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_multi_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tst(a varchar, b varchar,PRIMARY KEY(a,b)) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_rollback.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_rollback.test index 6cf56fd..9a04ecb 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_rollback.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1); diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_string.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_string.test index 2bd71d7..7928840 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_string.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_string.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(i varchar PRIMARY KEY, j INTEGER) diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_update_delete.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_update_delete.test index 6153c5b..c17b6f7 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_update_delete.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_update_delete.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_update_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER PRIMARY KEY, b INTEGER); diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_local.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_local.test index 1064d89..6c8a87e 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_local.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_local.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_updel_local.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i=33; diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_multi_column.test b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_multi_column.test index fbd4e95..4f9ba23 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_multi_column.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_pk_updel_multi_column.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_pk_updel_multi_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b VARCHAR, PRIMARY KEY(a, b)); diff --git a/parser/testdata/corpus/sql/constraints/primarykey/test_primary_key.test b/parser/testdata/corpus/sql/constraints/primarykey/test_primary_key.test index 85f5cfa..006d716 100644 --- a/parser/testdata/corpus/sql/constraints/primarykey/test_primary_key.test +++ b/parser/testdata/corpus/sql/constraints/primarykey/test_primary_key.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/primarykey/test_primary_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER PRIMARY KEY, j INTEGER) diff --git a/parser/testdata/corpus/sql/constraints/test_constraint_with_updates.test b/parser/testdata/corpus/sql/constraints/test_constraint_with_updates.test index e080c9b..b877a78 100644 --- a/parser/testdata/corpus/sql/constraints/test_constraint_with_updates.test +++ b/parser/testdata/corpus/sql/constraints/test_constraint_with_updates.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/test_constraint_with_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j INTEGER CHECK(i + j < 5), k INTEGER) diff --git a/parser/testdata/corpus/sql/constraints/test_named_column_constraints.test b/parser/testdata/corpus/sql/constraints/test_named_column_constraints.test new file mode 100644 index 0000000..b1bf559 --- /dev/null +++ b/parser/testdata/corpus/sql/constraints/test_named_column_constraints.test @@ -0,0 +1,60 @@ +# source: test/sql/constraints/test_named_column_constraints.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE p(id INT PRIMARY KEY); +-- +ok +== +INSERT INTO p VALUES (1), (2); +-- +ok +== +CREATE TABLE t( + a INT + CONSTRAINT name_that_is_not_stored_just_like_the_rest CHECK (a > 0) + CONSTRAINT c_not_null NOT NULL, + b INT DEFAULT 5 CONSTRAINT chk CHECK (b > 0) CONSTRAINT u UNIQUE, + c INT CONSTRAINT pk PRIMARY KEY CONSTRAINT fk REFERENCES p(id) +); +-- +ok +== +SELECT constraint_type, constraint_name, constraint_column_names, constraint_text +FROM duckdb_constraints() WHERE table_name = 't' ORDER BY constraint_name; +-- +ok +== +SELECT column_name, column_default, is_nullable FROM duckdb_columns() WHERE table_name = 't' ORDER BY column_index; +-- +ok +== +INSERT INTO t (a, c) VALUES (1, 1); +-- +ok +== +INSERT INTO t VALUES (0, 6, 2); +-- +ok +== +INSERT INTO t VALUES (NULL, 6, 2); +-- +ok +== +INSERT INTO t VALUES (1, -1, 2); +-- +ok +== +INSERT INTO t VALUES (1, 5, 2); +-- +ok +== +INSERT INTO t VALUES (1, 6, 3); +-- +ok +== +CREATE TABLE t_err(a INT CONSTRAINT c CONSTRAINT d CHECK (a > 0)); +-- +error: Parser Error: syntax error at or near "CONSTRAINT" +== diff --git a/parser/testdata/corpus/sql/constraints/test_not_null.test b/parser/testdata/corpus/sql/constraints/test_not_null.test index eed9950..ed2ac07 100644 --- a/parser/testdata/corpus/sql/constraints/test_not_null.test +++ b/parser/testdata/corpus/sql/constraints/test_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/test_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER NOT NULL) diff --git a/parser/testdata/corpus/sql/constraints/unique/test_unique.test b/parser/testdata/corpus/sql/constraints/unique/test_unique.test index 6a16137..17d86a8 100644 --- a/parser/testdata/corpus/sql/constraints/unique/test_unique.test +++ b/parser/testdata/corpus/sql/constraints/unique/test_unique.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/unique/test_unique.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER UNIQUE, j INTEGER) diff --git a/parser/testdata/corpus/sql/constraints/unique/test_unique_error.test b/parser/testdata/corpus/sql/constraints/unique/test_unique_error.test index a4a27c1..8d457d3 100644 --- a/parser/testdata/corpus/sql/constraints/unique/test_unique_error.test +++ b/parser/testdata/corpus/sql/constraints/unique/test_unique_error.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/unique/test_unique_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY TABLE integers(i INTEGER, j VARCHAR) diff --git a/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_column.test b/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_column.test index 1646e40..d31ca8e 100644 --- a/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_column.test +++ b/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_column.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/unique/test_unique_multi_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY TABLE integers(i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_constraint.test b/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_constraint.test index 1cd17a3..c64f802 100644 --- a/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_constraint.test +++ b/parser/testdata/corpus/sql/constraints/unique/test_unique_multi_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/unique/test_unique_multi_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER PRIMARY KEY, j INTEGER UNIQUE) @@ -43,3 +43,19 @@ INSERT INTO integers VALUES (100, 100) -- ok == +CREATE TABLE constraint_order (PRIMARY KEY (i), i INTEGER, j INTEGER UNIQUE, k INTEGER NOT NULL) +-- +ok +== +INSERT INTO constraint_order VALUES (1, 1, 1) +-- +ok +== +INSERT INTO constraint_order VALUES (2, 1, 2) +-- +ok +== +INSERT INTO constraint_order VALUES (3, 3, NULL) +-- +ok +== diff --git a/parser/testdata/corpus/sql/constraints/unique/test_unique_string.test b/parser/testdata/corpus/sql/constraints/unique/test_unique_string.test index 2057a14..5eb3aba 100644 --- a/parser/testdata/corpus/sql/constraints/unique/test_unique_string.test +++ b/parser/testdata/corpus/sql/constraints/unique/test_unique_string.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/unique/test_unique_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX "uidx" ON "integers" ("j") diff --git a/parser/testdata/corpus/sql/constraints/unique/test_unique_temp.test b/parser/testdata/corpus/sql/constraints/unique/test_unique_temp.test index 2351b9b..e5f3c88 100644 --- a/parser/testdata/corpus/sql/constraints/unique/test_unique_temp.test +++ b/parser/testdata/corpus/sql/constraints/unique/test_unique_temp.test @@ -1,6 +1,6 @@ # source: test/sql/constraints/unique/test_unique_temp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX uidx ON integers (i) diff --git a/parser/testdata/corpus/sql/copy/async_file_character_device.test b/parser/testdata/corpus/sql/copy/async_file_character_device.test new file mode 100644 index 0000000..b08894c --- /dev/null +++ b/parser/testdata/corpus/sql/copy/async_file_character_device.test @@ -0,0 +1,13 @@ +# source: test/sql/copy/async_file_character_device.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 42) TO '/dev/null' (FORMAT CSV); +-- +ok +== +COPY (SELECT 42) TO '/dev/null' (FORMAT PARQUET); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/async_file_lifecycle.test b/parser/testdata/corpus/sql/copy/async_file_lifecycle.test index 8a064f1..7cfaf01 100644 --- a/parser/testdata/corpus/sql/copy/async_file_lifecycle.test +++ b/parser/testdata/corpus/sql/copy/async_file_lifecycle.test @@ -1,6 +1,6 @@ # source: test/sql/copy/async_file_lifecycle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET async_threads=2; @@ -17,6 +17,64 @@ FROM range(0, 4096) t(i); -- ok == +COPY (SELECT CASE WHEN i = 4096 THEN error('injected CSV failure') ELSE i::VARCHAR END AS v + FROM range(8192) t(i)) +TO '{TEST_DIR}/async_lifecycle_failed.csv' (FORMAT CSV, PRESERVE_ORDER false); +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/async_lifecycle_failed.csv'); +-- +ok +== +COPY (SELECT CASE WHEN i = 4096 THEN error('injected compressed CSV failure') ELSE i::VARCHAR END AS v + FROM range(8192) t(i)) +TO '{TEST_DIR}/async_lifecycle_failed.csv.gz' (FORMAT CSV, COMPRESSION GZIP, PRESERVE_ORDER false); +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/async_lifecycle_failed.csv.gz'); +-- +ok +== +COPY (SELECT CASE WHEN i = 4096 THEN error('injected Parquet failure') ELSE i END AS v + FROM range(8192) t(i)) +TO '{TEST_DIR}/async_lifecycle_failed.parquet' (FORMAT PARQUET, PRESERVE_ORDER false); +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/async_lifecycle_failed.parquet'); +-- +ok +== +COPY (SELECT 'before' AS v) TO '{TEST_DIR}/async_lifecycle_existing.csv' (FORMAT CSV); +-- +ok +== +COPY (SELECT CASE WHEN i = 4096 THEN error('injected existing CSV failure') ELSE i::VARCHAR END AS v + FROM range(8192) t(i)) +TO '{TEST_DIR}/async_lifecycle_existing.csv' (FORMAT CSV, USE_TMP_FILE false, PRESERVE_ORDER false); +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/async_lifecycle_existing.csv'); +-- +ok +== +COPY (SELECT 'before' AS v) TO '{TEST_DIR}/async_lifecycle_existing.parquet' (FORMAT PARQUET); +-- +ok +== +COPY (SELECT CASE WHEN i = 4096 THEN error('injected existing Parquet failure') ELSE i END AS v + FROM range(8192) t(i)) +TO '{TEST_DIR}/async_lifecycle_existing.parquet' (FORMAT PARQUET, USE_TMP_FILE false, PRESERVE_ORDER false); +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/async_lifecycle_existing.parquet'); +-- +ok +== COPY lifecycle TO '{TEST_DIR}/async_lifecycle_single.parquet' (FORMAT PARQUET, RETURN_FILES); -- ok diff --git a/parser/testdata/corpus/sql/copy/copy_blob.test b/parser/testdata/corpus/sql/copy/copy_blob.test index 4000e09..8639aad 100644 --- a/parser/testdata/corpus/sql/copy/copy_blob.test +++ b/parser/testdata/corpus/sql/copy/copy_blob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/copy_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (select 'foo') TO '{TEST_DIR}/test.blob' (FORMAT BLOB); diff --git a/parser/testdata/corpus/sql/copy/copy_blob_options.test b/parser/testdata/corpus/sql/copy/copy_blob_options.test new file mode 100644 index 0000000..80b2e7f --- /dev/null +++ b/parser/testdata/corpus/sql/copy/copy_blob_options.test @@ -0,0 +1,28 @@ +# source: test/sql/copy/copy_blob_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 'duck'::BLOB) TO '{TEST_DIR}/blob_list_compression.gz' + (FORMAT BLOB, COMPRESSION ['gzip']); +-- +ok +== +SELECT size > 4 FROM read_blob('{TEST_DIR}/blob_list_compression.gz'); +-- +ok +== +COPY (SELECT 'duck'::BLOB) TO '{TEST_DIR}/blob_bad_compression.gz' + (FORMAT BLOB, COMPRESSION ['gzip', 'zstd']); +-- +ok +== +COPY (SELECT 'duck'::BLOB) TO '{TEST_DIR}/blob_numeric_compression' + (FORMAT BLOB, COMPRESSION 42); +-- +ok +== +COPY (SELECT 'abc'::BLOB AS b) TO '__TEST_DIR__/no_value.bin' (FORMAT BLOB, COMPRESSION); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/copy_column_identifier_conversion.test b/parser/testdata/corpus/sql/copy/copy_column_identifier_conversion.test new file mode 100644 index 0000000..1676115 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/copy_column_identifier_conversion.test @@ -0,0 +1,115 @@ +# source: test/sql/copy/copy_column_identifier_conversion.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET enable_logging = true; +-- +ok +== +SET VARIABLE p = 64; +-- +ok +== +SET table_function_identifier_conversion = '{conversion}'; +-- +ok +== +SET warnings_as_errors = true; +-- +ok +== +COPY (SELECT 42 i, getvariable('p') AS p) TO '{TEST_DIR}/copy_columns_{conversion}' (FORMAT parquet, PARTITION_BY {partition}, OVERWRITE); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT i, p FROM read_parquet('{TEST_DIR}/copy_columns_{conversion}/*/*.parquet', hive_partitioning = true); +-- +ok +== +COPY (SELECT 42 i, 64 p, 7 q) TO '{TEST_DIR}/copy_multiple_columns_{conversion}' (FORMAT parquet, PARTITION_BY (p, q)); +-- +ok +== +SELECT i, p, q FROM read_parquet('{TEST_DIR}/copy_multiple_columns_{conversion}/*/*/*.parquet', hive_partitioning = true); +-- +ok +== +COPY (SELECT 42 i, 'test' AS user) TO '{TEST_DIR}/copy_user_column_{conversion}' (FORMAT parquet, PARTITION_BY user); +-- +ok +== +SELECT i, user FROM read_parquet('{TEST_DIR}/copy_user_column_{conversion}/*/*.parquet', hive_partitioning = true); +-- +ok +== +COPY (SELECT 42 i) TO '{TEST_DIR}/copy_missing_column_{conversion}' (FORMAT parquet, PARTITION_BY missing); +-- +ok +== +COPY (SELECT NULL::VARCHAR a, 'hello' b, NULL::VARCHAR c) TO '{TEST_DIR}/copy_csv_columns_{conversion}.csv' (HEADER, FORCE_QUOTE b); +-- +ok +== +SELECT contains(content, '"hello"') FROM read_text('{TEST_DIR}/copy_csv_columns_{conversion}.csv'); +-- +ok +== +CREATE TABLE csv_columns (a VARCHAR, b VARCHAR, c VARCHAR); +-- +ok +== +COPY csv_columns FROM '{TEST_DIR}/copy_csv_columns_{conversion}.csv' (HEADER, FORCE_NOT_NULL a, ALLOW_QUOTED_NULLS false); +-- +ok +== +SELECT length(a), length(b), c IS NULL FROM csv_columns; +-- +ok +== +DROP TABLE csv_columns; +-- +ok +== +COPY (SELECT 'x' p, 'y' AS user) TO '{TEST_DIR}/copy_csv_user_column_{conversion}.csv' (HEADER, FORCE_QUOTE (p, user)); +-- +ok +== +SELECT replace(content, chr(10), '|') FROM read_text('{TEST_DIR}/copy_csv_user_column_{conversion}.csv'); +-- +ok +== +COPY (SELECT * FROM (VALUES (2), (1), (3)) t(p)) TO '{TEST_DIR}/copy_order_column_{conversion}' (FORMAT parquet, ORDER_BY {ordering}, OVERWRITE); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT p FROM read_parquet('{TEST_DIR}/copy_order_column_{conversion}/*.parquet', file_row_number = true) ORDER BY file_row_number; +-- +ok +== +COPY (SELECT * FROM (VALUES (0, 2, 30), (0, 1, 20), (0, 2, 10), (0, NULL, 40)) t(part, p, q)) +TO '{TEST_DIR}/copy_order_expression_{conversion}' +(FORMAT parquet, PARTITION_BY part, ORDER_BY (abs(p) DESC NULLS LAST, q)); +-- +ok +== +SELECT q FROM read_parquet('{TEST_DIR}/copy_order_expression_{conversion}/*/*.parquet', file_row_number = true) ORDER BY file_row_number; +-- +ok +== +SELECT count(*) FROM glob(no_such_file.csv); +-- +ok +== +SELECT count(*) FROM glob('no_such_file.csv'); +-- +ok +== +SET warnings_as_errors = false; +-- +ok +== +RESET table_function_identifier_conversion; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/copy_cte.test b/parser/testdata/corpus/sql/copy/copy_cte.test index ab95cd3..269f540 100644 --- a/parser/testdata/corpus/sql/copy/copy_cte.test +++ b/parser/testdata/corpus/sql/copy/copy_cte.test @@ -1,6 +1,6 @@ # source: test/sql/copy/copy_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE copy_cte_source (i INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/copy_legacy_options.test b/parser/testdata/corpus/sql/copy/copy_legacy_options.test new file mode 100644 index 0000000..0c6caec --- /dev/null +++ b/parser/testdata/corpus/sql/copy/copy_legacy_options.test @@ -0,0 +1,33 @@ +# source: test/sql/copy/copy_legacy_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t (a INT, b INT, c INT); +-- +ok +== +COPY t FROM '{DATA_DIR}/csv/unguessed_delimiters.csv' USING DELIMITERS '+'; +-- +ok +== +COPY t TO '{TEMP_DIR}/out.csv' DELIMITERS '^'; +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/out.csv', delim = '|', header = true, columns = {'line': 'VARCHAR'}) +-- +ok +== +COPY t FROM '{TEMP_DIR}/out.csv' DELIMITERS '^' (HEADER true); +-- +ok +== +COPY t FROM '{TEMP_DIR}/out.csv' DELIMITERS '^' WITH (DELIMITER ';'); +-- +error: Parser Error: Unexpected duplicate option "delimiter" +== +COPY (SELECT 42) TO '{TEMP_DIR}/out2.csv' DELIMITERS '^'; +-- +error: Parser Error: syntax error at or near "DELIMITERS" +== diff --git a/parser/testdata/corpus/sql/copy/copy_order_by_collation.test b/parser/testdata/corpus/sql/copy/copy_order_by_collation.test new file mode 100644 index 0000000..d6153bb --- /dev/null +++ b/parser/testdata/corpus/sql/copy/copy_order_by_collation.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/copy_order_by_collation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT * FROM (VALUES ('B'), ('a'), ('C')) v(s)) TO '{TEST_DIR}/copy_order_by_collation.parquet' (FORMAT parquet, ORDER_BY (s COLLATE nocase)) +-- +ok +== +SELECT list(s ORDER BY file_row_number) FROM read_parquet('{TEST_DIR}/copy_order_by_collation.parquet', file_row_number = true) +-- +ok +== +COPY (SELECT * FROM (VALUES ('B'), ('a'), ('C')) v(s)) TO '{TEST_DIR}/copy_order_by_collation.parquet' (FORMAT parquet, ORDER_BY (s COLLATE nocase DESC), OVERWRITE) +-- +ok +== +COPY (SELECT * FROM (VALUES ('B'), ('a'), ('C')) v(s)) TO '{TEST_DIR}/copy_order_by_collation.parquet' (FORMAT parquet, ORDER_BY (s), OVERWRITE) +-- +ok +== +SET default_collation = 'nocase' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/copy_order_by_subquery.test b/parser/testdata/corpus/sql/copy/copy_order_by_subquery.test new file mode 100644 index 0000000..270b3c3 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/copy_order_by_subquery.test @@ -0,0 +1,33 @@ +# source: test/sql/copy/copy_order_by_subquery.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT * FROM (VALUES (2), (1)) t(p)) TO '{TEST_DIR}/copy_order_by_subquery.parquet' (FORMAT parquet, ORDER_BY (p + (SELECT 0))) +-- +ok +== +COPY (SELECT * FROM (VALUES (2), (1)) t(p)) TO '{TEST_DIR}/copy_order_by_subquery.parquet' (FORMAT parquet, ORDER_BY (p IN (SELECT 1) DESC)) +-- +ok +== +CREATE MACRO zero_subquery() AS (SELECT 0) +-- +ok +== +COPY (SELECT * FROM (VALUES (2), (1)) t(p)) TO '{TEST_DIR}/copy_order_by_subquery.parquet' (FORMAT parquet, ORDER_BY (p + zero_subquery())) +-- +ok +== +COPY (SELECT * FROM (VALUES (2), (1)) t(p)) TO '{TEST_DIR}/copy_order_by_subquery.parquet' (FORMAT parquet, ORDER_BY (switch((SELECT 0), map([0], [1])))) +-- +ok +== +COPY (SELECT * FROM (VALUES (2), (1)) t(p)) TO '{TEST_DIR}/copy_order_by_subquery.parquet' (FORMAT parquet, ORDER_BY (p + 0)) +-- +ok +== +SELECT p FROM read_parquet('{TEST_DIR}/copy_order_by_subquery.parquet', file_row_number = true) ORDER BY file_row_number +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/copy_to_parameter_filename.test b/parser/testdata/corpus/sql/copy/copy_to_parameter_filename.test new file mode 100644 index 0000000..85037f2 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/copy_to_parameter_filename.test @@ -0,0 +1,29 @@ +# source: test/sql/copy/copy_to_parameter_filename.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PREPARE q AS COPY (SELECT 42 AS x) TO $1 (FORMAT csv); +-- +ok +== +EXECUTE q(42); +-- +ok +== +EXECUTE q('00000000-0000-0000-0000-000000000000'::UUID); +-- +ok +== +EXECUTE q(NULL::VARCHAR); +-- +ok +== +EXECUTE q('{TEMP_DIR}/copy_to_parameter.csv'); +-- +ok +== +SELECT x FROM read_csv('{TEMP_DIR}/copy_to_parameter.csv'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/14512.test b/parser/testdata/corpus/sql/copy/csv/14512.test index 9b98f64..63b6632 100644 --- a/parser/testdata/corpus/sql/copy/csv/14512.test +++ b/parser/testdata/corpus/sql/copy/csv/14512.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/14512.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/14512.csv', strict_mode=TRUE); diff --git a/parser/testdata/corpus/sql/copy/csv/14874.test b/parser/testdata/corpus/sql/copy/csv/14874.test index f77e49b..b4593f4 100644 --- a/parser/testdata/corpus/sql/copy/csv/14874.test +++ b/parser/testdata/corpus/sql/copy/csv/14874.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/14874.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM read_csv('{DATA_DIR}/csv/drug_exposure.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/17738.test b/parser/testdata/corpus/sql/copy/csv/17738.test index 611089a..99fe229 100644 --- a/parser/testdata/corpus/sql/copy/csv/17738.test +++ b/parser/testdata/corpus/sql/copy/csv/17738.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/17738.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/17738_rn.csv',header=False,skip=3, delim = ';'); diff --git a/parser/testdata/corpus/sql/copy/csv/17744.test b/parser/testdata/corpus/sql/copy/csv/17744.test index 066b359..b61a396 100644 --- a/parser/testdata/corpus/sql/copy/csv/17744.test +++ b/parser/testdata/corpus/sql/copy/csv/17744.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/17744.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/csv/18579.test b/parser/testdata/corpus/sql/copy/csv/18579.test index 22da003..1fd336a 100644 --- a/parser/testdata/corpus/sql/copy/csv/18579.test +++ b/parser/testdata/corpus/sql/copy/csv/18579.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/18579.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DESCRIBE FROM read_csv('{DATA_DIR}/csv/18579/*.csv', union_by_name = true); diff --git a/parser/testdata/corpus/sql/copy/csv/19578.test b/parser/testdata/corpus/sql/copy/csv/19578.test index e13f243..21c0a70 100644 --- a/parser/testdata/corpus/sql/copy/csv/19578.test +++ b/parser/testdata/corpus/sql/copy/csv/19578.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/19578.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT Delimiter, Quote, Escape FROM sniff_csv("data/19578.csv"); diff --git a/parser/testdata/corpus/sql/copy/csv/21248.test b/parser/testdata/corpus/sql/copy/csv/21248.test index 4fd3c72..1962eeb 100644 --- a/parser/testdata/corpus/sql/copy/csv/21248.test +++ b/parser/testdata/corpus/sql/copy/csv/21248.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/21248.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv(['data/csv/unionbyname_21248_*.csv'], union_by_name = true, ignore_errors = true, all_varchar = true); diff --git a/parser/testdata/corpus/sql/copy/csv/25268.test b/parser/testdata/corpus/sql/copy/csv/25268.test new file mode 100644 index 0000000..7b10094 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/25268.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/csv/25268.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT CASE WHEN i = 2 THEN NULL ELSE '0123456789' END AS a FROM range(1, 4) t(i)) TO '{TEST_DIR}/empty_line.csv' (HEADER false); +-- +ok +== +FROM read_csv('{TEST_DIR}/empty_line.csv', columns={'a': 'VARCHAR'}, header=false, nullstr=['', '', '']); +-- +ok +== +COPY (SELECT CASE WHEN i = 2030 THEN NULL ELSE '0123456789' END AS a FROM range(1, 2050) t(i)) TO '{TEST_DIR}/empty_line_boundary.csv' (HEADER false); +-- +ok +== +SELECT count(*) FROM read_csv('{TEST_DIR}/empty_line_boundary.csv', columns={'a': 'VARCHAR'}, header=false, parallel=false, nullstr=['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']); +-- +ok +== +SELECT count(*) FROM read_csv('{TEST_DIR}/empty_line_boundary.csv', columns={'a': 'VARCHAR'}, header=false, nullstr=['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/26049.test b/parser/testdata/corpus/sql/copy/csv/26049.test new file mode 100644 index 0000000..fff1834 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/26049.test @@ -0,0 +1,13 @@ +# source: test/sql/copy/csv/26049.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT col1 FROM read_csv('data/csv/26049.csv', columns={'col1': 'VARCHAR', 'col2': 'VARCHAR'}, escape='\', header=true, auto_detect=false, strict_mode=false); +-- +ok +== +SELECT col1 FROM read_csv('data/csv/26049.csv', columns={'col1': 'VARCHAR', 'col2': 'VARCHAR'}, escape='\', header=true, auto_detect=false, strict_mode=true); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/7702.test b/parser/testdata/corpus/sql/copy/csv/7702.test index a915d06..fa6e8fe 100644 --- a/parser/testdata/corpus/sql/copy/csv/7702.test +++ b/parser/testdata/corpus/sql/copy/csv/7702.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/7702.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM read_csv_auto( ['{DATA_DIR}/csv/error/mismatch/half1.csv', '{DATA_DIR}/csv/error/mismatch/half2.csv'], ignore_errors=true, sample_size=1); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250211_crash.test b/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250211_crash.test index b057068..6cade38 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250211_crash.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250211_crash.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/fuzz_20250211_crash.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/20250211_csv_fuzz_crash/case_53.csv', buffer_size=42); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250226.test b/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250226.test index adb7afe..244ab6c 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250226.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/fuzz_20250226.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/fuzz_20250226.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(file) from glob('./data/csv/afl/20250226_csv_fuzz_error/*'); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_ignore_errors.test b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_ignore_errors.test index 0dd2e7f..7b58d04 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_ignore_errors.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_ignore_errors.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_afl_ignore_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/ignore_errors/{i}.csv', ignore_errors = true) diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_no_parameter.test b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_no_parameter.test index a404db8..01c22a1 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_no_parameter.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_no_parameter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_afl_no_parameter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/afl/no_parameter/{i}.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_null_padding.test b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_null_padding.test index 786fd84..213647a 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_null_padding.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_null_padding.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_afl_null_padding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/null_padding/{i}.csv', null_padding=true) diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_skip.test b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_skip.test index e0690c1..380ba87 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_afl_skip.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_afl_skip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_afl_skip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/skip/{i}.csv', skip=1) diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_3977.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_3977.test index 4951322..7efa53d 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_3977.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_3977.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_3977.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(file) from glob('./data/csv/afl/3977/*'); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4086.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4086.test index 261dd75..290abd2 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4086.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4086.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4086.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/4086/case_1.csv', auto_detect=false, columns={'json': 'JSON'}, delim=NULL, buffer_size=42, store_rejects=true, rejects_limit=658694493994253607); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4172.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4172.test index 6e15744..4172bfb 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4172.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4172.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4172.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/4172/case_4.csv', ignore_errors=true, buffer_size=1, store_rejects=false); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4234.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4234.test index bd5cc20..4887a09 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4234.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4234.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4234.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/4234/test_fuzz_4234.csv', buffer_size=30, delim=';', header=false, null_padding=true, union_by_name=false); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4329.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4329.test index d255115..30247d3 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4329.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4329.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4329.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/4329/case_1.csv', escape='\', buffer_size=42, skip=42, strict_mode=false); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4379.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4379.test index fbccdad..caabae0 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4379.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4379.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4379.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4496.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4496.test index de2bcad..b52b1b8 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4496.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4496.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4496.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/4496/crashes/case_0.csv', auto_detect=false, buffer_size=42, columns={'json': 'JSON'}, delim=NULL, rejects_limit=658694493994253607, store_rejects=true); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4793.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4793.test index 483714c..65928d0 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4793.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_4793.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_4793.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/4793/crashes/case_0.csv', auto_detect=false, columns={'a':'varchar'}, delim='', encoding='latin-1', header=false, quote=''); diff --git a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_5194.test b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_5194.test index 22fdb8d..92378b1 100644 --- a/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_5194.test +++ b/parser/testdata/corpus/sql/copy/csv/afl/test_fuzz_5194.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/afl/test_fuzz_5194.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/5194/crashes/case_0.csv', auto_detect=false, buffer_size=8, columns={'a': 'integer','b': 'integer','c': 'integer'}, header=true, maximum_line_size=0); diff --git a/parser/testdata/corpus/sql/copy/csv/allow_empty.test b/parser/testdata/corpus/sql/copy/csv/allow_empty.test index 18bb45d..8e96e7b 100644 --- a/parser/testdata/corpus/sql/copy/csv/allow_empty.test +++ b/parser/testdata/corpus/sql/copy/csv/allow_empty.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/allow_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv('{TEST_DIR}/allow_empty_missing.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_14177.test b/parser/testdata/corpus/sql/copy/csv/auto/test_14177.test index 15c8288..cb71848 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_14177.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_14177.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_14177.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) FROM (FROM read_csv('{DATA_DIR}/csv/auto/14177.csv', buffer_size=80, ignore_errors = true)) as t diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5250.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5250.test index dec82be..5678e0c 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5250.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5250.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_5250.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from read_csv_auto('{DATA_DIR}/csv/page_namespacepage_title_sample.csv', SAMPLE_SIZE = -1) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5378.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5378.test index 6f7475d..3184171 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5378.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_5378.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_5378.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM read_csv_auto ('{DATA_DIR}/csv/auto/titlebasicsdebug.tsv', nullstr='\N', sample_size = -1); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8231.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8231.test index dcefd0f..5d0f74f 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8231.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8231.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_8231.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view locations_header_trailing_comma as SELECT * from read_csv_auto('{DATA_DIR}/csv/locations_row_trailing_comma.csv', null_padding=True) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8573.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8573.test index fa7f036..81c301e 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8573.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8573.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_8573.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(bignumber), typeof(bignumber::DECIMAL(25,3)) FROM read_csv('{DATA_DIR}/csv/big_number.csv', COLUMNS={'bignumber': 'DECIMAL(25,3)'}, QUOTE='"', DELIM=','); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8649.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8649.test index 780a3a1..8f187b8 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8649.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8649.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_8649.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv_auto("{DATA_DIR}/csv/dim0.csv") ; diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8860.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8860.test index b6b423d..9640f9e 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8860.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_8860.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_8860.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM read_csv_auto("{DATA_DIR}/csv/auto/product_codes_HS17_V202301.csv.gz", quote = '"', comment='', delim = ',') ; diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_column_type_opt.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_column_type_opt.test index f6aadca..3b0dadd 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_column_type_opt.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_column_type_opt.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_column_type_opt.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_csv('{DATA_DIR}/csv/test/multi_column_string.csv', COLUMN_TYPES=STRUCT_PACK(a := 'INTEGER')) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_cranlogs.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_cranlogs.test index c8444b2..0b016ae 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_cranlogs.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_cranlogs.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_cranlogs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE cranlogs AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/real/tmp2013-06-15.csv.gz'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_ncvoter.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_ncvoter.test index 8a404a1..daf0cfb 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_ncvoter.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_ncvoter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_greek_ncvoter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS ncvoters(county_id INTEGER, county_desc STRING, voter_reg_num STRING,status_cd STRING, voter_status_desc STRING, reason_cd STRING, voter_status_reason_desc STRING, absent_ind STRING, name_prefx_cd STRING,last_name STRING, first_name STRING, midl_name STRING, name_sufx_cd STRING, full_name_rep STRING,full_name_mail STRING, house_num STRING, half_code STRING, street_dir STRING, street_name STRING, street_type_cd STRING, street_sufx_cd STRING, unit_designator STRING, unit_num STRING, res_city_desc STRING,state_cd STRING, zip_code STRING, res_street_address STRING, res_city_state_zip STRING, mail_addr1 STRING, mail_addr2 STRING, mail_addr3 STRING, mail_addr4 STRING, mail_city STRING, mail_state STRING, mail_zipcode STRING, mail_city_state_zip STRING, area_cd STRING, phone_num STRING, full_phone_number STRING, drivers_lic STRING, race_code STRING, race_desc STRING, ethnic_code STRING, ethnic_desc STRING, party_cd STRING, party_desc STRING, sex_code STRING, sex STRING, birth_age STRING, birth_place STRING, registr_dt STRING, precinct_abbrv STRING, precinct_desc STRING,municipality_abbrv STRING, municipality_desc STRING, ward_abbrv STRING, ward_desc STRING, cong_dist_abbrv STRING, cong_dist_desc STRING, super_court_abbrv STRING, super_court_desc STRING, judic_dist_abbrv STRING, judic_dist_desc STRING, nc_senate_abbrv STRING, nc_senate_desc STRING, nc_house_abbrv STRING, nc_house_desc STRING,county_commiss_abbrv STRING, county_commiss_desc STRING, township_abbrv STRING, township_desc STRING,school_dist_abbrv STRING, school_dist_desc STRING, fire_dist_abbrv STRING, fire_dist_desc STRING, water_dist_abbrv STRING, water_dist_desc STRING, sewer_dist_abbrv STRING, sewer_dist_desc STRING, sanit_dist_abbrv STRING, sanit_dist_desc STRING, rescue_dist_abbrv STRING, rescue_dist_desc STRING, munic_dist_abbrv STRING, munic_dist_desc STRING, dist_1_abbrv STRING, dist_1_desc STRING, dist_2_abbrv STRING, dist_2_desc STRING, confidential_ind STRING, age STRING, ncid STRING, vtd_abbrv STRING, vtd_desc STRING); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_utf8.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_utf8.test index 17fba7e..d1f47e3 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_utf8.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_greek_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_greek_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE greek_utf8 AS SELECT i, nfc_normalize(j) j, k FROM read_csv_auto ('{DATA_DIR}/csv/real/greek_utf8.csv') t(i, j, k) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_imdb.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_imdb.test index 993c458..3e234fb 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_imdb.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_imdb.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_imdb.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE movie_info AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/real/imdb_movie_info_escaped.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_lineitem.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_lineitem.test index 4e2e925..7b89acd 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_lineitem.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_lineitem.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_lineitem.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lineitem(l_orderkey INT NOT NULL, l_partkey INT NOT NULL, l_suppkey INT NOT NULL, l_linenumber INT NOT NULL, l_quantity INTEGER NOT NULL, l_extendedprice DECIMAL(15,2) NOT NULL, l_discount DECIMAL(15,2) NOT NULL, l_tax DECIMAL(15,2) NOT NULL, l_returnflag VARCHAR(1) NOT NULL, l_linestatus VARCHAR(1) NOT NULL, l_shipdate DATE NOT NULL, l_commitdate DATE NOT NULL, l_receiptdate DATE NOT NULL, l_shipinstruct VARCHAR(25) NOT NULL, l_shipmode VARCHAR(10) NOT NULL, l_comment VARCHAR(44) NOT NULL); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_ontime.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_ontime.test index 74f764d..88949b6 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_ontime.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_ontime.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_ontime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ontime(year SMALLINT, quarter SMALLINT, month SMALLINT, dayofmonth SMALLINT, dayofweek SMALLINT, flightdate DATE, uniquecarrier CHAR(7), airlineid DECIMAL(8,2), carrier CHAR(2), tailnum VARCHAR(50), flightnum VARCHAR(10), originairportid INTEGER, originairportseqid INTEGER, origincitymarketid INTEGER, origin CHAR(5), origincityname VARCHAR(100), originstate CHAR(2), originstatefips VARCHAR(10), originstatename VARCHAR(100), originwac DECIMAL(8,2), destairportid INTEGER, destairportseqid INTEGER, destcitymarketid INTEGER, dest CHAR(5), destcityname VARCHAR(100), deststate CHAR(2), deststatefips VARCHAR(10), deststatename VARCHAR(100), destwac DECIMAL(8,2), crsdeptime DECIMAL(8,2), deptime DECIMAL(8,2), depdelay DECIMAL(8,2), depdelayminutes DECIMAL(8,2), depdel15 DECIMAL(8,2), departuredelaygroups DECIMAL(8,2), deptimeblk VARCHAR(20), taxiout DECIMAL(8,2), wheelsoff DECIMAL(8,2), wheelson DECIMAL(8,2), taxiin DECIMAL(8,2), crsarrtime DECIMAL(8,2), arrtime DECIMAL(8,2), arrdelay DECIMAL(8,2), arrdelayminutes DECIMAL(8,2), arrdel15 DECIMAL(8,2), arrivaldelaygroups DECIMAL(8,2), arrtimeblk VARCHAR(20), cancelled DECIMAL(8,2), cancellationcode CHAR(1), diverted DECIMAL(8,2), crselapsedtime DECIMAL(8,2), actualelapsedtime DECIMAL(8,2), airtime DECIMAL(8,2), flights DECIMAL(8,2), distance DECIMAL(8,2), distancegroup DECIMAL(8,2), carrierdelay DECIMAL(8,2), weatherdelay DECIMAL(8,2), nasdelay DECIMAL(8,2), securitydelay DECIMAL(8,2), lateaircraftdelay DECIMAL(8,2), firstdeptime VARCHAR(10), totaladdgtime VARCHAR(10), longestaddgtime VARCHAR(10), divairportlandings VARCHAR(10), divreacheddest VARCHAR(10), divactualelapsedtime VARCHAR(10), divarrdelay VARCHAR(10), divdistance VARCHAR(10), div1airport VARCHAR(10), div1aiportid INTEGER, div1airportseqid INTEGER, div1wheelson VARCHAR(10), div1totalgtime VARCHAR(10), div1longestgtime VARCHAR(10), div1wheelsoff VARCHAR(10), div1tailnum VARCHAR(10), div2airport VARCHAR(10), div2airportid INTEGER, div2airportseqid INTEGER, div2wheelson VARCHAR(10), div2totalgtime VARCHAR(10), div2longestgtime VARCHAR(10), div2wheelsoff VARCHAR(10), div2tailnum VARCHAR(10), div3airport VARCHAR(10), div3airportid INTEGER, div3airportseqid INTEGER, div3wheelson VARCHAR(10), div3totalgtime VARCHAR(10), div3longestgtime VARCHAR(10), div3wheelsoff VARCHAR(10), div3tailnum VARCHAR(10), div4airport VARCHAR(10), div4airportid INTEGER, div4airportseqid INTEGER, div4wheelson VARCHAR(10), div4totalgtime VARCHAR(10), div4longestgtime VARCHAR(10), div4wheelsoff VARCHAR(10), div4tailnum VARCHAR(10), div5airport VARCHAR(10), div5airportid INTEGER, div5airportseqid INTEGER, div5wheelson VARCHAR(10), div5totalgtime VARCHAR(10), div5longestgtime VARCHAR(10), div5wheelsoff VARCHAR(10), div5tailnum VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_web_page.test b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_web_page.test index 32cf29a..e8e207e 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_auto_web_page.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_auto_web_page.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_auto_web_page.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE web_page AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/real/web_page.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_csv_auto.test b/parser/testdata/corpus/sql/copy/csv/auto/test_csv_auto.test index 499fc89..ec00570 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_csv_auto.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_csv_auto.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_csv_auto.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/repromarket.csv', diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_date_format_bug_linux.test b/parser/testdata/corpus/sql/copy/csv/auto/test_date_format_bug_linux.test index caabd00..a539631 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_date_format_bug_linux.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_date_format_bug_linux.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_date_format_bug_linux.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv_auto('{DATA_DIR}/csv/auto/date_format_bug_linux.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_describe_order.test b/parser/testdata/corpus/sql/copy/csv/auto/test_describe_order.test index a6c388a..b8848d4 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_describe_order.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_describe_order.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_describe_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view v as select * from read_csv_auto('{DATA_DIR}/csv/who.csv.gz'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_double_quoted_header.test b/parser/testdata/corpus/sql/copy/csv/auto/test_double_quoted_header.test index 7dc0d05..3e9a0b1 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_double_quoted_header.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_double_quoted_header.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_double_quoted_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit describe from '{DATA_DIR}/csv/double_quoted_header.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_early_out.test b/parser/testdata/corpus/sql/copy/csv/auto/test_early_out.test index 4730270..a66133d 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_early_out.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_early_out.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_early_out.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_header_completion.test b/parser/testdata/corpus/sql/copy/csv/auto/test_header_completion.test index b9b3def..3e1fdbc 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_header_completion.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_header_completion.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_header_completion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/auto/missing_header_col.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_header_detection.test b/parser/testdata/corpus/sql/copy/csv/auto/test_header_detection.test index b15aabd..e59c014 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_header_detection.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_header_detection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_header_detection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/auto/no_header.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_large_integer_detection.test b/parser/testdata/corpus/sql/copy/csv/auto/test_large_integer_detection.test index 0fa2836..853c9db 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_large_integer_detection.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_large_integer_detection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_large_integer_detection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE large_integer_detection AS diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_normalize_names.test b/parser/testdata/corpus/sql/copy/csv/auto/test_normalize_names.test index 181e87e..83b1d18 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_normalize_names.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_normalize_names.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_normalize_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select columns from sniff_csv('{DATA_DIR}/csv/test_commit_rollback.csv', normalize_names = true) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_sample_size.test b/parser/testdata/corpus/sql/copy/csv/auto/test_sample_size.test index 45d15d1..9091762 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_sample_size.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_sample_size.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_sample_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/auto/issue_811.csv', SAMPLE_SIZE=1); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_blob.test b/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_blob.test index b817f1d..819023e 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_blob.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_blob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_sniffer_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from read_csv('{DATA_DIR}/csv/test/blob.csv',auto_type_candidates=['blob']) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_empty_start_value.test b/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_empty_start_value.test index 5bf4039..baeca2f 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_empty_start_value.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_sniffer_empty_start_value.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_sniffer_empty_start_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/empty_space_start_value.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_timings_csv.test b/parser/testdata/corpus/sql/copy/csv/auto/test_timings_csv.test index 46739d5..2d51435 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_timings_csv.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_timings_csv.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_timings_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE timings(tool string, sf float, day string, batch_type string, q string, parameters string, time float); diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_type_candidates.test b/parser/testdata/corpus/sql/copy/csv/auto/test_type_candidates.test index e842639..b104b4c 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_type_candidates.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_type_candidates.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_type_candidates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (a integer, b double, c varchar) diff --git a/parser/testdata/corpus/sql/copy/csv/auto/test_type_detection.test b/parser/testdata/corpus/sql/copy/csv/auto/test_type_detection.test index 75b2a03..9fd75f6 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto/test_type_detection.test +++ b/parser/testdata/corpus/sql/copy/csv/auto/test_type_detection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto/test_type_detection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT * FROM read_csv_auto ('{DATA_DIR}/csv/auto/large_mixed_data.csv', SAMPLE_SIZE=-1); diff --git a/parser/testdata/corpus/sql/copy/csv/auto_glob_directory.test b/parser/testdata/corpus/sql/copy/csv/auto_glob_directory.test index b5fd667..eb4e4e0 100644 --- a/parser/testdata/corpus/sql/copy/csv/auto_glob_directory.test +++ b/parser/testdata/corpus/sql/copy/csv/auto_glob_directory.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/auto_glob_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i%2 AS grp, i FROM range(1000) t(i)) TO '{TEST_DIR}/partitioned_glob_csv' (FORMAT csv, PARTITION_BY (grp)); diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/buffer_manager_finalize.test b/parser/testdata/corpus/sql/copy/csv/code_cov/buffer_manager_finalize.test index 0a6a665..29ff337 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/buffer_manager_finalize.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/buffer_manager_finalize.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/buffer_manager_finalize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS select i, (i+1) as j from range(0,3000) tbl(i) diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_core_encodings.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_core_encodings.test new file mode 100644 index 0000000..e448320 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_core_encodings.test @@ -0,0 +1,52 @@ +# source: test/sql/copy/csv/code_cov/csv_core_encodings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT from_hex('fffe760061006c00750065000a006100620063006400650066006700680069006a006b006c006d0003260a00') +) TO '{TEST_DIR}/utf16_boundary.csv' (FORMAT BLOB) +-- +ok +== +SELECT value +FROM read_csv('{TEST_DIR}/utf16_boundary.csv', encoding = 'utf-16', buffer_size = 23) +-- +ok +== +SELECT value +FROM read_csv('{TEST_DIR}/utf16_boundary.csv', encoding = 'utf-16', buffer_size = 24) +-- +ok +== +COPY ( + SELECT from_hex('76616c75650a6162636465666768696a6b6c6d6e6f70e90a') +) TO '{TEST_DIR}/latin1_boundary.csv' (FORMAT BLOB) +-- +ok +== +SELECT value +FROM read_csv('{TEST_DIR}/latin1_boundary.csv', encoding = 'latin-1', buffer_size = 23) +-- +ok +== +COPY ( + SELECT from_hex('fffe760061006c00750065000a0000d80a00') +) TO '{TEST_DIR}/invalid_utf16.csv' (FORMAT BLOB) +-- +ok +== +FROM read_csv('{TEST_DIR}/invalid_utf16.csv', encoding = 'utf-16') +-- +ok +== +COPY ( + SELECT from_hex('76616c75650a800a') +) TO '{TEST_DIR}/invalid_latin1.csv' (FORMAT BLOB) +-- +ok +== +FROM read_csv('{TEST_DIR}/invalid_latin1.csv', encoding = 'latin-1') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_dialect_detection.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_dialect_detection.test index 3bebbb2..3a4f9e5 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_dialect_detection.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_dialect_detection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/csv_dialect_detection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * from read_csv_auto('{DATA_DIR}/csv/escape.csv', escape=']', header = 0) diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_exact_buffer_size.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_exact_buffer_size.test index fef0b7e..025cd2c 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_exact_buffer_size.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_exact_buffer_size.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/csv_exact_buffer_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/auto/issue_1254_rn.csv', buffer_size=10) diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_scanner_conversion.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_scanner_conversion.test new file mode 100644 index 0000000..3bba6bc --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_scanner_conversion.test @@ -0,0 +1,179 @@ +# source: test/sql/copy/csv/code_cov/csv_scanner_conversion.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT + 4294967295::UINTEGER AS ui, + 340282366920938463463374607431768211455::UHUGEINT AS uhi, + 340282366920938463463374607431768211456::BIGNUM AS bn, + 12.34::DECIMAL(4, 2) AS d16, + 1234567.89::DECIMAL(9, 2) AS d32, + 1234567890123456.78::DECIMAL(18, 2) AS d64, + 123456789012345678901234567890123456.78::DECIMAL(38, 2) AS d128 +) TO '{TEST_DIR}/scanner_numbers.csv' (FORMAT CSV, HEADER false) +-- +ok +== +SELECT * +FROM read_csv( + '{TEST_DIR}/scanner_numbers.csv', + auto_detect = false, + header = false, + columns = { + 'ui': 'UINTEGER', + 'uhi': 'UHUGEINT', + 'bn': 'BIGNUM', + 'd16': 'DECIMAL(4, 2)', + 'd32': 'DECIMAL(9, 2)', + 'd64': 'DECIMAL(18, 2)', + 'd128': 'DECIMAL(38, 2)' + } +) +-- +ok +== +COPY ( + SELECT * + FROM (VALUES ('12,34', '1234567,89', '1234567890123456,78', '123456789012345678901234567890123456,78')) + t(d16, d32, d64, d128) +) TO '{TEST_DIR}/scanner_comma_decimals.csv' (FORMAT CSV, HEADER false, DELIMITER ';', QUOTE '') +-- +ok +== +SELECT * +FROM read_csv( + '{TEST_DIR}/scanner_comma_decimals.csv', + auto_detect = false, + header = false, + delim = ';', + decimal_separator = ',', + columns = { + 'd16': 'DECIMAL(4, 2)', + 'd32': 'DECIMAL(9, 2)', + 'd64': 'DECIMAL(18, 2)', + 'd128': 'DECIMAL(38, 2)' + } +) +-- +ok +== +COPY (SELECT 'not-a-number') TO '{TEST_DIR}/scanner_bad_bignum.csv' (FORMAT CSV, HEADER false, QUOTE '') +-- +ok +== +SELECT count(value) +FROM read_csv( + '{TEST_DIR}/scanner_bad_bignum.csv', + auto_detect = false, + header = false, + ignore_errors = true, + columns = {'value': 'BIGNUM'} +) +-- +ok +== +COPY (SELECT '1"2') TO '{TEST_DIR}/scanner_escaped_integer.csv' (FORMAT CSV, HEADER false, FORCE_QUOTE *) +-- +ok +== +SELECT * +FROM read_csv( + '{TEST_DIR}/scanner_escaped_integer.csv', + auto_detect = false, + header = false, + columns = {'value': 'INTEGER'} +) +-- +ok +== +COPY (SELECT '\x0A'::BLOB) TO '{TEST_DIR}/scanner_empty_line.csv' (FORMAT BLOB) +-- +ok +== +SELECT value IS NULL, length(value) +FROM read_csv( + '{TEST_DIR}/scanner_empty_line.csv', + auto_detect = false, + header = false, + nullstr = [''], + force_not_null = ['value'], + columns = {'value': 'VARCHAR'} +) +-- +ok +== +COPY (SELECT 1 AS a) TO '{TEST_DIR}/scanner_schema_1.csv' (FORMAT CSV, HEADER) +-- +ok +== +COPY (SELECT 2 AS a, 3 AS b) TO '{TEST_DIR}/scanner_schema_2.csv' (FORMAT CSV, HEADER) +-- +ok +== +SELECT column_name, column_type +FROM ( + DESCRIBE SELECT * + FROM read_csv( + ['{TEST_DIR}/scanner_schema_1.csv', '{TEST_DIR}/scanner_schema_2.csv'], + null_padding = true, + files_to_sniff = -1 + ) +) +ORDER BY column_name +-- +ok +== +COPY (SELECT 1) TO '{TEST_DIR}/scanner_merge_tinyint.csv' (FORMAT CSV, HEADER false) +-- +ok +== +COPY (SELECT 1000) TO '{TEST_DIR}/scanner_merge_smallint.csv' (FORMAT CSV, HEADER false) +-- +ok +== +COPY (SELECT 100000) TO '{TEST_DIR}/scanner_merge_integer.csv' (FORMAT CSV, HEADER false) +-- +ok +== +COPY (SELECT 10000000000) TO '{TEST_DIR}/scanner_merge_bigint.csv' (FORMAT CSV, HEADER false) +-- +ok +== +SELECT typeof(column0) +FROM read_csv( + [ + '{TEST_DIR}/scanner_merge_tinyint.csv', + '{TEST_DIR}/scanner_merge_smallint.csv', + '{TEST_DIR}/scanner_merge_integer.csv', + '{TEST_DIR}/scanner_merge_bigint.csv' + ], + header = false, + files_to_sniff = -1, + auto_type_candidates = ['TINYINT', 'SMALLINT', 'INTEGER', 'BIGINT', 'VARCHAR'] +) +LIMIT 1 +-- +ok +== +COPY (SELECT 12345678901234567890) TO '{TEST_DIR}/scanner_merge_hugeint.csv' (FORMAT CSV, HEADER false) +-- +ok +== +COPY (SELECT 340282366920938463463374607431768211456::BIGNUM) +TO '{TEST_DIR}/scanner_merge_bignum.csv' (FORMAT CSV, HEADER false) +-- +ok +== +SELECT typeof(column0) +FROM read_csv( + ['{TEST_DIR}/scanner_merge_hugeint.csv', '{TEST_DIR}/scanner_merge_bignum.csv'], + header = false, + files_to_sniff = -1, + auto_type_candidates = ['HUGEINT', 'BIGNUM', 'VARCHAR'] +) +LIMIT 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_sniffer_header.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_sniffer_header.test index b443229..d44b40c 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_sniffer_header.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_sniffer_header.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/csv_sniffer_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) from read_csv_auto('{DATA_DIR}/csv/header_left_space.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_state_machine_invalid_utf.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_state_machine_invalid_utf.test index 18ee629..efe0fad 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_state_machine_invalid_utf.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_state_machine_invalid_utf.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/csv_state_machine_invalid_utf.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv_auto('{DATA_DIR}/csv/test/invalid_utf.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_detection.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_detection.test index 5f5500b..e8cedd2 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_detection.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_detection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/csv_type_detection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv_auto('{DATA_DIR}/csv/invalid_utf8.csv', auto_detect = false, columns={'c01': 'VARCHAR'} ) diff --git a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_refinement.test b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_refinement.test index 82b8867..af720e0 100644 --- a/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_refinement.test +++ b/parser/testdata/corpus/sql/copy/csv/code_cov/csv_type_refinement.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/code_cov/csv_type_refinement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from read_csv_auto('{DATA_DIR}/csv/borked_date.csv', header = 0) diff --git a/parser/testdata/corpus/sql/copy/csv/column_names.test b/parser/testdata/corpus/sql/copy/csv/column_names.test index bb818bb..11481c2 100644 --- a/parser/testdata/corpus/sql/copy/csv/column_names.test +++ b/parser/testdata/corpus/sql/copy/csv/column_names.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/column_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT * FROM read_csv_auto('{DATA_DIR}/csv/test/issue2518.csv', header=False, columns={'rsID':'INT', 'CHR': 'VARCHAR', 'POS': 'INT','REFB': 'VARCHAR','ALTB':'VARCHAR'}, auto_detect = false) diff --git a/parser/testdata/corpus/sql/copy/csv/comment_quoting.test b/parser/testdata/corpus/sql/copy/csv/comment_quoting.test new file mode 100644 index 0000000..f124c48 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/comment_quoting.test @@ -0,0 +1,50 @@ +# source: test/sql/copy/csv/comment_quoting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 'a#b' AS x, 'p!q' AS y, 'plain' AS z) +TO '{TEST_DIR}/comment_default.csv' (FORMAT CSV, HEADER false); +-- +ok +== +SELECT rtrim(content, chr(10)) FROM read_text('{TEST_DIR}/comment_default.csv'); +-- +ok +== +COPY (SELECT 'a#b' AS x, 'p!q' AS y, 'plain' AS z) +TO '{TEST_DIR}/comment_none.csv' (FORMAT CSV, HEADER false, comment ''); +-- +ok +== +SELECT rtrim(content, chr(10)) FROM read_text('{TEST_DIR}/comment_none.csv'); +-- +ok +== +COPY (SELECT 'a#b' AS x, 'p!q' AS y, 'plain' AS z) +TO '{TEST_DIR}/comment_bang.csv' (FORMAT CSV, HEADER false, comment '!'); +-- +ok +== +SELECT rtrim(content, chr(10)) FROM read_text('{TEST_DIR}/comment_bang.csv'); +-- +ok +== +COPY (SELECT 'a,b' AS x, 'c"d' AS y) +TO '{TEST_DIR}/comment_special.csv' (FORMAT CSV, HEADER false, comment ''); +-- +ok +== +SELECT rtrim(content, chr(10)) FROM read_text('{TEST_DIR}/comment_special.csv'); +-- +ok +== +COPY (SELECT '#hash' AS x, 1 AS y UNION ALL SELECT 'ok', 2 UNION ALL SELECT 'end #', 3) +TO '{TEST_DIR}/comment_roundtrip.csv' (FORMAT CSV, HEADER 1, comment ''); +-- +ok +== +SELECT count(*) FROM read_csv('{TEST_DIR}/comment_roundtrip.csv'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/compressed_read_size.test b/parser/testdata/corpus/sql/copy/csv/compressed_read_size.test new file mode 100644 index 0000000..87300d7 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/compressed_read_size.test @@ -0,0 +1,37 @@ +# source: test/sql/copy/csv/compressed_read_size.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i, md5(i::VARCHAR) AS h FROM range(200000) t(i)) TO '{TEST_DIR}/read_size.csv.gz' (COMPRESSION gzip) +-- +ok +== +COPY (SELECT i, md5(i::VARCHAR) AS h FROM range(200000) t(i)) TO '{TEST_DIR}/read_size.csv.zst' (COMPRESSION zstd) +-- +ok +== +CALL enable_logging('FileSystem') +-- +ok +== +SELECT count(*), sum(i) FROM '{TEST_DIR}/read_size.csv.gz' +-- +ok +== +SELECT count(*), sum(i) FROM '{TEST_DIR}/read_size.csv.zst' +-- +ok +== +SELECT max(bytes) <= 262144 +FROM duckdb_logs_parsed('FileSystem') +WHERE path LIKE '%read_size.csv.gz' AND op = 'READ' +-- +ok +== +SELECT max(bytes) <= 262144 +FROM duckdb_logs_parsed('FileSystem') +WHERE path LIKE '%read_size.csv.zst' AND op = 'READ' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/copy_disable_parallelism.test b/parser/testdata/corpus/sql/copy/csv/copy_disable_parallelism.test index 3707a01..096cdd0 100644 --- a/parser/testdata/corpus/sql/copy/csv/copy_disable_parallelism.test +++ b/parser/testdata/corpus/sql/copy/csv/copy_disable_parallelism.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/copy_disable_parallelism.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b INTEGER, c VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/copy_expression.test b/parser/testdata/corpus/sql/copy/csv/copy_expression.test index e790a1e..cb7b578 100644 --- a/parser/testdata/corpus/sql/copy/csv/copy_expression.test +++ b/parser/testdata/corpus/sql/copy/csv/copy_expression.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/copy_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET VARIABLE copy_target = '{TEST_DIR}/copy_expression_target.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/copy_to_overwrite.test b/parser/testdata/corpus/sql/copy/csv/copy_to_overwrite.test index 54bf0dc..aa625d5 100644 --- a/parser/testdata/corpus/sql/copy/csv/copy_to_overwrite.test +++ b/parser/testdata/corpus/sql/copy/csv/copy_to_overwrite.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/copy_to_overwrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT * FROM range(5) t(i)) TO '{TEST_DIR}/copy_to_overwrite.csv' (HEADER) diff --git a/parser/testdata/corpus/sql/copy/csv/csv_copy_sniffer.test b/parser/testdata/corpus/sql/copy/csv/csv_copy_sniffer.test index a484b23..4bbefb0 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_copy_sniffer.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_copy_sniffer.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_copy_sniffer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE sales ( diff --git a/parser/testdata/corpus/sql/copy/csv/csv_decimal_separator.test b/parser/testdata/corpus/sql/copy/csv/csv_decimal_separator.test index 2dd9c34..aa89051 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_decimal_separator.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_decimal_separator.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_decimal_separator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE decimal_separators AS SELECT * FROM read_csv_auto('{DATA_DIR}/csv/decimal_separators/decimal_separators.csv', column_types={'commas': 'double', 'periods': 'double'}, delim=';', decimal_separator=',') diff --git a/parser/testdata/corpus/sql/copy/csv/csv_dtypes.test b/parser/testdata/corpus/sql/copy/csv/csv_dtypes.test index 5c008e0..8034c80 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_dtypes.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_dtypes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_dtypes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof(Year), typeof(Quarter) from '{DATA_DIR}/csv/real/ontime_sample.csv' LIMIT 1; diff --git a/parser/testdata/corpus/sql/copy/csv/csv_dtypes_union_by_name.test b/parser/testdata/corpus/sql/copy/csv/csv_dtypes_union_by_name.test index 70a497b..07169db 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_dtypes_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_dtypes_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_dtypes_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ubn1(a BIGINT); diff --git a/parser/testdata/corpus/sql/copy/csv/csv_duck_fuzz.test b/parser/testdata/corpus/sql/copy/csv/csv_duck_fuzz.test index 41dd7ab..46d0950 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_duck_fuzz.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_duck_fuzz.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_duck_fuzz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL FROM sniff_csv('{DATA_DIR}/csv/14512.csv', {parameter} := NULL) @@ -17,5 +17,5 @@ ok == SELECT NULL FROM read_csv(NULL) -- -error: Parser Error: read_csv cannot take NULL list as parameter +error: Parser Error: "read_csv" cannot take NULL list as parameter == diff --git a/parser/testdata/corpus/sql/copy/csv/csv_enum.test b/parser/testdata/corpus/sql/copy/csv/csv_enum.test index d0c3652..eb38af7 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_enum.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_enum.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE bla AS ENUM ('Y', 'N'); diff --git a/parser/testdata/corpus/sql/copy/csv/csv_error_message.test b/parser/testdata/corpus/sql/copy/csv/csv_error_message.test index b94a016..bcaeffd 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_error_message.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_error_message.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_error_message.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/15473.csv', delim = ',', columns = {'A' : 'VARCHAR','B' : 'VARCHAR','C' : 'VARCHAR','D' : 'VARCHAR'}) diff --git a/parser/testdata/corpus/sql/copy/csv/csv_external_access.test b/parser/testdata/corpus/sql/copy/csv/csv_external_access.test index 72facce..f13303a 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_external_access.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_external_access.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_external_access.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE date_test(d date); diff --git a/parser/testdata/corpus/sql/copy/csv/csv_glob_fallback.test b/parser/testdata/corpus/sql/copy/csv/csv_glob_fallback.test index fc4423e..470d690 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_glob_fallback.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_glob_fallback.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_glob_fallback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/csv/[avalon]_daily-avg.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/csv_hive.test b/parser/testdata/corpus/sql/copy/csv/csv_hive.test index e9ad4ee..733687a 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_hive.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_hive.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_hive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT 1 as id, 'value1' as value; diff --git a/parser/testdata/corpus/sql/copy/csv/csv_hive_filename_union.test b/parser/testdata/corpus/sql/copy/csv/csv_hive_filename_union.test index 2d72f45..28ab8e1 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_hive_filename_union.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_hive_filename_union.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_hive_filename_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select filename.replace('\', '/').split('/')[-2] from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/simple/*/*/test.csv', HIVE_PARTITIONING=1, FILENAME=1) order by 1 diff --git a/parser/testdata/corpus/sql/copy/csv/csv_home_directory.test b/parser/testdata/corpus/sql/copy/csv/csv_home_directory.test index 693bb75..a9a6e59 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_home_directory.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_home_directory.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_home_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(10) diff --git a/parser/testdata/corpus/sql/copy/csv/csv_limit_copy.test b/parser/testdata/corpus/sql/copy/csv/csv_limit_copy.test index e1c5666..b64c40f 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_limit_copy.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_limit_copy.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_limit_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS FROM range(1000000) t(i); diff --git a/parser/testdata/corpus/sql/copy/csv/csv_line_too_long.test b/parser/testdata/corpus/sql/copy/csv/csv_line_too_long.test index b035352..b6a8c0a 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_line_too_long.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_line_too_long.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_line_too_long.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T1 (name VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/csv/csv_multibyte_delimiter_escapes.test b/parser/testdata/corpus/sql/copy/csv/csv_multibyte_delimiter_escapes.test new file mode 100644 index 0000000..a4b5087 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/csv_multibyte_delimiter_escapes.test @@ -0,0 +1,37 @@ +# source: test/sql/copy/csv/csv_multibyte_delimiter_escapes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT '"a""b"||x' FROM range(60)) TO '__TEST_DIR__/mb_esc.csv' (FORMAT CSV, HEADER false, QUOTE '', ESCAPE '', DELIMITER E'\t') +-- +ok +== +SELECT column0, count(*) FROM read_csv('__TEST_DIR__/mb_esc.csv', delim='||', quote='"', escape='"', header=false) GROUP BY ALL +-- +ok +== +COPY (SELECT '""""::::x' FROM range(60)) TO '__TEST_DIR__/mb_esc2.csv' (FORMAT CSV, HEADER false, QUOTE '', ESCAPE '', DELIMITER E'\t') +-- +ok +== +SELECT column0, column1, count(*) FROM read_csv('__TEST_DIR__/mb_esc2.csv', delim='::::', quote='"', escape='"', header=false, buffer_size=64, max_line_size=64) GROUP BY ALL +-- +ok +== +COPY (SELECT 'a\b||x' FROM range(3)) TO '__TEST_DIR__/mb_uesc.csv' (FORMAT CSV, HEADER false, QUOTE '', ESCAPE '', DELIMITER E'\t') +-- +ok +== +SELECT * FROM read_csv('__TEST_DIR__/mb_uesc.csv', delim='||', quote='"', escape='\', header=false, strict_mode=false) +-- +ok +== +COPY (SELECT 'a\b::::x' FROM range(3)) TO '__TEST_DIR__/mb_uesc2.csv' (FORMAT CSV, HEADER false, QUOTE '', ESCAPE '', DELIMITER E'\t') +-- +ok +== +SELECT * FROM read_csv('__TEST_DIR__/mb_uesc2.csv', delim='::::', quote='"', escape='\', header=false, strict_mode=false) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/csv_names.test b/parser/testdata/corpus/sql/copy/csv/csv_names.test index b7a4b3c..6a554fd 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_names.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_names.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/header_bug.csv', names=['col1', 'col1']) LIMIT 1; diff --git a/parser/testdata/corpus/sql/copy/csv/csv_null_byte.test b/parser/testdata/corpus/sql/copy/csv/csv_null_byte.test index 382c41b..328ebdf 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_null_byte.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_null_byte.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_null_byte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/csv/nullbyte.csv'; @@ -23,3 +23,11 @@ select * from read_csv('{DATA_DIR}/csv/nullbyte_header.csv', columns={'col1': 'V -- ok == +select * from read_csv('{DATA_DIR}/csv/nul_field_start.csv', columns={'a': 'VARCHAR', 'b': 'VARCHAR', 'c': 'VARCHAR'}, quote='', escape='', header=false) where a <> 'aaaa' +-- +ok +== +select count(*) from read_csv('{DATA_DIR}/csv/nul_field_start.csv', columns={'a': 'VARCHAR', 'b': 'VARCHAR', 'c': 'VARCHAR'}, quote='', escape='', header=false) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/csv_null_padding.test b/parser/testdata/corpus/sql/copy/csv/csv_null_padding.test index 32c5703..866bfa5 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_null_padding.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_null_padding.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_null_padding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv_auto('{DATA_DIR}/csv/nullpadding_header.csv', null_padding=True, comment = '') diff --git a/parser/testdata/corpus/sql/copy/csv/csv_nullstr_list.test b/parser/testdata/corpus/sql/copy/csv/csv_nullstr_list.test index be2b268..dd647a7 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_nullstr_list.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_nullstr_list.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_nullstr_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/null/multiple_nulls.csv', auto_detect=false, delim=',', quote='"', escape='"', skip=0, header=true, columns={'name': 'VARCHAR', 'age': 'VARCHAR', 'height': 'VARCHAR'}, nullstr = ['','none','null']); @@ -19,6 +19,11 @@ FROM read_csv('{DATA_DIR}/csv/null/multiple_nulls.csv', auto_detect=false, delim -- ok == +COPY (SELECT NULL::INTEGER AS a) TO '{TEST_DIR}/empty_nullstr.csv' +(FORMAT CSV, NULLSTR ([]::VARCHAR[])); +-- +ok +== FROM read_csv('{DATA_DIR}/csv/null/multiple_nulls.csv', auto_detect=false, delim=',', quote='"', escape='"', skip=0, header=true, columns={'name': 'VARCHAR', 'age': 'VARCHAR', 'height': 'VARCHAR'}, nullstr = ['a', NULL]); -- ok diff --git a/parser/testdata/corpus/sql/copy/csv/csv_projection_pushdown.test b/parser/testdata/corpus/sql/copy/csv/csv_projection_pushdown.test index aa3b7b7..86c9634 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_projection_pushdown.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INT, j VARCHAR, k DATE); diff --git a/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_after_boundary.test b/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_after_boundary.test new file mode 100644 index 0000000..a9e7f8f --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_after_boundary.test @@ -0,0 +1,13 @@ +# source: test/sql/copy/csv/csv_quoted_newline_after_boundary.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 'a,b' || chr(10) || repeat('y', 26) || ',1' || chr(10) || repeat('z', 31) || ',2' || chr(10) || '"' || chr(10) || 'ab",3' || chr(10) || '"c",4') TO '__TEST_DIR__/qnl.csv' (FORMAT CSV, HEADER false, QUOTE '', ESCAPE '', DELIMITER E'\t') +-- +ok +== +SELECT a = chr(10) || 'ab', b FROM read_csv('__TEST_DIR__/qnl.csv', buffer_size=64, max_line_size=64) WHERE b >= 3 ORDER BY b +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_incorrect.test b/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_incorrect.test index 0f3d6be..1bc0a7c 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_incorrect.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_quoted_newline_incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_quoted_newline_incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from '{DATA_DIR}/csv/csv_quoted_newline_odd.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/csv_roundtrip_single_null.test b/parser/testdata/corpus/sql/copy/csv/csv_roundtrip_single_null.test index 094a450..cda599a 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_roundtrip_single_null.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_roundtrip_single_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_roundtrip_single_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT NULL) TO '{TEST_DIR}/single_null.csv' (HEADER 0) diff --git a/parser/testdata/corpus/sql/copy/csv/csv_windows_mixed_separators.test b/parser/testdata/corpus/sql/copy/csv/csv_windows_mixed_separators.test index ca66bef..fee0406 100644 --- a/parser/testdata/corpus/sql/copy/csv/csv_windows_mixed_separators.test +++ b/parser/testdata/corpus/sql/copy/csv/csv_windows_mixed_separators.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/csv_windows_mixed_separators.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}\csv/test/date.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/duck_fuzz/test_internal_4048.test b/parser/testdata/corpus/sql/copy/csv/duck_fuzz/test_internal_4048.test index 825b9ab..bcb3e95 100644 --- a/parser/testdata/corpus/sql/copy/csv/duck_fuzz/test_internal_4048.test +++ b/parser/testdata/corpus/sql/copy/csv/duck_fuzz/test_internal_4048.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/duck_fuzz/test_internal_4048.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM sniff_csv('{DATA_DIR}/csv/14512.csv', names := [NULL]); diff --git a/parser/testdata/corpus/sql/copy/csv/empty_first_line.test b/parser/testdata/corpus/sql/copy/csv/empty_first_line.test index b8d69e4..b95110a 100644 --- a/parser/testdata/corpus/sql/copy/csv/empty_first_line.test +++ b/parser/testdata/corpus/sql/copy/csv/empty_first_line.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/empty_first_line.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv_auto('{DATA_DIR}/csv/empty_first_line.csv', delim=' '); diff --git a/parser/testdata/corpus/sql/copy/csv/empty_string_quote.test b/parser/testdata/corpus/sql/copy/csv/empty_string_quote.test index 10ffef8..a1f5bf1 100644 --- a/parser/testdata/corpus/sql/copy/csv/empty_string_quote.test +++ b/parser/testdata/corpus/sql/copy/csv/empty_string_quote.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/empty_string_quote.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE customer(c_customer_sk INTEGER, c_customer_id VARCHAR, c_current_cdemo_sk INTEGER, c_current_hdemo_sk INTEGER, c_current_addr_sk INTEGER, c_first_shipto_date_sk INTEGER, c_first_sales_date_sk INTEGER, c_salutation VARCHAR, c_first_name VARCHAR, c_last_name VARCHAR, c_preferred_cust_flag VARCHAR, c_birth_day INTEGER, c_birth_month INTEGER, c_birth_year INTEGER, c_birth_country VARCHAR, c_login VARCHAR, c_email_address VARCHAR, c_last_review_date_sk INTEGER); diff --git a/parser/testdata/corpus/sql/copy/csv/except.test b/parser/testdata/corpus/sql/copy/csv/except.test index 364d186..d0b2d13 100644 --- a/parser/testdata/corpus/sql/copy/csv/except.test +++ b/parser/testdata/corpus/sql/copy/csv/except.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/except.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1 a, 2 b) TO '{TEST_DIR}/mismatch_types_except.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/glob/copy_csv_glob.test b/parser/testdata/corpus/sql/copy/csv/glob/copy_csv_glob.test index e08a705..99b9ef7 100644 --- a/parser/testdata/corpus/sql/copy/csv/glob/copy_csv_glob.test +++ b/parser/testdata/corpus/sql/copy/csv/glob/copy_csv_glob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/glob/copy_csv_glob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(d DATE); diff --git a/parser/testdata/corpus/sql/copy/csv/glob/read_csv_glob.test b/parser/testdata/corpus/sql/copy/csv/glob/read_csv_glob.test index c616660..9c68ae3 100644 --- a/parser/testdata/corpus/sql/copy/csv/glob/read_csv_glob.test +++ b/parser/testdata/corpus/sql/copy/csv/glob/read_csv_glob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/glob/read_csv_glob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof(#1),typeof(#2),typeof(#3),typeof(#4),typeof(#5) FROM read_csv('{DATA_DIR}/csv/per_thread/*.csv') limit 1 @@ -141,19 +141,19 @@ ok == SELECT * FROM read_csv_auto(NULL) ORDER BY 1 -- -error: Parser Error: read_csv_auto cannot take NULL list as parameter +error: Parser Error: "read_csv_auto" cannot take NULL list as parameter == SELECT * FROM read_csv_auto([NULL]) ORDER BY 1 -- -error: Parser Error: read_csv_auto reader cannot take NULL input as parameter +error: Parser Error: "read_csv_auto" reader cannot take NULL input as parameter == SELECT * FROM read_csv_auto(NULL::VARCHAR) ORDER BY 1 -- -error: Parser Error: read_csv_auto cannot take NULL list as parameter +error: Parser Error: "read_csv_auto" cannot take NULL list as parameter == SELECT * FROM read_csv_auto(NULL::VARCHAR[]) ORDER BY 1 -- -error: Parser Error: read_csv_auto cannot take NULL list as parameter +error: Parser Error: "read_csv_auto" cannot take NULL list as parameter == FROM read_csv('{DATA_DIR}/csv/glob/*/*.csv'); -- diff --git a/parser/testdata/corpus/sql/copy/csv/glob/test_unmatch_globs.test b/parser/testdata/corpus/sql/copy/csv/glob/test_unmatch_globs.test index e564c3c..668e17f 100644 --- a/parser/testdata/corpus/sql/copy/csv/glob/test_unmatch_globs.test +++ b/parser/testdata/corpus/sql/copy/csv/glob/test_unmatch_globs.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/glob/test_unmatch_globs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/glob_dif_dialect/14166/__200*.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/inconsistent_cells_error.test b/parser/testdata/corpus/sql/copy/csv/inconsistent_cells_error.test index 18070d6..e2c03d0 100644 --- a/parser/testdata/corpus/sql/copy/csv/inconsistent_cells_error.test +++ b/parser/testdata/corpus/sql/copy/csv/inconsistent_cells_error.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/inconsistent_cells_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from '{DATA_DIR}/csv/inconsistent_cells.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/integer_exponent.test b/parser/testdata/corpus/sql/copy/csv/integer_exponent.test index 2f11c6e..8821198 100644 --- a/parser/testdata/corpus/sql/copy/csv/integer_exponent.test +++ b/parser/testdata/corpus/sql/copy/csv/integer_exponent.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/integer_exponent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from '{DATA_DIR}/csv/integer_exponent.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/issue_22153.test b/parser/testdata/corpus/sql/copy/csv/issue_22153.test index 4cecfdb..92f00fe 100644 --- a/parser/testdata/corpus/sql/copy/csv/issue_22153.test +++ b/parser/testdata/corpus/sql/copy/csv/issue_22153.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/issue_22153.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 'hello "world"' AS a, 42 AS b) TO '{TEST_DIR}/test_escape_default.csv' (HEADER false); diff --git a/parser/testdata/corpus/sql/copy/csv/issue_6690.test b/parser/testdata/corpus/sql/copy/csv/issue_6690.test index e263a26..6dc5db8 100644 --- a/parser/testdata/corpus/sql/copy/csv/issue_6690.test +++ b/parser/testdata/corpus/sql/copy/csv/issue_6690.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/issue_6690.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv_auto('{DATA_DIR}/csv/comma_decimal_null.csv',SEP=',',SAMPLE_SIZE=-1,decimal_separator=',') diff --git a/parser/testdata/corpus/sql/copy/csv/issue_6764.test b/parser/testdata/corpus/sql/copy/csv/issue_6764.test index 0741705..1af7d97 100644 --- a/parser/testdata/corpus/sql/copy/csv/issue_6764.test +++ b/parser/testdata/corpus/sql/copy/csv/issue_6764.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/issue_6764.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv_auto('{DATA_DIR}/csv/issue6764.csv', all_varchar=true, skip=1, null_padding=True) diff --git a/parser/testdata/corpus/sql/copy/csv/leading_zeros_autodetect.test b/parser/testdata/corpus/sql/copy/csv/leading_zeros_autodetect.test index 81eb3fe..54986a8 100644 --- a/parser/testdata/corpus/sql/copy/csv/leading_zeros_autodetect.test +++ b/parser/testdata/corpus/sql/copy/csv/leading_zeros_autodetect.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/leading_zeros_autodetect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE leading_zeros AS SELECT * FROM read_csv_auto('{DATA_DIR}/csv/leading_zeros.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_2_byte_delimiter.test b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_2_byte_delimiter.test index 3b8dc07..7abea11 100644 --- a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_2_byte_delimiter.test +++ b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_2_byte_delimiter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/multidelimiter/test_2_byte_delimiter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/multidelimiter/aa_delim_small.csv', delim = 'aa', header = False, buffer_size = 8) diff --git a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_3_4_byte_delimiter.test b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_3_4_byte_delimiter.test index 715afc7..06aa1e8 100644 --- a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_3_4_byte_delimiter.test +++ b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_3_4_byte_delimiter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/multidelimiter/test_3_4_byte_delimiter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/multidelimiter/aaa_delim.csv', delim = 'aaa', header = False, buffer_size = {buffer_size}) diff --git a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_abac.test b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_abac.test index e598029..23f3b6e 100644 --- a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_abac.test +++ b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_abac.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/multidelimiter/test_abac.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/multidelimiter/aaab_delim.csv', delim = 'AAAB') diff --git a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_options_inconsistencies.test b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_options_inconsistencies.test index 6041193..72d89a6 100644 --- a/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_options_inconsistencies.test +++ b/parser/testdata/corpus/sql/copy/csv/multidelimiter/test_options_inconsistencies.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/multidelimiter/test_options_inconsistencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/multidelimiter/aaa_delim.csv', delim = '"\', quote ='"') diff --git a/parser/testdata/corpus/sql/copy/csv/null_padding_big.test b/parser/testdata/corpus/sql/copy/csv/null_padding_big.test index 3765b3f..17f004d 100644 --- a/parser/testdata/corpus/sql/copy/csv/null_padding_big.test +++ b/parser/testdata/corpus/sql/copy/csv/null_padding_big.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/null_padding_big.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a VARCHAR, b INTEGER, c INTEGER); diff --git a/parser/testdata/corpus/sql/copy/csv/null_terminator.test b/parser/testdata/corpus/sql/copy/csv/null_terminator.test index 158c457..b30973b 100644 --- a/parser/testdata/corpus/sql/copy/csv/null_terminator.test +++ b/parser/testdata/corpus/sql/copy/csv/null_terminator.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/null_terminator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/null_terminator.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/null_value_wrong_type.test b/parser/testdata/corpus/sql/copy/csv/null_value_wrong_type.test index 8ce6349..f9f51dd 100644 --- a/parser/testdata/corpus/sql/copy/csv/null_value_wrong_type.test +++ b/parser/testdata/corpus/sql/copy/csv/null_value_wrong_type.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/null_value_wrong_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit describe from '{DATA_DIR}/csv/null_mismatch.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/overwrite/test_copy_overwrite.test b/parser/testdata/corpus/sql/copy/csv/overwrite/test_copy_overwrite.test index 3f57ed2..248e30e 100644 --- a/parser/testdata/corpus/sql/copy/csv/overwrite/test_copy_overwrite.test +++ b/parser/testdata/corpus/sql/copy/csv/overwrite/test_copy_overwrite.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/overwrite/test_copy_overwrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/overwrite/test_overwrite_pipe_windows.test b/parser/testdata/corpus/sql/copy/csv/overwrite/test_overwrite_pipe_windows.test index 5171b8b..d69dfac 100644 --- a/parser/testdata/corpus/sql/copy/csv/overwrite/test_overwrite_pipe_windows.test +++ b/parser/testdata/corpus/sql/copy/csv/overwrite/test_overwrite_pipe_windows.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/overwrite/test_overwrite_pipe_windows.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42) to 'con:' diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_buffer_size.test b/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_buffer_size.test index 7f3edf8..c5506df 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_buffer_size.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_buffer_size.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/csv_parallel_buffer_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sum(a), sum(b), sum(c) FROM read_csv('{DATA_DIR}/csv/test/multi_column_integer.csv', COLUMNS=STRUCT_PACK(a := 'INTEGER', b := 'INTEGER', c := 'INTEGER'), auto_detect='true', delim = '|', buffer_size=30) diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_null_option.test b/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_null_option.test index 29eeccb..1c92ae6 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_null_option.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/csv_parallel_null_option.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/csv_parallel_null_option.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA enable_profiling diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_hive_partitioning.test b/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_hive_partitioning.test index 7298ec6..1afe1c5 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_hive_partitioning.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_hive_partitioning.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/parallel_csv_hive_partitioning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select id, value, filename.replace('\', '/').split('/')[-2], filename.replace('\', '/').split('/')[-3] from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/simple/*/*/test.csv', FILENAME=1) order by id diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_union_by_name.test b/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_union_by_name.test index 57d0fee..9f0f14f 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/parallel_csv_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/parallel_csv_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT id, value, a, part diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_5438.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_5438.test index 9aa3c75..8686794 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/test_5438.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_5438.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/test_5438.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT j->>'duck' FROM read_csv_auto('{DATA_DIR}/csv/test/5438.csv', delim='', columns={'j': 'JSON'}, auto_detect = false) diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_5566.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_5566.test index 9d15d0c..cce0125 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/test_5566.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_5566.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/test_5566.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_csv_auto('{DATA_DIR}/csv/auto/test_single_column.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_7578.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_7578.test index 2f9b217..0e20f94 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/test_7578.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_7578.test @@ -1,9 +1,9 @@ # source: test/sql/copy/csv/parallel/test_7578.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -select * +CREATE TABLE explicit_quote AS select * from read_csv('{DATA_DIR}/csv/bug_7578.csv', delim='\t', quote = '`', columns={ 'transaction_id': 'VARCHAR', 'team_id': 'INT', @@ -15,7 +15,11 @@ from read_csv('{DATA_DIR}/csv/bug_7578.csv', delim='\t', quote = '`', columns={ 'tags.transaction_id':'VARCHAR', 'tags.team_id':'INT', 'tags':'varchar' -}) order by all +}) +-- +ok +== +SELECT * FROM explicit_quote ORDER BY ALL -- ok == @@ -23,7 +27,7 @@ pragma threads=2 -- ok == -select * +CREATE TABLE automatic_quote AS select * from read_csv('{DATA_DIR}/csv/bug_7578.csv', delim='\t', columns={ 'transaction_id': 'VARCHAR', 'team_id': 'INT', @@ -39,3 +43,11 @@ from read_csv('{DATA_DIR}/csv/bug_7578.csv', delim='\t', columns={ -- ok == +SELECT count(*) FROM ( + (FROM explicit_quote EXCEPT ALL FROM automatic_quote) + UNION ALL + (FROM automatic_quote EXCEPT ALL FROM explicit_quote) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_multiple_files.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_multiple_files.test index bad7172..74f5fe2 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/test_multiple_files.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_multiple_files.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/test_multiple_files.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_csv_auto('{DATA_DIR}/csv/auto/glob/[0-9].csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_csv.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_csv.test index 9480cd9..55ed719 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_csv.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_csv.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/test_parallel_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/14512_og.csv', buffer_size = 473, strict_mode = false, delim = ',', quote = '"', escape = '"') diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_error_messages.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_error_messages.test index 31dad8c..284ca0c 100644 --- a/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_error_messages.test +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_parallel_error_messages.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/parallel/test_parallel_error_messages.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads=4 @@ -51,11 +51,11 @@ SELECT * FROM read_csv('{DATA_DIR}/csv/error/mixedtypes_rn.csv', parallel=false, -- ok == -SELECT * FROM read_csv('{DATA_DIR}/csv/error/quotednewlines.csv', parallel=true, sep=',', buffer_size=100, columns={'h1': varchar, 'h2': varchar}, header=True) +SELECT * FROM read_csv('{DATA_DIR}/csv/error/quotednewlines.csv', parallel=true, sep=',', quote='"', buffer_size=100, columns={'h1': varchar, 'h2': varchar}, header=True) -- ok == -SELECT * FROM read_csv('{DATA_DIR}/csv/error/quotednewlines.csv', parallel=true, sep=',', buffer_size=200, columns={'h1': int, 'h2': varchar}, header=True) +SELECT * FROM read_csv('{DATA_DIR}/csv/error/quotednewlines.csv', parallel=true, sep=',', quote='"', buffer_size=200, columns={'h1': int, 'h2': varchar}, header=True) -- ok == diff --git a/parser/testdata/corpus/sql/copy/csv/parallel/test_rrrn_parallel.test b/parser/testdata/corpus/sql/copy/csv/parallel/test_rrrn_parallel.test new file mode 100644 index 0000000..04a0266 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/parallel/test_rrrn_parallel.test @@ -0,0 +1,72 @@ +# source: test/sql/copy/csv/parallel/test_rrrn_parallel.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT (repeat('p', 23) || chr(13) || chr(13) || chr(10) || + string_agg(lpad(CAST(t.id AS VARCHAR), 2, '0') || ',' || + repeat('x', 19) || chr(13) || chr(13) || chr(10), '') + )::BLOB + FROM generate_series(0, 59) t(id) +) TO '{TEST_DIR}/rrrn_test.csv' (FORMAT BLOB); +-- +ok +== +SELECT + (SELECT COUNT(*) FROM read_csv('{TEST_DIR}/rrrn_test.csv', + auto_detect=false, header=true, delim=',', + columns={'id':'BIGINT','val':'VARCHAR'}, + strict_mode=false, ignore_errors=true, + buffer_size=1024, parallel=true)) AS parallel_count, + (SELECT COUNT(*) FROM read_csv('{TEST_DIR}/rrrn_test.csv', + auto_detect=false, header=true, delim=',', + columns={'id':'BIGINT','val':'VARCHAR'}, + strict_mode=false, ignore_errors=true, + buffer_size=1024, parallel=false)) AS sequential_count +-- +ok +== +SELECT + (SELECT COUNT(*) FROM read_csv('{TEST_DIR}/rrrn_test.csv', + auto_detect=false, header=true, delim=',', + columns={'id':'BIGINT','val':'VARCHAR'}, + strict_mode=false, ignore_errors=true, + buffer_size=1024, parallel=true) + WHERE id = 40) AS id40_count, + (SELECT COUNT(*) FROM read_csv('{TEST_DIR}/rrrn_test.csv', + auto_detect=false, header=true, delim=',', + columns={'id':'BIGINT','val':'VARCHAR'}, + strict_mode=false, ignore_errors=true, + buffer_size=1024, parallel=true) + WHERE id = 39) AS id39_count +-- +ok +== +SELECT COUNT(*) FROM ( + SELECT id, COUNT(*) AS cnt + FROM read_csv('{TEST_DIR}/rrrn_test.csv', + auto_detect=false, header=true, delim=',', + columns={'id':'BIGINT','val':'VARCHAR'}, + strict_mode=false, ignore_errors=true, + buffer_size=1024, parallel=true) + GROUP BY id + HAVING cnt > 1 +) +-- +ok +== +COPY ( + SELECT (repeat('p', 22) || chr(13) || chr(13) || chr(10) || + string_agg(lpad(CAST(t.id AS VARCHAR), 2, '0') || ',' || repeat('x', 19) || chr(13) || chr(13) || chr(10), ''))::BLOB + FROM generate_series(0, 89) t(id) +) TO '{TEST_DIR}/rrrn_mid.csv' (FORMAT BLOB); +-- +ok +== +SELECT count(*), count(DISTINCT id) FROM read_csv('{TEST_DIR}/rrrn_mid.csv', + auto_detect=false, header=true, delim=',', columns={'id':'BIGINT','val':'VARCHAR'}, + strict_mode=false, ignore_errors=true, buffer_size=4096, max_line_size=2048, parallel=true) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/plus_autodetect.test b/parser/testdata/corpus/sql/copy/csv/plus_autodetect.test index 23c245c..8633115 100644 --- a/parser/testdata/corpus/sql/copy/csv/plus_autodetect.test +++ b/parser/testdata/corpus/sql/copy/csv/plus_autodetect.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/plus_autodetect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE phone_numbers AS SELECT * FROM read_csv_auto('{DATA_DIR}/csv/phonenumbers.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/pollock/test_field_delimiter.test b/parser/testdata/corpus/sql/copy/csv/pollock/test_field_delimiter.test index 223e032..26286d9 100644 --- a/parser/testdata/corpus/sql/copy/csv/pollock/test_field_delimiter.test +++ b/parser/testdata/corpus/sql/copy/csv/pollock/test_field_delimiter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/pollock/test_field_delimiter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/pollock/file_field_delimiter_0x20.csv', delim = ' ', escape = '"', quote='"', header = false, skip=1, diff --git a/parser/testdata/corpus/sql/copy/csv/pollock/test_quotation_char.test b/parser/testdata/corpus/sql/copy/csv/pollock/test_quotation_char.test index 7f5cf1b..117e6a0 100644 --- a/parser/testdata/corpus/sql/copy/csv/pollock/test_quotation_char.test +++ b/parser/testdata/corpus/sql/copy/csv/pollock/test_quotation_char.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/pollock/test_quotation_char.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/pollock/file_quotation_char_0x27.csv', delim = ',', escape = '"', quote='''', diff --git a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_gzip.test b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_gzip.test index 0300844..853a163 100644 --- a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_gzip.test +++ b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_gzip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/read_ahead/csv_readahead_gzip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads=8 diff --git a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_multi_file.test b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_multi_file.test index 39eaa23..f1b353c 100644 --- a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_multi_file.test +++ b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_multi_file.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/read_ahead/csv_readahead_multi_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS i FROM range(0, 100000)) TO '{TEST_DIR}/csv_ra_0.csv' (FORMAT csv) diff --git a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_rejects.test b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_rejects.test index 8696eb7..fb2b2fc 100644 --- a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_rejects.test +++ b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_rejects.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/read_ahead/csv_readahead_rejects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range::VARCHAR AS i FROM range(0, 100000)) TO '{TEST_DIR}/csv_ra_rejects_0.csv' (FORMAT csv, HEADER false) diff --git a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_single_file.test b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_single_file.test index a259b0a..1e72a5d 100644 --- a/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_single_file.test +++ b/parser/testdata/corpus/sql/copy/csv/read_ahead/csv_readahead_single_file.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/read_ahead/csv_readahead_single_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS i FROM range(0, 500000)) TO '{TEST_DIR}/csv_ra_single.csv' (FORMAT csv) diff --git a/parser/testdata/corpus/sql/copy/csv/read_csv_subquery.test b/parser/testdata/corpus/sql/copy/csv/read_csv_subquery.test index 7b008d8..a1f6b06 100644 --- a/parser/testdata/corpus/sql/copy/csv/read_csv_subquery.test +++ b/parser/testdata/corpus/sql/copy/csv/read_csv_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/read_csv_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH urls AS ( diff --git a/parser/testdata/corpus/sql/copy/csv/read_csv_variable.test b/parser/testdata/corpus/sql/copy/csv/read_csv_variable.test index 5bad5ee..6688443 100644 --- a/parser/testdata/corpus/sql/copy/csv/read_csv_variable.test +++ b/parser/testdata/corpus/sql/copy/csv/read_csv_variable.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/read_csv_variable.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE globbed_files AS FROM glob('{DATA_DIR}/csv/glob/a?/*.csv'); @@ -17,5 +17,5 @@ ok == SELECT * FROM read_csv(getvariable('csv_files')) ORDER BY 1 -- -error: Parser Error: read_csv cannot take NULL list as parameter +error: Parser Error: "read_csv" cannot take NULL list as parameter == diff --git a/parser/testdata/corpus/sql/copy/csv/read_single_csv_file.test b/parser/testdata/corpus/sql/copy/csv/read_single_csv_file.test new file mode 100644 index 0000000..7c57211 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/read_single_csv_file.test @@ -0,0 +1,195 @@ +# source: test/sql/copy/csv/read_single_csv_file.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM read_single_csv_file('data/csv/tpcds_14.csv') +-- +ok +== +SELECT * FROM read_single_csv_file('data/csv/glob/a1/*.csv') +-- +ok +== +SELECT * FROM read_single_csv_file(['data/csv/glob/a1/a1.csv']) +-- +ok +== +SELECT i_class_id, channel FROM read_single_csv_file('data/csv/tpcds_14.csv') LIMIT 2 +-- +ok +== +SELECT count(*) FROM read_single_csv_file('data/csv/tpcds_14.csv', header=false) +-- +ok +== +SELECT count(*) FROM read_single_csv_file('data/csv/tpcds_14.csv', skip=2) +-- +ok +== +SELECT typeof(channel) FROM read_single_csv_file('data/csv/tpcds_14.csv', all_varchar=true) LIMIT 1 +-- +ok +== +COPY (SELECT i AS id, 'value_' || i AS s FROM range(200000) t(i)) TO '{TEST_DIR}/ordered.csv' (FORMAT csv, HEADER) +-- +ok +== +SELECT bool_and(id = rn) FROM (SELECT id, row_number() OVER () - 1 AS rn FROM read_single_csv_file('{TEST_DIR}/ordered.csv')) +-- +ok +== +SELECT count(*) FROM read_single_csv_file('data/csv/tpcds_14.csv', buffer_size=1024) +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/tpcds_14.csv') +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/glob/a1/*.csv') +-- +ok +== +SELECT count(*) FROM read_csv(['data/csv/glob/a1/a1.csv', 'data/csv/glob/a2/a2.csv']) +-- +ok +== +SELECT count(DISTINCT filename) FROM read_csv('data/csv/glob/a?/*.csv', filename=true) +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/glob/*/*.csv', union_by_name=true) +-- +ok +== +SELECT d, column0, i FROM read_csv('data/csv/glob/*/*.csv', union_by_name=true) ORDER BY ALL LIMIT 3 +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/error/mismatch/*.csv', ignore_errors=true) +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/error/mismatch/*.csv', ignore_errors=true, filename=true) +-- +ok +== +SELECT count(filename) FROM read_csv('data/csv/error/mismatch/*.csv', ignore_errors=true, filename=true) +-- +ok +== +SELECT * FROM read_csv('data/csv/error/mismatch/*.csv', ignore_errors=true, filename=true) +-- +ok +== +COPY (SELECT 1 AS a, '' AS b) TO '{TEST_DIR}/fnn_1.csv' (FORMAT csv, HEADER, QUOTE '') +-- +ok +== +COPY (SELECT 2 AS a, '' AS c) TO '{TEST_DIR}/fnn_2.csv' (FORMAT csv, HEADER, QUOTE '') +-- +ok +== +SELECT a, b IS NULL, c IS NULL FROM read_csv('{TEST_DIR}/fnn_*.csv', union_by_name=true, force_not_null=['c']) +ORDER BY a +-- +ok +== +SELECT * FROM read_csv('{TEST_DIR}/fnn_*.csv', union_by_name=true, force_not_null=['d']) +-- +ok +== +SELECT a, b IS NULL, c IS NULL FROM read_csv('{TEST_DIR}/fnn_*.csv', union_by_name=true, force_not_null=['C']) +ORDER BY a +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/error/mismatch/small1.csv', store_rejects=true) +-- +ok +== +SELECT bool_and(id = rn) FROM (SELECT id, row_number() OVER () - 1 AS rn FROM read_csv('{TEST_DIR}/ordered.csv')) +-- +ok +== +SELECT count(*) FROM read_csv('data/csv/tpcds_14.csv', buffer_size=1024) +-- +ok +== +SELECT * FROM read_csv('data/csv/this_file_does_not_exist.csv') +-- +ok +== +COPY (SELECT 1 AS a, 'x' AS b) TO '{TEST_DIR}/sniff_f1.csv' (FORMAT csv, HEADER) +-- +ok +== +COPY (SELECT 2 AS a, 'y' AS b) TO '{TEST_DIR}/sniff_f2.csv' (FORMAT csv, HEADER) +-- +ok +== +COPY (SELECT 'notanumber' AS a, 'z' AS b) TO '{TEST_DIR}/sniff_f3.csv' (FORMAT csv, HEADER) +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_csv('{TEST_DIR}/sniff_*.csv')) WHERE column_name='a' +-- +ok +== +SELECT * FROM read_csv('{TEST_DIR}/sniff_*.csv') ORDER BY ALL +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_csv('{TEST_DIR}/sniff_*.csv', files_to_sniff=1)) WHERE column_name='a' +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_csv('{TEST_DIR}/sniff_*.csv', files_to_sniff=-1)) WHERE column_name='a' +-- +ok +== +SELECT * FROM read_csv('{TEST_DIR}/sniff_*.csv', files_to_sniff=0) +-- +ok +== +CREATE TABLE copy_target(channel VARCHAR, i_brand_id BIGINT, i_class_id BIGINT, i_category_id BIGINT, sum_sales DOUBLE, number_sales BIGINT) +-- +ok +== +COPY copy_target FROM 'data/csv/tpcds_14.csv' (FORMAT csv) +-- +ok +== +SELECT count(*), sum(i_brand_id) FROM copy_target +-- +ok +== +CREATE TABLE copy_subset(channel VARCHAR) +-- +ok +== +COPY copy_subset FROM 'data/csv/tpcds_14.csv' (FORMAT csv) +-- +ok +== +SELECT count(*) FROM copy_subset +-- +ok +== +COPY (SELECT 1 AS id, 'x' AS s) TO '{TEST_DIR}/roundtrip.csv' (FORMAT csv, HEADER) +-- +ok +== +CREATE TABLE copy_rt(id BIGINT, s VARCHAR) +-- +ok +== +COPY copy_rt FROM '{TEST_DIR}/roundtrip.csv' (FORMAT csv, HEADER) +-- +ok +== +SELECT * FROM copy_rt +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/recursive_csv_union_by_name.test b/parser/testdata/corpus/sql/copy/csv/recursive_csv_union_by_name.test index c0b49a2..f08de80 100644 --- a/parser/testdata/corpus/sql/copy/csv/recursive_csv_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/csv/recursive_csv_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/recursive_csv_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view r AS from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/mismatching_contents/*/*.csv', UNION_BY_NAME=1, HIVE_PARTITIONING=1) diff --git a/parser/testdata/corpus/sql/copy/csv/recursive_read_csv.test b/parser/testdata/corpus/sql/copy/csv/recursive_read_csv.test index 486d221..21d33d2 100644 --- a/parser/testdata/corpus/sql/copy/csv/recursive_read_csv.test +++ b/parser/testdata/corpus/sql/copy/csv/recursive_read_csv.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/recursive_read_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table r AS SELECT * FROM read_csv('{DATA_DIR}/csv/test/date.csv', columns=STRUCT_PACK(d := 'DATE'), header=0, auto_detect=0); diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_incorrect_columns_amount_rejects.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_incorrect_columns_amount_rejects.test index 45aa13b..5e0da91 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_incorrect_columns_amount_rejects.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_incorrect_columns_amount_rejects.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_incorrect_columns_amount_rejects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_auto.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_auto.test index 4e48662..c130635 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_auto.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_auto.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_auto.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(first(column0)), typeof(first(column1)), COUNT(*), SUM(column0), MAX(len(column1)) FROM read_csv_auto( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_cache_key_collision.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_cache_key_collision.test new file mode 100644 index 0000000..8e7d502 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_cache_key_collision.test @@ -0,0 +1,36 @@ +# source: test/sql/copy/csv/rejects/csv_rejects_cache_key_collision.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT '42' UNION ALL SELECT 'bad_A') TO '{TEMP_DIR}/rejects_a.csv' (HEADER false); +-- +ok +== +COPY (SELECT '99' UNION ALL SELECT 'bad_B') TO '{TEMP_DIR}/rejects_b.csv' (HEADER false); +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/rejects_a.csv', columns={'col1':'INTEGER'}, + store_rejects=true, rejects_scan='foo_bar', rejects_table='baz', auto_detect=false); +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/rejects_b.csv', columns={'col1':'INTEGER'}, + store_rejects=true, rejects_scan='foo', rejects_table='bar_baz', auto_detect=false); +-- +ok +== +SELECT table_name FROM information_schema.tables +WHERE table_name IN ('foo_bar', 'baz', 'foo', 'bar_baz') ORDER BY table_name; +-- +ok +== +SELECT csv_line FROM baz; +-- +ok +== +SELECT csv_line FROM bar_baz; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_cast.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_cast.test index b0815f2..4ece65c 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_cast.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_cast.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_flush_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT first(a), first(b), typeof(first(a)), typeof(first(b)), COUNT(*) FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_message.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_message.test index 54d2feb..9fe97ef 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_message.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_flush_message.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_flush_message.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_maximum_line.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_maximum_line.test index 6ec6d3c..3c34329 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_maximum_line.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_maximum_line.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_maximum_line.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_read.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_read.test index 1a4b926..1c0479a 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_read.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_read.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_read.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( @@ -81,6 +81,14 @@ SELECT * EXCLUDE (scan_id, file_id) FROM reject_scans ORDER BY ALL; -- ok == +SELECT count(DISTINCT file_id), count(DISTINCT scan_id) FROM reject_scans; +-- +ok +== +SELECT count(DISTINCT file_id) FROM reject_errors; +-- +ok +== SELECT * EXCLUDE (scan_id, file_id) FROM reject_errors ORDER BY ALL; -- ok diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_truncate_line_invalid_utf8.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_truncate_line_invalid_utf8.test index 62e82d6..896c9ee 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_truncate_line_invalid_utf8.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_truncate_line_invalid_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_truncate_line_invalid_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_csv('data/csv/test/no_newline_unicode.csv', sep='🦆', names=['a','b','c'], types=['date','int','int'], header=false, ignore_errors=true, store_rejects=true, rejects_line_size_limit=4); diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_two_tables.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_two_tables.test index 63bb83b..e4e3820 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_two_tables.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_rejects_two_tables.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_rejects_two_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * EXCLUDE (scan_id) FROM reject_scans order by all; diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/csv_unquoted_rejects.test b/parser/testdata/corpus/sql/copy/csv/rejects/csv_unquoted_rejects.test index 2d8afd2..d6668b7 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/csv_unquoted_rejects.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/csv_unquoted_rejects.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/csv_unquoted_rejects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_parameters.test b/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_parameters.test index ec8f985..356b3cf 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_parameters.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_parameters.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/test_invalid_parameters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_utf_rejects.test b/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_utf_rejects.test index 1e862d9..3d28ad7 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_utf_rejects.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/test_invalid_utf_rejects.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/test_invalid_utf_rejects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/test/invalid_utf_big.csv',columns = {'col1': 'VARCHAR','col2': 'VARCHAR','col3': 'VARCHAR'}, diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/test_mixed.test b/parser/testdata/corpus/sql/copy/csv/rejects/test_mixed.test index 9b937c8..6bf0588 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/test_mixed.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/test_mixed.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/test_mixed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/rejects/test_multiple_errors_same_line.test b/parser/testdata/corpus/sql/copy/csv/rejects/test_multiple_errors_same_line.test index e2759f1..429ee63 100644 --- a/parser/testdata/corpus/sql/copy/csv/rejects/test_multiple_errors_same_line.test +++ b/parser/testdata/corpus/sql/copy/csv/rejects/test_multiple_errors_same_line.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/rejects/test_multiple_errors_same_line.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/rejects/multiple_errors/cast_and_more_col.csv', diff --git a/parser/testdata/corpus/sql/copy/csv/relaxed_quotes.test b/parser/testdata/corpus/sql/copy/csv/relaxed_quotes.test index 1cdd9cc..b530159 100644 --- a/parser/testdata/corpus/sql/copy/csv/relaxed_quotes.test +++ b/parser/testdata/corpus/sql/copy/csv/relaxed_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/relaxed_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/unescaped_quotes/stops.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/struct.test b/parser/testdata/corpus/sql/copy/csv/struct.test index 9438ec3..bbc4d02 100644 --- a/parser/testdata/corpus/sql/copy/csv/struct.test +++ b/parser/testdata/corpus/sql/copy/csv/struct.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/struct.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/struct_padding.test b/parser/testdata/corpus/sql/copy/csv/struct_padding.test index f72f455..75fe055 100644 --- a/parser/testdata/corpus/sql/copy/csv/struct_padding.test +++ b/parser/testdata/corpus/sql/copy/csv/struct_padding.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/struct_padding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv('{DATA_DIR}/csv/test/struct_padding.csv', columns={'col': 'STRUCT(val VARCHAR)'}) ORDER BY 1; diff --git a/parser/testdata/corpus/sql/copy/csv/test_11403.test b/parser/testdata/corpus/sql/copy/csv/test_11403.test index 28c7a41..6ca5562 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_11403.test +++ b/parser/testdata/corpus/sql/copy/csv/test_11403.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_11403.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM '{DATA_DIR}/csv/quoted_newline.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_11840.test b/parser/testdata/corpus/sql/copy/csv/test_11840.test index d114d09..4df9b17 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_11840.test +++ b/parser/testdata/corpus/sql/copy/csv/test_11840.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_11840.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/date_specificity.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_12596.test b/parser/testdata/corpus/sql/copy/csv/test_12596.test index 27223cb..8e86ac7 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_12596.test +++ b/parser/testdata/corpus/sql/copy/csv/test_12596.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_12596.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/bug_12596.csv', skip=1, delim=',', header=false, columns={'c1': 'INTEGER', 'c2': 'INTEGER', 'column2': 'VARCHAR'}, null_padding = true); diff --git a/parser/testdata/corpus/sql/copy/csv/test_15473.test b/parser/testdata/corpus/sql/copy/csv/test_15473.test index c4aa559..49d2c98 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_15473.test +++ b/parser/testdata/corpus/sql/copy/csv/test_15473.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_15473.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select columns from sniff_csv('{DATA_DIR}/csv/15473.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_8890.test b/parser/testdata/corpus/sql/copy/csv/test_8890.test index f6a8c38..ced362c 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_8890.test +++ b/parser/testdata/corpus/sql/copy/csv/test_8890.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_8890.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select diff --git a/parser/testdata/corpus/sql/copy/csv/test_9005.test b/parser/testdata/corpus/sql/copy/csv/test_9005.test index a9a3d3a..0fd1e6b 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_9005.test +++ b/parser/testdata/corpus/sql/copy/csv/test_9005.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_9005.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv_auto('{DATA_DIR}/csv/bug_9005/teste*.csv',filename=true,union_by_name=True) where filename='{DATA_DIR}/csv/bug_9005/teste1.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/test_afl.test b/parser/testdata/corpus/sql/copy/csv/test_afl.test index 757d73b..478ba26 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_afl.test +++ b/parser/testdata/corpus/sql/copy/csv/test_afl.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_afl.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/afl/1.csv', force_not_null=012%0); diff --git a/parser/testdata/corpus/sql/copy/csv/test_all_quotes.test b/parser/testdata/corpus/sql/copy/csv/test_all_quotes.test index 8e07296..9091fd6 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_all_quotes.test +++ b/parser/testdata/corpus/sql/copy/csv/test_all_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_all_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT quote FROM sniff_csv('{DATA_DIR}/csv/all_quotes.csv', ignore_errors = 1) diff --git a/parser/testdata/corpus/sql/copy/csv/test_allow_quoted_nulls_option.test b/parser/testdata/corpus/sql/copy/csv/test_allow_quoted_nulls_option.test index 290a02d..baa4655 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_allow_quoted_nulls_option.test +++ b/parser/testdata/corpus/sql/copy/csv/test_allow_quoted_nulls_option.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_allow_quoted_nulls_option.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv_auto('{DATA_DIR}/csv/null_comparison.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_auto_date.test b/parser/testdata/corpus/sql/copy/csv/test_auto_date.test index ee18b1a..6c59e9f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_auto_date.test +++ b/parser/testdata/corpus/sql/copy/csv/test_auto_date.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_auto_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE date_tests (a DATE) diff --git a/parser/testdata/corpus/sql/copy/csv/test_auto_detection_headers.test b/parser/testdata/corpus/sql/copy/csv/test_auto_detection_headers.test index d04d0a0..1721733 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_auto_detection_headers.test +++ b/parser/testdata/corpus/sql/copy/csv/test_auto_detection_headers.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_auto_detection_headers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/headers/undetected_type.csv', delim = ';') diff --git a/parser/testdata/corpus/sql/copy/csv/test_bgzf_read.test b/parser/testdata/corpus/sql/copy/csv/test_bgzf_read.test index 4f838df..abc8b43 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_bgzf_read.test +++ b/parser/testdata/corpus/sql/copy/csv/test_bgzf_read.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_bgzf_read.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bgzf AS SELECT * FROM read_csv_auto('{DATA_DIR}/csv/test/bgzf.gz'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_big_header.test b/parser/testdata/corpus/sql/copy/csv/test_big_header.test index 8106db4..c9baecb 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_big_header.test +++ b/parser/testdata/corpus/sql/copy/csv/test_big_header.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_big_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (foo INTEGER, bar VARCHAR(10), baz VARCHAR(10), bam VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/test_blob.test b/parser/testdata/corpus/sql/copy/csv/test_blob.test index ef605cd..6ec57a4 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_blob.test +++ b/parser/testdata/corpus/sql/copy/csv/test_blob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE blobs (b BYTEA); diff --git a/parser/testdata/corpus/sql/copy/csv/test_bug_10273.test b/parser/testdata/corpus/sql/copy/csv/test_bug_10273.test index 4ac3313..350ef8f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_bug_10273.test +++ b/parser/testdata/corpus/sql/copy/csv/test_bug_10273.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_bug_10273.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/bug_10273.csv', header=0) diff --git a/parser/testdata/corpus/sql/copy/csv/test_column_inconsistencies.test b/parser/testdata/corpus/sql/copy/csv/test_column_inconsistencies.test index b94f177..beba1f7 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_column_inconsistencies.test +++ b/parser/testdata/corpus/sql/copy/csv/test_column_inconsistencies.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_column_inconsistencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/inconsistencies/inconsistent_columns_3.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/test_comment_midline.test b/parser/testdata/corpus/sql/copy/csv/test_comment_midline.test index 70ff1ad..26aca88 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_comment_midline.test +++ b/parser/testdata/corpus/sql/copy/csv/test_comment_midline.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_comment_midline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/comments/14648.csv', diff --git a/parser/testdata/corpus/sql/copy/csv/test_comment_option.test b/parser/testdata/corpus/sql/copy/csv/test_comment_option.test index f79d987..4b985dc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_comment_option.test +++ b/parser/testdata/corpus/sql/copy/csv/test_comment_option.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_comment_option.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/comments/17226.csv', comment='#', all_varchar=True, skip=0, ignore_errors=True) diff --git a/parser/testdata/corpus/sql/copy/csv/test_compression_flag.test b/parser/testdata/corpus/sql/copy/csv/test_compression_flag.test index db065b3..6afe9a6 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_compression_flag.test +++ b/parser/testdata/corpus/sql/copy/csv/test_compression_flag.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_compression_flag.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lineitem(a INT NOT NULL, diff --git a/parser/testdata/corpus/sql/copy/csv/test_copy.test b/parser/testdata/corpus/sql/copy/csv/test_copy.test index 62e8a17..a2a4be0 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_copy.test +++ b/parser/testdata/corpus/sql/copy/csv/test_copy.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(a), SUM(a) FROM test; @@ -81,11 +81,11 @@ ok == COPY test4 (a,c) FROM '{TEMP_DIR}/test4.csv' (FORMAT 'csv', FORMAT 'some_other_copy_function'); -- -error: Parser Error: Unexpected duplicate option format +error: Parser Error: Unexpected duplicate option "format" == COPY test4 (a,c) FROM '{TEMP_DIR}/test4.csv' (FORMAT 'some_other_copy_function', FORMAT 'csv'); -- -error: Parser Error: Unexpected duplicate option format +error: Parser Error: Unexpected duplicate option "format" == COPY test4 (a,c) FROM '{TEMP_DIR}/test4.csv' (ESCAPE 1); -- diff --git a/parser/testdata/corpus/sql/copy/csv/test_copy_csv_multibyte_delimiter.test b/parser/testdata/corpus/sql/copy/csv/test_copy_csv_multibyte_delimiter.test new file mode 100644 index 0000000..ef3463c --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/test_copy_csv_multibyte_delimiter.test @@ -0,0 +1,21 @@ +# source: test/sql/copy/csv/test_copy_csv_multibyte_delimiter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 a, 'xéy' b, 'z' c) TO '{TEST_DIR}/multibyte_delimiter.csv' (DELIMITER 'é'); +-- +ok +== +SELECT * FROM read_csv('{TEST_DIR}/multibyte_delimiter.csv', delim='é') +-- +ok +== +COPY (SELECT 1 a, 'x||y' b) TO '{TEST_DIR}/multichar_delimiter.csv' (DELIMITER '||'); +-- +ok +== +SELECT * FROM read_csv('{TEST_DIR}/multichar_delimiter.csv', delim='||') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_copy_default.test b/parser/testdata/corpus/sql/copy/csv/test_copy_default.test index 604f209..6b4419e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_copy_default.test +++ b/parser/testdata/corpus/sql/copy/csv/test_copy_default.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_copy_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b VARCHAR DEFAULT('hello'), c INTEGER DEFAULT(3+4)); diff --git a/parser/testdata/corpus/sql/copy/csv/test_copy_gzip.test b/parser/testdata/corpus/sql/copy/csv/test_copy_gzip.test index 39f8679..92fe849 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_copy_gzip.test +++ b/parser/testdata/corpus/sql/copy/csv/test_copy_gzip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_copy_gzip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lineitem(l_orderkey INT NOT NULL, diff --git a/parser/testdata/corpus/sql/copy/csv/test_copy_many_empty_lines.test b/parser/testdata/corpus/sql/copy/csv/test_copy_many_empty_lines.test index f2df950..2b43dcc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_copy_many_empty_lines.test +++ b/parser/testdata/corpus/sql/copy/csv/test_copy_many_empty_lines.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_copy_many_empty_lines.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER); diff --git a/parser/testdata/corpus/sql/copy/csv/test_copy_null.test b/parser/testdata/corpus/sql/copy/csv/test_copy_null.test index 07a7721..3edb3f2 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_copy_null.test +++ b/parser/testdata/corpus/sql/copy/csv/test_copy_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_copy_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_null_option (col_a INTEGER, col_b VARCHAR(10), col_c VARCHAR(10), col_d VARCHAR(10), col_e VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_duplicate_columns.test b/parser/testdata/corpus/sql/copy/csv/test_csv_duplicate_columns.test index 1c785ce..66be723 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_duplicate_columns.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_duplicate_columns.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_duplicate_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1 as a, 2 as a, 3 as a) TO '{TEST_DIR}/dupe_cols.csv' (FORMAT CSV, HEADER); diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_error_message_type.test b/parser/testdata/corpus/sql/copy/csv/test_csv_error_message_type.test index ba7704d..ff55a74 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_error_message_type.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_error_message_type.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_error_message_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE venue ( diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_error_projection.test b/parser/testdata/corpus/sql/copy/csv/test_csv_error_projection.test new file mode 100644 index 0000000..a529f9f --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_error_projection.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/csv/test_csv_error_projection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(b) FROM read_csv('data/csv/invalid_utf8_projected.csv', sample_size=1) +-- +ok +== +SELECT b FROM read_csv('data/csv/invalid_utf8_projected.csv', sample_size=1) +-- +ok +== +SELECT count(b) FROM read_csv('data/csv/invalid_utf8_projected.csv', sample_size=1, ignore_errors=true) +-- +ok +== +SELECT * FROM read_csv('data/csv/extra_value_null_prefix.csv', columns={'a':'INT','b':'INT'}, strict_mode=true, nullstr='xyz', header=false, auto_detect=false, delim=',') +-- +ok +== +SELECT * FROM read_csv('data/csv/extra_value_null_prefix.csv', columns={'a':'INT','b':'INT'}, strict_mode=true, nullstr='x', header=false, auto_detect=false, delim=',') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_json.test b/parser/testdata/corpus/sql/copy/csv/test_csv_json.test index 7830e18..427adb3 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_json.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_json.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/error/json.csv', columns={'a':'JSON'}) diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_mixed_casts.test b/parser/testdata/corpus/sql/copy/csv/test_csv_mixed_casts.test index cd95dbd..40927a1 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_mixed_casts.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_mixed_casts.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_mixed_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv( diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_no_trailing_newline.test b/parser/testdata/corpus/sql/copy/csv/test_csv_no_trailing_newline.test index 7f70484..4ac403f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_no_trailing_newline.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_no_trailing_newline.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_no_trailing_newline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE no_newline (a INTEGER, b INTEGER, c VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_options_typed_null.test b/parser/testdata/corpus/sql/copy/csv/test_csv_options_typed_null.test new file mode 100644 index 0000000..46e929b --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_options_typed_null.test @@ -0,0 +1,49 @@ +# source: test/sql/copy/csv/test_csv_options_typed_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 i, 'x' s) TO '{TEMP_DIR}/typed_null_options.csv'; +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', types := ['BIGINT', NULL]); +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', types := NULL::VARCHAR[]); +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', dtypes := {'i': NULL::VARCHAR}); +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', columns := NULL::STRUCT(a VARCHAR)); +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', columns := {'a': NULL::VARCHAR}); +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', auto_type_candidates := NULL::VARCHAR[]); +-- +ok +== +SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', auto_type_candidates := ['BIGINT', NULL]); +-- +ok +== +SELECT * FROM sniff_csv('{TEMP_DIR}/typed_null_options.csv', types := ['BIGINT', NULL]); +-- +ok +== +SELECT * FROM read_single_csv_file(''); +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/typed_null_options.csv', types := ['BIGINT', 'VARCHAR']); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown.test b/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown.test index 9a845f1..3384ca8 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select l_returnflag, l_linenumber from read_csv('{DATA_DIR}/csv/real/lineitem_sample.csv', delim='|', header=False, columns={ diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown_glob.test b/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown_glob.test index b0c631b..71529a4 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown_glob.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_projection_pushdown_glob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_projection_pushdown_glob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT DATE '1992-01-01' d, 42 i, 'hello' s) TO '{TEST_DIR}/projection_pushdown_f1.csv' (HEADER, DELIMITER '|') diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz.test b/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz.test index c56d483..4430008 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_csv_timestamp_tz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy ( diff --git a/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz_icu.test b/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz_icu.test index 9990f2f..5a2c483 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz_icu.test +++ b/parser/testdata/corpus/sql/copy/csv/test_csv_timestamp_tz_icu.test @@ -1,16 +1,8 @@ # source: test/sql/copy/csv/test_csv_timestamp_tz_icu.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET Calendar = 'gregorian'; --- -ok -== -SET TimeZone = 'America/Los_Angeles'; --- -ok -== COPY ( SELECT make_timestamptz(1713193669561000) AS t ) TO '{TEST_DIR}/timestamp-format.csv' (FORMAT CSV, timestampformat '%x %X.%g%z'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_date.test b/parser/testdata/corpus/sql/copy/csv/test_date.test index 7e53fbc..17de7ab 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_date.test +++ b/parser/testdata/corpus/sql/copy/csv/test_date.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT cast(d as string) FROM date_test; diff --git a/parser/testdata/corpus/sql/copy/csv/test_date_sniffer.test b/parser/testdata/corpus/sql/copy/csv/test_date_sniffer.test index ada25ac..889d4ef 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_date_sniffer.test +++ b/parser/testdata/corpus/sql/copy/csv/test_date_sniffer.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_date_sniffer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/bad_date.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_dateformat.test b/parser/testdata/corpus/sql/copy/csv/test_dateformat.test index c807a5d..4f7595e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_dateformat.test +++ b/parser/testdata/corpus/sql/copy/csv/test_dateformat.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_dateformat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates (d DATE); diff --git a/parser/testdata/corpus/sql/copy/csv/test_decimal.test b/parser/testdata/corpus/sql/copy/csv/test_decimal.test index a030181..bf1ee5d 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_decimal.test +++ b/parser/testdata/corpus/sql/copy/csv/test_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/decimal.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_double_sniffer.test b/parser/testdata/corpus/sql/copy/csv/test_double_sniffer.test index c70dcd6..fa131ab 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_double_sniffer.test +++ b/parser/testdata/corpus/sql/copy/csv/test_double_sniffer.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_double_sniffer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(number) FROM read_csv('{DATA_DIR}/csv/double_trouble.csv', decimal_separator=',') limit 1; diff --git a/parser/testdata/corpus/sql/copy/csv/test_empty_header.test b/parser/testdata/corpus/sql/copy/csv/test_empty_header.test index f37ebd0..33a4511 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_empty_header.test +++ b/parser/testdata/corpus/sql/copy/csv/test_empty_header.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_empty_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select columns[1].name,columns[2].name,columns[3].name,columns[4].name,columns[5].name diff --git a/parser/testdata/corpus/sql/copy/csv/test_empty_quote.test b/parser/testdata/corpus/sql/copy/csv/test_empty_quote.test index 24bf6cc..23df5fb 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_empty_quote.test +++ b/parser/testdata/corpus/sql/copy/csv/test_empty_quote.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_empty_quote.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE no_quote(a VARCHAR, b VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/csv/test_encoding_straddle_compressed.test b/parser/testdata/corpus/sql/copy/csv/test_encoding_straddle_compressed.test new file mode 100644 index 0000000..04e6e42 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/test_encoding_straddle_compressed.test @@ -0,0 +1,13 @@ +# source: test/sql/copy/csv/test_encoding_straddle_compressed.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT right(value, 8) FROM read_csv('{DATA_DIR}/csv/encodings/straddle_cp932_1k.csv.gz', header=true, all_varchar=true, encoding='ibm-943_P15A-2003', buffer_size=1024) WHERE key='z' +-- +ok +== +SELECT right(value, 8) FROM read_csv('{DATA_DIR}/csv/encodings/straddle_gb18030_2k.csv.gz', header=true, all_varchar=true, encoding='gb18030', buffer_size=1024) WHERE key='z' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_enum_csv.test b/parser/testdata/corpus/sql/copy/csv/test_enum_csv.test index c1d019c..1451cef 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_enum_csv.test +++ b/parser/testdata/corpus/sql/copy/csv/test_enum_csv.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_enum_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE mood AS ENUM ('happy', 'sad', 'angry') diff --git a/parser/testdata/corpus/sql/copy/csv/test_escape_long_value.test b/parser/testdata/corpus/sql/copy/csv/test_escape_long_value.test index 02a219a..6775f00 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_escape_long_value.test +++ b/parser/testdata/corpus/sql/copy/csv/test_escape_long_value.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_escape_long_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T AS FROM read_csv('{DATA_DIR}/csv/big_escape.csv', buffer_size = {buffer_size}, quote = '"', escape = '"', delim = ';', columns = {'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, auto_detect = false) diff --git a/parser/testdata/corpus/sql/copy/csv/test_export_force_quotes.test b/parser/testdata/corpus/sql/copy/csv/test_export_force_quotes.test index 152dd9e..8a77594 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_export_force_quotes.test +++ b/parser/testdata/corpus/sql/copy/csv/test_export_force_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_export_force_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit export database '{TEST_DIR}/test_export' (force_quote *); diff --git a/parser/testdata/corpus/sql/copy/csv/test_export_not_null.test b/parser/testdata/corpus/sql/copy/csv/test_export_not_null.test index 99817f5..a50a8c3 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_export_not_null.test +++ b/parser/testdata/corpus/sql/copy/csv/test_export_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_export_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(a VARCHAR NOT NULL) diff --git a/parser/testdata/corpus/sql/copy/csv/test_extra_delimiters_rfc.test b/parser/testdata/corpus/sql/copy/csv/test_extra_delimiters_rfc.test index 1457cc0..5fdcf09 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_extra_delimiters_rfc.test +++ b/parser/testdata/corpus/sql/copy/csv/test_extra_delimiters_rfc.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_extra_delimiters_rfc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/extra_delimiters.csv', strict_mode = false, columns={'a':'VARCHAR','b':'VARCHAR','c':'VARCHAR'}, auto_detect = false, delim = ',', header = true) diff --git a/parser/testdata/corpus/sql/copy/csv/test_filename_filter.test b/parser/testdata/corpus/sql/copy/csv/test_filename_filter.test index 9f36f3b..5378840 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_filename_filter.test +++ b/parser/testdata/corpus/sql/copy/csv/test_filename_filter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_filename_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT column1, column2, column3, parse_filename(filename) FROM read_csv('{DATA_DIR}/csv/filename_filter/*.csv', filename=true); diff --git a/parser/testdata/corpus/sql/copy/csv/test_force_not_null.test b/parser/testdata/corpus/sql/copy/csv/test_force_not_null.test index 821e927..e27c79f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_force_not_null.test +++ b/parser/testdata/corpus/sql/copy/csv/test_force_not_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_force_not_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (col_a INTEGER, col_b VARCHAR(10), col_c VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/test_force_quote.test b/parser/testdata/corpus/sql/copy/csv/test_force_quote.test index 2971315..72374dc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_force_quote.test +++ b/parser/testdata/corpus/sql/copy/csv/test_force_quote.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_force_quote.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY test FROM '{DATA_DIR}/csv/test/force_quote.csv' (HEADER 0); diff --git a/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_lineitem.test b/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_lineitem.test index 0118253..80296f2 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_lineitem.test +++ b/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_lineitem.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_glob_reorder_lineitem.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment from lineitem limit 10000 offset 0) diff --git a/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_null.test b/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_null.test index 2145376..840a3c3 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_null.test +++ b/parser/testdata/corpus/sql/copy/csv/test_glob_reorder_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_glob_reorder_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select 1 as a,1 as b from range(3); diff --git a/parser/testdata/corpus/sql/copy/csv/test_glob_type.test b/parser/testdata/corpus/sql/copy/csv/test_glob_type.test index 06842ca..6edeae8 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_glob_type.test +++ b/parser/testdata/corpus/sql/copy/csv/test_glob_type.test @@ -1,12 +1,8 @@ # source: test/sql/copy/csv/test_glob_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET threads=1 --- -ok -== SELECT typeof(bar) FROM '{DATA_DIR}/csv/17451/*.csv' limit 1 -- ok @@ -27,7 +23,7 @@ SELECT typeof(bar) FROM read_csv(['{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/1 -- ok == -SELECT typeof(bar) FROM read_csv(['{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/2.csv','{DATA_DIR}/csv/17451/extra/3.csv'], files_to_sniff = 5) limit 1 +SELECT column_type FROM (DESCRIBE SELECT bar FROM read_csv(['{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/2.csv','{DATA_DIR}/csv/17451/extra/3.csv'], files_to_sniff = 5)) -- ok == diff --git a/parser/testdata/corpus/sql/copy/csv/test_greek_utf8.test b/parser/testdata/corpus/sql/copy/csv/test_greek_utf8.test index 2b5b922..e79bb79 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_greek_utf8.test +++ b/parser/testdata/corpus/sql/copy/csv/test_greek_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_greek_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE greek_utf8 AS SELECT i, nfc_normalize(j) j, k FROM read_csv('{DATA_DIR}/csv/real/greek_utf8.csv', columns=STRUCT_PACK(i := 'INTEGER', j := 'VARCHAR', k := 'INTEGER'), delim='|') diff --git a/parser/testdata/corpus/sql/copy/csv/test_gzip_large_member_header.test b/parser/testdata/corpus/sql/copy/csv/test_gzip_large_member_header.test new file mode 100644 index 0000000..d5683b5 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/test_gzip_large_member_header.test @@ -0,0 +1,9 @@ +# source: test/sql/copy/csv/test_gzip_large_member_header.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_csv('data/csv/gzip_large_extra_field.csv.gz'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_header_only.test b/parser/testdata/corpus/sql/copy/csv/test_header_only.test index cf6d133..5443fab 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_header_only.test +++ b/parser/testdata/corpus/sql/copy/csv/test_header_only.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_header_only.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT columns from sniff_csv('{DATA_DIR}/csv/header_only.csv', header=True, ignore_errors=True) diff --git a/parser/testdata/corpus/sql/copy/csv/test_headers_12089.test b/parser/testdata/corpus/sql/copy/csv/test_headers_12089.test index d39e2c7..caac30f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_headers_12089.test +++ b/parser/testdata/corpus/sql/copy/csv/test_headers_12089.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_headers_12089.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select columns FROM sniff_csv('{DATA_DIR}/csv/headers/escaped_quote.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_hits_problematic.test b/parser/testdata/corpus/sql/copy/csv/test_hits_problematic.test index bcc2702..f5242ac 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_hits_problematic.test +++ b/parser/testdata/corpus/sql/copy/csv/test_hits_problematic.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_hits_problematic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/hits_problematic.csv', auto_detect=false, delim=',', quote='"', escape='\', new_line='\n', skip=0, comment='', header=false, columns={'column000': 'BIGINT', 'column001': 'BIGINT', 'column002': 'VARCHAR', 'column003': 'BIGINT', 'column004': 'TIMESTAMP', 'column005': 'DATE', 'column006': 'BIGINT', 'column007': 'BIGINT', 'column008': 'BIGINT', 'column009': 'BIGINT', 'column010': 'BIGINT', 'column011': 'BIGINT', 'column012': 'BIGINT', 'column013': 'VARCHAR', 'column014': 'VARCHAR', 'column015': 'BIGINT', 'column016': 'BIGINT', 'column017': 'BIGINT', 'column018': 'BIGINT', 'column019': 'BIGINT', 'column020': 'BIGINT', 'column021': 'BIGINT', 'column022': 'BIGINT', 'column023': 'BIGINT', 'column024': 'BIGINT', 'column025': 'DOUBLE', 'column026': 'BIGINT', 'column027': 'BIGINT', 'column028': 'BIGINT', 'column029': 'VARCHAR', 'column030': 'BIGINT', 'column031': 'BIGINT', 'column032': 'BIGINT', 'column033': 'BIGINT', 'column034': 'VARCHAR', 'column035': 'VARCHAR', 'column036': 'BIGINT', 'column037': 'BIGINT', 'column038': 'BIGINT', 'column039': 'VARCHAR', 'column040': 'BIGINT', 'column041': 'BIGINT', 'column042': 'BIGINT', 'column043': 'BIGINT', 'column044': 'BIGINT', 'column045': 'TIMESTAMP', 'column046': 'BIGINT', 'column047': 'BIGINT', 'column048': 'BIGINT', 'column049': 'BIGINT', 'column050': 'VARCHAR', 'column051': 'BIGINT', 'column052': 'BIGINT', 'column053': 'BIGINT', 'column054': 'BIGINT', 'column055': 'BIGINT', 'column056': 'VARCHAR', 'column057': 'BIGINT', 'column058': 'BIGINT', 'column059': 'BIGINT', 'column060': 'BIGINT', 'column061': 'BIGINT', 'column062': 'BIGINT', 'column063': 'VARCHAR', 'column064': 'TIMESTAMP', 'column065': 'BIGINT', 'column066': 'BIGINT', 'column067': 'BIGINT', 'column068': 'BIGINT', 'column069': 'BIGINT', 'column070': 'BIGINT', 'column071': 'BIGINT', 'column072': 'BIGINT', 'column073': 'BIGINT', 'column074': 'VARCHAR', 'column075': 'VARCHAR', 'column076': 'VARCHAR', 'column077': 'VARCHAR', 'column078': 'BIGINT', 'column079': 'BIGINT', 'column080': 'BIGINT', 'column081': 'BIGINT', 'column082': 'BIGINT', 'column083': 'BIGINT', 'column084': 'BIGINT', 'column085': 'BIGINT', 'column086': 'VARCHAR', 'column087': 'BIGINT', 'column088': 'VARCHAR', 'column089': 'VARCHAR', 'column090': 'BIGINT', 'column091': 'VARCHAR', 'column092': 'VARCHAR', 'column093': 'VARCHAR', 'column094': 'VARCHAR', 'column095': 'VARCHAR', 'column096': 'VARCHAR', 'column097': 'VARCHAR', 'column098': 'VARCHAR', 'column099': 'VARCHAR', 'column100': 'VARCHAR', 'column101': 'BIGINT', 'column102': 'BIGINT', 'column103': 'BIGINT', 'column104': 'BIGINT'}, dateformat='%Y-%m-%d'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_ignore_errors.test b/parser/testdata/corpus/sql/copy/csv/test_ignore_errors.test index 685816e..ccc586f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_ignore_errors.test +++ b/parser/testdata/corpus/sql/copy/csv/test_ignore_errors.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_ignore_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY integers FROM '{DATA_DIR}/csv/test/error_too_little.csv' (HEADER, IGNORE_ERRORS, NULL_PADDING FALSE) diff --git a/parser/testdata/corpus/sql/copy/csv/test_ignore_errors_end_of_chunk.test b/parser/testdata/corpus/sql/copy/csv/test_ignore_errors_end_of_chunk.test index 9f4dc3e..522fc36 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_ignore_errors_end_of_chunk.test +++ b/parser/testdata/corpus/sql/copy/csv/test_ignore_errors_end_of_chunk.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_ignore_errors_end_of_chunk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY integers FROM '{DATA_DIR}/csv/test/error_too_little_end_of_filled_chunk.csv' (HEADER, IGNORE_ERRORS, NULL_PADDING 0, AUTO_DETECT 0) diff --git a/parser/testdata/corpus/sql/copy/csv/test_ignore_mid_null_line.test b/parser/testdata/corpus/sql/copy/csv/test_ignore_mid_null_line.test index 337a524..36254b1 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_ignore_mid_null_line.test +++ b/parser/testdata/corpus/sql/copy/csv/test_ignore_mid_null_line.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_ignore_mid_null_line.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/error/mid_null.csv', delim = ';', diff --git a/parser/testdata/corpus/sql/copy/csv/test_imdb.test b/parser/testdata/corpus/sql/copy/csv/test_imdb.test index c826eb0..fac452c 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_imdb.test +++ b/parser/testdata/corpus/sql/copy/csv/test_imdb.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_imdb.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE movie_info (id integer NOT NULL PRIMARY KEY, movie_id integer NOT NULL, info_type_id integer NOT NULL, info text NOT NULL, note text); diff --git a/parser/testdata/corpus/sql/copy/csv/test_infinite_loop_escape.test b/parser/testdata/corpus/sql/copy/csv/test_infinite_loop_escape.test index 721fabb..8755db5 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_infinite_loop_escape.test +++ b/parser/testdata/corpus/sql/copy/csv/test_infinite_loop_escape.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_infinite_loop_escape.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE trigger_loop (a VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/csv/test_insert_into_types.test b/parser/testdata/corpus/sql/copy/csv/test_insert_into_types.test index 7d3bbfc..d11ee8e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_insert_into_types.test +++ b/parser/testdata/corpus/sql/copy/csv/test_insert_into_types.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_insert_into_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE users ( diff --git a/parser/testdata/corpus/sql/copy/csv/test_issue3562_assertion.test b/parser/testdata/corpus/sql/copy/csv/test_issue3562_assertion.test index b96b619..42968d8 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_issue3562_assertion.test +++ b/parser/testdata/corpus/sql/copy/csv/test_issue3562_assertion.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_issue3562_assertion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as SELECT * FROM read_csv('{DATA_DIR}/csv/test/issue3562_assertion.csv.gz', columns={'OBJECTID': 'DECIMAL(18,3)', 'URL': 'TEXT', 'NAME': 'TEXT', 'the_geom':'TEXT', 'LINE': 'TEXT'}); diff --git a/parser/testdata/corpus/sql/copy/csv/test_issue5077.test b/parser/testdata/corpus/sql/copy/csv/test_issue5077.test index 7441d55..312917f 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_issue5077.test +++ b/parser/testdata/corpus/sql/copy/csv/test_issue5077.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_issue5077.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/csv/issue5077_aligned.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_lineitem.test b/parser/testdata/corpus/sql/copy/csv/test_lineitem.test index e939754..6634edc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_lineitem.test +++ b/parser/testdata/corpus/sql/copy/csv/test_lineitem.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_lineitem.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY lineitem FROM '{DATA_DIR}/csv/real/lineitem_sample.csv' DELIMITER '|' diff --git a/parser/testdata/corpus/sql/copy/csv/test_lineitem_gz.test b/parser/testdata/corpus/sql/copy/csv/test_lineitem_gz.test index 58d5f28..4d95ef5 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_lineitem_gz.test +++ b/parser/testdata/corpus/sql/copy/csv/test_lineitem_gz.test @@ -1,32 +1,27 @@ # source: test/sql/copy/csv/test_lineitem_gz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CALL dbgen(sf=10); +SET threads=2; -- ok == -copy lineitem to '{TEST_DIR}/lineitem1.csv.gz' +CALL dbgen(sf=0.01); -- ok == -set memory_limit='32gb'; +COPY lineitem TO '{TEST_DIR}/lineitem.csv.gz' (FORMAT CSV, COMPRESSION GZIP, HEADER); -- ok == -select count(*) from read_csv([ -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz', -'{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz','{TEST_DIR}/lineitem1.csv.gz' -]); +SET memory_limit='32MiB'; +-- +ok +== +SELECT count(*), sum(l_orderkey) = 50 * (SELECT sum(l_orderkey) FROM lineitem) +FROM read_csv(list_transform(range(50), lambda i: '{TEST_DIR}/lineitem.csv.gz'), + buffer_size=1048576, max_line_size=65536); -- ok == diff --git a/parser/testdata/corpus/sql/copy/csv/test_linesize.test b/parser/testdata/corpus/sql/copy/csv/test_linesize.test index d44934b..316815a 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_linesize.test +++ b/parser/testdata/corpus/sql/copy/csv/test_linesize.test @@ -1,9 +1,13 @@ # source: test/sql/copy/csv/test_linesize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/15473.csv', max_line_size = 10) -- ok == +FROM read_csv('{DATA_DIR}/csv/15473.csv', max_line_size = 1152921504606846976) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_long_line.test b/parser/testdata/corpus/sql/copy/csv/test_long_line.test index 9073b91..87206ba 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_long_line.test +++ b/parser/testdata/corpus/sql/copy/csv/test_long_line.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_long_line.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b VARCHAR, c INTEGER); diff --git a/parser/testdata/corpus/sql/copy/csv/test_many_columns.test b/parser/testdata/corpus/sql/copy/csv/test_many_columns.test index b65e247..63fae46 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_many_columns.test +++ b/parser/testdata/corpus/sql/copy/csv/test_many_columns.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_many_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT * FROM read_csv_auto('{DATA_DIR}/csv/manycolumns.csv'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_mismatch_schemas.test b/parser/testdata/corpus/sql/copy/csv/test_mismatch_schemas.test index a513c26..d21f30e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_mismatch_schemas.test +++ b/parser/testdata/corpus/sql/copy/csv/test_mismatch_schemas.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_mismatch_schemas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv(['{DATA_DIR}/csv/multiple_files/more_columns/file_1.csv','{DATA_DIR}/csv/multiple_files/more_columns/file_2.csv', diff --git a/parser/testdata/corpus/sql/copy/csv/test_missing_row.test b/parser/testdata/corpus/sql/copy/csv/test_missing_row.test index 2271e78..c531f35 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_missing_row.test +++ b/parser/testdata/corpus/sql/copy/csv/test_missing_row.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_missing_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/customer.4.csv', auto_detect=false, delim='|', quote='"', escape='"', new_line='\n', skip=0, header=false, columns = {'c_custkey': 'BIGINT', 'c_name': 'VARCHAR', 'c_address': 'VARCHAR', 'c_nationkey': 'INTEGER', 'c_phone': 'VARCHAR', 'c_acctbal': 'DECIMAL(15, 2)', 'c_mktsegment': 'VARCHAR', 'c_comment': 'VARCHAR'}, parallel=true, buffer_size = 300); diff --git a/parser/testdata/corpus/sql/copy/csv/test_mixed_line_endings.test b/parser/testdata/corpus/sql/copy/csv/test_mixed_line_endings.test index d6e7e7d..8ba2d85 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_mixed_line_endings.test +++ b/parser/testdata/corpus/sql/copy/csv/test_mixed_line_endings.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_mixed_line_endings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into test select * from read_csv_auto('{DATA_DIR}/csv/test/mixed_line_endings.csv', strict_mode=false); diff --git a/parser/testdata/corpus/sql/copy/csv/test_mixed_new_line.test b/parser/testdata/corpus/sql/copy/csv/test_mixed_new_line.test index f6327d2..b7d4675 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_mixed_new_line.test +++ b/parser/testdata/corpus/sql/copy/csv/test_mixed_new_line.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_mixed_new_line.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/mixed_new_line.csv', strict_mode=false) diff --git a/parser/testdata/corpus/sql/copy/csv/test_ncvoter.test b/parser/testdata/corpus/sql/copy/csv/test_ncvoter.test index 4ef7115..667c731 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_ncvoter.test +++ b/parser/testdata/corpus/sql/copy/csv/test_ncvoter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_ncvoter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ncvoters FROM '{DATA_DIR}/csv/real/ncvoter.csv' DELIMITER ' '; diff --git a/parser/testdata/corpus/sql/copy/csv/test_nfc.test b/parser/testdata/corpus/sql/copy/csv/test_nfc.test index bedd69b..cf8f487 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_nfc.test +++ b/parser/testdata/corpus/sql/copy/csv/test_nfc.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_nfc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nfcstrings (s STRING); diff --git a/parser/testdata/corpus/sql/copy/csv/test_nfc_suite.test b/parser/testdata/corpus/sql/copy/csv/test_nfc_suite.test index 2c9d4c5..80da60b 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_nfc_suite.test +++ b/parser/testdata/corpus/sql/copy/csv/test_nfc_suite.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_nfc_suite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nfcstrings (source STRING, nfc STRING, nfd STRING); diff --git a/parser/testdata/corpus/sql/copy/csv/test_non_unicode_header.test b/parser/testdata/corpus/sql/copy/csv/test_non_unicode_header.test index 82444a5..5b8c8dc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_non_unicode_header.test +++ b/parser/testdata/corpus/sql/copy/csv/test_non_unicode_header.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_non_unicode_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit drop table if exists reject_errors; diff --git a/parser/testdata/corpus/sql/copy/csv/test_null_padding_projection.test b/parser/testdata/corpus/sql/copy/csv/test_null_padding_projection.test index b361b94..127ab0a 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_null_padding_projection.test +++ b/parser/testdata/corpus/sql/copy/csv/test_null_padding_projection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_null_padding_projection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/nullpadding.csv',null_padding=true, columns={ diff --git a/parser/testdata/corpus/sql/copy/csv/test_null_padding_union.test b/parser/testdata/corpus/sql/copy/csv/test_null_padding_union.test index b2c1e80..cb6af64 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_null_padding_union.test +++ b/parser/testdata/corpus/sql/copy/csv/test_null_padding_union.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_null_padding_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view v as diff --git a/parser/testdata/corpus/sql/copy/csv/test_ontime.test b/parser/testdata/corpus/sql/copy/csv/test_ontime.test index 390509d..158fcc6 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_ontime.test +++ b/parser/testdata/corpus/sql/copy/csv/test_ontime.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_ontime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ontime(year SMALLINT, quarter SMALLINT, month SMALLINT, dayofmonth SMALLINT, dayofweek SMALLINT, flightdate DATE, uniquecarrier CHAR(7), airlineid DECIMAL(8,2), carrier CHAR(2), tailnum VARCHAR(50), flightnum VARCHAR(10), originairportid INTEGER, originairportseqid INTEGER, origincitymarketid INTEGER, origin CHAR(5), origincityname VARCHAR(100), originstate CHAR(2), originstatefips VARCHAR(10), originstatename VARCHAR(100), originwac DECIMAL(8,2), destairportid INTEGER, destairportseqid INTEGER, destcitymarketid INTEGER, dest CHAR(5), destcityname VARCHAR(100), deststate CHAR(2), deststatefips VARCHAR(10), deststatename VARCHAR(100), destwac DECIMAL(8,2), crsdeptime DECIMAL(8,2), deptime DECIMAL(8,2), depdelay DECIMAL(8,2), depdelayminutes DECIMAL(8,2), depdel15 DECIMAL(8,2), departuredelaygroups DECIMAL(8,2), deptimeblk VARCHAR(20), taxiout DECIMAL(8,2), wheelsoff DECIMAL(8,2), wheelson DECIMAL(8,2), taxiin DECIMAL(8,2), crsarrtime DECIMAL(8,2), arrtime DECIMAL(8,2), arrdelay DECIMAL(8,2), arrdelayminutes DECIMAL(8,2), arrdel15 DECIMAL(8,2), arrivaldelaygroups DECIMAL(8,2), arrtimeblk VARCHAR(20), cancelled SMALLINT, cancellationcode CHAR(1), diverted SMALLINT, crselapsedtime DECIMAL(8,2), actualelapsedtime DECIMAL(8,2), airtime DECIMAL(8,2), flights DECIMAL(8,2), distance DECIMAL(8,2), distancegroup SMALLINT, carrierdelay DECIMAL(8,2), weatherdelay DECIMAL(8,2), nasdelay DECIMAL(8,2), securitydelay DECIMAL(8,2), lateaircraftdelay DECIMAL(8,2), firstdeptime VARCHAR(10), totaladdgtime VARCHAR(10), longestaddgtime VARCHAR(10), divairportlandings VARCHAR(10), divreacheddest VARCHAR(10), divactualelapsedtime VARCHAR(10), divarrdelay VARCHAR(10), divdistance VARCHAR(10), div1airport VARCHAR(10), div1aiportid INTEGER, div1airportseqid INTEGER, div1wheelson VARCHAR(10), div1totalgtime VARCHAR(10), div1longestgtime VARCHAR(10), div1wheelsoff VARCHAR(10), div1tailnum VARCHAR(10), div2airport VARCHAR(10), div2airportid INTEGER, div2airportseqid INTEGER, div2wheelson VARCHAR(10), div2totalgtime VARCHAR(10), div2longestgtime VARCHAR(10), div2wheelsoff VARCHAR(10), div2tailnum VARCHAR(10), div3airport VARCHAR(10), div3airportid INTEGER, div3airportseqid INTEGER, div3wheelson VARCHAR(10), div3totalgtime VARCHAR(10), div3longestgtime VARCHAR(10), div3wheelsoff VARCHAR(10), div3tailnum VARCHAR(10), div4airport VARCHAR(10), div4airportid INTEGER, div4airportseqid INTEGER, div4wheelson VARCHAR(10), div4totalgtime VARCHAR(10), div4longestgtime VARCHAR(10), div4wheelsoff VARCHAR(10), div4tailnum VARCHAR(10), div5airport VARCHAR(10), div5airportid INTEGER, div5airportseqid INTEGER, div5wheelson VARCHAR(10), div5totalgtime VARCHAR(10), div5longestgtime VARCHAR(10), div5wheelsoff VARCHAR(10), div5tailnum VARCHAR(10)); diff --git a/parser/testdata/corpus/sql/copy/csv/test_parallel_nullpadding.test b/parser/testdata/corpus/sql/copy/csv/test_parallel_nullpadding.test index 3935efd..0a3824b 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_parallel_nullpadding.test +++ b/parser/testdata/corpus/sql/copy/csv/test_parallel_nullpadding.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_parallel_nullpadding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from read_csv('{DATA_DIR}/csv/evil_nullpadding.csv', delim = ';', quote = '"', null_padding = True, header = 0) diff --git a/parser/testdata/corpus/sql/copy/csv/test_partition_compression.test b/parser/testdata/corpus/sql/copy/csv/test_partition_compression.test index cf77aea..b6ee3c6 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_partition_compression.test +++ b/parser/testdata/corpus/sql/copy/csv/test_partition_compression.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_partition_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS VALUES ('a', 'foo', 1), ('a', 'foo', 2), ('a', 'bar', 1), ('b', 'bar', 1); diff --git a/parser/testdata/corpus/sql/copy/csv/test_prefix_suffix.test b/parser/testdata/corpus/sql/copy/csv/test_prefix_suffix.test index d7eed84..a54f0dc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_prefix_suffix.test +++ b/parser/testdata/corpus/sql/copy/csv/test_prefix_suffix.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_prefix_suffix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42) to '{TEST_DIR}/file.csv' (prefix 'a'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_quote_default.test b/parser/testdata/corpus/sql/copy/csv/test_quote_default.test index ac4178e..d80e200 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_quote_default.test +++ b/parser/testdata/corpus/sql/copy/csv/test_quote_default.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_quote_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/test_default_option.csv', columns = {'a':'varchar', 'b':'integer'}, auto_detect = false, header = true) where b = 1 diff --git a/parser/testdata/corpus/sql/copy/csv/test_quoted_later_escaped.test b/parser/testdata/corpus/sql/copy/csv/test_quoted_later_escaped.test index 2798103..c0a60dc 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_quoted_later_escaped.test +++ b/parser/testdata/corpus/sql/copy/csv/test_quoted_later_escaped.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_quoted_later_escaped.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T as select '1, "Oogie Boogie"' from range (100000) diff --git a/parser/testdata/corpus/sql/copy/csv/test_quoted_newline.test b/parser/testdata/corpus/sql/copy/csv/test_quoted_newline.test index f0a8a1d..453c9ca 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_quoted_newline.test +++ b/parser/testdata/corpus/sql/copy/csv/test_quoted_newline.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_quoted_newline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY test FROM '{DATA_DIR}/csv/test/quoted_newline.csv' (DELIMITER ',', AUTO_DETECT 0); diff --git a/parser/testdata/corpus/sql/copy/csv/test_read_csv.test b/parser/testdata/corpus/sql/copy/csv/test_read_csv.test index 0da407e..dae286b 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_read_csv.test +++ b/parser/testdata/corpus/sql/copy/csv/test_read_csv.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_read_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select delimiter, quote FROM sniff_csv('{DATA_DIR}/csv/stats_3_muta_10_21.csv') diff --git a/parser/testdata/corpus/sql/copy/csv/test_replacement_scan_alias.test b/parser/testdata/corpus/sql/copy/csv/test_replacement_scan_alias.test index ba84666..f7709e3 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_replacement_scan_alias.test +++ b/parser/testdata/corpus/sql/copy/csv/test_replacement_scan_alias.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_replacement_scan_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/csv/test/dateformat.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/test_segfault.test b/parser/testdata/corpus/sql/copy/csv/test_segfault.test index 022efe1..7cf03d2 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_segfault.test +++ b/parser/testdata/corpus/sql/copy/csv/test_segfault.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_segfault.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from '{DATA_DIR}/csv/fuzzing/{i}.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_skip_bom.test b/parser/testdata/corpus/sql/copy/csv/test_skip_bom.test index c3aef36..2c0fbb2 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_skip_bom.test +++ b/parser/testdata/corpus/sql/copy/csv/test_skip_bom.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_skip_bom.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE people AS SELECT * FROM read_csv('{DATA_DIR}/csv/people.csv', columns=STRUCT_PACK(a := 'VARCHAR', b := 'VARCHAR'), sep=',', auto_detect='false'); diff --git a/parser/testdata/corpus/sql/copy/csv/test_skip_header.test b/parser/testdata/corpus/sql/copy/csv/test_skip_header.test index 7f4891c..c5d6db7 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_skip_header.test +++ b/parser/testdata/corpus/sql/copy/csv/test_skip_header.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_skip_header.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/csv/skip_header.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_sniff_csv.test b/parser/testdata/corpus/sql/copy/csv/test_sniff_csv.test index 0c90eca..7558247 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_sniff_csv.test +++ b/parser/testdata/corpus/sql/copy/csv/test_sniff_csv.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_sniff_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT quote, escape from sniff_csv('{DATA_DIR}/csv/16857.csv', ignore_errors = true); diff --git a/parser/testdata/corpus/sql/copy/csv/test_sniff_csv_options.test b/parser/testdata/corpus/sql/copy/csv/test_sniff_csv_options.test index 23e3288..2246e88 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_sniff_csv_options.test +++ b/parser/testdata/corpus/sql/copy/csv/test_sniff_csv_options.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_sniff_csv_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM sniff_csv('{DATA_DIR}/csv/real/lineitem_sample.csv', delim = ','); diff --git a/parser/testdata/corpus/sql/copy/csv/test_sniffer_hang.test b/parser/testdata/corpus/sql/copy/csv/test_sniffer_hang.test index b7ef110..def914d 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_sniffer_hang.test +++ b/parser/testdata/corpus/sql/copy/csv/test_sniffer_hang.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_sniffer_hang.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/bad_csv_file_2047.csv', sample_size = -1) diff --git a/parser/testdata/corpus/sql/copy/csv/test_sniffer_tab_delimiter.test b/parser/testdata/corpus/sql/copy/csv/test_sniffer_tab_delimiter.test index d0bf993..66db4f7 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_sniffer_tab_delimiter.test +++ b/parser/testdata/corpus/sql/copy/csv/test_sniffer_tab_delimiter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_sniffer_tab_delimiter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select columns from sniff_csv('{DATA_DIR}/csv/test_apple_financial.csv.gz', header = 1, skip=3, delim = '\t') diff --git a/parser/testdata/corpus/sql/copy/csv/test_soccer_kaggle.test b/parser/testdata/corpus/sql/copy/csv/test_soccer_kaggle.test index b46289b..c22d970 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_soccer_kaggle.test +++ b/parser/testdata/corpus/sql/copy/csv/test_soccer_kaggle.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_soccer_kaggle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from '{DATA_DIR}/csv/soccer_kaggle.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/test_thijs_unquoted_file.test b/parser/testdata/corpus/sql/copy/csv/test_thijs_unquoted_file.test index db8e221..a49699b 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_thijs_unquoted_file.test +++ b/parser/testdata/corpus/sql/copy/csv/test_thijs_unquoted_file.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_thijs_unquoted_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/thijs_unquoted.csv', quote='"', sep='|', escape='"', columns={'a':'varchar', 'b': 'varchar', 'c': 'integer'}, auto_detect=false); diff --git a/parser/testdata/corpus/sql/copy/csv/test_thousands_separator.test b/parser/testdata/corpus/sql/copy/csv/test_thousands_separator.test index 4533875..e546b4e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_thousands_separator.test +++ b/parser/testdata/corpus/sql/copy/csv/test_thousands_separator.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_thousands_separator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/thousands_separator/simple.csv', thousands = NULL, delim = NULL) diff --git a/parser/testdata/corpus/sql/copy/csv/test_time.test b/parser/testdata/corpus/sql/copy/csv/test_time.test index 2465ecf..46164e6 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_time.test +++ b/parser/testdata/corpus/sql/copy/csv/test_time.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from read_csv('{DATA_DIR}/csv/auto/invalid_time.csv', header = 0) diff --git a/parser/testdata/corpus/sql/copy/csv/test_timestamp_offset.test b/parser/testdata/corpus/sql/copy/csv/test_timestamp_offset.test index 14bd84f..5218331 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_timestamp_offset.test +++ b/parser/testdata/corpus/sql/copy/csv/test_timestamp_offset.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_timestamp_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT col1, typeof(col1) FROM '{DATA_DIR}/csv/test/timestampoffset.csv' t1(col1); diff --git a/parser/testdata/corpus/sql/copy/csv/test_timestamptz_12926.test b/parser/testdata/corpus/sql/copy/csv/test_timestamptz_12926.test index 3892f2e..a74f06e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_timestamptz_12926.test +++ b/parser/testdata/corpus/sql/copy/csv/test_timestamptz_12926.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_timestamptz_12926.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/timestamp_tz.csv', dtypes = [TIMESTAMPTZ]); diff --git a/parser/testdata/corpus/sql/copy/csv/test_union_by_name.test b/parser/testdata/corpus/sql/copy/csv/test_union_by_name.test index f84369c..633b4b6 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/csv/test_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ubn1 TO '{TEMP_DIR}/ubn1.csv' WITH ( DELIMITER ','); diff --git a/parser/testdata/corpus/sql/copy/csv/test_union_by_name_types.test b/parser/testdata/corpus/sql/copy/csv/test_union_by_name_types.test index 29bfa8d..c252c16 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_union_by_name_types.test +++ b/parser/testdata/corpus/sql/copy/csv/test_union_by_name_types.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_union_by_name_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(#1), typeof(#2), typeof(#3), typeof(#4), typeof(#5), typeof(#6), typeof(#7), typeof(#8), typeof(#9), typeof(#10), typeof(#11), typeof(#12), typeof(#13) diff --git a/parser/testdata/corpus/sql/copy/csv/test_utf16_odd_length.test b/parser/testdata/corpus/sql/copy/csv/test_utf16_odd_length.test new file mode 100644 index 0000000..46a18a3 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/csv/test_utf16_odd_length.test @@ -0,0 +1,9 @@ +# source: test/sql/copy/csv/test_utf16_odd_length.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +FROM read_csv('data/csv/encodings/utf16_odd_length.csv', encoding = 'utf-16', header = false); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/csv/test_validator.test b/parser/testdata/corpus/sql/copy/csv/test_validator.test index 4378704..1af1b2e 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_validator.test +++ b/parser/testdata/corpus/sql/copy/csv/test_validator.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_validator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/evil_nullpadding.csv', buffer_size=20, quote = '"') diff --git a/parser/testdata/corpus/sql/copy/csv/test_web_page.test b/parser/testdata/corpus/sql/copy/csv/test_web_page.test index ab26284..bcc23b7 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_web_page.test +++ b/parser/testdata/corpus/sql/copy/csv/test_web_page.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_web_page.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE web_page(wp_web_page_sk integer not null, wp_web_page_id char(16) not null, wp_rec_start_date date, wp_rec_end_date date, wp_creation_date_sk integer, wp_access_date_sk integer, wp_autogen_flag char(1), wp_customer_sk integer, wp_url varchar(100), wp_type char(50), wp_char_count integer, wp_link_count integer, wp_image_count integer, wp_max_ad_count integer, primary key (wp_web_page_sk)); diff --git a/parser/testdata/corpus/sql/copy/csv/test_windows_newline.test b/parser/testdata/corpus/sql/copy/csv/test_windows_newline.test index 7ac979a..200e005 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_windows_newline.test +++ b/parser/testdata/corpus/sql/copy/csv/test_windows_newline.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_windows_newline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY test FROM '{DATA_DIR}/csv/test/windows_newline.csv'; diff --git a/parser/testdata/corpus/sql/copy/csv/test_wrong_newline_delimiter.test b/parser/testdata/corpus/sql/copy/csv/test_wrong_newline_delimiter.test index 0ceb593..5cc07a3 100644 --- a/parser/testdata/corpus/sql/copy/csv/test_wrong_newline_delimiter.test +++ b/parser/testdata/corpus/sql/copy/csv/test_wrong_newline_delimiter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/test_wrong_newline_delimiter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_csv('{DATA_DIR}/csv/timestamp.csv', columns = {'a': 'BIGINT'}, new_line= '\r', strict_mode=false) diff --git a/parser/testdata/corpus/sql/copy/csv/timestamp_with_tz.test b/parser/testdata/corpus/sql/copy/csv/timestamp_with_tz.test index 36f7f08..f7bcb02 100644 --- a/parser/testdata/corpus/sql/copy/csv/timestamp_with_tz.test +++ b/parser/testdata/corpus/sql/copy/csv/timestamp_with_tz.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/timestamp_with_tz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(id int, ts timestamp); diff --git a/parser/testdata/corpus/sql/copy/csv/tsv_copy.test b/parser/testdata/corpus/sql/copy/csv/tsv_copy.test index ead30f1..754be0f 100644 --- a/parser/testdata/corpus/sql/copy/csv/tsv_copy.test +++ b/parser/testdata/corpus/sql/copy/csv/tsv_copy.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/tsv_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE people(id INTEGER, name VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/csv/unicode_filename.test b/parser/testdata/corpus/sql/copy/csv/unicode_filename.test index 2cc93ec..a634b68 100644 --- a/parser/testdata/corpus/sql/copy/csv/unicode_filename.test +++ b/parser/testdata/corpus/sql/copy/csv/unicode_filename.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/unicode_filename.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/csv/issue2628_中文.csv' diff --git a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/basic.test b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/basic.test index cdbc5e1..91fd2df 100644 --- a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/basic.test +++ b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/basic.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/unquoted_escape/basic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv('{DATA_DIR}/csv/unquoted_escape/plain.csv', escape = '\', sep = ',', strict_mode = false, nullstr = '\N'); diff --git a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/human_eval.test b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/human_eval.test index a6dcade..a7f255a 100644 --- a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/human_eval.test +++ b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/human_eval.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/unquoted_escape/human_eval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE human_eval_jsonl AS diff --git a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/identical.test b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/identical.test index 927b225..73078d7 100644 --- a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/identical.test +++ b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/identical.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/unquoted_escape/identical.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT concat('#', columns(*), '#') FROM read_csv('{DATA_DIR}/csv/unquoted_escape/identical.csv', quote = '"', escape = '"', sep = ',', strict_mode = false); diff --git a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/mixed.test b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/mixed.test index 14e3d7e..233d4a7 100644 --- a/parser/testdata/corpus/sql/copy/csv/unquoted_escape/mixed.test +++ b/parser/testdata/corpus/sql/copy/csv/unquoted_escape/mixed.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/unquoted_escape/mixed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/copy/csv/write_header_default.test b/parser/testdata/corpus/sql/copy/csv/write_header_default.test index c9cbba2..66eb2a7 100644 --- a/parser/testdata/corpus/sql/copy/csv/write_header_default.test +++ b/parser/testdata/corpus/sql/copy/csv/write_header_default.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/write_header_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (a integer) diff --git a/parser/testdata/corpus/sql/copy/csv/zstd_crash.test b/parser/testdata/corpus/sql/copy/csv/zstd_crash.test index aafe159..dc6d1b5 100644 --- a/parser/testdata/corpus/sql/copy/csv/zstd_crash.test +++ b/parser/testdata/corpus/sql/copy/csv/zstd_crash.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/zstd_crash.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_zst AS SELECT * FROM read_csv('{DATA_DIR}/csv/broken/test.csv.zst', AUTO_DETECT=TRUE); diff --git a/parser/testdata/corpus/sql/copy/csv/zstd_fs.test b/parser/testdata/corpus/sql/copy/csv/zstd_fs.test index aea6d61..a814c26 100644 --- a/parser/testdata/corpus/sql/copy/csv/zstd_fs.test +++ b/parser/testdata/corpus/sql/copy/csv/zstd_fs.test @@ -1,6 +1,6 @@ # source: test/sql/copy/csv/zstd_fs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY lineitem FROM '{DATA_DIR}/csv/zstd/lineitem1k.tbl.zst' DELIMITER '|'; diff --git a/parser/testdata/corpus/sql/copy/encryption/concurrent_encrypted_attach.test b/parser/testdata/corpus/sql/copy/encryption/concurrent_encrypted_attach.test index 30c4779..85b3725 100644 --- a/parser/testdata/corpus/sql/copy/encryption/concurrent_encrypted_attach.test +++ b/parser/testdata/corpus/sql/copy/encryption/concurrent_encrypted_attach.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/concurrent_encrypted_attach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/concurrent_encrypted{i}.duckdb' AS encrypted{i} (ENCRYPTION_KEY 'asdf{i}'); diff --git a/parser/testdata/corpus/sql/copy/encryption/different_aes_ciphers.test b/parser/testdata/corpus/sql/copy/encryption/different_aes_ciphers.test index 530a939..c8b3501 100644 --- a/parser/testdata/corpus/sql/copy/encryption/different_aes_ciphers.test +++ b/parser/testdata/corpus/sql/copy/encryption/different_aes_ciphers.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/different_aes_ciphers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted.duckdb' AS encrypted (ENCRYPTION_KEY 'asdf', ENCRYPTION_CIPHER 'random'); diff --git a/parser/testdata/corpus/sql/copy/encryption/different_encryption_versions_and_ciphers.test b/parser/testdata/corpus/sql/copy/encryption/different_encryption_versions_and_ciphers.test index c969544..7c04d4f 100644 --- a/parser/testdata/corpus/sql/copy/encryption/different_encryption_versions_and_ciphers.test +++ b/parser/testdata/corpus/sql/copy/encryption/different_encryption_versions_and_ciphers.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/different_encryption_versions_and_ciphers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted_{cipher}_{version}.duckdb' AS encrypted_{cipher}_{version} (ENCRYPTION_KEY 'asdf', ENCRYPTION_CIPHER '{cipher}', debug_encryption_version 'v9'); diff --git a/parser/testdata/corpus/sql/copy/encryption/encryption_storage_versions.test b/parser/testdata/corpus/sql/copy/encryption/encryption_storage_versions.test index c83a1b3..a587b05 100644 --- a/parser/testdata/corpus/sql/copy/encryption/encryption_storage_versions.test +++ b/parser/testdata/corpus/sql/copy/encryption/encryption_storage_versions.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/encryption_storage_versions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/unencrypted.duckdb' as unencrypted; diff --git a/parser/testdata/corpus/sql/copy/encryption/force_mbedtls.test b/parser/testdata/corpus/sql/copy/encryption/force_mbedtls.test index 60bfd6d..0b92508 100644 --- a/parser/testdata/corpus/sql/copy/encryption/force_mbedtls.test +++ b/parser/testdata/corpus/sql/copy/encryption/force_mbedtls.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/force_mbedtls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_mbedtls_unsafe = 'true'; diff --git a/parser/testdata/corpus/sql/copy/encryption/test_different_encryption_versions.test b/parser/testdata/corpus/sql/copy/encryption/test_different_encryption_versions.test index 6cf4077..60694ea 100644 --- a/parser/testdata/corpus/sql/copy/encryption/test_different_encryption_versions.test +++ b/parser/testdata/corpus/sql/copy/encryption/test_different_encryption_versions.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/test_different_encryption_versions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted_invalid.duckdb' AS encrypted_invalid (ENCRYPTION_KEY 'asdf', STORAGE_VERSION 'v1.4.0', debug_encryption_version 'v1'); @@ -39,10 +39,6 @@ USE unencrypted; -- ok == -CALL dbgen(sf=0.01); --- -ok -== COPY FROM DATABASE unencrypted to encrypted_storage_version; -- ok diff --git a/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted.test b/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted.test index ca710d2..aa9bfae 100644 --- a/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted.test +++ b/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/unencrypted_to_encrypted.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY FROM DATABASE unencrypted to encrypted; diff --git a/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted_direct_query.test b/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted_direct_query.test index 9479c3f..b0039f0 100644 --- a/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted_direct_query.test +++ b/parser/testdata/corpus/sql/copy/encryption/unencrypted_to_encrypted_direct_query.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/unencrypted_to_encrypted_direct_query.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(i) FROM encrypted.tbl; diff --git a/parser/testdata/corpus/sql/copy/encryption/write_encrypted_database.test b/parser/testdata/corpus/sql/copy/encryption/write_encrypted_database.test index d07e7db..aa02604 100644 --- a/parser/testdata/corpus/sql/copy/encryption/write_encrypted_database.test +++ b/parser/testdata/corpus/sql/copy/encryption/write_encrypted_database.test @@ -1,6 +1,6 @@ # source: test/sql/copy/encryption/write_encrypted_database.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted.duckdb' AS encrypted (ENCRYPTION_KEY 'xxxxx'); diff --git a/parser/testdata/corpus/sql/copy/file_size_bytes.test b/parser/testdata/corpus/sql/copy/file_size_bytes.test index 935312a..a2ef220 100644 --- a/parser/testdata/corpus/sql/copy/file_size_bytes.test +++ b/parser/testdata/corpus/sql/copy/file_size_bytes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/file_size_bytes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigdata AS SELECT i AS col_a, i AS col_b FROM range(0,10_000) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/file_size_bytes_csv_compression.test b/parser/testdata/corpus/sql/copy/file_size_bytes_csv_compression.test new file mode 100644 index 0000000..81fd462 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/file_size_bytes_csv_compression.test @@ -0,0 +1,19 @@ +# source: test/sql/copy/file_size_bytes_csv_compression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT repeat('x', 200) AS payload FROM range(100_000)) +TO '{TEST_DIR}/file_size_bytes_csv_gzip' +(FORMAT CSV, COMPRESSION GZIP, FILE_SIZE_BYTES '1kb'); +-- +ok +== +SELECT count(*) FROM read_csv_auto('{TEST_DIR}/file_size_bytes_csv_gzip/*.csv.gz'); +-- +ok +== +SELECT count(*) < 10 FROM glob('{TEST_DIR}/file_size_bytes_csv_gzip/*.csv.gz'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/file_size_bytes_existing_target.test b/parser/testdata/corpus/sql/copy/file_size_bytes_existing_target.test new file mode 100644 index 0000000..c86d664 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/file_size_bytes_existing_target.test @@ -0,0 +1,21 @@ +# source: test/sql/copy/file_size_bytes_existing_target.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 AS a) TO '{TEST_DIR}/tgt.parquet' (FORMAT parquet); +-- +ok +== +COPY (SELECT range FROM range(1000)) TO '{TEST_DIR}/tgt.parquet' (FORMAT parquet, FILE_SIZE_BYTES '1kb'); +-- +ok +== +COPY (SELECT range FROM range(1000)) TO '{TEST_DIR}/tgt.parquet' (FORMAT parquet, FILE_SIZE_BYTES '1kb', OVERWRITE); +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/tgt.parquet/*.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/file_size_bytes_tiny_limit.test b/parser/testdata/corpus/sql/copy/file_size_bytes_tiny_limit.test new file mode 100644 index 0000000..aaaa06d --- /dev/null +++ b/parser/testdata/corpus/sql/copy/file_size_bytes_tiny_limit.test @@ -0,0 +1,45 @@ +# source: test/sql/copy/file_size_bytes_tiny_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_execution_time = 60000 +-- +ok +== +COPY (SELECT i FROM range(5) r(i)) TO '__TEST_DIR__/tiny_fsb' (FORMAT csv, FILE_SIZE_BYTES 1) +-- +ok +== +SELECT count(*) <= 5 FROM glob('__TEST_DIR__/tiny_fsb/*.csv') +-- +ok +== +SELECT sum(i) FROM read_csv('__TEST_DIR__/tiny_fsb/*.csv') +-- +ok +== +COPY (SELECT i FROM range(5) r(i)) TO '__TEST_DIR__/tiny_fsb_parquet' (FORMAT parquet, FILE_SIZE_BYTES 1) +-- +ok +== +SELECT sum(i) FROM read_parquet('__TEST_DIR__/tiny_fsb_parquet/*.parquet') +-- +ok +== +COPY (SELECT 1 i) TO '__TEST_DIR__/rgpf0' (FORMAT parquet, ROW_GROUPS_PER_FILE 0) +-- +ok +== +COPY (SELECT i, i % 3 p FROM range(30000) r(i)) TO '__TEST_DIR__/tiny_fsb_partitioned' (FORMAT csv, PARTITION_BY (p), FILE_SIZE_BYTES '10KB') +-- +ok +== +SELECT count(*), sum(i) FROM read_csv('__TEST_DIR__/tiny_fsb_partitioned/*/*.csv') +-- +ok +== +SELECT count(*) > 3 FROM glob('__TEST_DIR__/tiny_fsb_partitioned/*/*.csv') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/format_uuid.test b/parser/testdata/corpus/sql/copy/format_uuid.test index 972bbfb..46757ee 100644 --- a/parser/testdata/corpus/sql/copy/format_uuid.test +++ b/parser/testdata/corpus/sql/copy/format_uuid.test @@ -1,6 +1,6 @@ # source: test/sql/copy/format_uuid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test2 as SELECT i as a, (i*2) as b, power(i,2) as c from range(0,10) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/hive_partition_null_overwrite.test b/parser/testdata/corpus/sql/copy/hive_partition_null_overwrite.test index 42da691..d4492ab 100644 --- a/parser/testdata/corpus/sql/copy/hive_partition_null_overwrite.test +++ b/parser/testdata/corpus/sql/copy/hive_partition_null_overwrite.test @@ -1,6 +1,6 @@ # source: test/sql/copy/hive_partition_null_overwrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT * FROM read_csv_auto('{DATA_DIR}/csv/null/hive_partition_null_overwrite.csv')) diff --git a/parser/testdata/corpus/sql/copy/parquet/afl.test b/parser/testdata/corpus/sql/copy/parquet/afl.test index c458465..25de7f9 100644 --- a/parser/testdata/corpus/sql/copy/parquet/afl.test +++ b/parser/testdata/corpus/sql/copy/parquet/afl.test @@ -1,13 +1,9 @@ # source: test/sql/copy/parquet/afl.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/afl/{i}.parquet') -- ok == -select * from parquet_scan('{DATA_DIR}/parquet-testing/afl/3.parquet') --- -ok -== diff --git a/parser/testdata/corpus/sql/copy/parquet/allow_empty.test b/parser/testdata/corpus/sql/copy/parquet/allow_empty.test index fe348f5..eb78c17 100644 --- a/parser/testdata/corpus/sql/copy/parquet/allow_empty.test +++ b/parser/testdata/corpus/sql/copy/parquet/allow_empty.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/allow_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_parquet(['{TEST_DIR}/allow_empty_missing.parquet']); diff --git a/parser/testdata/corpus/sql/copy/parquet/alltypes-dictionaries.test b/parser/testdata/corpus/sql/copy/parquet/alltypes-dictionaries.test index f47d659..551b93a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/alltypes-dictionaries.test +++ b/parser/testdata/corpus/sql/copy/parquet/alltypes-dictionaries.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/alltypes-dictionaries.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select (r1.range * 10)::{type} r from range(10) r1, range(1000) r2) to '{TEST_DIR}/dict-{type}.parquet' (row_group_size 2048); diff --git a/parser/testdata/corpus/sql/copy/parquet/attach_parquet.test b/parser/testdata/corpus/sql/copy/parquet/attach_parquet.test index 4e034f1..273c9d7 100644 --- a/parser/testdata/corpus/sql/copy/parquet/attach_parquet.test +++ b/parser/testdata/corpus/sql/copy/parquet/attach_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/attach_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42 val) TO '{TEST_DIR}/file.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/auto_glob_directory.test b/parser/testdata/corpus/sql/copy/parquet/auto_glob_directory.test index e74d1ea..83a5034 100644 --- a/parser/testdata/corpus/sql/copy/parquet/auto_glob_directory.test +++ b/parser/testdata/corpus/sql/copy/parquet/auto_glob_directory.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/auto_glob_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i%2 AS grp, i FROM range(1000) t(i)) TO '{TEST_DIR}/partitioned_glob.parquet' (PARTITION_BY (grp)); diff --git a/parser/testdata/corpus/sql/copy/parquet/aws2.test b/parser/testdata/corpus/sql/copy/parquet/aws2.test index 9fcc227..6cad11e 100644 --- a/parser/testdata/corpus/sql/copy/parquet/aws2.test +++ b/parser/testdata/corpus/sql/copy/parquet/aws2.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/aws2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/aws2.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/aws_kinesis.test b/parser/testdata/corpus/sql/copy/parquet/aws_kinesis.test index fd75d6b..ef49708 100644 --- a/parser/testdata/corpus/sql/copy/parquet/aws_kinesis.test +++ b/parser/testdata/corpus/sql/copy/parquet/aws_kinesis.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/aws_kinesis.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/aws_kinesis.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/bigdecimal.test b/parser/testdata/corpus/sql/copy/parquet/bigdecimal.test index 44aaa4b..c52017c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/bigdecimal.test +++ b/parser/testdata/corpus/sql/copy/parquet/bigdecimal.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/bigdecimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/parquet-testing/bigdecimal.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/bloom_filter_decimal.test b/parser/testdata/corpus/sql/copy/parquet/bloom_filter_decimal.test index a9f99be..9f604a5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/bloom_filter_decimal.test +++ b/parser/testdata/corpus/sql/copy/parquet/bloom_filter_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/bloom_filter_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/bloom_filter_interval.test b/parser/testdata/corpus/sql/copy/parquet/bloom_filter_interval.test index fbd3057..80d424a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/bloom_filter_interval.test +++ b/parser/testdata/corpus/sql/copy/parquet/bloom_filter_interval.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/bloom_filter_interval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/bloom_filters.test b/parser/testdata/corpus/sql/copy/parquet/bloom_filters.test index 8b8c037..4087961 100644 --- a/parser/testdata/corpus/sql/copy/parquet/bloom_filters.test +++ b/parser/testdata/corpus/sql/copy/parquet/bloom_filters.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/bloom_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select @@ -49,7 +49,7 @@ ok == COPY ( SELECT - ((i % 100) * 2)::INTEGER AS r, + CASE WHEN i = 0 THEN NULL ELSE ((i % 100) * 2)::INTEGER END AS r, i::BIGINT AS payload FROM range(20480) t(i) ) TO '{TEST_DIR}/bloom_in.parquet' ( @@ -70,6 +70,38 @@ ok EXPLAIN ANALYZE SELECT sum(payload) FROM read_parquet('{TEST_DIR}/bloom_in.parquet') +WHERE r IN (101, NULL); +-- +ok +== +SELECT count(*) +FROM read_parquet('{TEST_DIR}/bloom_in.parquet') +WHERE r IN (101, NULL); +-- +ok +== +SELECT r IN (NULL) +FROM read_parquet('{TEST_DIR}/bloom_in.parquet') +WHERE r IS NULL; +-- +ok +== +SELECT count(*) +FROM read_parquet('{TEST_DIR}/bloom_in.parquet') +WHERE r IN (NULL); +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) +FROM read_parquet('{TEST_DIR}/bloom_in.parquet') +WHERE r IN (NULL); +-- +ok +== +EXPLAIN ANALYZE +SELECT sum(payload) +FROM read_parquet('{TEST_DIR}/bloom_in.parquet') WHERE r = 101 OR r = 103; -- ok @@ -355,6 +387,7 @@ COPY ( (TIMESTAMP '2000-01-01' + (2 * (i % 2048)) * INTERVAL 1 SECOND)::TIMESTAMPTZ_NS AS ts_tz_ns, (TIME '00:00:00' + (2 * (i % 2048)) * INTERVAL 1 SECOND)::TIME AS tm, + (TIME '00:00:00' + (2 * (i % 2048)) * INTERVAL 1 SECOND)::TIME_NS AS tm_ns, (TIMETZ '12:00:00+02' + (2 * (i % 2048)) * INTERVAL 1 SECOND)::TIMETZ AS tm_tz FROM range(8192) t(i) ) TO '{TEST_DIR}/bloom_temporal.parquet' ( @@ -430,6 +463,11 @@ FROM parquet_bloom_probe('{TEST_DIR}/bloom_temporal.parquet', 'tm', TIME '00:16: -- ok == +SELECT bool_and(bloom_filter_excludes) +FROM parquet_bloom_probe('{TEST_DIR}/bloom_temporal.parquet', 'tm_ns', TIME_NS '00:16:41'); +-- +ok +== SELECT bool_or(bloom_filter_excludes) FROM parquet_bloom_probe('{TEST_DIR}/bloom_temporal.parquet', 'tm_tz', TIMETZ '12:00:00+02'); -- @@ -480,6 +518,11 @@ WHERE tm = TIME '00:16:41'; -- ok == +EXPLAIN ANALYZE SELECT count(*) FROM '{TEST_DIR}/bloom_temporal.parquet' +WHERE tm_ns = TIME_NS '00:16:41'; +-- +ok +== COPY ( SELECT CASE WHEN i = 0 THEN 'infinity'::TIMESTAMP_MS @@ -722,3 +765,19 @@ WHERE x IS NOT DISTINCT FROM 'NaN'::DOUBLE; -- ok == +EXPLAIN ANALYZE SELECT sum(payload) FROM read_parquet('{TEST_DIR}/bloom_in.parquet') WHERE r / 1 = 101; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(payload) FROM read_parquet('{TEST_DIR}/bloom_in.parquet') WHERE r::DOUBLE = 101; +-- +ok +== +SELECT sum(payload) FROM read_parquet('{TEST_DIR}/bloom_in.parquet') WHERE r / 1 = 101; +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/bloom_in.parquet') WHERE r / 1 = 100; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/broken_parquet.test b/parser/testdata/corpus/sql/copy/parquet/broken_parquet.test index be2dfc4..cc9c1e8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/broken_parquet.test +++ b/parser/testdata/corpus/sql/copy/parquet/broken_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/broken_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from parquet_scan('test/sql/copy/parquet/broken/missingmagicatfront.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/byte_stream_split.test b/parser/testdata/corpus/sql/copy/parquet/byte_stream_split.test index a1cb69a..d5a6073 100644 --- a/parser/testdata/corpus/sql/copy/parquet/byte_stream_split.test +++ b/parser/testdata/corpus/sql/copy/parquet/byte_stream_split.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/byte_stream_split.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/byte_stream_split.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/case_insensitive_replacement.test b/parser/testdata/corpus/sql/copy/parquet/case_insensitive_replacement.test index d4a997b..feff5b6 100644 --- a/parser/testdata/corpus/sql/copy/parquet/case_insensitive_replacement.test +++ b/parser/testdata/corpus/sql/copy/parquet/case_insensitive_replacement.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/case_insensitive_replacement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT data FROM '{DATA_DIR}/parquet-testing/CASE_INSENSITIVE.PARQUET' diff --git a/parser/testdata/corpus/sql/copy/parquet/copy_ninf_stats.test b/parser/testdata/corpus/sql/copy/parquet/copy_ninf_stats.test index 282e039..1f030aa 100644 --- a/parser/testdata/corpus/sql/copy/parquet/copy_ninf_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/copy_ninf_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/copy_ninf_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select '-infinity'::double ninf) to '{TEST_DIR}/ninf.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/copy_option_non_foldable.test b/parser/testdata/corpus/sql/copy/parquet/copy_option_non_foldable.test index 418c83d..473f0e2 100644 --- a/parser/testdata/corpus/sql/copy/parquet/copy_option_non_foldable.test +++ b/parser/testdata/corpus/sql/copy/parquet/copy_option_non_foldable.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/copy_option_non_foldable.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE statement2 as COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/copy_option_prepared.test b/parser/testdata/corpus/sql/copy/parquet/copy_option_prepared.test index ab8bf7b..a532e7c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/copy_option_prepared.test +++ b/parser/testdata/corpus/sql/copy/parquet/copy_option_prepared.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/copy_option_prepared.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE statement as COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/copy_option_suggestion.test b/parser/testdata/corpus/sql/copy/parquet/copy_option_suggestion.test index c55e711..6ce7e8c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/copy_option_suggestion.test +++ b/parser/testdata/corpus/sql/copy/parquet/copy_option_suggestion.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/copy_option_suggestion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42) to 'file.parquet' (partition_b (a)); diff --git a/parser/testdata/corpus/sql/copy/parquet/copy_option_validation.test b/parser/testdata/corpus/sql/copy/parquet/copy_option_validation.test new file mode 100644 index 0000000..a1a51f2 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/copy_option_validation.test @@ -0,0 +1,33 @@ +# source: test/sql/copy/parquet/copy_option_validation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i % 7 p FROM range(100) r(i)) TO '__TEST_DIR__/bf.parquet' (BLOOM_FILTER_FALSE_POSITIVE_RATIO 2) +-- +ok +== +COPY (SELECT i % 7 p FROM range(100) r(i)) TO '__TEST_DIR__/bf.parquet' (BLOOM_FILTER_FALSE_POSITIVE_RATIO 'nan') +-- +ok +== +COPY (SELECT i % 7 p FROM range(100) r(i)) TO '__TEST_DIR__/bf.parquet' (BLOOM_FILTER_FALSE_POSITIVE_RATIO 'inf') +-- +ok +== +COPY (SELECT i % 7 p FROM range(100) r(i)) TO '__TEST_DIR__/bf.parquet' (BLOOM_FILTER_FALSE_POSITIVE_RATIO 1) +-- +ok +== +COPY (SELECT i % 7 p FROM range(100) r(i)) TO '__TEST_DIR__/bf.parquet' (BLOOM_FILTER_FALSE_POSITIVE_RATIO 0.01) +-- +ok +== +SELECT sum(p) FROM '__TEST_DIR__/bf.parquet' +-- +ok +== +COPY (SELECT 1 i) TO '__TEST_DIR__/rgs.parquet' (ROW_GROUP_SIZE 18446744073709551615) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/corrupt_stats.test b/parser/testdata/corpus/sql/copy/parquet/corrupt_stats.test index 03626c9..8470226 100644 --- a/parser/testdata/corpus/sql/copy/parquet/corrupt_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/corrupt_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/corrupt_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a FROM '{DATA_DIR}/parquet-testing/corrupt_stats.parquet' GROUP BY a; diff --git a/parser/testdata/corpus/sql/copy/parquet/cte_batch_exchange.test b/parser/testdata/corpus/sql/copy/parquet/cte_batch_exchange.test index c11981b..3ba9197 100644 --- a/parser/testdata/corpus/sql/copy/parquet/cte_batch_exchange.test +++ b/parser/testdata/corpus/sql/copy/parquet/cte_batch_exchange.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/cte_batch_exchange.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE cte_parquet_source AS SELECT i FROM range(1000000) t(i); @@ -54,3 +54,34 @@ WHERE i != expected; -- ok == +SET threads={threads}; +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN ANALYZE +COPY ( + WITH c AS MATERIALIZED (SELECT i FROM cte_parquet_source) + SELECT i FROM c WHERE i < (SELECT count(*) FROM c) +) TO '{TEST_DIR}/cte_materialized_batch_scan.parquet' (FORMAT parquet, ROW_GROUP_SIZE 32768); +-- +ok +== +SELECT count(*), min(i), max(i) +FROM read_parquet('{TEST_DIR}/cte_materialized_batch_scan.parquet'); +-- +ok +== +SELECT count(*) +FROM ( + SELECT i, row_number() OVER () - 1 AS expected + FROM read_parquet('{TEST_DIR}/cte_materialized_batch_scan.parquet') +) +WHERE i != expected; +-- +ok +== +SELECT count(*), count(*) FILTER (WHERE row_group_num_rows NOT IN (32768, 16960)) +FROM parquet_metadata('{TEST_DIR}/cte_materialized_batch_scan.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/decimal_filter.test b/parser/testdata/corpus/sql/copy/parquet/decimal_filter.test index 325e5d7..e35dace 100644 --- a/parser/testdata/corpus/sql/copy/parquet/decimal_filter.test +++ b/parser/testdata/corpus/sql/copy/parquet/decimal_filter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/decimal_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/parquet-testing/decimals.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/delta_byte_array.test b/parser/testdata/corpus/sql/copy/parquet/delta_byte_array.test index b4ae169..1c10f90 100644 --- a/parser/testdata/corpus/sql/copy/parquet/delta_byte_array.test +++ b/parser/testdata/corpus/sql/copy/parquet/delta_byte_array.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/delta_byte_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/delta_byte_array.parquet' @@ -11,3 +11,22 @@ SELECT * FROM '{DATA_DIR}/parquet-testing/delta_length_byte_array.parquet' -- ok == +COPY ( + SELECT i, repeat('page-backed-', 8) || i::VARCHAR AS s FROM range(4096) t(i) +) TO '{TEST_DIR}/dlba_small_pages.parquet' +(FORMAT parquet, PARQUET_VERSION v2, DICTIONARY_SIZE_LIMIT 0, + ROW_GROUP_SIZE 8192, DATA_PAGE_SIZE_LIMIT 16384); +-- +ok +== +SELECT bool_and(encodings = 'DELTA_LENGTH_BYTE_ARRAY') +FROM parquet_metadata('{TEST_DIR}/dlba_small_pages.parquet') +WHERE path_in_schema = 's'; +-- +ok +== +SELECT count(*), count(*) FILTER (WHERE s IS DISTINCT FROM repeat('page-backed-', 8) || i::VARCHAR) +FROM read_parquet('{TEST_DIR}/dlba_small_pages.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/describe_parquet.test b/parser/testdata/corpus/sql/copy/parquet/describe_parquet.test index fb8ffd5..58ff164 100644 --- a/parser/testdata/corpus/sql/copy/parquet/describe_parquet.test +++ b/parser/testdata/corpus/sql/copy/parquet/describe_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/describe_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DESCRIBE '{DATA_DIR}/parquet-testing/delta_byte_array.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/dictionary_compression_ratio_threshold.test b/parser/testdata/corpus/sql/copy/parquet/dictionary_compression_ratio_threshold.test index 325d090..a028dde 100644 --- a/parser/testdata/corpus/sql/copy/parquet/dictionary_compression_ratio_threshold.test +++ b/parser/testdata/corpus/sql/copy/parquet/dictionary_compression_ratio_threshold.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/dictionary_compression_ratio_threshold.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT 'thisisaverylongstringbutitrepeatsmanytimessoitshighlycompressible' || (range % 10) i FROM range(100000) diff --git a/parser/testdata/corpus/sql/copy/parquet/encryption/arrow_compatibility.test b/parser/testdata/corpus/sql/copy/parquet/encryption/arrow_compatibility.test index 9bbfa59..5d02f82 100644 --- a/parser/testdata/corpus/sql/copy/parquet/encryption/arrow_compatibility.test +++ b/parser/testdata/corpus/sql/copy/parquet/encryption/arrow_compatibility.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/encryption/arrow_compatibility.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA add_parquet_key('arrow_key', '0123456789012345') diff --git a/parser/testdata/corpus/sql/copy/parquet/encryption/plaintext_footer_encryption.test b/parser/testdata/corpus/sql/copy/parquet/encryption/plaintext_footer_encryption.test new file mode 100644 index 0000000..cbdbf03 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/encryption/plaintext_footer_encryption.test @@ -0,0 +1,9 @@ +# source: test/sql/copy/parquet/encryption/plaintext_footer_encryption.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_parquet('{DATA_DIR}/parquet-testing/plaintext_footer_crypto_metadata.parquet') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/enum_converted_type.test b/parser/testdata/corpus/sql/copy/parquet/enum_converted_type.test index 86feec0..28358ca 100644 --- a/parser/testdata/corpus/sql/copy/parquet/enum_converted_type.test +++ b/parser/testdata/corpus/sql/copy/parquet/enum_converted_type.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/enum_converted_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/parquet-testing/enum.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/file_metadata.test b/parser/testdata/corpus/sql/copy/parquet/file_metadata.test index 6e64321..0c6322a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/file_metadata.test +++ b/parser/testdata/corpus/sql/copy/parquet/file_metadata.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/file_metadata.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET parquet_metadata_cache = true; diff --git a/parser/testdata/corpus/sql/copy/parquet/fixed.test b/parser/testdata/corpus/sql/copy/parquet/fixed.test index 2de84ff..dfbbaee 100644 --- a/parser/testdata/corpus/sql/copy/parquet/fixed.test +++ b/parser/testdata/corpus/sql/copy/parquet/fixed.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/fixed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT data FROM parquet_scan('{DATA_DIR}/parquet-testing/fixed.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/float16.test b/parser/testdata/corpus/sql/copy/parquet/float16.test index 5af8e9b..6cd9b0b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/float16.test +++ b/parser/testdata/corpus/sql/copy/parquet/float16.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/float16.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select type, type_length, logical_type from parquet_schema('{DATA_DIR}/parquet-testing/float16.parquet') where name = 'x' @@ -19,3 +19,21 @@ select x from read_parquet('{DATA_DIR}/parquet-testing/float16.parquet') where x -- ok == +SELECT substr(hex(content), 41, 4) +FROM read_blob('{DATA_DIR}/parquet-testing/float16.parquet') +-- +ok +== +COPY ( + SELECT from_hex(substr(hex(content), 1, 40) || '0100' || substr(hex(content), 45)) + FROM read_blob('{DATA_DIR}/parquet-testing/float16.parquet') +) TO '{TEST_DIR}/float16_subnormal.parquet' (FORMAT BLOB); +-- +ok +== +SELECT printf('%.12g', x) +FROM read_parquet('{TEST_DIR}/float16_subnormal.parquet') +WHERE x > 0 AND x < 0.5 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/hive_partitioning_struct.test b/parser/testdata/corpus/sql/copy/parquet/hive_partitioning_struct.test index 17c4275..1e15639 100644 --- a/parser/testdata/corpus/sql/copy/parquet/hive_partitioning_struct.test +++ b/parser/testdata/corpus/sql/copy/parquet/hive_partitioning_struct.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/hive_partitioning_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/hive_timestamps.test b/parser/testdata/corpus/sql/copy/parquet/hive_timestamps.test index 88a688a..d2dd1c8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/hive_timestamps.test +++ b/parser/testdata/corpus/sql/copy/parquet/hive_timestamps.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/hive_timestamps.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE raw_data ( diff --git a/parser/testdata/corpus/sql/copy/parquet/incorrect_converted_type.test b/parser/testdata/corpus/sql/copy/parquet/incorrect_converted_type.test index fc7e7dd..1e739a7 100644 --- a/parser/testdata/corpus/sql/copy/parquet/incorrect_converted_type.test +++ b/parser/testdata/corpus/sql/copy/parquet/incorrect_converted_type.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/incorrect_converted_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/broken/broken_bigint.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/infer_copy_format.test b/parser/testdata/corpus/sql/copy/parquet/infer_copy_format.test index 48f5b74..ebaa285 100644 --- a/parser/testdata/corpus/sql/copy/parquet/infer_copy_format.test +++ b/parser/testdata/corpus/sql/copy/parquet/infer_copy_format.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/infer_copy_format.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(6) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/parquet/int96_as.test b/parser/testdata/corpus/sql/copy/parquet/int96_as.test new file mode 100644 index 0000000..f583e44 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/int96_as.test @@ -0,0 +1,168 @@ +# source: test/sql/copy/parquet/int96_as.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(ts), ts::VARCHAR +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet') +ORDER BY ts +-- +ok +== +SELECT typeof(ts), ts::VARCHAR +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='timestamp') +ORDER BY ts +-- +ok +== +SELECT typeof(ts), ts::VARCHAR +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='timestamp_ns') +ORDER BY ts +-- +ok +== +SELECT typeof(ts), ts::VARCHAR +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds_dictionary.parquet', int96_as='timestamp_ns') +ORDER BY ts +-- +ok +== +SELECT typeof(ts), ts +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='struct') +ORDER BY ts +-- +ok +== +SELECT typeof(ts['date']), typeof(ts['time']) +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='struct') +LIMIT 1 +-- +ok +== +SELECT ts['date'], ts['time'] +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='struct') +ORDER BY ts['date'] +-- +ok +== +SELECT ts['date']::TIMESTAMP +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='struct') +WHERE ts['date'] = DATE '2026-09-16' +-- +ok +== +SELECT typeof(ts), ts +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds_dictionary.parquet', int96_as='struct') +ORDER BY ts +-- +ok +== +SELECT typeof(ts['date']) +FROM parquet_scan('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='struct') +LIMIT 1 +-- +ok +== +SELECT typeof(ts) +FROM parquet_scan('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='timestamp_ns') +LIMIT 1 +-- +ok +== +CREATE TABLE int96_copy(ts STRUCT(date DATE, "time" TIME_NS)) +-- +ok +== +COPY int96_copy FROM '{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet' + (FORMAT parquet, int96_as 'struct') +-- +ok +== +SELECT typeof(ts), ts +FROM int96_copy +ORDER BY ts +-- +ok +== +CREATE TABLE int96_copy_ns(ts TIMESTAMP_NS) +-- +ok +== +COPY int96_copy_ns FROM '{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet' + (FORMAT parquet, int96_as 'timestamp_ns') +-- +ok +== +SELECT typeof(ts), ts::VARCHAR +FROM int96_copy_ns +ORDER BY ts +-- +ok +== +SELECT * FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds.parquet', int96_as='invalid') +-- +ok +== +SELECT ts['date'], ts['time'] +FROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds_dictionary.parquet', int96_as='struct') +ORDER BY ts['date'], ts['time'] DESC +-- +ok +== +CREATE TABLE int96_full_range(lo TIMESTAMP, hi TIMESTAMP) +-- +ok +== +INSERT INTO int96_full_range VALUES (TIMESTAMP '0001-01-01 00:00:00', TIMESTAMP '9999-12-31 23:59:59.999999') +-- +ok +== +COPY int96_full_range TO '{TEST_DIR}/int96_full_range.parquet' + (FORMAT parquet, write_timestamp_as_int96 true) +-- +ok +== +SELECT lo::VARCHAR || '|' || hi::VARCHAR FROM read_parquet('{TEST_DIR}/int96_full_range.parquet') +-- +ok +== +SELECT lo::VARCHAR, hi::VARCHAR FROM read_parquet('{TEST_DIR}/int96_full_range.parquet', int96_as='timestamp_ns') +-- +ok +== +COPY ( + SELECT TIMESTAMP '1677-09-21 12:00:00' AS ts +) TO '{TEST_DIR}/int96_lower_bound.parquet' + (FORMAT PARQUET, write_timestamp_as_int96 true); +-- +ok +== +SELECT ts +FROM read_parquet('{TEST_DIR}/int96_lower_bound.parquet', int96_as='timestamp_ns'); +-- +ok +== +SELECT lo['date'], lo['time'], hi['date'], hi['time'] +FROM read_parquet('{TEST_DIR}/int96_full_range.parquet', int96_as='struct') +-- +ok +== +COPY (SELECT TIMESTAMP_NS '1992-01-01 12:03:27.123456789' AS ts) TO '{TEST_DIR}/int64_ns.parquet' + (FORMAT parquet) +-- +ok +== +SELECT typeof(ts), ts::VARCHAR FROM read_parquet('{TEST_DIR}/int64_ns.parquet', int96_as='struct') +-- +ok +== +COPY (SELECT TIMESTAMPTZ_NS '2026-09-16 10:20:30.123456789+00' AS ts) +TO '{TEST_DIR}/timezone_stats.parquet' (FORMAT PARQUET); +-- +ok +== +SELECT stats_min_value, stats_max_value +FROM parquet_metadata('{TEST_DIR}/timezone_stats.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/invalid_utf8_stats.test b/parser/testdata/corpus/sql/copy/parquet/invalid_utf8_stats.test index 07d3590..db1c5e1 100644 --- a/parser/testdata/corpus/sql/copy/parquet/invalid_utf8_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/invalid_utf8_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/invalid_utf8_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM 'data/parquet-testing/invalid_utf8_stats.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/issue_21508.test b/parser/testdata/corpus/sql/copy/parquet/issue_21508.test index 9617615..d18e847 100644 --- a/parser/testdata/corpus/sql/copy/parquet/issue_21508.test +++ b/parser/testdata/corpus/sql/copy/parquet/issue_21508.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/issue_21508.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA add_parquet_key('key256', '01234567891123450123456789112345') diff --git a/parser/testdata/corpus/sql/copy/parquet/json_parquet.test b/parser/testdata/corpus/sql/copy/parquet/json_parquet.test index 01e4c68..f9e8c8a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/json_parquet.test +++ b/parser/testdata/corpus/sql/copy/parquet/json_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/json_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE json_tbl AS FROM '{DATA_DIR}/parquet-testing/json_convertedtype.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/kv_metadata.test b/parser/testdata/corpus/sql/copy/parquet/kv_metadata.test index 9d22b19..09c55eb 100644 --- a/parser/testdata/corpus/sql/copy/parquet/kv_metadata.test +++ b/parser/testdata/corpus/sql/copy/parquet/kv_metadata.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/kv_metadata.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1, 'foo') TO '{TEST_DIR}/kv_metadata_test.parquet' (FORMAT PARQUET, KV_METADATA {foo: 'bar', baz: 42, quz: '\xC3\xB6\xC3\xA4\xC3\xA5'::BLOB}); diff --git a/parser/testdata/corpus/sql/copy/parquet/kv_metadata_null.test b/parser/testdata/corpus/sql/copy/parquet/kv_metadata_null.test new file mode 100644 index 0000000..56e2704 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/kv_metadata_null.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/parquet/kv_metadata_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1) TO '{TEMP_DIR}/kv_null_blob.parquet' (FORMAT PARQUET, KV_METADATA {quz: NULL::BLOB}); +-- +ok +== +COPY (SELECT 1) TO '{TEMP_DIR}/kv_null_varchar.parquet' (FORMAT PARQUET, KV_METADATA {foo: 'bar', quz: NULL::VARCHAR}); +-- +ok +== +COPY (SELECT 1) TO '{TEMP_DIR}/kv_null_struct.parquet' (FORMAT PARQUET, KV_METADATA NULL::STRUCT(a VARCHAR)); +-- +ok +== +COPY (SELECT 1) TO '{TEMP_DIR}/kv_ok.parquet' (FORMAT PARQUET, KV_METADATA {foo: 'bar', baz: '\x01\x02'::BLOB}); +-- +ok +== +SELECT key::VARCHAR, octet_length(value) FROM parquet_kv_metadata('{TEMP_DIR}/kv_ok.parquet') ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/lineitem_arrow.test b/parser/testdata/corpus/sql/copy/parquet/lineitem_arrow.test index e4ea97d..bb64fab 100644 --- a/parser/testdata/corpus/sql/copy/parquet/lineitem_arrow.test +++ b/parser/testdata/corpus/sql/copy/parquet/lineitem_arrow.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/lineitem_arrow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lineitem AS SELECT * FROM '{DATA_DIR}/parquet-testing/arrow/lineitem-arrow.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/list_contains_row_group_pruning.test b/parser/testdata/corpus/sql/copy/parquet/list_contains_row_group_pruning.test new file mode 100644 index 0000000..8a70d01 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/list_contains_row_group_pruning.test @@ -0,0 +1,33 @@ +# source: test/sql/copy/parquet/list_contains_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT [i] AS l FROM range(6144) t(i)) +TO '{TEST_DIR}/list_contains_row_group_pruning.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM '{TEST_DIR}/list_contains_row_group_pruning.parquet' +WHERE list_contains(l, 3000); +-- +ok +== +SELECT count(*) FROM '{TEST_DIR}/list_contains_row_group_pruning.parquet' WHERE list_contains(l, 3000); +-- +ok +== +COPY (SELECT [lpad(i::VARCHAR, 4, '0')] AS l FROM range(6144) t(i)) +TO '{TEST_DIR}/list_contains_string_row_group_pruning.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM '{TEST_DIR}/list_contains_string_row_group_pruning.parquet' +WHERE list_contains(l, '3000'); +-- +ok +== +SELECT count(*) FROM '{TEST_DIR}/list_contains_string_row_group_pruning.parquet' WHERE list_contains(l, '3000'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/map_extract_row_group_pruning.test b/parser/testdata/corpus/sql/copy/parquet/map_extract_row_group_pruning.test new file mode 100644 index 0000000..3443537 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/map_extract_row_group_pruning.test @@ -0,0 +1,42 @@ +# source: test/sql/copy/parquet/map_extract_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT MAP {'k': i} AS m FROM range(6144) t(i)) +TO '{TEST_DIR}/map_extract_row_group_pruning.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM '{TEST_DIR}/map_extract_row_group_pruning.parquet' +WHERE m['k'] BETWEEN 2900 AND 3100; +-- +ok +== +SELECT count(*) FROM '{TEST_DIR}/map_extract_row_group_pruning.parquet' WHERE m['k'] BETWEEN 2900 AND 3100; +-- +ok +== +COPY ( + SELECT MAP {'k': ((i % 100) * 2)::INTEGER} AS m, i AS payload + FROM range(20480) t(i) +) TO '{TEST_DIR}/map_extract_bloom_pruning.parquet' ( + FORMAT PARQUET, + ROW_GROUP_SIZE 2048, + DICTIONARY_SIZE_LIMIT 1000, + WRITE_BLOOM_FILTER TRUE +) +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/map_extract_bloom_pruning.parquet') +WHERE m['k'] = 101 +-- +ok +== +EXPLAIN ANALYZE +SELECT m, payload FROM read_parquet('{TEST_DIR}/map_extract_bloom_pruning.parquet') +WHERE m['k'] = 101 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/metadata_full.test b/parser/testdata/corpus/sql/copy/parquet/metadata_full.test index 3a4ef1e..84d0fa5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/metadata_full.test +++ b/parser/testdata/corpus/sql/copy/parquet/metadata_full.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/metadata_full.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT unnest(parquet_file_metadata, recursive:=True) FROM parquet_full_metadata('data/parquet-testing/arrow/alltypes_dictionary.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/multi_file/adaptive_filter_carryover.test b/parser/testdata/corpus/sql/copy/parquet/multi_file/adaptive_filter_carryover.test index 11074f7..c110f9d 100644 --- a/parser/testdata/corpus/sql/copy/parquet/multi_file/adaptive_filter_carryover.test +++ b/parser/testdata/corpus/sql/copy/parquet/multi_file/adaptive_filter_carryover.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/multi_file/adaptive_filter_carryover.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET read_ahead_depth=1 diff --git a/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_integer_types.test b/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_integer_types.test index 46b2dff..d8e5bb1 100644 --- a/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_integer_types.test +++ b/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_integer_types.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/multi_file/multi_file_filter_integer_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (FROM (VALUES ('f1', 42::INT), ('f1', 8::INT), ('f1', NULL::INT)) t(f, i)) TO '{TEST_DIR}/multi_file_filter_f1.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_mixed.test b/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_mixed.test index 43409f7..3b273c7 100644 --- a/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_mixed.test +++ b/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_mixed.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/multi_file/multi_file_filter_mixed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (FROM (VALUES ('f1', 42), ('f1', 8), ('f1', NULL)) t(f, i)) TO '{TEST_DIR}/multi_file_filter_f1.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_struct.test b/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_struct.test index 0c6c2ad..24a5e89 100644 --- a/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_struct.test +++ b/parser/testdata/corpus/sql/copy/parquet/multi_file/multi_file_filter_struct.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/multi_file/multi_file_filter_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/multi_file_conversion_error.test b/parser/testdata/corpus/sql/copy/parquet/multi_file_conversion_error.test index 12ae556..34b45f6 100644 --- a/parser/testdata/corpus/sql/copy/parquet/multi_file_conversion_error.test +++ b/parser/testdata/corpus/sql/copy/parquet/multi_file_conversion_error.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/multi_file_conversion_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42 as a) to '{TEST_DIR}/conversion_error1.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/parallel_parquet_glob.test b/parser/testdata/corpus/sql/copy/parquet/parallel_parquet_glob.test index 370d856..095278b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parallel_parquet_glob.test +++ b/parser/testdata/corpus/sql/copy/parquet/parallel_parquet_glob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parallel_parquet_glob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from parquet_scan('{DATA_DIR}/parquet-testing/glob/t?.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet2.test b/parser/testdata/corpus/sql/copy/parquet/parquet2.test index 13f486d..167f00e 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet2.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet2.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT id FROM '{DATA_DIR}/parquet-testing/p2.parquet' offset 4968; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet2strings.test b/parser/testdata/corpus/sql/copy/parquet/parquet2strings.test index dbec5d1..0c68df5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet2strings.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet2strings.test @@ -1,9 +1,23 @@ # source: test/sql/copy/parquet/parquet2strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SELECT id_string FROM '{DATA_DIR}/parquet-testing/p2strings.parquet' limit 10; +SELECT id_string FROM '{DATA_DIR}/parquet-testing/p2strings.parquet' ORDER BY id LIMIT 10; +-- +ok +== +SELECT count(*) FROM ( + (SELECT id, id_string FROM '{DATA_DIR}/parquet-testing/p2strings.parquet' + EXCEPT ALL + SELECT id, id_string FROM read_csv('{DATA_DIR}/parquet-testing/p2strings.csv', + header=false, columns={'id': 'BIGINT', 'id_string': 'VARCHAR'})) + UNION ALL + (SELECT id, id_string FROM read_csv('{DATA_DIR}/parquet-testing/p2strings.csv', + header=false, columns={'id': 'BIGINT', 'id_string': 'VARCHAR'}) + EXCEPT ALL + SELECT id, id_string FROM '{DATA_DIR}/parquet-testing/p2strings.parquet') +); -- ok == diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_10148.test b/parser/testdata/corpus/sql/copy/parquet/parquet_10148.test index be2265d..bff596c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_10148.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_10148.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_10148.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CDCONO FROM '{DATA_DIR}/parquet-testing/bug10148-wide-decimal-stats.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_10279.test b/parser/testdata/corpus/sql/copy/parquet/parquet_10279.test index d0b693e..a9f3f17 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_10279.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_10279.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_10279.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/issue10279_delta_encoding.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_12621.test b/parser/testdata/corpus/sql/copy/parquet/parquet_12621.test index 62e0460..a0bbc42 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_12621.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_12621.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_12621.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_13053_duplicate_column_names.test b/parser/testdata/corpus/sql/copy/parquet/parquet_13053_duplicate_column_names.test index 5c3d6bc..184643c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_13053_duplicate_column_names.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_13053_duplicate_column_names.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_13053_duplicate_column_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select name from parquet_schema( '{DATA_DIR}/parquet-testing/bug13053.parquet') offset 1; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_1554.test b/parser/testdata/corpus/sql/copy/parquet/parquet_1554.test index 17262f6..3efd119 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_1554.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_1554.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_1554.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(backlink_count) FROM parquet_scan('{DATA_DIR}/parquet-testing/bug1554.parquet') WHERE http_status_code=200 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_1588.test b/parser/testdata/corpus/sql/copy/parquet/parquet_1588.test index 91fabf3..0cf7ef3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_1588.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_1588.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_1588.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table some_bools (val boolean); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_1589.test b/parser/testdata/corpus/sql/copy/parquet/parquet_1589.test index c5a0c3f..0afa75c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_1589.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_1589.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_1589.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT backlink_count FROM parquet_scan('{DATA_DIR}/parquet-testing/bug1589.parquet') LIMIT 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_1618_struct_strings.test b/parser/testdata/corpus/sql/copy/parquet/parquet_1618_struct_strings.test index 8292db9..4393fc1 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_1618_struct_strings.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_1618_struct_strings.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_1618_struct_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT "inner"['str_field'] FROM parquet_scan('{DATA_DIR}/parquet-testing/bug1618_struct_strings.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_1619.test b/parser/testdata/corpus/sql/copy/parquet/parquet_1619.test index 17944cf..2912cbf 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_1619.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_1619.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_1619.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select struct_extract("inner", 'f64_field') from parquet_scan('{DATA_DIR}/parquet-testing/struct.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_22147_union_by_name_nonnested.test b/parser/testdata/corpus/sql/copy/parquet/parquet_22147_union_by_name_nonnested.test index 4eff8f3..b4c2c8a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_22147_union_by_name_nonnested.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_22147_union_by_name_nonnested.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_22147_union_by_name_nonnested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT {'a': 1::INTEGER} AS x) TO '{TEST_DIR}/ubn22147_struct.parquet' (FORMAT PARQUET); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_2267.test b/parser/testdata/corpus/sql/copy/parquet/parquet_2267.test index f0a8c55..e2f5baa 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_2267.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_2267.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_2267.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/bug2267.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_3896.test b/parser/testdata/corpus/sql/copy/parquet/parquet_3896.test index 509577f..1fecf71 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_3896.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_3896.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_3896.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_3989.test b/parser/testdata/corpus/sql/copy/parquet/parquet_3989.test index dab3add..45b0214 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_3989.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_3989.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_3989.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lists as SELECT i as id, [i] as list from range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_4442.test b/parser/testdata/corpus/sql/copy/parquet/parquet_4442.test index 626709a..c836216 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_4442.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_4442.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_4442.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/bug4442.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_4859.test b/parser/testdata/corpus/sql/copy/parquet/parquet_4859.test index d9cbb27..604c008 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_4859.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_4859.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_4859.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select "repositoryTopics.edges" from "{DATA_DIR}/parquet-testing/bug4859.parquet" diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_4903.test b/parser/testdata/corpus/sql/copy/parquet/parquet_4903.test index 75712fe..4eb5f62 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_4903.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_4903.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_4903.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT type_param_constraints FROM '{DATA_DIR}/parquet-testing/bug4903.parquet' limit 10 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_5209.test b/parser/testdata/corpus/sql/copy/parquet/parquet_5209.test index 4372fed..5b9ce46 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_5209.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_5209.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_5209.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_5209 AS SELECT range FROM range(10000); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_6044.test b/parser/testdata/corpus/sql/copy/parquet/parquet_6044.test index 5317836..924c821 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_6044.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_6044.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_6044.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 0.9 AS a) to '{TEST_DIR}/tiny_decimal.parquet' (format 'parquet', codec 'zstd'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_6580.test b/parser/testdata/corpus/sql/copy/parquet/parquet_6580.test index 223d929..6895265 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_6580.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_6580.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_6580.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select *, make_timestamp(dt2*1000*1000) diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_6630_union_by_name.test b/parser/testdata/corpus/sql/copy/parquet/parquet_6630_union_by_name.test index c27e96f..fdaa883 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_6630_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_6630_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_6630_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_6933.test b/parser/testdata/corpus/sql/copy/parquet/parquet_6933.test index 80fccfc..5d4a7ce 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_6933.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_6933.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_6933.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE table1 ( diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_all_null_column.test b/parser/testdata/corpus/sql/copy/parquet/parquet_all_null_column.test index 25c5e62..c3d636c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_all_null_column.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_all_null_column.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_all_null_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS i, NULL::BIGINT AS n FROM range(10000)) TO '{TEST_DIR}/all_null.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_arrow_timestamp.test b/parser/testdata/corpus/sql/copy/parquet/parquet_arrow_timestamp.test index d25f4d0..3ec41d9 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_arrow_timestamp.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_arrow_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_arrow_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/timestamp.parquet') order by 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_blob.test b/parser/testdata/corpus/sql/copy/parquet/parquet_blob.test index febd848..eb1f3f6 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_blob.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_blob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/blob.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_blob_string.test b/parser/testdata/corpus/sql/copy/parquet/parquet_blob_string.test index 5e44b08..e02eb63 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_blob_string.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_blob_string.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_blob_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(#1) FROM parquet_scan('{DATA_DIR}/parquet-testing/binary_string.parquet',binary_as_string=False) limit 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_bloom_filter_corruption.test b/parser/testdata/corpus/sql/copy/parquet/parquet_bloom_filter_corruption.test index c91a07d..4d13684 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_bloom_filter_corruption.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_bloom_filter_corruption.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_bloom_filter_corruption.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM read_parquet('{DATA_DIR}/parquet-testing/bloom_filter_bad_numbytes.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_column_metadata_corruption.test b/parser/testdata/corpus/sql/copy/parquet/parquet_column_metadata_corruption.test index c881d26..3707e58 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_column_metadata_corruption.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_column_metadata_corruption.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_column_metadata_corruption.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT num_values, row_group_num_rows, stats_null_count diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_column_statistics_option.test b/parser/testdata/corpus/sql/copy/parquet/parquet_column_statistics_option.test new file mode 100644 index 0000000..e11b1ff --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_column_statistics_option.test @@ -0,0 +1,123 @@ +# source: test/sql/copy/parquet/parquet_column_statistics_option.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_serializer=true +-- +ok +== +COPY (SELECT i AS id, (i % 25)::INTEGER AS nation, CASE WHEN i % 2 = 0 THEN NULL ELSE i END AS half, 'r_' || i AS name + FROM range(100000) t(i)) +TO '{TEST_DIR}/column_stats_1.parquet' (FORMAT parquet); +-- +ok +== +COPY (SELECT i AS id, (i % 25)::INTEGER AS nation, CASE WHEN i % 2 = 0 THEN NULL ELSE i END AS half, 'r_' || i AS name + FROM range(100000, 200000) t(i)) +TO '{TEST_DIR}/column_stats_2.parquet' (FORMAT parquet); +-- +ok +== +EXPLAIN SELECT id FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_2.parquet']) +WHERE id > 1000000; +-- +ok +== +EXPLAIN SELECT id FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_2.parquet'], + column_statistics := MAP {'id': MAP {'min': '0', 'max': '199999', 'count': '200000', 'null_count': '0', 'distinct_count': '200000'}}) +WHERE id > 1000000; +-- +ok +== +SELECT count(*), min(id), max(id) FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_2.parquet'], + column_statistics := MAP {'id': MAP {'min': '0', 'max': '199999', 'count': '200000', 'null_count': '0', 'distinct_count': '200000'}}) +WHERE id >= 150000; +-- +ok +== +EXPLAIN SELECT id FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_2.parquet'], + column_statistics := MAP {'name': MAP {'count': '200000', 'null_count': '0'}}) +WHERE name IS NULL; +-- +ok +== +EXPLAIN SELECT id FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_2.parquet'], + column_statistics := MAP {'name': MAP {'count': '200000', 'null_count': '0'}}) +WHERE half IS NULL; +-- +ok +== +EXPLAIN SELECT id FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', + column_statistics := MAP {'id': MAP {'min': '0', 'max': '1000'}}) +WHERE id > 5000; +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', + column_statistics := MAP {'name': MAP {'min': 'r_0', 'max': 'r_99999', 'null_count': '0'}}) +WHERE name = 'r_7'; +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', column_statistics := 42); +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', column_statistics := MAP {'id': MAP {'count': 'many'}}); +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', column_statistics := MAP {'nope': MAP {'min': '0'}}); +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', column_statistics := MAP {'id': MAP {'min': 'zero', 'max': 'ten'}}); +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/column_stats_1.parquet', column_statistics := NULL); +-- +ok +== +COPY (SELECT i AS id, {'x': i, 'y': 'v_' || i} AS s, [i, i + 1] AS l FROM range(1000) t(i)) +TO '{TEST_DIR}/column_stats_nested_1.parquet' (FORMAT parquet); +-- +ok +== +COPY (SELECT i AS id, {'x': i, 'y': 'v_' || i} AS s, [i, i + 1] AS l FROM range(1000, 2000) t(i)) +TO '{TEST_DIR}/column_stats_nested_2.parquet' (FORMAT parquet); +-- +ok +== +EXPLAIN SELECT s.x FROM read_parquet(['{TEST_DIR}/column_stats_nested_1.parquet', '{TEST_DIR}/column_stats_nested_2.parquet'], + column_statistics := MAP {'"s"."x"': MAP {'min': '0', 'max': '1999', 'count': '2000', 'null_count': '0'}}) +WHERE s.x > 5000; +-- +ok +== +SELECT count(*) FROM read_parquet(['{TEST_DIR}/column_stats_nested_1.parquet', '{TEST_DIR}/column_stats_nested_2.parquet'], + column_statistics := MAP {'"s"."x"': MAP {'min': '0', 'max': '1999', 'count': '2000', 'null_count': '0'}}) +WHERE s.x >= 1500; +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/column_stats_nested_1.parquet', column_statistics := MAP {'"s"."z"': MAP {'min': '0'}}); +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/column_stats_nested_1.parquet', column_statistics := MAP {'"s".x': MAP {'min': '0'}}); +-- +ok +== +COPY (SELECT i AS ident FROM range(1000, 2000) t(i)) TO '{TEST_DIR}/column_stats_renamed.parquet' (FORMAT parquet); +-- +ok +== +EXPLAIN SELECT id FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_renamed.parquet'], union_by_name := true, + column_statistics := MAP {'"id"': MAP {'min': '0', 'max': '99999', 'count': '101000', 'null_count': '1000'}, + '"ident"': MAP {'min': '1000', 'max': '1999', 'count': '101000', 'null_count': '100000'}}) +WHERE ident > 5000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_copy_failure_cleans_up.test b/parser/testdata/corpus/sql/copy/parquet/parquet_copy_failure_cleans_up.test index 317baa7..05f4c20 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_copy_failure_cleans_up.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_copy_failure_cleans_up.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_copy_failure_cleans_up.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 'hello'::INT) to '{TEST_DIR}/borked.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_copy_type_mismatch.test b/parser/testdata/corpus/sql/copy/parquet/parquet_copy_type_mismatch.test index e16b2e6..7cc47fa 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_copy_type_mismatch.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_copy_type_mismatch.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_copy_type_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version='v1.2.0' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_corrupt_stats.test b/parser/testdata/corpus/sql/copy/parquet/parquet_corrupt_stats.test index 5fbc51c..3cbb9a3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_corrupt_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_corrupt_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_corrupt_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/parquet-testing/out_of_range_stats.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_count_star.test b/parser/testdata/corpus/sql/copy/parquet/parquet_count_star.test index e52a2e3..a36f746 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_count_star.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_count_star.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_count_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM '{DATA_DIR}/parquet-testing/out_of_range_stats.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_dbp_empty_miniblock.test b/parser/testdata/corpus/sql/copy/parquet/parquet_dbp_empty_miniblock.test new file mode 100644 index 0000000..faac93a --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_dbp_empty_miniblock.test @@ -0,0 +1,13 @@ +# source: test/sql/copy/parquet/parquet_dbp_empty_miniblock.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_parquet('data/parquet-testing/broken/dbp_empty_miniblock.parquet') LIMIT 3; +-- +ok +== +SELECT count(*) FROM read_parquet('data/parquet-testing/broken/dbp_empty_miniblock.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_debug_use_openssl.test b/parser/testdata/corpus/sql/copy/parquet/parquet_debug_use_openssl.test index 4a00d96..f87f1e5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_debug_use_openssl.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_debug_use_openssl.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_debug_use_openssl.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42 i) to '{TEST_DIR}/parquet_debug_use_openssl.parquet' (DEBUG_USE_OPENSSL true) diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_deep_schema.test b/parser/testdata/corpus/sql/copy/parquet/parquet_deep_schema.test new file mode 100644 index 0000000..bfa8d11 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_deep_schema.test @@ -0,0 +1,21 @@ +# source: test/sql/copy/parquet/parquet_deep_schema.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_parquet('data/parquet-testing/broken/deep_schema.parquet'); +-- +ok +== +DESCRIBE SELECT * FROM 'data/parquet-testing/broken/deep_schema.parquet'; +-- +ok +== +COPY (SELECT {'a': {'a': {'a': [1, 2]}}} s) TO '{TEMP_DIR}/parquet_nested_ok.parquet'; +-- +ok +== +SELECT s.a.a.a FROM read_parquet('{TEMP_DIR}/parquet_nested_ok.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_dictionary_zero_sum_aggregate.test b/parser/testdata/corpus/sql/copy/parquet/parquet_dictionary_zero_sum_aggregate.test index 121dbf2..d646001 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_dictionary_zero_sum_aggregate.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_dictionary_zero_sum_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_dictionary_zero_sum_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_encoding_skip.test b/parser/testdata/corpus/sql/copy/parquet/parquet_encoding_skip.test index 6c5abc3..fb902bc 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_encoding_skip.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_encoding_skip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_encoding_skip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i id, i AS bigint, i::SMALLINT AS tinyint, i::DOUBLE dbl, 'prefix_' || i::VARCHAR str, 'constant' const_str FROM range(3000) t(i)) TO '{TEST_DIR}/skip.parquet' (PARQUET_VERSION '{parquet_version}'); @@ -19,3 +19,60 @@ SELECT * FROM '{TEST_DIR}/skip_nested.parquet' WHERE id>2995 -- ok == +COPY ( + SELECT CASE WHEN i < 2048 THEN ((i % 2) * 2)::INTEGER ELSE 1 END AS filter_col, + i::FLOAT AS f, i::DOUBLE AS d, + CASE WHEN i % 7 = 0 THEN NULL ELSE 'value_' || lpad(i::VARCHAR, 6, '0') END AS s + FROM range(5000) t(i) +) TO '{TEST_DIR}/skip_v2_encodings.parquet' ( + FORMAT parquet, PARQUET_VERSION 'V2', ROW_GROUP_SIZE 10000, DICTIONARY_SIZE_LIMIT 1 +); +-- +ok +== +SELECT path_in_schema, encodings +FROM parquet_metadata('{TEST_DIR}/skip_v2_encodings.parquet') +WHERE path_in_schema IN ('f', 'd', 's') +ORDER BY path_in_schema +-- +ok +== +SELECT sum(f), sum(d), sum(length(s)) +FROM read_parquet('{TEST_DIR}/skip_v2_encodings.parquet') +WHERE filter_col = 1 +-- +ok +== +COPY ( + SELECT CASE WHEN i < 2048 THEN ((i % 2) * 2)::INTEGER ELSE 1 END AS filter_col, + CASE WHEN i % 7 = 0 THEN NULL ELSE 'value_' || lpad(i::VARCHAR, 6, '0') END AS s, + i::VARIANT AS v, + printf('00000000-0000-0000-0000-%012d', i)::UUID AS u, + INTERVAL (i) MICROSECOND AS iv, + (i / 100.0)::DECIMAL(20, 2) AS dec, + i::BIGINT AS n + FROM range(5000) t(i) +) TO '{TEST_DIR}/skip_v1_encodings.parquet' ( + FORMAT parquet, PARQUET_VERSION 'V1', ROW_GROUP_SIZE 10000, DICTIONARY_SIZE_LIMIT 1 +); +-- +ok +== +SELECT encodings +FROM parquet_metadata('{TEST_DIR}/skip_v1_encodings.parquet') +WHERE path_in_schema = 's' +-- +ok +== +SELECT sum(strlen(s)), sum(v::BIGINT) +FROM read_parquet('{TEST_DIR}/skip_v1_encodings.parquet') +WHERE filter_col = 1 +-- +ok +== +SELECT min(u)::VARCHAR, max(u)::VARCHAR, sum(epoch_us(iv)), sum(n), sum(dec) +FROM read_parquet('{TEST_DIR}/skip_v1_encodings.parquet') +WHERE filter_col = 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_encryption.test b/parser/testdata/corpus/sql/copy/parquet/parquet_encryption.test index 2fcd137..dda551f 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_encryption.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_encryption.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_encryption.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA add_parquet_key('my_cool_key', '42') @@ -11,6 +11,10 @@ PRAGMA add_parquet_key('my_invalid_duck_key', 'ZHVjaw==') -- ok == +PRAGMA add_parquet_key(NULL, 'somekey') +-- +ok +== COPY (SELECT 42 i) to '{TEST_DIR}/encrypted.parquet' (ENCRYPTION_CONFIG {column_keys: {key_name: ['col0', 'col1']}}) -- ok @@ -43,6 +47,10 @@ COPY test FROM '{TEST_DIR}/encrypted{key_len}.parquet' (ENCRYPTION_CONFIG {foote -- ok == +SET debug_verify_serializer=false +-- +ok +== SELECT * FROM read_parquet('{TEST_DIR}/encrypted128.parquet') -- ok @@ -75,6 +83,47 @@ SELECT * FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet', encryp -- ok == +SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet', + encryption_config={footer_key: 'key256'}) +-- +ok +== +EXPLAIN SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet', + encryption_config={footer_key: 'key256'}) +-- +ok +== +SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet') +-- +ok +== +SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet', + encryption_config={footer_key: 'key192'}) +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet', encryption_config={footer_key: 'key192'}) +WHERE i > 100 +-- +ok +== +COPY (SELECT 168 i) TO '{TEST_DIR}/plain_metadata_cache.parquet' +-- +ok +== +SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/plain_metadata_cache.parquet') +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/plain_metadata_cache.parquet') +-- +ok +== +SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/plain_metadata_cache.parquet', + encryption_config={footer_key: 'key256'}) +-- +ok +== SELECT * FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet', encryption_config={footer_key: 'key192'}) -- ok diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_enum_test.test b/parser/testdata/corpus/sql/copy/parquet/parquet_enum_test.test index cb66917..0548011 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_enum_test.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_enum_test.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_enum_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/adam_genotypes.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter.test b/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter.test index 5b8ed96..e0cfb19 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_expression_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter_pruning.test b/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter_pruning.test index 651dd12..e2aa337 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter_pruning.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_expression_filter_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_expression_filter_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS a FROM range(102400)) TO '{TEST_DIR}/expr_prune_int.parquet' (ROW_GROUP_SIZE 10240) @@ -148,7 +148,7 @@ WHERE prefix(s, p) OR prefix(s, 'd') ok == COPY ( - SELECT CASE WHEN range < 2048 THEN chr(255) || 'a' ELSE chr(256) || 'a' END AS s + SELECT CASE WHEN range < 2048 THEN chr((254 + range % 2)::INT) || 'a' ELSE chr(256) || 'a' END AS s FROM range(4096) ) TO '{TEST_DIR}/expr_prune_prefix_utf8_boundary.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048) -- @@ -166,6 +166,19 @@ WHERE prefix(s, chr(255)) OR prefix(s, 'zz') -- ok == +COPY ( + SELECT CASE WHEN range < 2048 THEN chr(255) || 'a' ELSE chr(256) || 'a' END AS s + FROM range(4096) +) TO '{TEST_DIR}/expr_prune_prefix_always_true.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048) +-- +ok +== +SELECT count(*) +FROM '{TEST_DIR}/expr_prune_prefix_always_true.parquet' +WHERE prefix(s, chr(255)) OR prefix(s, 'zz') +-- +ok +== SELECT count(*) FROM '{TEST_DIR}/expr_prune_prefix_or.parquet' WHERE s ILIKE 'P0000%' @@ -296,3 +309,19 @@ WHERE octet_length(b) > 30 -- ok == +SET disabled_optimizers='statistics_propagation' +-- +ok +== +SELECT {column} FROM read_parquet('{DATA_DIR}/parquet-testing/nan_count_bounds.parquet', can_have_nan=false) WHERE {column} > 1 +-- +error: Parser Error: syntax error at or near "column" +== +SELECT {column} FROM read_parquet('{DATA_DIR}/parquet-testing/nan_count_bounds.parquet', can_have_nan=false) WHERE {column} > 1 AND {column} < 2 +-- +error: Parser Error: syntax error at or near "column" +== +SET disabled_optimizers='' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_external_access.test b/parser/testdata/corpus/sql/copy/parquet/parquet_external_access.test index 6543197..4ab3d80 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_external_access.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_external_access.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_external_access.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/arrow/lineitem-arrow.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_filename.test b/parser/testdata/corpus/sql/copy/parquet/parquet_filename.test index 759c8e9..e207073 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_filename.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_filename.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_filename.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select i, j, parse_path(filename)[-2:] from parquet_scan('{DATA_DIR}/parquet-testing/glob*/t?.parquet', FILENAME=1) order by i; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_filename_filter.test b/parser/testdata/corpus/sql/copy/parquet/parquet_filename_filter.test index 1891124..2ad096f 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_filename_filter.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_filename_filter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_filename_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select id, value as f, date from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/different_order/*/*/test.parquet', HIVE_PARTITIONING=1) where filename='value1'; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_filter_bug1391.test b/parser/testdata/corpus/sql/copy/parquet/parquet_filter_bug1391.test index 52acc16..aa837b3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_filter_bug1391.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_filter_bug1391.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_filter_bug1391.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW tbl AS SELECT * FROM PARQUET_SCAN('{DATA_DIR}/parquet-testing/filter_bug1391.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_filter_dictionary_materialize.test b/parser/testdata/corpus/sql/copy/parquet/parquet_filter_dictionary_materialize.test index 5cf0b7f..4453730 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_filter_dictionary_materialize.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_filter_dictionary_materialize.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_filter_dictionary_materialize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i::BIGINT AS k, 'this is a sufficiently long string value number ' || i AS v, diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_filter_narrowing_cast.test b/parser/testdata/corpus/sql/copy/parquet/parquet_filter_narrowing_cast.test new file mode 100644 index 0000000..e7ce977 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_filter_narrowing_cast.test @@ -0,0 +1,96 @@ +# source: test/sql/copy/parquet/parquet_filter_narrowing_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 0.1::FLOAT AS c) TO '{TEST_DIR}/narrow_float.parquet' (FORMAT parquet) +-- +ok +== +CREATE VIEW f AS SELECT * FROM read_parquet('{TEST_DIR}/narrow_float.parquet', + schema=map{'c': {'name': 'c', 'type': 'DOUBLE', 'default_value': NULL}}) +-- +ok +== +SELECT c FROM f +-- +ok +== +SELECT COUNT(*) FROM f WHERE c > 0.1 +-- +ok +== +SELECT COUNT(*) FROM f WHERE c >= 0.1 +-- +ok +== +SELECT COUNT(*) FROM f WHERE c = 0.1 +-- +ok +== +SELECT COUNT(*) FROM f WHERE c <> 0.1 +-- +ok +== +SELECT COUNT(*) FROM f WHERE c IN (0.1) +-- +ok +== +SELECT COUNT(*) FROM f WHERE c < 0.1 +-- +ok +== +COPY (SELECT 0.7::FLOAT AS c) TO '{TEST_DIR}/narrow_float7.parquet' (FORMAT parquet) +-- +ok +== +CREATE VIEW f7 AS SELECT * FROM read_parquet('{TEST_DIR}/narrow_float7.parquet', + schema=map{'c': {'name': 'c', 'type': 'DOUBLE', 'default_value': NULL}}) +-- +ok +== +SELECT COUNT(*) FROM f7 WHERE c < 0.7 +-- +ok +== +SELECT COUNT(*) FROM f7 WHERE c >= 0.7 +-- +ok +== +COPY (SELECT unnest([0.1, 0.5])::FLOAT AS c) TO '{TEST_DIR}/narrow_two_rows.parquet' (FORMAT parquet) +-- +ok +== +SELECT c FROM read_parquet('{TEST_DIR}/narrow_two_rows.parquet', + schema=map{'c': {'name': 'c', 'type': 'DOUBLE', 'default_value': NULL}}) +WHERE c > 0.1 ORDER BY c +-- +ok +== +COPY (SELECT 2::BIGINT AS c) TO '{TEST_DIR}/narrow_bigint.parquet' (FORMAT parquet) +-- +ok +== +CREATE VIEW b AS SELECT * FROM read_parquet('{TEST_DIR}/narrow_bigint.parquet', + schema=map{'c': {'name': 'c', 'type': 'DOUBLE', 'default_value': NULL}}) +-- +ok +== +SELECT COUNT(*) FROM b WHERE c > 1.5 +-- +ok +== +SELECT COUNT(*) FROM b WHERE c = 1.5 +-- +ok +== +COPY (SELECT 1.25::DECIMAL(18,2) AS c) TO '{TEST_DIR}/narrow_decimal.parquet' (FORMAT parquet) +-- +ok +== +SELECT COUNT(*) FROM read_parquet('{TEST_DIR}/narrow_decimal.parquet', + schema=map{'c': {'name': 'c', 'type': 'DECIMAL(18,3)', 'default_value': NULL}}) +WHERE c > 1.245 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_fixed_length_blob_dict.test b/parser/testdata/corpus/sql/copy/parquet/parquet_fixed_length_blob_dict.test index 034add6..63a7de9 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_fixed_length_blob_dict.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_fixed_length_blob_dict.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_fixed_length_blob_dict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT @@ -14,3 +14,8 @@ FROM parquet_scan('{DATA_DIR}/parquet-testing/sorted.zstd_18_131072_small.parque -- ok == +SELECT DISTINCT octet_length(sfc_key) +FROM parquet_scan('{DATA_DIR}/parquet-testing/sorted.zstd_18_131072_small.parquet') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_glob_cache.test b/parser/testdata/corpus/sql/copy/parquet/parquet_glob_cache.test index e7923fb..4a0a6c8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_glob_cache.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_glob_cache.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_glob_cache.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN select count(*) from parquet_scan('{DATA_DIR}/parquet-testing/glob/*') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_go.test b/parser/testdata/corpus/sql/copy/parquet/parquet_go.test index 794dcc8..680c43a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_go.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_go.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_go.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/parquet_go.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_hive.test b/parser/testdata/corpus/sql/copy/parquet/parquet_hive.test index 394a13f..958c2cc 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_hive.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_hive.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_hive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select id, value, part, date from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/simple/*/*/test.parquet', HIVE_PARTITIONING=1) order by id @@ -137,3 +137,7 @@ EXPLAIN select a from parquet_scan('{TEMP_DIR}/hive_filters_2/*/*/*.parquet', HI -- ok == +select max(date) from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/simple/*/*/test.parquet', HIVE_PARTITIONING=1) where date < '2013-01-01'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_hive2.test b/parser/testdata/corpus/sql/copy/parquet/parquet_hive2.test index 0ea84b4..a513f39 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_hive2.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_hive2.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_hive2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table orders(m int,v int,j int); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_column_alias.test b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_column_alias.test new file mode 100644 index 0000000..721a21c --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_column_alias.test @@ -0,0 +1,37 @@ +# source: test/sql/copy/parquet/parquet_hive_column_alias.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT * FROM (VALUES (1,7), (1,7), (NULL,7), (2,9)) t(id,part)) TO '{TEST_DIR}/aliased_hive' (FORMAT parquet, PARTITION_BY(part)) +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(a,b) WHERE b=999 +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(a,b) WHERE b=7 +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(part,renamed) WHERE part=1 +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(part,renamed) WHERE part IS NULL +-- +ok +== +SELECT a,b FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(a,b) WHERE b=7 +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') WHERE part=7 +-- +ok +== +EXPLAIN SELECT a,b FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(a,b) WHERE b=7 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_empty.test b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_empty.test index e54cdb1..bac1f91 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_empty.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_empty.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_hive_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_null.test b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_null.test index fd44cf2..9ba750f 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_null.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_hive_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select i%5 as a, i%2 as b from range(0,10) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_override_stats.test b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_override_stats.test index 8afd090..d77fea5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_hive_override_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_hive_override_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_hive_override_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1::UBIGINT AS id, 42::UBIGINT AS part) @@ -52,6 +52,10 @@ SELECT count(*) FROM read_parquet('{TEST_DIR}/hive_mismatch/part=7/disagrees.par -- ok == +SELECT count(*) FROM read_parquet('{TEST_DIR}/hive_mismatch/part=7/disagrees.parquet') WHERE part = 999 +-- +ok +== SELECT typeof(part), part FROM read_parquet('{TEST_DIR}/hive_mismatch/part=7/disagrees.parquet', hive_partitioning=false) -- diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_interval_converted_type.test b/parser/testdata/corpus/sql/copy/parquet/parquet_interval_converted_type.test new file mode 100644 index 0000000..7d4a70e --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_interval_converted_type.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/parquet/parquet_interval_converted_type.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM parquet_metadata('data/parquet-testing/broken/interval_converted_type.parquet'); +-- +ok +== +SELECT * FROM parquet_full_metadata('data/parquet-testing/broken/interval_converted_type.parquet'); +-- +ok +== +SELECT * FROM read_parquet('data/parquet-testing/broken/interval_converted_type.parquet'); +-- +ok +== +COPY (SELECT INTERVAL 3 DAY i) TO '{TEMP_DIR}/interval_ok.parquet'; +-- +ok +== +SELECT i FROM read_parquet('{TEMP_DIR}/interval_ok.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_json_varchar_mismatch.test b/parser/testdata/corpus/sql/copy/parquet/parquet_json_varchar_mismatch.test index a3421b8..3e0efe0 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_json_varchar_mismatch.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_json_varchar_mismatch.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_json_varchar_mismatch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 'TEST 1' AS groupDn, NULL AS memberDn) TO '{TEST_DIR}/json_varchar_mismatch1.json'; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_late_materialization.test b/parser/testdata/corpus/sql/copy/parquet/parquet_late_materialization.test index 77c1463..d583a51 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_late_materialization.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_late_materialization.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_late_materialization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i, i + 1 AS j, i + 2 AS k, -i AS l FROM range(10) t(i)) TO '{TEST_DIR}/late_materialization.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_list.test b/parser/testdata/corpus/sql/copy/parquet/parquet_list.test index 996ce5a..b059644 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_list.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_list.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from parquet_scan(['{DATA_DIR}/parquet-testing/glob/t1.parquet', '{DATA_DIR}/parquet-testing/glob/t2.parquet']); @@ -25,13 +25,13 @@ ok == select count(*) from parquet_scan([NULL]); -- -error: Parser Error: parquet_scan reader cannot take NULL input as parameter +error: Parser Error: "parquet_scan" reader cannot take NULL input as parameter == select count(*) from parquet_scan(NULL::VARCHAR[]); -- -error: Parser Error: parquet_scan cannot take NULL list as parameter +error: Parser Error: "parquet_scan" cannot take NULL list as parameter == select count(*) from parquet_scan(NULL::VARCHAR); -- -error: Parser Error: parquet_scan cannot take NULL list as parameter +error: Parser Error: "parquet_scan" cannot take NULL list as parameter == diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_metadata.test b/parser/testdata/corpus/sql/copy/parquet/parquet_metadata.test index 7de1730..a1435a2 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_metadata.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_metadata.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_metadata.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_metadata('{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_blob.test b/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_blob.test index 228387a..5108aa7 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_blob.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_blob.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_metadata_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select * from values ('\x0An\xC3\xB5'::blob), ('\xFFXl\x9D'::blob) tbl(b)) to '{TEST_DIR}/blobs.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_cache.test b/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_cache.test index 9ad044f..d7d4d36 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_cache.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_metadata_cache.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_metadata_cache.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/cache/cache1.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_nan.test b/parser/testdata/corpus/sql/copy/parquet/parquet_nan.test index e2acef3..f79a148 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_nan.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_nan.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_nan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/nan-float.parquet') order by 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_nan_count.test b/parser/testdata/corpus/sql/copy/parquet/parquet_nan_count.test new file mode 100644 index 0000000..4f9cc4e --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_nan_count.test @@ -0,0 +1,119 @@ +# source: test/sql/copy/parquet/parquet_nan_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE VIEW nan_data AS +SELECT x::FLOAT f, x::DOUBLE d FROM (SELECT CASE WHEN i%4<2 THEN 'nan'::DOUBLE WHEN i%4=2 THEN 1 ELSE NULL END x FROM range(4096) t(i)) +-- +ok +== +COPY nan_data TO '{TEST_DIR}/nan_count_dict.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048) +-- +ok +== +COPY nan_data TO '{TEST_DIR}/nan_count_plain.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048, PARQUET_VERSION V1, DICTIONARY_SIZE_LIMIT 0) +-- +ok +== +COPY nan_data TO '{TEST_DIR}/nan_count_bss.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048, PARQUET_VERSION V2, DICTIONARY_SIZE_LIMIT 0) +-- +ok +== +SELECT row_group_id, path_in_schema, encodings, stats_nan_count, stats_null_count, stats_min_value, stats_max_value +FROM parquet_metadata('{TEST_DIR}/nan_count_dict.parquet') +ORDER BY ALL +-- +ok +== +SELECT row_group_id, path_in_schema, encodings, stats_nan_count, stats_null_count, stats_min_value, stats_max_value +FROM parquet_metadata('{TEST_DIR}/nan_count_plain.parquet') +ORDER BY ALL +-- +ok +== +SELECT row_group_id, path_in_schema, encodings, stats_nan_count, stats_null_count, stats_min_value, stats_max_value +FROM parquet_metadata('{TEST_DIR}/nan_count_bss.parquet') +ORDER BY ALL +-- +ok +== +SELECT path_in_schema, encodings, encoding_stats[1].page_type, stats_nan_count +FROM parquet_metadata('{TEST_DIR}/nan_count_dict.parquet') +WHERE row_group_id = 0 +ORDER BY ALL +-- +ok +== +COPY (SELECT i::FLOAT f, i::DOUBLE d, i::HUGEINT h, i FROM range(10) t(i)) TO '{TEST_DIR}/nan_count_zero.parquet' +-- +ok +== +SELECT path_in_schema, type, stats_nan_count, stats_min_value, stats_max_value +FROM parquet_metadata('{TEST_DIR}/nan_count_zero.parquet') +ORDER BY ALL +-- +ok +== +COPY (SELECT CASE WHEN i%4=0 THEN NULL WHEN i%4=1 THEN [] ELSE ['nan'::DOUBLE, NULL, 'nan', 1] END l FROM range(8) t(i)) TO '{TEST_DIR}/nan_count_list.parquet' +-- +ok +== +SELECT stats_nan_count, stats_null_count, num_values FROM parquet_metadata('{TEST_DIR}/nan_count_list.parquet') +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/nan_count_{encoding}.parquet', can_have_nan=false) WHERE {column} > 1 +-- +error: Parser Error: syntax error at or near "column" +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/nan_count_{encoding}.parquet', can_have_nan=false) WHERE {column} = 1 +-- +error: Parser Error: syntax error at or near "column" +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/nan_count_{encoding}.parquet', can_have_nan=false) WHERE {column} != 1 +-- +error: Parser Error: syntax error at or near "column" +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/nan_count_{encoding}.parquet', can_have_nan=false) WHERE {column} = 'nan' +-- +error: Parser Error: syntax error at or near "column" +== +SELECT stats_min_value, stats_max_value, stats_nan_count FROM parquet_metadata('{DATA_DIR}/parquet-testing/arrow_nan.parquet') LIMIT 1 +-- +ok +== +SELECT f, d FROM read_parquet('{DATA_DIR}/parquet-testing/arrow_nan.parquet', can_have_nan=true) WHERE d > 1 +-- +ok +== +COPY (SELECT i::DOUBLE d FROM range(2048) t(i) UNION ALL SELECT 'nan'::DOUBLE FROM range(2048)) TO '{TEST_DIR}/nan_count_mixed.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048) +-- +ok +== +SELECT row_group_id, stats_nan_count, stats_max_value FROM parquet_metadata('{TEST_DIR}/nan_count_mixed.parquet') ORDER BY ALL +-- +ok +== +SELECT count(*), min(d) FROM read_parquet('{TEST_DIR}/nan_count_mixed.parquet', can_have_nan={option}) WHERE d > 5000 +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/nan_count_mixed.parquet', can_have_nan={option}) WHERE d < 10 +-- +error: Parser Error: syntax error at or near "}" +== +SELECT path_in_schema, stats_min_value, stats_max_value, stats_null_count, stats_nan_count, num_values +FROM parquet_metadata('{DATA_DIR}/parquet-testing/nan_count_bounds.parquet') +ORDER BY ALL +-- +ok +== +SELECT {column} FROM read_parquet('{DATA_DIR}/parquet-testing/nan_count_bounds.parquet', can_have_nan=false) WHERE {column} != 1 +-- +error: Parser Error: syntax error at or near "column" +== +SELECT {column} FROM read_parquet('{DATA_DIR}/parquet-testing/nan_count_bounds.parquet', can_have_nan=false) WHERE {column} <= 1 +-- +error: Parser Error: syntax error at or near "column" +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_no_stats.test b/parser/testdata/corpus/sql/copy/parquet/parquet_no_stats.test index 02c9969..97cb9b7 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_no_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_no_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_no_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT min(x), max(x) FROM read_parquet('{DATA_DIR}/parquet-testing/no_stats.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_nullbyte.test b/parser/testdata/corpus/sql/copy/parquet/parquet_nullbyte.test index da29e3d..8f76b92 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_nullbyte.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_nullbyte.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_nullbyte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/nullbyte.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_pandas_date.test b/parser/testdata/corpus/sql/copy/parquet/parquet_pandas_date.test index 85a26f2..3ee7b8b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_pandas_date.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_pandas_date.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_pandas_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/pandas-date.parquet') order by 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model.test index 00b45ce..654a5a5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_prefetch_cost_model.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model_remote.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model_remote.test index d3f5fb7..678a6f8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model_remote.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_cost_model_remote.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_prefetch_cost_model_remote.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET enable_external_file_cache=false diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_first_group_cost.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_first_group_cost.test new file mode 100644 index 0000000..ee9dc7c --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_first_group_cost.test @@ -0,0 +1,47 @@ +# source: test/sql/copy/parquet/parquet_prefetch_first_group_cost.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT CASE WHEN i%2000=0 THEN 0 ELSE 1 END AS flag, + md5(i::VARCHAR)||md5((i+1)::VARCHAR)||md5((i+2)::VARCHAR)||md5((i+3)::VARCHAR) AS payload + FROM range(4096) t(i) +) TO '{TEST_DIR}/cheap_first_filter.parquet' + (ROW_GROUP_SIZE 2048, COMPRESSION 'uncompressed', WRITE_BLOOM_FILTER FALSE) +-- +ok +== +COPY ( + SELECT md5(i::VARCHAR) AS f, md5((i+1)::VARCHAR) AS payload + FROM range(4096) t(i) +) TO '{TEST_DIR}/expensive_first_filter.parquet' + (ROW_GROUP_SIZE 2048, COMPRESSION 'uncompressed', WRITE_BLOOM_FILTER FALSE) +-- +ok +== +SELECT bit_xor(hash(flag,payload)) FROM read_parquet('{TEST_DIR}/cheap_first_filter.parquet') WHERE flag=1 +-- +ok +== +SELECT row_group_id,strategy FROM duckdb_logs_parsed('ParquetPrefetch') +WHERE file_path LIKE '%cheap_first_filter.parquet' ORDER BY row_group_id +-- +ok +== +SELECT bit_xor(hash(f,payload)) FROM read_parquet('{TEST_DIR}/expensive_first_filter.parquet') +WHERE f NOT LIKE '%not-in-hex%' +-- +ok +== +SELECT row_group_id,strategy FROM duckdb_logs_parsed('ParquetPrefetch') +WHERE file_path LIKE '%expensive_first_filter.parquet' ORDER BY row_group_id +-- +ok +== +SELECT bit_xor(hash(flag,payload,file_row_number)) +FROM read_parquet('{TEST_DIR}/cheap_first_filter.parquet',file_row_number=true) +WHERE file_row_number%2=0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_footer_once.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_footer_once.test new file mode 100644 index 0000000..4af1dc7 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_footer_once.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/parquet/parquet_prefetch_footer_once.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i a, i b, i c, i d FROM range(131072) t(i)) +TO '{TEST_DIR}/prefetch_footer_once.parquet' (ROW_GROUP_SIZE 2048) +-- +ok +== +SELECT count(*) FROM parquet_metadata('{TEST_DIR}/prefetch_footer_once.parquet') +-- +ok +== +SELECT count(*) FROM duckdb_logs_parsed('FileSystem') +WHERE path LIKE '%prefetch_footer_once.parquet' AND op = 'READ' +-- +ok +== +SELECT count(*) = count(DISTINCT (pos, bytes)) +FROM duckdb_logs_parsed('FileSystem') +WHERE path LIKE '%prefetch_footer_once.parquet' AND op = 'READ' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_metrics_multifile.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_metrics_multifile.test index c22f65a..d3ea6a9 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_metrics_multifile.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_metrics_multifile.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_prefetch_metrics_multifile.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET parquet_prefetch_column_gap=16384 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test new file mode 100644 index 0000000..c320ab4 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test @@ -0,0 +1,62 @@ +# source: test/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET parquet_prefetch_column_gap=16384; +-- +ok +== +SET enable_external_file_cache=false; +-- +ok +== +COPY ( + SELECT hash(i)::VARCHAR AS a, + CASE WHEN i%100=50 THEN 51 ELSE i%100 END AS c, + hash(i+1)::VARCHAR AS b + FROM range(12288) t(i) +) TO '{TEST_DIR}/prefetch_overlap.parquet' + (FORMAT PARQUET, ROW_GROUP_SIZE 2048, COMPRESSION 'uncompressed', WRITE_BLOOM_FILTER FALSE); +-- +ok +== +SET enable_profiling='json'; +-- +ok +== +SET profiling_output='{TEST_DIR}/prefetch_overlap.json'; +-- +error: Parser Error: Profiler file type ({TEST_DIR}/prefetch_overlap.json) must either have the same file extension as the profiling output type (query_tree), or be a '.txt' file. Set "enable_profiling = 'json'" first. +== +SET tracked_metrics=['io.total_bytes_read']; +-- +ok +== +SELECT sum(length(a)+length(b)) FROM read_parquet('{TEST_DIR}/prefetch_overlap.parquet') WHERE c=50; +-- +ok +== +PRAGMA disable_profiling; +-- +ok +== +SELECT io.total_bytes_read < 40000 FROM read_json_auto('{TEST_DIR}/prefetch_overlap.json'); +-- +ok +== +SELECT + (SELECT sum(length(a)+length(b)) FROM read_parquet('{TEST_DIR}/prefetch_overlap.parquet') WHERE c=51) + = + (SELECT sum(length(hash(i)::VARCHAR)+length(hash(i+1)::VARCHAR)) + FROM range(12288) t(i) WHERE i%100 IN (50,51)); +-- +ok +== +SELECT + (SELECT sum(length(a)+length(b)) FROM read_parquet('{TEST_DIR}/prefetch_overlap.parquet')) + = + (SELECT sum(length(hash(i)::VARCHAR)+length(hash(i+1)::VARCHAR)) FROM range(12288) t(i)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/collate/test_unsupported_collations.test.metadata.json b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test.metadata.json similarity index 74% rename from parser/testdata/corpus/sql/collate/test_unsupported_collations.test.metadata.json rename to parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test.metadata.json index a855d7a..0a73ac0 100644 --- a/parser/testdata/corpus/sql/collate/test_unsupported_collations.test.metadata.json +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_overlapping_ranges.test.metadata.json @@ -1,5 +1,5 @@ { "todo": { - "eb15b92628017c19": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + "10680897ce345798": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" } } diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_projection.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_projection.test index d67ca5e..72a810a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_projection.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_projection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_prefetch_projection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_row_group_outcome.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_row_group_outcome.test index b9fc8d9..54a6ea0 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_row_group_outcome.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_row_group_outcome.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_prefetch_row_group_outcome.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_shared_column_chunks.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_shared_column_chunks.test new file mode 100644 index 0000000..91814f8 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_shared_column_chunks.test @@ -0,0 +1,27 @@ +# source: test/sql/copy/parquet/parquet_prefetch_shared_column_chunks.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT CASE WHEN i % 7 = 0 THEN NULL ELSE i END AS i, {'a': i::INT, 'd': CASE WHEN i % 2 = 0 THEN i::VARIANT ELSE md5(i::VARCHAR)::VARIANT END}::VARIANT AS v + FROM range(10000) t(i) +) TO '{TEST_DIR}/shared_chunks.parquet' (ROW_GROUP_SIZE 5000) +-- +ok +== +SELECT max(v.a::VARCHAR), max(v.d::VARCHAR) FROM read_parquet('{TEST_DIR}/shared_chunks.parquet') WHERE i >= 0 +-- +ok +== +SELECT row_group_id, strategy +FROM duckdb_logs_parsed('ParquetPrefetch') +WHERE file_path LIKE '%shared_chunks.parquet' +ORDER BY row_group_id +-- +ok +== +SELECT max(v.d::VARCHAR), max(v.d::VARCHAR || '') FROM read_parquet('{TEST_DIR}/shared_chunks.parquet') WHERE i >= 0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_strategy_option.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_strategy_option.test index e805c48..182a7cc 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_strategy_option.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_strategy_option.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_prefetch_strategy_option.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_tracked_memory.test b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_tracked_memory.test index bbe4d92..67ea7bd 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_tracked_memory.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_prefetch_tracked_memory.test @@ -1,13 +1,17 @@ # source: test/sql/copy/parquet/parquet_prefetch_tracked_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -copy (select range i from range(16000000)) to '{TEST_DIR}/prefetch_tracked_big.parquet' (ROW_GROUP_SIZE 16000000); +set threads=1; -- ok == -set memory_limit='240mb'; +copy (select range i from range(64000000)) to '{TEST_DIR}/prefetch_tracked_big.parquet' (ROW_GROUP_SIZE 64000000); +-- +ok +== +set memory_limit='360mb'; -- ok == diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_read_options.test b/parser/testdata/corpus/sql/copy/parquet/parquet_read_options.test new file mode 100644 index 0000000..ad31bc5 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_read_options.test @@ -0,0 +1,64 @@ +# source: test/sql/copy/parquet/parquet_read_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 42 AS i) TO '{TEST_DIR}/read_options.parquet' (FORMAT parquet) +-- +ok +== +CREATE TABLE target(i INTEGER) +-- +ok +== +COPY target FROM '{TEST_DIR}/read_options.parquet' ( + FORMAT parquet, + COMPRESSION 'zstd', + BINARY_AS_STRING false, + FILE_ROW_NUMBER false, + DEBUG_USE_OPENSSL false, + CAN_HAVE_NAN true +) +-- +ok +== +SELECT * FROM target +-- +ok +== +CREATE TABLE bare_option(i INTEGER) +-- +ok +== +COPY bare_option FROM '{TEST_DIR}/read_options.parquet' (FORMAT parquet, BINARY_AS_STRING) +-- +ok +== +SELECT * FROM bare_option +-- +ok +== +CREATE TABLE with_row_number(i INTEGER, file_row_number BIGINT) +-- +ok +== +COPY with_row_number FROM '{TEST_DIR}/read_options.parquet' (FORMAT parquet, FILE_ROW_NUMBER true) +-- +ok +== +SELECT * FROM with_row_number +-- +ok +== +COPY target FROM '{TEST_DIR}/read_options.parquet' (FORMAT parquet, CAN_HAVE_NAN) +-- +ok +== +COPY target FROM '{TEST_DIR}/read_options.parquet' (FORMAT parquet, ENCRYPTION_CONFIG) +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/read_options.parquet', explicit_cardinality=123) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_row_group_row_count.test b/parser/testdata/corpus/sql/copy/parquet/parquet_row_group_row_count.test new file mode 100644 index 0000000..4d922ee --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_row_group_row_count.test @@ -0,0 +1,29 @@ +# source: test/sql/copy/parquet/parquet_row_group_row_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_execution_time=10000; +-- +ok +== +SELECT * FROM read_parquet('data/parquet-testing/broken/huge_rg_num_rows.parquet'); +-- +ok +== +SELECT * FROM read_parquet('data/parquet-testing/broken/huge_rg_num_rows.parquet') USING SAMPLE 10; +-- +ok +== +SELECT file_row_number FROM read_parquet('data/parquet-testing/broken/huge_rg_num_rows.parquet', file_row_number = true); +-- +ok +== +COPY (SELECT i, [i, i + 1] l, {'a': i} s, CASE WHEN i % 2 = 0 THEN NULL ELSE i END n FROM range(10) t(i)) TO '{TEMP_DIR}/row_group_row_count.parquet'; +-- +ok +== +SELECT count(*), sum(len(l)), sum(s.a), count(n) FROM read_parquet('{TEMP_DIR}/row_group_row_count.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_row_number.test b/parser/testdata/corpus/sql/copy/parquet/parquet_row_number.test index 3c5b14e..16b6f13 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_row_number.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_row_number.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_row_number.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select min(file_row_number) from parquet_scan('{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet', file_row_number=1); @@ -43,10 +43,6 @@ select s.min, s.max, s.has_null, s.has_no_null from (select first(stats(file_row -- ok == -PRAGMA explain_output = OPTIMIZED_ONLY; --- -ok -== explain select 1 from parquet_scan('{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet', file_row_number=1) where file_row_number > 10000; -- ok diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_schema_duckdb_type.test b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_duckdb_type.test new file mode 100644 index 0000000..d607301 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_duckdb_type.test @@ -0,0 +1,33 @@ +# source: test/sql/copy/parquet/parquet_schema_duckdb_type.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT [1, 2] AS l, {'a': 1, 'b': 'x'} AS s, MAP {'k': [1]} AS m, 42::VARIANT AS v, 'POINT (1 2)'::GEOMETRY AS g) +TO '{TEMP_DIR}/parquet_schema_duckdb_type.parquet' +-- +ok +== +SELECT name, duckdb_type FROM parquet_schema('{TEMP_DIR}/parquet_schema_duckdb_type.parquet') +-- +ok +== +SELECT count(*) FROM ( + SELECT name, duckdb_type FROM parquet_schema('{TEMP_DIR}/parquet_schema_duckdb_type.parquet') + WHERE name IN ('l', 's', 'm', 'v', 'g') + EXCEPT + SELECT column_name, column_type FROM (DESCRIBE FROM '{TEMP_DIR}/parquet_schema_duckdb_type.parquet') +) +-- +ok +== +SELECT duckdb_type, (SELECT typeof(TX_JSON) FROM '{DATA_DIR}/parquet-testing/json_convertedtype.parquet' LIMIT 1) +FROM parquet_schema('{DATA_DIR}/parquet-testing/json_convertedtype.parquet') WHERE name = 'TX_JSON' +-- +ok +== +SELECT name, duckdb_type FROM (SELECT unnest(parquet_schema, recursive := true) +FROM parquet_full_metadata('{TEMP_DIR}/parquet_schema_duckdb_type.parquet')) WHERE name IN ('s', 'g') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_schema_evolution.test b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_evolution.test index 18603b9..f5c4e08 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_schema_evolution.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_evolution.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_schema_evolution.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42::INT a, 43::INT c) TO '{TEST_DIR}/evolution_1.parquet' (FORMAT PARQUET); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_schema_lossy_filter_pushdown.test b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_lossy_filter_pushdown.test new file mode 100644 index 0000000..01268e3 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_lossy_filter_pushdown.test @@ -0,0 +1,53 @@ +# source: test/sql/copy/parquet/parquet_schema_lossy_filter_pushdown.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT TIMESTAMP '2020-01-01 10:00:00' AS c UNION ALL SELECT TIMESTAMP '2020-01-01') TO '__TEST_DIR__/sc_ts.parquet' +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_ts.parquet', schema=map{'c': {name: 'c', type: 'DATE', default_value: NULL}}) WHERE c = DATE '2020-01-01' +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_ts.parquet', schema=map{'c': {name: 'c', type: 'DATE', default_value: NULL}}) WHERE c IN (DATE '2020-01-01', DATE '2021-01-01') +-- +ok +== +COPY (SELECT 1.23::DECIMAL(9,4) AS c UNION ALL SELECT 1.2::DECIMAL(9,4)) TO '__TEST_DIR__/sc_dec.parquet' +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_dec.parquet', schema=map{'c': {name: 'c', type: 'DECIMAL(4,1)', default_value: NULL}}) WHERE c = 1.2 +-- +ok +== +COPY (SELECT 2.6::DECIMAL(4,1) AS c) TO '__TEST_DIR__/sc_dec_int.parquet' +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_dec_int.parquet', schema=map{'c': {name: 'c', type: 'INTEGER', default_value: NULL}}) WHERE c = 3 +-- +ok +== +COPY (SELECT '2020-01-01' AS c UNION ALL SELECT '2020-1-1') TO '__TEST_DIR__/sc_varchar.parquet' +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_varchar.parquet', schema=map{'c': {name: 'c', type: 'DATE', default_value: NULL}}) WHERE c = DATE '2020-01-01' +-- +ok +== +COPY (SELECT range::INTEGER AS c FROM range(10)) TO '__TEST_DIR__/sc_int.parquet' +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_int.parquet', schema=map{'c': {name: 'c', type: 'BIGINT', default_value: NULL}}) WHERE c >= 5 +-- +ok +== +SELECT count(*) FROM read_parquet('__TEST_DIR__/sc_int.parquet', schema=map{'c': {name: 'c', type: 'BIGINT', default_value: NULL}}) WHERE c = 10000000000 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_schema_num_children_fix.test b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_num_children_fix.test index 47cdba7..eedea52 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_schema_num_children_fix.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_schema_num_children_fix.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_schema_num_children_fix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM parquet_schema('{DATA_DIR}/parquet-testing/empty-group/empty_group_test.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_serialize_pruned_file_list.test b/parser/testdata/corpus/sql/copy/parquet/parquet_serialize_pruned_file_list.test new file mode 100644 index 0000000..9892c60 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_serialize_pruned_file_list.test @@ -0,0 +1,39 @@ +# source: test/sql/copy/parquet/parquet_serialize_pruned_file_list.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 AS id, 7 AS part) TO '{TEST_DIR}/prune_all' (FORMAT parquet, PARTITION_BY (part)) +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/prune_all/part=7/*.parquet') WHERE part = 999 +-- +ok +== +SELECT id, part FROM read_parquet('{TEST_DIR}/prune_all/part=7/*.parquet') WHERE part = 999 +-- +ok +== +SELECT id, part FROM read_parquet('{TEST_DIR}/prune_all/part=7/*.parquet') WHERE part = 7 +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/prune_all/does_not_exist*.parquet') +-- +ok +== +COPY (SELECT 'duckdb'::VARCHAR AS s, 42::INTEGER AS i) +TO '{TEST_DIR}/serialize_options.parquet' (FORMAT parquet) +-- +ok +== +SELECT i, typeof(i) FROM read_parquet('{TEST_DIR}/serialize_options.parquet', + schema=map{'i': {'name': 'i', 'type': 'BIGINT', 'default_value': NULL}}) +-- +ok +== +SELECT strlen(s) FROM read_parquet('{TEST_DIR}/serialize_options.parquet') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_shredding_unsupported_types.test b/parser/testdata/corpus/sql/copy/parquet/parquet_shredding_unsupported_types.test new file mode 100644 index 0000000..a71923e --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_shredding_unsupported_types.test @@ -0,0 +1,37 @@ +# source: test/sql/copy/parquet/parquet_shredding_unsupported_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1::VARIANT AS v) TO '__TEST_DIR__/shred_bit.parquet' (SHREDDING {v: 'BIT'}) +-- +ok +== +COPY (SELECT 1::VARIANT AS v) TO '__TEST_DIR__/shred_bignum.parquet' (SHREDDING {v: 'BIGNUM'}) +-- +ok +== +COPY (SELECT 's2'::VARIANT v) TO '__TEST_DIR__/shred_json.parquet' (SHREDDING {v: 'JSON'}) +-- +ok +== +COPY (SELECT {'a': 'not json'}::VARIANT v) TO '__TEST_DIR__/shred_json2.parquet' (SHREDDING {v: 'STRUCT(a JSON)'}) +-- +ok +== +COPY (SELECT 's2'::VARIANT v) TO '__TEST_DIR__/shred_varchar.parquet' (SHREDDING {v: 'VARCHAR'}) +-- +ok +== +SELECT v::VARCHAR FROM '__TEST_DIR__/shred_varchar.parquet' +-- +ok +== +COPY (SELECT {'a': 42}::VARIANT v) TO '__TEST_DIR__/shred_struct.parquet' (SHREDDING {v: 'STRUCT(a BIGINT)'}) +-- +ok +== +SELECT v::VARCHAR FROM '__TEST_DIR__/shred_struct.parquet' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_signed_zero.test b/parser/testdata/corpus/sql/copy/parquet/parquet_signed_zero.test new file mode 100644 index 0000000..3920ded --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_signed_zero.test @@ -0,0 +1,28 @@ +# source: test/sql/copy/parquet/parquet_signed_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE OR REPLACE TABLE signed_zero AS +SELECT (CASE WHEN i % 1000 = 7 THEN '-0.0' ELSE '0.0' END)::{type} AS x, + (CASE WHEN i % 1000 = 7 THEN '0.0' ELSE '-0.0' END)::{type} AS y +FROM range(2000) t(i) +-- +error: Parser Error: syntax error at or near "{" +== +COPY signed_zero TO '{TEST_DIR}/signed_zero_{type}_{version}.parquet' +(FORMAT PARQUET, PARQUET_VERSION {version}) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*), count(*) FILTER (WHERE signbit(x)), count(*) FILTER (WHERE signbit(y)) +FROM read_parquet('{TEST_DIR}/signed_zero_{type}_{version}.parquet') +-- +ok +== +SELECT count(*), bool_and(encodings = CASE WHEN '{version}' = 'V1' THEN 'PLAIN_DICTIONARY' ELSE 'RLE_DICTIONARY' END), + bool_and(stats_distinct_count = 2) +FROM parquet_metadata('{TEST_DIR}/signed_zero_{type}_{version}.parquet') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_silly.test b/parser/testdata/corpus/sql/copy/parquet/parquet_silly.test index 2f9fe25..9242e4a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_silly.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_silly.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_silly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select "önë", "C1", "🦆" from parquet_scan('{DATA_DIR}/parquet-testing/silly-names.parquet') order by 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_sqlnull_write.test b/parser/testdata/corpus/sql/copy/parquet/parquet_sqlnull_write.test index cfcc390..8fbe20d 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_sqlnull_write.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_sqlnull_write.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_sqlnull_write.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT *, typeof(val) FROM '{DATA_DIR}/parquet-testing/null_type_column.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_stats.test b/parser/testdata/corpus/sql/copy/parquet/parquet_stats.test index 99788ef..40800cf 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select stats_min, stats_max, stats_min_value, stats_max_value from parquet_metadata('{DATA_DIR}/parquet-testing/boolean_stats.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_string_stats.test b/parser/testdata/corpus/sql/copy/parquet/parquet_string_stats.test index cfb7657..455acf1 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_string_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_string_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_string_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select s.min, s.max from (select stats(l_comment) s from 'data/parquet-testing/lineitem-top10000.gzip.parquet') LIMIT 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_union_by_name.test b/parser/testdata/corpus/sql/copy/parquet/parquet_union_by_name.test index 162b776..0d8ed97 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE ubn1(a BIGINT); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_variant_leaf_types.test b/parser/testdata/corpus/sql/copy/parquet/parquet_variant_leaf_types.test new file mode 100644 index 0000000..23eae4d --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_variant_leaf_types.test @@ -0,0 +1,17 @@ +# source: test/sql/copy/parquet/parquet_variant_leaf_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_parquet('data/parquet-testing/broken/variant_value_int96.parquet'); +-- +ok +== +SELECT * FROM read_parquet('data/parquet-testing/broken/variant_metadata_geometry.parquet'); +-- +ok +== +SELECT * FROM read_parquet('data/parquet-testing/variant_bool_true.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_columns.test b/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_columns.test index 2db8828..8f616cc 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_columns.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_columns.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_virtual_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT file_index FROM '{DATA_DIR}/parquet-testing/glob/t1.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_group_number.test b/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_group_number.test index e23931e..ba2dd3b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_group_number.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_group_number.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_virtual_file_row_group_number.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select i, i * 2 as j from range(10000) t(i)) to '{TEST_DIR}/rg.parquet' (format parquet, ROW_GROUP_SIZE 2048); @@ -47,10 +47,6 @@ select i, j, file_row_group_number from '{TEST_DIR}/rg.parquet' where i in (0, 2 -- ok == -set threads=1; --- -ok -== PRAGMA enable_profiling = 'json'; -- ok @@ -67,10 +63,6 @@ select count(*) from '{TEST_DIR}/rg.parquet' where file_row_group_number = 2; -- ok == -PRAGMA disable_profiling; --- -ok -== CREATE VIEW parquet_scan_row_groups AS WITH RECURSIVE ops(op) AS ( SELECT unnest(operator)::JSON AS op FROM '{TEST_DIR}/profiling_output.json' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_number.test b/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_number.test index 295611e..59fc87e 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_number.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_virtual_file_row_number.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_virtual_file_row_number.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select file_row_number from '{DATA_DIR}/parquet-testing/glob/t1.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_write_codecs.test b/parser/testdata/corpus/sql/copy/parquet/parquet_write_codecs.test index 5d84b09..50f4f9e 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_write_codecs.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_write_codecs.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_write_codecs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42, 'hello') TO '{TEMP_DIR}/{codec}.parquet' (FORMAT 'parquet', CODEC '{codec}'); diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_write_repeated_lists.test b/parser/testdata/corpus/sql/copy/parquet/parquet_write_repeated_lists.test index ba0cb91..f59e818 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_write_repeated_lists.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_write_repeated_lists.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_write_repeated_lists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( @@ -15,3 +15,46 @@ SELECT * FROM read_parquet('{TEST_DIR}/lists.parquet'); -- ok == +COPY (SELECT ['a', 'b'] AS l FROM range(3)) +TO '{TEST_DIR}/repeated_lists_v2.parquet' (FORMAT PARQUET, PARQUET_VERSION V2); +-- +ok +== +SELECT l FROM read_parquet('{TEST_DIR}/repeated_lists_v2.parquet'); +-- +ok +== +CREATE OR REPLACE VIEW repeated_lists AS +SELECT ['a', 'b'] AS strings, + ['abcdefghijklmnop', NULL, ''] AS nullable_strings, + [['a', 'b'], [], NULL, ['c', NULL]] AS nested_strings, + [{'s': 'abcdefghijklmnop', 'l': ['a', 'b']}, NULL] AS structs, + MAP(['a', 'b'], ['c', 'd']) AS maps, + ['a'::BLOB, '\x00\xFF'::BLOB] AS blobs, + []::VARCHAR[] AS empty_list, + NULL::VARCHAR[] AS null_list, + CASE WHEN range % 7 = 0 THEN NULL + WHEN range % 7 = 1 THEN '' + ELSE repeat('x', 1 + range % 101) END AS scalar_strings, + '' AS empty_string, + NULL::VARCHAR AS null_string +FROM range({row_count}); +-- +error: Parser Error: syntax error at or near "}" +== +COPY repeated_lists TO '{TEST_DIR}/repeated_lists_nested.parquet' +(FORMAT PARQUET, PARQUET_VERSION '{parquet_version}', DICTIONARY_SIZE_LIMIT {dictionary_size_limit}, + ROW_GROUP_SIZE 2048, DATA_PAGE_SIZE_LIMIT {data_page_size_limit}); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM ( + (SELECT * FROM read_parquet('{TEST_DIR}/repeated_lists_nested.parquet') + EXCEPT ALL SELECT * FROM repeated_lists) + UNION ALL + (SELECT * FROM repeated_lists + EXCEPT ALL SELECT * FROM read_parquet('{TEST_DIR}/repeated_lists_nested.parquet')) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/parquet_zstd.test b/parser/testdata/corpus/sql/copy/parquet/parquet_zstd.test index 5b9f8a3..8cc5a60 100644 --- a/parser/testdata/corpus/sql/copy/parquet/parquet_zstd.test +++ b/parser/testdata/corpus/sql/copy/parquet/parquet_zstd.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/parquet_zstd.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/zstd.parquet') order by 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/partition_by_bind_issues.test b/parser/testdata/corpus/sql/copy/parquet/partition_by_bind_issues.test index 4991c3b..35681d9 100644 --- a/parser/testdata/corpus/sql/copy/parquet/partition_by_bind_issues.test +++ b/parser/testdata/corpus/sql/copy/parquet/partition_by_bind_issues.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/partition_by_bind_issues.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_active_jobs_hang.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_active_jobs_hang.test index 98aad33..eafd030 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_active_jobs_hang.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_active_jobs_hang.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_active_jobs_hang.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i AS id FROM range(60000) t(i)) TO '{TEST_DIR}/hang.parquet' (FORMAT parquet, ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_learning.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_learning.test index a229a9d..e1d5367 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_learning.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_learning.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_depth_learning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET read_ahead_depth=4 @@ -16,7 +16,7 @@ COPY ( END AS c, i % 1000 AS g FROM RANGE(24576) t(i) -) TO '{TEST_DIR}/ra_learn.parquet' (ROW_GROUP_SIZE 2048, WRITE_BLOOM_FILTER FALSE) +) TO '{TEST_DIR}/ra_learn.parquet' (ROW_GROUP_SIZE 2048, WRITE_BLOOM_FILTER FALSE, COMPRESSION 'uncompressed') -- ok == diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_setting.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_setting.test index 9914c6c..a0d3114 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_setting.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_depth_setting.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_depth_setting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET read_ahead_depth=-1 diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_dynamic_pruning.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_dynamic_pruning.test new file mode 100644 index 0000000..195264e --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_dynamic_pruning.test @@ -0,0 +1,100 @@ +# source: test/sql/copy/parquet/read_ahead/readahead_dynamic_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET async_threads=1 +-- +ok +== +SET read_ahead_depth=64 +-- +ok +== +COPY (SELECT i FROM range(16384) t(i)) TO '{TEST_DIR}/recheck_ordered.parquet' (ROW_GROUP_SIZE 2048) +-- +ok +== +CALL enable_logging(['PhysicalOperator', 'ParquetPrefetch']) +-- +ok +== +SELECT i FROM read_parquet('{TEST_DIR}/recheck_ordered.parquet') ORDER BY i LIMIT 3 +-- +ok +== +SELECT count(*) FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class='ParquetReader' AND event='ReadRowGroup' +-- +ok +== +SELECT count(*) FROM duckdb_logs_parsed('ParquetPrefetch') +WHERE file_path LIKE '%recheck_ordered.parquet' +-- +ok +== +CREATE TABLE recheck_values AS +SELECT i AS id, + CASE WHEN i BETWEEN 8192 AND 10239 THEN NULL ELSE i // 4096 END AS k, + CASE WHEN i >= 22528 THEN 'nan'::DOUBLE ELSE k::DOUBLE END AS f, + lpad(k::VARCHAR, 4, '0') || 'é' AS s, + TIMESTAMP '2020-01-01' + k * INTERVAL '1 day' AS ts, + repeat('payload-' || i::VARCHAR, 32) AS payload +FROM range(24576) t(i) +-- +ok +== +COPY recheck_values TO '{TEST_DIR}/recheck_values.parquet' (ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE VIEW recheck_input AS SELECT * FROM read_parquet('{TEST_DIR}/recheck_values.parquet', can_have_nan=true) +-- +ok +== +SET threads={workers} +-- +error: Parser Error: syntax error at or near "}" +== +WITH actual AS ( + SELECT * FROM recheck_input WHERE id % 31 = 0 + ORDER BY {column} {direction} NULLS {nulls}, id DESC LIMIT 10 OFFSET 3 +), expected AS ( + SELECT * FROM recheck_values WHERE id % 31 = 0 + ORDER BY {column} {direction} NULLS {nulls}, id DESC LIMIT 10 OFFSET 3 +) +SELECT count(*) FROM ( + (SELECT * FROM actual EXCEPT ALL SELECT * FROM expected) + UNION ALL + (SELECT * FROM expected EXCEPT ALL SELECT * FROM actual) +) +-- +error: Parser Error: syntax error at or near "column" +== +WITH actual AS ( + SELECT id, k, payload FROM recheck_input WHERE id % 31 = 0 + ORDER BY k {direction} NULLS LAST, id DESC LIMIT 128 OFFSET 3 +), expected AS ( + SELECT id, k, payload FROM recheck_values WHERE id % 31 = 0 + ORDER BY k {direction} NULLS LAST, id DESC LIMIT 128 OFFSET 3 +) +SELECT count(*) FROM ( + (SELECT * FROM actual EXCEPT ALL SELECT * FROM expected) + UNION ALL + (SELECT * FROM expected EXCEPT ALL SELECT * FROM actual) +) +-- +error: Parser Error: syntax error at or near "{" +== +PREPARE recheck_plan AS SELECT id FROM recheck_input WHERE id >= $1 ORDER BY id LIMIT 3 +-- +ok +== +EXECUTE recheck_plan(0) +-- +ok +== +EXECUTE recheck_plan(20000) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_io_errors.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_io_errors.test index 99e66d0..0f67b5a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_io_errors.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_io_errors.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_io_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET read_ahead_depth=8 diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_limit_slot_leak_hang.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_limit_slot_leak_hang.test index 065d7e8..527c731 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_limit_slot_leak_hang.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_limit_slot_leak_hang.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_limit_slot_leak_hang.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS i FROM range(120000)) TO '{TEST_DIR}/limit_slot_leak.parquet' (FORMAT parquet, ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_memory_limit.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_memory_limit.test new file mode 100644 index 0000000..d2f7253 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_memory_limit.test @@ -0,0 +1,41 @@ +# source: test/sql/copy/parquet/read_ahead/readahead_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT md5(i::VARCHAR)::UUID::VARCHAR AS v, md5((-i)::VARCHAR)::UUID AS u FROM range(1000000) t(i)) TO '{TEST_DIR}/readahead_memory_limit.parquet' +-- +ok +== +SET threads=16 +-- +ok +== +SET memory_limit='100MB' +-- +ok +== +COPY '{TEST_DIR}/readahead_memory_limit.parquet' TO '{TEST_DIR}/readahead_memory_limit_off.parquet' +-- +ok +== +COPY '{TEST_DIR}/readahead_memory_limit.parquet' TO '{TEST_DIR}/readahead_memory_limit_auto.parquet' +-- +ok +== +SET memory_limit='2GB' +-- +ok +== +SELECT count(*), count(DISTINCT v) FROM '{TEST_DIR}/readahead_memory_limit_auto.parquet' +-- +ok +== +SELECT count(*) FROM ( + SELECT * FROM '{TEST_DIR}/readahead_memory_limit.parquet' + EXCEPT + SELECT * FROM '{TEST_DIR}/readahead_memory_limit_auto.parquet' +) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_open_error.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_open_error.test new file mode 100644 index 0000000..e3d8125 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_open_error.test @@ -0,0 +1,29 @@ +# source: test/sql/copy/parquet/read_ahead/readahead_open_error.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT range AS b FROM range(1000)) TO '{TEST_DIR}/oe_{i}.parquet' (FORMAT parquet) +-- +ok +== +COPY (SELECT 'garbage' AS g) TO '{TEST_DIR}/oe_1x.parquet' (FORMAT csv) +-- +ok +== +SET GLOBAL debug_local_file_system_delay_ms=1 +-- +ok +== +SELECT sum(b) FROM read_parquet('{TEST_DIR}/oe_*.parquet') +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/oe_*.parquet') +-- +ok +== +SET GLOBAL debug_local_file_system_delay_ms=0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_order_preservation.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_order_preservation.test index 1134ad6..abcfef8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_order_preservation.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_order_preservation.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_order_preservation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS i FROM range(0, 100000)) TO '{TEST_DIR}/ord_0.parquet' (FORMAT parquet, ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_parked_job_progress.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_parked_job_progress.test new file mode 100644 index 0000000..494230a --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_parked_job_progress.test @@ -0,0 +1,25 @@ +# source: test/sql/copy/parquet/read_ahead/readahead_parked_job_progress.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i AS x FROM range(200000) t(i)) TO '{TEST_DIR}/parked_progress_a.parquet' (ROW_GROUP_SIZE 50000) +-- +ok +== +COPY (SELECT i AS x FROM range(200000) t(i)) TO '{TEST_DIR}/parked_progress_b.parquet' (ROW_GROUP_SIZE 50000) +-- +ok +== +SET max_execution_time=60000 +-- +ok +== +SELECT count(*), sum(x) FROM ( + SELECT x FROM '{TEST_DIR}/parked_progress_a.parquet' + UNION ALL + SELECT x FROM '{TEST_DIR}/parked_progress_b.parquet' +) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_starved_consumers.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_starved_consumers.test index 81accc1..3d878a3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_starved_consumers.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_starved_consumers.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_ahead/readahead_starved_consumers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT range AS i FROM range(200000)) TO '{TEST_DIR}/starved.parquet' (FORMAT parquet, ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_waiting_consumers.test b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_waiting_consumers.test new file mode 100644 index 0000000..acdf9fc --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_ahead/readahead_waiting_consumers.test @@ -0,0 +1,33 @@ +# source: test/sql/copy/parquet/read_ahead/readahead_waiting_consumers.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT range AS i, range % 40 AS p FROM range(400000)) TO '{TEST_DIR}/waiting_consumers' (FORMAT parquet, PARTITION_BY (p)) +-- +ok +== +SET GLOBAL debug_local_file_system_delay_ms=2 +-- +ok +== +SELECT count(*), sum(i) FROM read_parquet('{TEST_DIR}/waiting_consumers/**/*.parquet') +-- +ok +== +SET GLOBAL debug_local_file_system_delay_ms=50 +-- +ok +== +SET max_execution_time=100 +-- +ok +== +SELECT sum(i) FROM read_parquet('{TEST_DIR}/waiting_consumers/**/*.parquet') +-- +ok +== +RESET max_execution_time +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/read_parquet_parameter.test b/parser/testdata/corpus/sql/copy/parquet/read_parquet_parameter.test index 8f4c422..ffca2a4 100644 --- a/parser/testdata/corpus/sql/copy/parquet/read_parquet_parameter.test +++ b/parser/testdata/corpus/sql/copy/parquet/read_parquet_parameter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/read_parquet_parameter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT * FROM parquet_scan($1) ORDER BY 1 diff --git a/parser/testdata/corpus/sql/copy/parquet/read_single_parquet_file.test b/parser/testdata/corpus/sql/copy/parquet/read_single_parquet_file.test new file mode 100644 index 0000000..4b4415d --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_single_parquet_file.test @@ -0,0 +1,125 @@ +# source: test/sql/copy/parquet/read_single_parquet_file.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM read_single_parquet_file('data/parquet-testing/lineitem-top10000.gzip.parquet') +-- +ok +== +SELECT * FROM read_single_parquet_file(['data/parquet-testing/lineitem-top10000.gzip.parquet']) +-- +ok +== +SELECT l_partkey, l_orderkey FROM read_single_parquet_file('data/parquet-testing/lineitem-top10000.gzip.parquet') LIMIT 2 +-- +ok +== +SELECT count(*) FROM read_single_parquet_file('data/parquet-testing/lineitem-top10000.gzip.parquet') WHERE l_orderkey < 100 +-- +ok +== +COPY (SELECT i AS id, 'value_' || i AS s FROM range(200000) t(i)) TO '{TEST_DIR}/single_rg.parquet' (FORMAT parquet, ROW_GROUP_SIZE 20000) +-- +ok +== +SELECT count(*), sum(id) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT bool_and(id = rn) FROM (SELECT id, row_number() OVER () - 1 AS rn FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet')) +-- +ok +== +SELECT count(*) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') WHERE id > 199998 +-- +ok +== +SELECT count(*) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') WHERE id > 150000 +-- +ok +== +SELECT count(*) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') WHERE s = 'value_199999' +-- +ok +== +SELECT stats(id) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') LIMIT 1 +-- +ok +== +SELECT count(*), min(id), max(id) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') +-- +ok +== +EXPLAIN SELECT count(*), min(id), max(id) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT max(file_row_number) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT count(DISTINCT file_row_group_number) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT file_row_number, id FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet') WHERE id = 12345 +-- +ok +== +COPY (SELECT 1 AS a, 'x' AS b) TO '{TEST_DIR}/multi_1.parquet' (FORMAT parquet) +-- +ok +== +COPY (SELECT 2 AS a, 'y' AS b) TO '{TEST_DIR}/multi_2.parquet' (FORMAT parquet) +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/multi_*.parquet') ORDER BY a +-- +ok +== +SELECT count(DISTINCT filename) FROM read_parquet('{TEST_DIR}/multi_*.parquet', filename=true) +-- +ok +== +SELECT count(DISTINCT file_row_group_number) FROM read_parquet('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT max(file_row_number) FROM read_parquet('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT stats(id) FROM read_parquet('{TEST_DIR}/single_rg.parquet') LIMIT 1 +-- +ok +== +SELECT count(*), min(id), max(id) FROM read_parquet('{TEST_DIR}/single_rg.parquet') +-- +ok +== +EXPLAIN SELECT count(*), min(id), max(id) FROM read_parquet('{TEST_DIR}/single_rg.parquet') +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/single_rg.parquet') WHERE id > 199998 +-- +ok +== +SELECT bool_and(id = rn) FROM (SELECT id, row_number() OVER () - 1 AS rn FROM read_parquet('{TEST_DIR}/single_rg.parquet')) +-- +ok +== +COPY (SELECT 3 AS a, 'z' AS c) TO '{TEST_DIR}/multi_3.parquet' (FORMAT parquet) +-- +ok +== +SELECT a, b, c FROM read_parquet('{TEST_DIR}/multi_*.parquet', union_by_name=true) ORDER BY a +-- +ok +== +SELECT * FROM read_parquet('{TEST_DIR}/this_file_does_not_exist.parquet') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/read_single_parquet_file_late_materialization.test b/parser/testdata/corpus/sql/copy/parquet/read_single_parquet_file_late_materialization.test new file mode 100644 index 0000000..64ede8c --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/read_single_parquet_file_late_materialization.test @@ -0,0 +1,29 @@ +# source: test/sql/copy/parquet/read_single_parquet_file_late_materialization.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i AS a, i * 2 AS b, 'v' || i AS c FROM range(5000) t(i)) TO '__TEST_DIR__/single_late_mat.parquet' (FORMAT parquet, ROW_GROUP_SIZE 1000); +-- +ok +== +SELECT * FROM read_single_parquet_file('__TEST_DIR__/single_late_mat.parquet') ORDER BY a DESC LIMIT 3; +-- +ok +== +SELECT * FROM read_single_parquet_file('__TEST_DIR__/single_late_mat.parquet') ORDER BY b LIMIT 2 OFFSET 2500; +-- +ok +== +SELECT count(*) FROM (SELECT * FROM read_single_parquet_file('__TEST_DIR__/single_late_mat.parquet') LIMIT 2049); +-- +ok +== +SELECT c, file_row_number FROM read_single_parquet_file('__TEST_DIR__/single_late_mat.parquet') WHERE a % 1000 = 7 ORDER BY a DESC LIMIT 2; +-- +ok +== +SELECT count(*) FROM read_single_parquet_file('__TEST_DIR__/single_late_mat.parquet') WHERE a < 2049; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/recursive_parquet_union_by_name.test b/parser/testdata/corpus/sql/copy/parquet/recursive_parquet_union_by_name.test index eb2dd3b..edd1c04 100644 --- a/parser/testdata/corpus/sql/copy/parquet/recursive_parquet_union_by_name.test +++ b/parser/testdata/corpus/sql/copy/parquet/recursive_parquet_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/recursive_parquet_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view r AS from read_parquet('{DATA_DIR}/parquet-testing/hive-partitioning/union_by_name/*/*.parquet', hive_partitioning=1, union_by_name=1) diff --git a/parser/testdata/corpus/sql/copy/parquet/replacement_scan_custom_extension.test b/parser/testdata/corpus/sql/copy/parquet/replacement_scan_custom_extension.test index fd41e6b..7c78cb3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/replacement_scan_custom_extension.test +++ b/parser/testdata/corpus/sql/copy/parquet/replacement_scan_custom_extension.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/replacement_scan_custom_extension.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42 a) to '{TEST_DIR}/lists.my_file_extension' (FORMAT PARQUET); diff --git a/parser/testdata/corpus/sql/copy/parquet/rle_bool.test b/parser/testdata/corpus/sql/copy/parquet/rle_bool.test index f8fd9b9..de26880 100644 --- a/parser/testdata/corpus/sql/copy/parquet/rle_bool.test +++ b/parser/testdata/corpus/sql/copy/parquet/rle_bool.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/rle_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/arrow/datapage_v2.snappy.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/shredded_variant_stats.test b/parser/testdata/corpus/sql/copy/parquet/shredded_variant_stats.test index 272cc1e..4daf41a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/shredded_variant_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/shredded_variant_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/shredded_variant_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT * from (VALUES diff --git a/parser/testdata/corpus/sql/copy/parquet/spark_v2.test b/parser/testdata/corpus/sql/copy/parquet/spark_v2.test index d7064bc..e18f288 100644 --- a/parser/testdata/corpus/sql/copy/parquet/spark_v2.test +++ b/parser/testdata/corpus/sql/copy/parquet/spark_v2.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/spark_v2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM '{DATA_DIR}/parquet-testing/spark-store.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/struct_column_reader_skip.test b/parser/testdata/corpus/sql/copy/parquet/struct_column_reader_skip.test index e68fedf..344b6ab 100644 --- a/parser/testdata/corpus/sql/copy/parquet/struct_column_reader_skip.test +++ b/parser/testdata/corpus/sql/copy/parquet/struct_column_reader_skip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/struct_column_reader_skip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT my_map['A'], * FROM parquet_scan('{DATA_DIR}/parquet-testing/struct_skip_test.parquet') where filter == '0' diff --git a/parser/testdata/corpus/sql/copy/parquet/struct_skip_pushdown_null.test b/parser/testdata/corpus/sql/copy/parquet/struct_skip_pushdown_null.test index dcadd2b..f2f1a68 100644 --- a/parser/testdata/corpus/sql/copy/parquet/struct_skip_pushdown_null.test +++ b/parser/testdata/corpus/sql/copy/parquet/struct_skip_pushdown_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/struct_skip_pushdown_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/test_aws_files.test b/parser/testdata/corpus/sql/copy/parquet/test_aws_files.test index cf698fb..03744f0 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_aws_files.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_aws_files.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_aws_files.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/aws1.snappy.parquet') limit 100 diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parallel_many_row_groups.test b/parser/testdata/corpus/sql/copy/parquet/test_parallel_many_row_groups.test index ac525fc..437fd3c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parallel_many_row_groups.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parallel_many_row_groups.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parallel_many_row_groups.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*), MIN(i), MAX(i), SUM(i) FROM parquet_scan('{DATA_DIR}/parquet-testing/manyrowgroups.parquet') t(i) diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal.test index 8221bca..46848f3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal_gt38.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal_gt38.test new file mode 100644 index 0000000..8af9530 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_decimal_gt38.test @@ -0,0 +1,49 @@ +# source: test/sql/copy/parquet/test_parquet_decimal_gt38.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(x) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38.parquet') LIMIT 1 +-- +ok +== +SELECT x FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38.parquet') +-- +ok +== +SELECT x FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38_len21.parquet') +-- +ok +== +SELECT x FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38_row_groups.parquet') ORDER BY x +-- +ok +== +SELECT count(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38_row_groups.parquet') WHERE x < -1.5 +-- +ok +== +SELECT count(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38_row_groups.parquet') WHERE x = 2.0 +-- +ok +== +SELECT count(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38_row_groups.parquet') WHERE x BETWEEN -3 AND 3 +-- +ok +== +SELECT min(x), max(x) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/fixed_length_decimal_gt38_row_groups.parquet') +-- +ok +== +SELECT x FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/byte_array_decimal_gt38.parquet') ORDER BY x +-- +ok +== +SELECT count(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/byte_array_decimal_gt38.parquet') WHERE x > 100 +-- +ok +== +SELECT count(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/byte_array_decimal_gt38.parquet') WHERE x < 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_duplicate_columns.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_duplicate_columns.test index 6d83e83..e5b1ee8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_duplicate_columns.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_duplicate_columns.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_duplicate_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1 as a, 2 as a, 3 as a) TO '{TEST_DIR}/dupe_cols.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_filter_pushdown.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_filter_pushdown.test index 687bf93..033a471 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_filter_pushdown.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/userdata1.parquet') where id > 500 diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_gzip.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_gzip.test index bd91009..c86ec60 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_gzip.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_gzip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_gzip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from parquet_scan('{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_nested.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_nested.test index a9ae343..d6ce9bc 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_nested.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_nested.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * FROM parquet_scan('{DATA_DIR}/parquet-testing/map.parquet') sq limit 3; diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_null.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_null.test index 2e99a35..ff013b4 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_null.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_null.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(col1) from parquet_scan('{DATA_DIR}/parquet-testing/bug687_nulls.parquet') diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_scan.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_scan.test index a7e7ab7..b849191 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_scan.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_scan.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_scan('does_not_exist') diff --git a/parser/testdata/corpus/sql/copy/parquet/test_parquet_stats.test b/parser/testdata/corpus/sql/copy/parquet/test_parquet_stats.test index 5dc57a7..f751fd8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/test_parquet_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/test_parquet_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/test_parquet_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA explain_output = PHYSICAL_ONLY @@ -55,11 +55,51 @@ explain select time from parquet_scan('{DATA_DIR}/parquet-testing/timestamp*.par -- ok == -select time from parquet_scan('{DATA_DIR}/parquet-testing/timestamp*.parquet') where time > '2020-10-06' +select count(*) from parquet_scan('{DATA_DIR}/parquet-testing/timestamp*.parquet') where time > '2020-10-06' -- ok == -pragma disable_object_cache +explain select time from parquet_scan('{DATA_DIR}/parquet-testing/timestamp*.parquet', union_by_name=true) where time > '2020-10-06' +-- +ok +== +SET parquet_metadata_cache=false; +-- +ok +== +select count(*) from parquet_scan('{DATA_DIR}/parquet-testing/timestamp*.parquet', union_by_name=true) where time > '2020-10-06' +-- +ok +== +COPY (SELECT i FROM range(10) t(i)) TO '{TEST_DIR}/stats_first.parquet' (FORMAT PARQUET); +-- +ok +== +COPY (SELECT i FROM range(100, 110) t(i)) TO '{TEST_DIR}/stats_second.parquet' (FORMAT PARQUET); +-- +ok +== +SET parquet_metadata_cache={cache}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM parquet_scan('{TEST_DIR}/stats_*.parquet') WHERE i >= 100; +-- +ok +== +SELECT count(*) FROM parquet_scan('{TEST_DIR}/stats_*.parquet'); +-- +ok +== +SELECT count(*) FROM parquet_scan('{TEST_DIR}/stats_*.parquet', union_by_name=true) WHERE i >= 100; +-- +ok +== +EXPLAIN SELECT i FROM parquet_scan('{TEST_DIR}/stats_*.parquet', union_by_name=true) WHERE i > 109; +-- +ok +== +SELECT count(*) FROM parquet_scan('{TEST_DIR}/stats_*.parquet', union_by_name=true) WHERE i > 109; -- ok == diff --git a/parser/testdata/corpus/sql/copy/parquet/timestamp_ms_stats.test b/parser/testdata/corpus/sql/copy/parquet/timestamp_ms_stats.test index cd110ed..23ed0e9 100644 --- a/parser/testdata/corpus/sql/copy/parquet/timestamp_ms_stats.test +++ b/parser/testdata/corpus/sql/copy/parquet/timestamp_ms_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/timestamp_ms_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select timestamp from '{DATA_DIR}/parquet-testing/issue_5533_timestamp_ms_stats.parquet' order by 1; diff --git a/parser/testdata/corpus/sql/copy/parquet/timestamp_s.test b/parser/testdata/corpus/sql/copy/parquet/timestamp_s.test index f09f249..c20895b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/timestamp_s.test +++ b/parser/testdata/corpus/sql/copy/parquet/timestamp_s.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/timestamp_s.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (ts TIMESTAMP_S); diff --git a/parser/testdata/corpus/sql/copy/parquet/timetz_parquet.test b/parser/testdata/corpus/sql/copy/parquet/timetz_parquet.test index 1d17213..9fb5958 100644 --- a/parser/testdata/corpus/sql/copy/parquet/timetz_parquet.test +++ b/parser/testdata/corpus/sql/copy/parquet/timetz_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/timetz_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/parquet-testing/timetz_4byte_stats.parquet' order by 1; diff --git a/parser/testdata/corpus/sql/copy/parquet/timezone.test b/parser/testdata/corpus/sql/copy/parquet/timezone.test index 33442a3..74aac75 100644 --- a/parser/testdata/corpus/sql/copy/parquet/timezone.test +++ b/parser/testdata/corpus/sql/copy/parquet/timezone.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/timezone.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof(TimeRecStart) from '{DATA_DIR}/parquet-testing/tz.parquet' limit 1; diff --git a/parser/testdata/corpus/sql/copy/parquet/union_by_name_hive_partitioning.test b/parser/testdata/corpus/sql/copy/parquet/union_by_name_hive_partitioning.test index 05991f8..aca761c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/union_by_name_hive_partitioning.test +++ b/parser/testdata/corpus/sql/copy/parquet/union_by_name_hive_partitioning.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/union_by_name_hive_partitioning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_parquet('{DATA_DIR}/parquet-testing/hive-partitioning/union_by_name/*/*.parquet', hive_partitioning=1) diff --git a/parser/testdata/corpus/sql/copy/parquet/union_by_name_null_nested.test b/parser/testdata/corpus/sql/copy/parquet/union_by_name_null_nested.test new file mode 100644 index 0000000..925ef98 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/union_by_name_null_nested.test @@ -0,0 +1,52 @@ +# source: test/sql/copy/parquet/union_by_name_null_nested.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE null_target_struct AS STRUCT(n INTEGER, s VARCHAR); +-- +ok +== +CREATE TYPE null_target_nested_struct AS STRUCT(v null_target_struct); +-- +ok +== +CREATE TABLE null_nested_values AS SELECT + {'n': 42, 's': 'hello'} AS null_target_struct, + {'v': {'n': 42, 's': 'hello'}} AS null_target_nested_struct, + [42, NULL, 7] AS "INTEGER[]", + MAP {1: 'hello', 2: NULL} AS "MAP(INTEGER,VARCHAR)"; +-- +ok +== +COPY (SELECT 1 AS id, NULL::"NULL" AS r, + {'v': NULL::"NULL"} AS s, + MAP {'key': NULL::"NULL"} AS m, + [NULL::"NULL", NULL::"NULL"] AS l) +TO '{TEST_DIR}/null_nested_old.parquet' (FORMAT PARQUET); +-- +ok +== +COPY (SELECT 2 AS id, v AS r, {'v': v} AS s, MAP {'key': v} AS m, [v, NULL] AS l + FROM (SELECT "{type}" AS v FROM null_nested_values)) +TO '{TEST_DIR}/null_nested_new.parquet' (FORMAT PARQUET); +-- +ok +== +SELECT id, r IS NULL, s.v IS NULL, map_extract_value(m, 'key') IS NULL, + l[1] IS NULL, l[2] IS NULL, cardinality(m), len(l) +FROM read_parquet(['{TEST_DIR}/null_nested_{first}.parquet', + '{TEST_DIR}/null_nested_{second}.parquet'], union_by_name = true) +ORDER BY id; +-- +ok +== +SELECT r IS NOT DISTINCT FROM v, s.v IS NOT DISTINCT FROM v, + map_extract_value(m, 'key') IS NOT DISTINCT FROM v, l[1] IS NOT DISTINCT FROM v +FROM read_parquet(['{TEST_DIR}/null_nested_{first}.parquet', + '{TEST_DIR}/null_nested_{second}.parquet'], union_by_name = true), + (SELECT "{type}" AS v FROM null_nested_values) expected +WHERE id = 2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/union_by_name_pushdown.test b/parser/testdata/corpus/sql/copy/parquet/union_by_name_pushdown.test index 6882c5d..000937c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/union_by_name_pushdown.test +++ b/parser/testdata/corpus/sql/copy/parquet/union_by_name_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/union_by_name_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42 AS i, 84 AS j) TO '{TEST_DIR}/union_by_name_pushdown1.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_extract_stats.test b/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_extract_stats.test new file mode 100644 index 0000000..94590d7 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_extract_stats.test @@ -0,0 +1,37 @@ +# source: test/sql/copy/parquet/union_by_name_struct_extract_stats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT {'key': 'key-0', 'default': 'value'} AS status) TO '{TEST_DIR}/issue_26156_0.parquet' +-- +ok +== +COPY (SELECT {'key': 'key-1', 'default': 'value'} AS status) TO '{TEST_DIR}/issue_26156_1.parquet' +-- +ok +== +SELECT count(*) +FROM read_parquet(['{TEST_DIR}/issue_26156_0.parquet', '{TEST_DIR}/issue_26156_1.parquet'], union_by_name = true) +WHERE status.default = 'value' +-- +ok +== +SELECT count(*) +FROM read_parquet(['{TEST_DIR}/issue_26156_0.parquet', '{TEST_DIR}/issue_26156_1.parquet'], union_by_name = true) +WHERE status.key = 'key-1' +-- +ok +== +SELECT min(status.key), max(status.default) +FROM read_parquet(['{TEST_DIR}/issue_26156_0.parquet', '{TEST_DIR}/issue_26156_1.parquet'], union_by_name = true) +-- +ok +== +SELECT status.key +FROM read_parquet(['{TEST_DIR}/issue_26156_0.parquet', '{TEST_DIR}/issue_26156_1.parquet'], union_by_name = true) +WHERE status.default = 'value' +ORDER BY ALL +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_filter.test b/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_filter.test index b9aa19f..7c959bf 100644 --- a/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_filter.test +++ b/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_filter.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/union_by_name_struct_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT {'a': 1, 'b': 2}::STRUCT(a INT, b INT) AS s, 1 AS id) TO '{TEST_DIR}/f1.parquet' diff --git a/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_projection.test b/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_projection.test index f09d0fa..530a7c2 100644 --- a/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_projection.test +++ b/parser/testdata/corpus/sql/copy/parquet/union_by_name_struct_projection.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/union_by_name_struct_projection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT {'a': 1, 'b': 2}::STRUCT(a INT, b INT) AS s, 1 AS id) diff --git a/parser/testdata/corpus/sql/copy/parquet/variant_array_row_group_pruning.test b/parser/testdata/corpus/sql/copy/parquet/variant_array_row_group_pruning.test index bb3c1fd..719a210 100644 --- a/parser/testdata/corpus/sql/copy/parquet/variant_array_row_group_pruning.test +++ b/parser/testdata/corpus/sql/copy/parquet/variant_array_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/variant_array_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/variant_shredded_decimal_scale.test b/parser/testdata/corpus/sql/copy/parquet/variant_shredded_decimal_scale.test new file mode 100644 index 0000000..b2b2e9c --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/variant_shredded_decimal_scale.test @@ -0,0 +1,39 @@ +# source: test/sql/copy/parquet/variant_shredded_decimal_scale.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT (i % 10)::DECIMAL(4,1)::VARIANT AS v FROM range(122880) r(i)) TO '__TEST_DIR__/variant_decimal_scale_1.parquet' +-- +ok +== +COPY (SELECT (i % 10)::DECIMAL(4,2)::VARIANT AS v FROM range(122880, 200000) r(i)) TO '__TEST_DIR__/variant_decimal_scale_2.parquet' +-- +ok +== +COPY (SELECT v FROM read_parquet(['__TEST_DIR__/variant_decimal_scale_1.parquet', '__TEST_DIR__/variant_decimal_scale_2.parquet'])) TO '__TEST_DIR__/variant_decimal_scale_merged.parquet' +-- +ok +== +SELECT count(*) FILTER (WHERE v::DECIMAL(4,2) = 9.00), max(v::DECIMAL(4,2)), count(DISTINCT v::VARCHAR) +FROM '__TEST_DIR__/variant_decimal_scale_merged.parquet' +-- +ok +== +COPY (SELECT CASE WHEN i < 122880 THEN (i % 10)::DECIMAL(3,1)::VARIANT ELSE (900 + i % 100)::DECIMAL(4,1)::VARIANT END AS v FROM range(200000) r(i)) TO '__TEST_DIR__/variant_decimal_wider.parquet' +-- +ok +== +SELECT count(*) FILTER (WHERE variant_typeof(v) = 'DECIMAL(3, 1)' AND v::DECIMAL(4,1) > 99.9), sum(v::DECIMAL(4,1)), max(v::DECIMAL(4,1)) +FROM '__TEST_DIR__/variant_decimal_wider.parquet' +-- +ok +== +COPY (SELECT CASE WHEN i < 122880 THEN (i % 10)::DECIMAL(4,1)::VARIANT ELSE (i % 10)::DECIMAL(3,1)::VARIANT END AS v FROM range(200000) r(i)) TO '__TEST_DIR__/variant_decimal_narrower.parquet' +-- +ok +== +SELECT variant_typeof(v), sum(v::DECIMAL(4,1)) FROM '__TEST_DIR__/variant_decimal_narrower.parquet' GROUP BY ALL ORDER BY ALL +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_dictionary_index_width.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_dictionary_index_width.test index 31f228b..433d0e5 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_dictionary_index_width.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_dictionary_index_width.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_dictionary_index_width.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_empty_struct.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_empty_struct.test index ae21d4a..4d4add2 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_empty_struct.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_empty_struct.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_empty_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT empty_struct FROM test_all_types()) TO '{TEST_DIR}/empty_struct.parquet' (FORMAT PARQUET); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_encoding_stats.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_encoding_stats.test new file mode 100644 index 0000000..90f93b6 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_encoding_stats.test @@ -0,0 +1,91 @@ +# source: test/sql/copy/parquet/writer/parquet_encoding_stats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE strings AS SELECT (i % 3)::VARCHAR AS s FROM range(1000) tbl(i); +-- +ok +== +COPY strings TO '{TEST_DIR}/encoding_stats_v1.parquet' (FORMAT PARQUET, PARQUET_VERSION v1); +-- +ok +== +SELECT s.page_type, s.encoding, s."count" +FROM (SELECT unnest(encoding_stats) AS s FROM parquet_metadata('{TEST_DIR}/encoding_stats_v1.parquet')) +-- +ok +== +COPY strings TO '{TEST_DIR}/encoding_stats_v2.parquet' (FORMAT PARQUET, PARQUET_VERSION v2); +-- +ok +== +SELECT s.page_type, s.encoding, s."count" +FROM (SELECT unnest(encoding_stats) AS s FROM parquet_metadata('{TEST_DIR}/encoding_stats_v2.parquet')) +-- +ok +== +CREATE TABLE distinct_strings AS SELECT i::VARCHAR AS s FROM range(30) tbl(i); +-- +ok +== +COPY distinct_strings TO '{TEST_DIR}/encoding_stats_plain.parquet' (FORMAT PARQUET); +-- +ok +== +SELECT s.page_type, s.encoding, s."count" +FROM (SELECT unnest(encoding_stats) AS s FROM parquet_metadata('{TEST_DIR}/encoding_stats_plain.parquet')) +-- +ok +== +SELECT s.page_type, s.encoding, s."count" +FROM (SELECT unnest(encoding_stats) AS s + FROM parquet_metadata('data/parquet-testing/enum.parquet') + WHERE path_in_schema = 'trace_id') +-- +ok +== +SELECT encoding_stats FROM parquet_metadata('data/parquet-testing/userdata1.parquet') +WHERE path_in_schema = 'first_name' +-- +ok +== +CREATE TABLE all_types AS SELECT + i % 3 = 0 AS bool_col, + (i % 3)::TINYINT AS tinyint_col, + (i % 3)::SMALLINT AS smallint_col, + (i % 3)::INTEGER AS int_col, + (i % 3)::BIGINT AS bigint_col, + (i % 3)::FLOAT AS float_col, + (i % 3)::DOUBLE AS double_col, + ((i % 3) + 0.5)::DECIMAL(9,2) AS dec9_col, + ((i % 3) + 0.5)::DECIMAL(18,3) AS dec18_col, + ((i % 3) + 0.5)::DECIMAL(38,4) AS dec38_col, + DATE '2024-01-01' + (i % 3)::INTEGER AS date_col, + TIME '01:02:03' AS time_col, + TIMESTAMP '2024-01-01 01:02:03' + (i % 3) * INTERVAL 1 HOUR AS ts_col, + (i % 3)::VARCHAR AS varchar_col, + encode((i % 3)::VARCHAR) AS blob_col +FROM range(1000) tbl(i); +-- +ok +== +COPY all_types TO '{TEST_DIR}/encoding_stats_all_types.parquet' (FORMAT PARQUET); +-- +ok +== +SELECT count(*) FROM parquet_metadata('{TEST_DIR}/encoding_stats_all_types.parquet') +-- +ok +== +SELECT count(*) +FROM ( + SELECT dictionary_page_offset, (encoding_stats[1]).page_type AS first_page_type + FROM parquet_metadata('{TEST_DIR}/encoding_stats_all_types.parquet') +) +WHERE first_page_type IS NULL + OR (dictionary_page_offset IS NOT NULL AND first_page_type <> 'DICTIONARY_PAGE') + OR (dictionary_page_offset IS NULL AND first_page_type <> 'DATA_PAGE') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_test_all_types.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_test_all_types.test index 62f8dab..59a1c38 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_test_all_types.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_test_all_types.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_test_all_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types AS diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_metadata.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_metadata.test index b8d46a8..df074f0 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_metadata.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_metadata.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_timetz_metadata.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_roundtrip.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_roundtrip.test index f1a3de4..6b248ce 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_roundtrip.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_timetz_roundtrip.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_timetz_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_union_list.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_union_list.test index ea14bcd..3f97682 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_union_list.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_union_list.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_union_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE origin (id INT, ufield UNION(val VARCHAR[], omitted BOOLEAN)); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_booleans.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_booleans.test index a7ba174..d25c5d2 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_booleans.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_booleans.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_booleans.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bools(b BOOL) @@ -29,3 +29,15 @@ SELECT typeof(b) FROM '{TEST_DIR}/bools.parquet' LIMIT 1 -- ok == +COPY ( + SELECT i % 3 = 0 AS b + FROM range(2056) t(i) +) TO '{TEST_DIR}/bools_no_null.parquet' (FORMAT parquet) +-- +ok +== +SELECT count(*), count_if(b), count_if(NOT b) +FROM '{TEST_DIR}/bools_no_null.parquet' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_compression_level.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_compression_level.test index f631493..1aaa521 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_compression_level.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_compression_level.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_compression_level.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS FROM range(100) t(i) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_data_page_size.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_data_page_size.test index 1e67e66..86ba42d 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_data_page_size.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_data_page_size.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_data_page_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select range i, 'val_' || (range % 400) s from range(100_000)) to '{TEST_DIR}/small_pages.parquet' (format parquet, data_page_size_limit 4096, compression uncompressed); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_date.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_date.test index f8be00a..73a24a7 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_date.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_date.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(d DATE) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_decimals.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_decimals.test index ec5ab75..ea06a29 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_decimals.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_decimals.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_decimals.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE decimals( diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_enums.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_enums.test index ecbb99f..88f9b45 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_enums.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_enums.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_enums.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE mood AS ENUM ('joy', 'ok', 'happy'); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_field_id.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_field_id.test index a9e37cb..5bc7cd2 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_field_id.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_field_id.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_field_id.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select range as i from range(10)) to '{TEST_DIR}/my.parquet' (FIELD_IDS) @@ -195,3 +195,22 @@ select field_id from parquet_schema('{TEST_DIR}/my.parquet') where name = 'F' -- ok == +copy (select (1, 'a') as t) to '{TEST_DIR}/tuple_explicit.parquet' + (FORMAT parquet, FIELD_IDS {t:{__duckdb_field_id:10,element1:11,element2:12}}) +-- +ok +== +select name, field_id from parquet_schema('{TEST_DIR}/tuple_explicit.parquet') +where name in ('t', 'element1', 'element2') order by field_id +-- +ok +== +copy (select (1, 'a') as t) to '{TEST_DIR}/tuple_auto.parquet' (FORMAT parquet, FIELD_IDS 'auto') +-- +ok +== +select name, field_id from parquet_schema('{TEST_DIR}/tuple_auto.parquet') +where name in ('t', 'element1', 'element2') order by field_id +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_home_directory.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_home_directory.test index c1fb7c8..84fbe15 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_home_directory.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_home_directory.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_home_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY integers TO '{TEST_DIR}/integers.parquet' (FORMAT PARQUET); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_hugeint.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_hugeint.test index ff88951..6244ee0 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_hugeint.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_hugeint.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints(h HUGEINT) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_interval.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_interval.test index 7dc0da1..ae0007b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_interval.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_interval.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_interval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS intervals (i interval); @@ -28,3 +28,17 @@ COPY (SELECT -interval '1 day') TO '{TEST_DIR}/intervals.parquet' -- ok == +COPY (SELECT INTERVAL '580063 hours 44 minutes 54 seconds' AS i) TO '{TEST_DIR}/large_interval.parquet' +-- +ok +== +SELECT i = INTERVAL '580063 hours 44 minutes 54 seconds', + datepart('month', i), + datepart('day', i), + datepart('hour', i), + datepart('minute', i), + datepart('second', i) +FROM '{TEST_DIR}/large_interval.parquet' +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_issue_5779.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_issue_5779.test index 7688862..023dc46 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_issue_5779.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_issue_5779.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_issue_5779.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE empty_lists(i INTEGER[]); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_memory_usage.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_memory_usage.test index cd45f91..75b2194 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_memory_usage.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_memory_usage.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_memory_usage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set memory_limit='{memory_limit}' diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_shredding.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_shredding.test new file mode 100644 index 0000000..dbea739 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_shredding.test @@ -0,0 +1,57 @@ +# source: test/sql/copy/parquet/writer/parquet_write_shredding.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 42::VARIANT AS v) TO '{TEST_DIR}/invalid.parquet' + (FORMAT parquet, SHREDDING 'auto') +-- +ok +== +COPY (SELECT 42::VARIANT AS v) TO '{TEST_DIR}/invalid.parquet' + (FORMAT parquet, SHREDDING 'INTEGER') +-- +ok +== +COPY (SELECT 42 AS i) TO '{TEST_DIR}/invalid.parquet' + (FORMAT parquet, SHREDDING {v:'INTEGER'}) +-- +ok +== +COPY (SELECT 42::VARIANT AS v1, 7::VARIANT AS v2) TO '{TEST_DIR}/invalid.parquet' + (FORMAT parquet, SHREDDING {missing:'INTEGER'}) +-- +ok +== +COPY (SELECT 42::VARIANT AS v) TO '{TEST_DIR}/invalid.parquet' + (FORMAT parquet, SHREDDING {v:42}) +-- +ok +== +COPY (SELECT 42::VARIANT AS v) TO '{TEST_DIR}/invalid.parquet' + (FORMAT parquet, SHREDDING {v:'MAP(INTEGER, INTEGER)'}) +-- +ok +== +COPY (SELECT 42::VARIANT AS v) TO '{TEST_DIR}/shredded_primitive.parquet' + (FORMAT parquet, SHREDDING {v:'INTEGER'}) +-- +ok +== +SELECT v::INTEGER FROM read_parquet('{TEST_DIR}/shredded_primitive.parquet') +-- +ok +== +COPY (SELECT {'a':42, 'b':['x', 'y']}::VARIANT AS v) TO '{TEST_DIR}/shredded_nested.parquet' + (FORMAT parquet, SHREDDING {v:'STRUCT(a INTEGER, b VARCHAR[])'}) +-- +ok +== +SELECT value.a, value.b +FROM ( + SELECT v::STRUCT(a INTEGER, b VARCHAR[]) AS value + FROM read_parquet('{TEST_DIR}/shredded_nested.parquet') +) +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_signed.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_signed.test index 84fa45f..a1dd84f 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_signed.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_signed.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_signed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE values_TINYINT AS SELECT d::TINYINT d FROM (VALUES diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_string_distinct.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_string_distinct.test index 82c130e..c5a9f2b 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_string_distinct.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_string_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_string_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 'hello' FROM range(10)) TO '{TEST_DIR}/string_dict.parquet'; diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings.test index 686a6db..7cc5db8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO strings VALUES diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings_v1.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings_v1.test index a551c6a..4f01a4c 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings_v1.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_strings_v1.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_strings_v1.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY strings TO '{TEST_DIR}/strings.parquet' (FORMAT PARQUET, PARQUET_VERSION v1); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_timestamp.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_timestamp.test index 9012b1f..0c06e02 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_timestamp.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE timestamps(d {type}) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uhugeint.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uhugeint.test index 886a37b..dd6dbe8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uhugeint.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uhugeint.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_uhugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints(h UHUGEINT) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_unsigned.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_unsigned.test index 718c6ab..59a06e4 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_unsigned.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_unsigned.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_unsigned.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE values_UTINYINT AS SELECT d::UTINYINT d FROM (VALUES diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uuid.test b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uuid.test index c66f05a..a5d622a 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uuid.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/parquet_write_uuid.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/parquet_write_uuid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS uuid (u uuid); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/partition_without_hive.test b/parser/testdata/corpus/sql/copy/parquet/writer/partition_without_hive.test index 4059ace..078ab30 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/partition_without_hive.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/partition_without_hive.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/partition_without_hive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(part_key INT, val INT); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes.test b/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes.test index 9fe93d4..abad384 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/row_group_size_bytes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42) to '{TEST_DIR}/tbl.parquet' (ROW_GROUP_SIZE_BYTES) @@ -64,6 +64,10 @@ copy ( -- ok == +select max(row_group_num_rows) between 2600 and 4096 from parquet_metadata('{TEST_DIR}/tbl.parquet') +-- +ok +== copy ( select range || repeat('0', 50) c0 from range(50000) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes_wide.test b/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes_wide.test new file mode 100644 index 0000000..98112d9 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/parquet/writer/row_group_size_bytes_wide.test @@ -0,0 +1,151 @@ +# source: test/sql/copy/parquet/writer/row_group_size_bytes_wide.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE wide AS SELECT i, repeat(md5(i::VARCHAR), 2048)::BLOB AS payload FROM range(600) t(i) +-- +ok +== +COPY wide TO '{TEST_DIR}/unordered.parquet' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/unordered.parquet') +-- +ok +== +SET preserve_insertion_order=true +-- +ok +== +COPY wide TO '{TEST_DIR}/ordered.parquet' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000) +-- +ok +== +SELECT count(*), bool_and(payload = repeat(md5(i::VARCHAR), 2048)::BLOB) FROM '{TEST_DIR}/ordered.parquet' +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/ordered.parquet') +-- +ok +== +COPY (SELECT i % 4 AS p, i, payload FROM wide) TO '{TEST_DIR}/part' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000, PARTITION_BY ('p')) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/part/**/*.parquet') +-- +ok +== +CREATE TABLE mixed AS SELECT i, CASE WHEN i % 100 = 0 THEN repeat(md5(i::VARCHAR), 4096) ELSE md5(i::VARCHAR) END::BLOB AS payload FROM range(20000) t(i) +-- +ok +== +COPY (SELECT i % 4 AS p, i, payload FROM mixed) TO '{TEST_DIR}/mixed' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000, PARTITION_BY ('p')) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/mixed/**/*.parquet') +-- +ok +== +CREATE TABLE skewed AS SELECT i // 2048 AS p, i, + CASE WHEN i % 2048 < 100 THEN repeat(md5(i::VARCHAR), 2048) ELSE md5(i::VARCHAR) END::BLOB AS payload +FROM range(4096) t(i) +-- +ok +== +SET partitioned_write_flush_threshold=1 +-- +ok +== +SET threads={threads} +-- +error: Parser Error: syntax error at or near "}" +== +COPY skewed TO '{TEST_DIR}/skewed_{threads}' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000, PARTITION_BY (p)) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/skewed_{threads}/**/*.parquet') +-- +ok +== +SELECT (SELECT count(*) FROM (FROM skewed EXCEPT ALL SELECT p, i, payload FROM '{TEST_DIR}/skewed_{threads}/**/*.parquet')), + (SELECT count(*) FROM (SELECT p, i, payload FROM '{TEST_DIR}/skewed_{threads}/**/*.parquet' EXCEPT ALL FROM skewed)) +-- +ok +== +COPY skewed TO '{TEST_DIR}/skewed_sorted_{threads}' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000, PARTITION_BY (p), ORDER_BY (i)) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/skewed_sorted_{threads}/**/*.parquet') +-- +ok +== +COPY skewed TO '{TEST_DIR}/skewed_sorted' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000, ORDER_BY (i)) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/skewed_sorted/*.parquet') +-- +ok +== +RESET threads +-- +ok +== +RESET partitioned_write_flush_threshold +-- +ok +== +CREATE TABLE nested AS SELECT + CASE WHEN i % 3 = 0 THEN NULL ELSE {'a': i, 'b': i} END AS fixed_strct, + range(i, i + 400) AS lst, + {'a': repeat(md5(i::VARCHAR), 20), 'b': i} AS strct, + [repeat(md5(i::VARCHAR), 10), repeat(md5((i + 1)::VARCHAR), 10)]::VARCHAR[2] AS arr, + map_from_entries([(i, repeat(md5(i::VARCHAR), 20))]) AS mp +FROM range(1200) t(i) +-- +ok +== +COPY nested TO '{TEST_DIR}/nested.parquet' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000) +-- +ok +== +SELECT max(row_group_bytes) < 1300000 FROM parquet_metadata('{TEST_DIR}/nested.parquet') +-- +ok +== +SELECT (SELECT count(*) FROM (FROM nested EXCEPT FROM '{TEST_DIR}/nested.parquet')), + (SELECT count(*) FROM (FROM '{TEST_DIR}/nested.parquet' EXCEPT FROM nested)) +-- +ok +== +CREATE TABLE fixed_struct AS SELECT {'a': i, 'b': i, 'c': i, 'd': i, 'e': i, 'f': i, 'g': i, 'h': i} AS s FROM range(20000) t(i) +-- +ok +== +COPY fixed_struct TO '{TEST_DIR}/fixed_struct.parquet' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 50000) +-- +ok +== +SELECT max(row_group_bytes) < 65000, count(DISTINCT row_group_id) < 100 FROM parquet_metadata('{TEST_DIR}/fixed_struct.parquet') +-- +ok +== +CREATE TABLE huge AS SELECT repeat(md5(i::VARCHAR), 262144)::BLOB AS payload FROM range(8) t(i) +-- +ok +== +COPY huge TO '{TEST_DIR}/huge.parquet' (FORMAT parquet, COMPRESSION uncompressed, ROW_GROUP_SIZE_BYTES 1000000) +-- +ok +== +SELECT count(DISTINCT row_group_id) FROM parquet_metadata('{TEST_DIR}/huge.parquet') +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/skip_empty_write.test b/parser/testdata/corpus/sql/copy/parquet/writer/skip_empty_write.test index 422900a..c4f8865 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/skip_empty_write.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/skip_empty_write.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/skip_empty_write.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE empty_tbl(i INT, j VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/test_copy_overwrite_parquet.test b/parser/testdata/corpus/sql/copy/parquet/writer/test_copy_overwrite_parquet.test index 77249a8..cb68c34 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/test_copy_overwrite_parquet.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/test_copy_overwrite_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/test_copy_overwrite_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY test TO '{TEST_DIR}/overwrite.parquet' (FORMAT PARQUET) diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write.test b/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write.test index c0cc9ea..19c6696 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/test_parquet_write.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42) TO '{TEST_DIR}/scalar.parquet' (FORMAT 'parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write_complex.test b/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write_complex.test index 0b11212..8d68ab3 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write_complex.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/test_parquet_write_complex.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/test_parquet_write_complex.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/arrow/alltypes_dictionary.parquet'); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/write_complex_nested.test b/parser/testdata/corpus/sql/copy/parquet/writer/write_complex_nested.test index c9118a8..c17b7d8 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/write_complex_nested.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/write_complex_nested.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/write_complex_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE struct_of_lists AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/write_list.test b/parser/testdata/corpus/sql/copy/parquet/writer/write_list.test index e14f2fa..4e0c16e 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/write_list.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/write_list.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/write_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE list AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/write_map.test b/parser/testdata/corpus/sql/copy/parquet/writer/write_map.test index 6ab7989..be9b165 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/write_map.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/write_map.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/write_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE int_maps(m MAP(INTEGER,INTEGER)); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_big_string.test b/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_big_string.test index b7d170b..da11421 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_big_string.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_big_string.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/write_stats_big_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE varchar(v VARCHAR); diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_null_count.test b/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_null_count.test index 5e14bd9..304a6b1 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_null_count.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/write_stats_null_count.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/write_stats_null_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42 i) TO '{TEST_DIR}/stats.parquet' (FORMAT PARQUET); @@ -43,3 +43,19 @@ COPY structs TO '{TEST_DIR}/stats.parquet' (FORMAT PARQUET); -- ok == +COPY (SELECT [NULL, {'x': i}] AS ls FROM range(5) t(i)) TO '{TEST_DIR}/stats.parquet' (FORMAT PARQUET); +-- +ok +== +SELECT path_in_schema, stats_null_count, num_values FROM parquet_metadata('{TEST_DIR}/stats.parquet') +-- +ok +== +COPY (SELECT CASE WHEN i = 0 THEN NULL ELSE [NULL, {'x': i}] END AS ls FROM range(5) t(i)) TO '{TEST_DIR}/stats.parquet' (FORMAT PARQUET); +-- +ok +== +COPY (SELECT {'o': CASE WHEN i % 2 = 0 THEN NULL ELSE {'x': i} END} AS s FROM range(5) t(i)) TO '{TEST_DIR}/stats.parquet' (FORMAT PARQUET); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/parquet/writer/write_struct.test b/parser/testdata/corpus/sql/copy/parquet/writer/write_struct.test index 97756ab..a44a318 100644 --- a/parser/testdata/corpus/sql/copy/parquet/writer/write_struct.test +++ b/parser/testdata/corpus/sql/copy/parquet/writer/write_struct.test @@ -1,6 +1,6 @@ # source: test/sql/copy/parquet/writer/write_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE struct AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_filter_pushdown.test b/parser/testdata/corpus/sql/copy/partitioned/hive_filter_pushdown.test index e5a33c6..cdaf215 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_filter_pushdown.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i::VARCHAR as a, (i*10)::VARCHAR as b, (i*100)::VARCHAR as c from range(0,10) tbl(i)) TO '{TEST_DIR}/hive_pushdown_bug' (FORMAT PARQUET, PARTITION_BY c); diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_append.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_append.test index 98427d1..3898096 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_append.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_append.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE sensor_data(ts TIMESTAMP, value INT); diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_case_insensitive_column.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_case_insensitive_column.test index aa651ae..b90690b 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_case_insensitive_column.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_case_insensitive_column.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_case_insensitive_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM '{DATA_DIR}/parquet-testing/hive-partitioning/ci-column-names/**/*.parquet' ORDER BY ALL diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_compression.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_compression.test index d331763..41304e4 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_compression.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_compression.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (FROM test) TO '{TEST_DIR}/hive_partition_compress' (FORMAT parquet, COMPRESSION 'gzip', PARTITION_BY ('col0', 'col1')); diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_duplicate_name.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_duplicate_name.test index 5a9e68c..fb3dca4 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_duplicate_name.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_duplicate_name.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_duplicate_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_escape.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_escape.test index 81a0406..368b39d 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_escape.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_escape.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_escape.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE weird_tbl(id INT DEFAULT nextval('seq'), key VARCHAR) @@ -49,3 +49,58 @@ COPY weird_tbl TO '{TEST_DIR}/escaped_partitions_names' (FORMAT PARQUET, PARTITI -- ok == +CREATE TABLE blob_tbl AS SELECT * FROM (VALUES (1, 'blob'::BLOB), (2, '\x00\xFF'::BLOB)) v(id, key); +-- +ok +== +COPY blob_tbl TO '{TEST_DIR}/escaped_partitions_blob' (FORMAT PARQUET, PARTITION_BY(key)) +-- +ok +== +select COUNT(*) from glob('{TEST_DIR}/escaped_partitions_blob/key=%5Cx00%5CxFF/*.parquet') +-- +ok +== +select key, id +from parquet_scan('{TEST_DIR}/escaped_partitions_blob/**/*.parquet') +ORDER BY id +-- +ok +== +CREATE TABLE timestamp_tbl AS SELECT * FROM + (VALUES (1, TIMESTAMP '2024-01-15 10:30:00'), (2, TIMESTAMP '2024-02-20 00:00:00')) v(id, key); +-- +ok +== +COPY timestamp_tbl TO '{TEST_DIR}/escaped_partitions_timestamp' (FORMAT PARQUET, PARTITION_BY(key)) +-- +ok +== +select COUNT(*) from glob('{TEST_DIR}/escaped_partitions_timestamp/key=2024-01-15%2010%3A30%3A00/*.parquet') +-- +ok +== +select key, id +from parquet_scan('{TEST_DIR}/escaped_partitions_timestamp/**/*.parquet') +ORDER BY id +-- +ok +== +CREATE TABLE percent_tbl AS SELECT * FROM (VALUES (1, ''), (2, 'a b%2Fc')) v(id, key); +-- +ok +== +COPY percent_tbl TO '{TEST_DIR}/escaped_partitions_percent' (FORMAT PARQUET, PARTITION_BY(key)) +-- +ok +== +select COUNT(*) from glob('{TEST_DIR}/escaped_partitions_percent/key=a%20b%252Fc/*.parquet') +-- +ok +== +select key, id +from parquet_scan('{TEST_DIR}/escaped_partitions_percent/**/*.parquet') +ORDER BY id +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_join_pushdown.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_join_pushdown.test index 68b076e..c4892b3 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_join_pushdown.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_join_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_join_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i//1000 AS partition, i FROM range(10000) t(i) diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_recursive_cte.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_recursive_cte.test index 5d1b5df..7d8eaf9 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partition_recursive_cte.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partition_recursive_cte.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partition_recursive_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT 2000+i%10 AS year, 1+i%3 AS month, i%4 AS c, i%5 AS d FROM RANGE(0,20) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_delayed_flush.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_delayed_flush.test index cc66edb..7bc1874 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_delayed_flush.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_delayed_flush.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partitioned_delayed_flush.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET partitioned_write_flush_threshold=64; diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_write.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_write.test index e610a5a..af7c46e 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_write.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partitioned_write.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partitioned_write.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test as SELECT i%2 as part_col, (i+1)%5 as value_col, i as value2_col from range(0,10) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/partitioned/hive_partitioning_overwrite.test b/parser/testdata/corpus/sql/copy/partitioned/hive_partitioning_overwrite.test index 2f30e89..3a1f677 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/hive_partitioning_overwrite.test +++ b/parser/testdata/corpus/sql/copy/partitioned/hive_partitioning_overwrite.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/hive_partitioning_overwrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42 AS part_col, 43 AS value_col) TO '{TEST_DIR}/overwrite_test' (FORMAT PARQUET, PARTITION_BY (part_col)); diff --git a/parser/testdata/corpus/sql/copy/partitioned/order_by_without_partition.test b/parser/testdata/corpus/sql/copy/partitioned/order_by_without_partition.test index e6f6dc2..b79924e 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/order_by_without_partition.test +++ b/parser/testdata/corpus/sql/copy/partitioned/order_by_without_partition.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/order_by_without_partition.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET partitioned_write_flush_threshold=2048; diff --git a/parser/testdata/corpus/sql/copy/partitioned/partition_by_syntax.test b/parser/testdata/corpus/sql/copy/partitioned/partition_by_syntax.test index a9fc029..643e551 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partition_by_syntax.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partition_by_syntax.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partition_by_syntax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1 AS a, 2 AS payload) TO '{TEST_DIR}/single_partition' PARTITION BY a, HEADER; diff --git a/parser/testdata/corpus/sql/copy/partitioned/partition_issue_6304.test b/parser/testdata/corpus/sql/copy/partitioned/partition_issue_6304.test index 60ff11b..a48db03 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partition_issue_6304.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partition_issue_6304.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partition_issue_6304.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select NULL as i, NULL as j from range(100000)) to '{TEST_DIR}/issue6304_null' (format parquet, partition_by(i), overwrite_or_ignore); diff --git a/parser/testdata/corpus/sql/copy/partitioned/partition_null_row_group_size_bytes.test b/parser/testdata/corpus/sql/copy/partitioned/partition_null_row_group_size_bytes.test new file mode 100644 index 0000000..d3f0f4d --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partition_null_row_group_size_bytes.test @@ -0,0 +1,16 @@ +# source: test/sql/copy/partitioned/partition_null_row_group_size_bytes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT repeat('w', 1024) AS name, CASE WHEN i < 2048 THEN 'a' ELSE NULL END AS part + FROM range(4096) t(i) +) TO '{TEMP_DIR}/partition_null_rgsb' (FORMAT PARQUET, PARTITION_BY (part), ROW_GROUP_SIZE_BYTES '256KiB', OVERWRITE_OR_IGNORE); +-- +ok +== +SELECT part, count(*) FROM read_parquet('{TEMP_DIR}/partition_null_rgsb/**/*.parquet', hive_partitioning=true) GROUP BY ALL ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/partition_path.test b/parser/testdata/corpus/sql/copy/partitioned/partition_path.test new file mode 100644 index 0000000..aec88ff --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partition_path.test @@ -0,0 +1,365 @@ +# source: test/sql/copy/partitioned/partition_path.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE sales AS +SELECT i AS id, + DATE '2024-01-15' + (i * 20)::INTEGER AS d, + CASE i % 3 WHEN 0 THEN 'eu' WHEN 1 THEN 'us' ELSE NULL END AS region +FROM range(10) t(i); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_case' (FORMAT parquet, PARTITION_BY (region), +PARTITION_PATH CASE WHEN region = 'eu' THEN 'europe' ELSE 'region=' || coalesce(region, 'unknown') END); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_case/(.*)/[^/]*$', 1) AS dir, count(*) +FROM read_parquet('{TEST_DIR}/partition_path_case/**/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY (SELECT *, year(d) AS y, month(d) AS m FROM sales) TO '{TEST_DIR}/partition_path_date' (FORMAT parquet, +PARTITION_BY (y, m), PARTITION_PATH format('{}/{:02d}', y, m)); +-- +ok +== +SELECT dir, count(*), count(DISTINCT filename) FROM ( + SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_date/(.*)/[^/]*$', 1) AS dir, filename + FROM read_parquet('{TEST_DIR}/partition_path_date/*/*/*.parquet', hive_partitioning = false) +) GROUP BY dir ORDER BY dir; +-- +ok +== +COPY (SELECT *, month(d) AS m FROM sales) TO '{TEST_DIR}/partition_path_multi' (FORMAT parquet, +PARTITION_BY (region, m), PARTITION_PATH coalesce(region, 'none') || '/month_' || m::VARCHAR, WRITE_PARTITION_COLUMNS); +-- +ok +== +SELECT count(*), count(DISTINCT regexp_extract(replace(filename, '\', '/'), 'partition_path_multi/(.*)/[^/]*$', 1)) +FROM read_parquet('{TEST_DIR}/partition_path_multi/*/month_*/*.parquet', hive_partitioning = false); +-- +ok +== +SELECT count(*) FROM ( + SELECT id, d, region, month(d) FROM sales + EXCEPT + SELECT id, d, region, m FROM read_parquet('{TEST_DIR}/partition_path_multi/*/*/*.parquet', hive_partitioning = false) +); +-- +ok +== +CREATE TABLE regions AS SELECT * FROM (VALUES + (1, 'eu', 'us-east-1'), (2, 'eu', 'us-west-2'), (3, 'us', 'us-east-1'), (4, 'eu', 'us-east-1'), (5, 'us', NULL) +) v(id, region, other_col); +-- +ok +== +COPY regions TO '{TEST_DIR}/partition_path_multi_case' (FORMAT parquet, PARTITION_BY (region, other_col), +PARTITION_PATH CASE WHEN region = 'eu' AND other_col = 'us-east-1' THEN 'val1/val2' +ELSE 'region=' || region || '/other_col=' || coalesce(other_col, '__HIVE_DEFAULT_PARTITION__') END); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_multi_case/(.*)/[^/]*$', 1) AS dir, list(id ORDER BY id) +FROM read_parquet('{TEST_DIR}/partition_path_multi_case/*/*/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY regions TO '{TEST_DIR}/partition_path_multi_case_null' (FORMAT parquet, PARTITION_BY (region, other_col), +PARTITION_PATH 'region=' || region || '/other_col=' || other_col); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_const' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH 'all'); +-- +ok +== +COPY (FROM sales WHERE region = 'eu') TO '{TEST_DIR}/partition_path_empty' (FORMAT parquet, PARTITION_BY (region), +PARTITION_PATH ''); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_empty_dot' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH './'); +-- +ok +== +CREATE TABLE countries AS SELECT * FROM (VALUES (1, 'eu', NULL), (2, 'eu', 'de'), (3, 'us', NULL), (4, 'eu', 'fr')) +v(id, region, country); +-- +ok +== +COPY countries TO '{TEST_DIR}/partition_path_nested' (FORMAT parquet, PARTITION_BY (region, country), +PARTITION_PATH CASE WHEN country IS NULL THEN region ELSE region || '/' || country END); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_nested/(.*)/[^/]*$', 1) AS dir, list(id ORDER BY id) +FROM read_parquet(['{TEST_DIR}/partition_path_nested/*/*.parquet', '{TEST_DIR}/partition_path_nested/*/*/*.parquet'], +hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY countries TO '{TEST_DIR}/partition_path_nested_deep' (FORMAT parquet, PARTITION_BY (region, country), +PARTITION_PATH CASE WHEN country IS NULL THEN region ELSE region || '/a/b/' || country END); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_nested_deep/(.*)/[^/]*$', 1) AS dir, list(id) +FROM read_parquet('{TEST_DIR}/partition_path_nested_deep/**/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY countries TO '{TEST_DIR}/partition_path_nested_hive' (FORMAT parquet, PARTITION_BY (region, country), +PARTITION_PATH CASE WHEN region = 'eu' AND country = 'fr' THEN 'region=us/country=__HIVE_DEFAULT_PARTITION__/other' +ELSE path_join(hive_partition_component('region', region), hive_partition_component('country', country)) END); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_nested_hive/(.*)/[^/]*$', 1) AS dir, list(id) +FROM read_parquet('{TEST_DIR}/partition_path_nested_hive/**/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY (FROM (VALUES (1, 'eu'), (2, 'europe'), (3, 'eu-west')) v(id, region)) TO '{TEST_DIR}/partition_path_prefix' +(FORMAT parquet, PARTITION_BY (region), PARTITION_PATH region); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_prefix/(.*)/[^/]*$', 1) AS dir, count(*) +FROM read_parquet('{TEST_DIR}/partition_path_prefix/*/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY (SELECT *, month(d) AS m FROM sales) TO '{TEST_DIR}/partition_path_int' (FORMAT parquet, PARTITION_BY (m), +PARTITION_PATH (m)); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_int/(.*)/[^/]*$', 1) AS dir, count(*) +FROM read_parquet('{TEST_DIR}/partition_path_int/*/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_csv' (FORMAT csv, PARTITION_BY (region), PARTITION_PATH coalesce(region, 'none')); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_csv/(.*)/[^/]*$', 1) AS dir, count(*) +FROM read_csv('{TEST_DIR}/partition_path_csv/*/*.csv', hive_partitioning = false, filename = true) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY (SELECT i % 2 AS p, i AS v FROM range(20000) t(i)) TO '{TEST_DIR}/partition_path_rotation' +(FORMAT parquet, PARTITION_BY (p), PARTITION_PATH 'part_' || p::VARCHAR, ROW_GROUP_SIZE 1024, FILE_SIZE_BYTES '1kb'); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_rotation/(.*)/[^/]*$', 1) AS dir, count(*), + count(DISTINCT filename) > 1 +FROM read_parquet('{TEST_DIR}/partition_path_rotation/*/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/partition_path_rotation/part_*/data_0.parquet'); +-- +ok +== +COPY (SELECT i % 5 AS p, i AS v FROM range(10000) t(i)) TO '{TEST_DIR}/partition_path_reopen' +(FORMAT parquet, PARTITION_BY (p), PARTITION_PATH 'part_' || p::VARCHAR); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_reopen/(.*)/[^/]*$', 1) AS dir, count(*), + count(DISTINCT filename) > 1 +FROM read_parquet('{TEST_DIR}/partition_path_reopen/*/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +RESET partitioned_write_flush_threshold; +-- +ok +== +RESET partitioned_write_max_open_files; +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_case' (FORMAT parquet, PARTITION_BY (region), +PARTITION_PATH coalesce(region, 'none'), OVERWRITE); +-- +ok +== +SELECT count(*) FROM read_parquet('{TEST_DIR}/partition_path_case/**/*.parquet', hive_partitioning = false); +-- +ok +== +PREPARE partition_path_prepared AS COPY sales TO '{TEST_DIR}/partition_path_prepared' +(FORMAT parquet, PARTITION_BY (region), PARTITION_PATH coalesce(region, $1)); +-- +ok +== +EXECUTE partition_path_prepared('none'); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_prepared/(.*)/[^/]*$', 1) AS dir, count(*) +FROM read_parquet('{TEST_DIR}/partition_path_prepared/*/*.parquet', hive_partitioning = false) +GROUP BY dir ORDER BY dir; +-- +ok +== +CREATE TABLE events AS SELECT * FROM (VALUES (1, 'eu', 'x'), (2, 'us', 'y'), (3, 'eu', 'y')) v(id, region, part); +-- +ok +== +COPY events TO '{TEST_DIR}/partition_path_mixed' (FORMAT parquet, PARTITION_BY (region, part), +PARTITION_PATH CASE WHEN region = 'eu' AND part = 'x' THEN 'custom_location' +ELSE path_join(hive_partition_component('region', region), hive_partition_component('part', part)) END); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_mixed/(.*)/[^/]*$', 1) AS dir, id +FROM read_parquet('{TEST_DIR}/partition_path_mixed/**/*.parquet', hive_partitioning = false) +ORDER BY dir; +-- +ok +== +SELECT region, part, id +FROM read_parquet('{TEST_DIR}/partition_path_mixed/region=*/part=*/*.parquet', hive_partitioning = true) +ORDER BY id; +-- +ok +== +COPY regions TO '{TEST_DIR}/partition_path_hive_component' (FORMAT parquet, PARTITION_BY (region, other_col), +PARTITION_PATH path_join(hive_partition_component('region', region), hive_partition_component('other_col', other_col))); +-- +ok +== +SELECT id, region, other_col +FROM read_parquet('{TEST_DIR}/partition_path_hive_component/*/*/*.parquet', hive_partitioning = true) +ORDER BY id; +-- +ok +== +CREATE TABLE hive_values AS SELECT * FROM (VALUES + (1, 'a/b', 1), (2, 'c d%', NULL), (3, NULL, 2), (4, '__HIVE_DEFAULT_PARTITION__', 3), (5, '🦆', 1), (6, 'a/b', 1) +) v(id, k, n); +-- +ok +== +COPY hive_values TO '{TEST_DIR}/partition_path_hive_default' (FORMAT parquet, PARTITION_BY (k, n)); +-- +ok +== +COPY hive_values TO '{TEST_DIR}/partition_path_hive_expression' (FORMAT parquet, PARTITION_BY (k, n), +PARTITION_PATH path_join(hive_partition_component('k', k), hive_partition_component('n', n))); +-- +ok +== +SELECT count(*), count(*) FILTER (WHERE default_file IS NULL OR expression_file IS NULL) +FROM ( + SELECT regexp_extract(replace(file, '\', '/'), 'partition_path_hive_default/(.*)$', 1) AS default_file + FROM glob('{TEST_DIR}/partition_path_hive_default/**/*.parquet') +) d +FULL OUTER JOIN ( + SELECT regexp_extract(replace(file, '\', '/'), 'partition_path_hive_expression/(.*)$', 1) AS expression_file + FROM glob('{TEST_DIR}/partition_path_hive_expression/**/*.parquet') +) e ON default_file = expression_file; +-- +ok +== +CREATE TABLE structs AS SELECT 1 AS id, {'x': 'a'} AS p; +-- +ok +== +COPY structs TO '{TEST_DIR}/partition_path_struct' (FORMAT parquet, PARTITION_BY (p), +PARTITION_PATH struct_extract(p, 'x'), WRITE_PARTITION_COLUMNS); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_struct/(.*)/[^/]*$', 1) AS dir, id, p +FROM read_parquet('{TEST_DIR}/partition_path_struct/*/*.parquet', hive_partitioning = false) +ORDER BY dir; +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_PATH 'dir'); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH); +-- +error: Parser Error: PARTITION_PATH expects an expression +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH (region, region)); +-- +error: Parser Error: PARTITION_PATH expects a single expression +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH (region DESC)); +-- +error: Parser Error: PARTITION_PATH expects a single expression +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH id::VARCHAR); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH nonexistent); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH sales.region); +-- +ok +== +COPY structs TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (p), PARTITION_PATH p.x); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH max(region)); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH row_number() OVER ()); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH (SELECT 'dir')); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH list_transform([region], lambda x: upper(x))[1]); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH 'dir', HIVE_FILE_PATTERN false); +-- +ok +== +COPY sales FROM '{TEST_DIR}/partition_path_error.csv' (PARTITION_PATH 'dir'); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error_null' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH region); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error_absolute' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH '/tmp/' || coalesce(region, 'none')); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_error_parent' (FORMAT parquet, PARTITION_BY (region), PARTITION_PATH '../' || coalesce(region, 'none')); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/partition_path_json.test b/parser/testdata/corpus/sql/copy/partitioned/partition_path_json.test new file mode 100644 index 0000000..466019a --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partition_path_json.test @@ -0,0 +1,31 @@ +# source: test/sql/copy/partitioned/partition_path_json.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE sales AS +SELECT i AS id, CASE i % 3 WHEN 0 THEN 'eu' WHEN 1 THEN 'us' ELSE NULL END AS region +FROM range(10) t(i); +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_json' (FORMAT json, PARTITION_BY (region), PARTITION_PATH coalesce(region, 'none')); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_json/(.*)/[^/]*$', 1) AS dir, count(*) +FROM read_json('{TEST_DIR}/partition_path_json/*/*.json', hive_partitioning = false, filename = true) +GROUP BY dir ORDER BY dir; +-- +ok +== +COPY sales TO '{TEST_DIR}/partition_path_json_columns' (FORMAT json, PARTITION_BY (region), PARTITION_PATH 'region_' || coalesce(region, 'none'), WRITE_PARTITION_COLUMNS); +-- +ok +== +SELECT regexp_extract(replace(filename, '\', '/'), 'partition_path_json_columns/(.*)/[^/]*$', 1) AS dir, count(*), count(region) +FROM read_json('{TEST_DIR}/partition_path_json_columns/*/*.json', hive_partitioning = false, filename = true) +GROUP BY dir ORDER BY dir; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_asof_join.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_asof_join.test new file mode 100644 index 0000000..fee4578 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_asof_join.test @@ -0,0 +1,89 @@ +# source: test/sql/copy/partitioned/partitioned_asof_join.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET VARIABLE datadate='2026-04-01'::DATE; +-- +ok +== +CREATE TYPE symbols AS ENUM ('VOE', 'ecpf', 'TRIO', 'TPZ', 'TXO', 'VEEA', 'VTP', 'TDOC', 'TSCO', 'XYLD', 'TTC', 'UNCY', 'TWN', 'TRNS', 'UE', 'TSLY', 'USB', 'mnoi', 'UFPT', 'VNO', 'TRC', 'ZYBT', 'YETH', 'TMUS.I', 'kpfi', 'TWIN', 'XHG', 'TLS', 'VDIG', 'UBS', 'VOYG', 'XISE', 'VMAR', 'VOYA.PRB', 'TMVE', 'TNON', 'USA', 'TARA', 'bofo', 'TEST', 'VTMX', 'WFC.PRZ', 'TDAY', 'WRD', 'mail', 'UK', 'VGAS.W', 'TLRY', 'WTIP', 'YOUL'); +-- +ok +== +SET VARIABLE fiftyInstrs=enum_range(NULL::symbols); +-- +ok +== +CREATE TABLE trade AS + SELECT + i AS tid, + getvariable('fiftyInstrs')[1 + floor(random() * 40)::INTEGER]::symbols AS sym, + getvariable('datadate') + INTERVAL 9 HOURS + INTERVAL (floor(random() * (7 * 60 * 60 + 30 * 60) * 1000)::INTEGER) MILLISECONDS AS time + FROM range(10_000) t(i) +-- +ok +== +CREATE TABLE quote AS + SELECT + i AS qid, + getvariable('fiftyInstrs')[1 + floor(random() * 50)::INTEGER]::symbols AS sym, + getvariable('datadate') + INTERVAL 9 HOURS + INTERVAL (floor(random() * (7 * 60 * 60 + 30 * 60) * 1000)::INTEGER) MILLISECONDS AS time + FROM range(100_000) t(i) +-- +ok +== +SELECT tid, t.sym::VARCHAR AS sym, t.time, qid, q.time +FROM ( + SELECT sym, time, tid + FROM trade + WHERE time BETWEEN getvariable('datadate') + INTERVAL '16 hours 20 minutes' + AND getvariable('datadate') + INTERVAL '16 hours 30 minutes' +) t +ASOF LEFT JOIN ( + SELECT sym, time, qid + FROM quote +) q USING (sym, time) +ORDER BY tid; +-- +ok +== +COPY trade TO '{TEST_DIR}/trade' (FORMAT parquet, PARTITION_BY (sym)) +-- +ok +== +DROP TABLE trade +-- +ok +== +CREATE VIEW trade AS FROM '{TEST_DIR}/trade/**/*.parquet' +-- +ok +== +COPY quote TO '{TEST_DIR}/quote' (FORMAT parquet, PARTITION_BY (sym)) +-- +ok +== +DROP TABLE quote +-- +ok +== +CREATE VIEW quote AS FROM '{TEST_DIR}/quote/**/*.parquet' +-- +ok +== +SELECT tid, t.sym, t.time, qid, q.time +FROM ( + SELECT sym, time, tid + FROM trade + WHERE time BETWEEN getvariable('datadate') + INTERVAL '16 hours 20 minutes' + AND getvariable('datadate') + INTERVAL '16 hours 30 minutes' +) t +ASOF LEFT JOIN ( + SELECT sym, time, qid + FROM quote +) q USING (sym, time) +ORDER BY tid; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_early_finalize.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_early_finalize.test index 1ba0086..9a4f4a5 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partitioned_early_finalize.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_early_finalize.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partitioned_early_finalize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET partitioned_write_max_open_files=1024; diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_file_rotation.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_file_rotation.test index 5f15d97..9b5549b 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partitioned_file_rotation.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_file_rotation.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partitioned_file_rotation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE partitioned_rotation_source AS diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_flush_join_race.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_flush_join_race.test new file mode 100644 index 0000000..1c081c9 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_flush_join_race.test @@ -0,0 +1,31 @@ +# source: test/sql/copy/partitioned/partitioned_flush_join_race.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA threads=16; +-- +ok +== +CREATE TABLE flush_join_src AS SELECT (i % 64)::INTEGER AS p, i::BIGINT AS v FROM range(1048576) tbl(i); +-- +ok +== +COPY flush_join_src TO '{TEST_DIR}/flush_join_race_{i}' (FORMAT PARQUET, PARTITION_BY (p)); +-- +ok +== +SELECT count(*), count(DISTINCT v), sum(v) +FROM read_parquet('{TEST_DIR}/flush_join_race_{i}/**/*.parquet', hive_partitioning = true); +-- +ok +== +COPY flush_join_src TO '{TEST_DIR}/flush_join_race_ordered_{i}' (FORMAT PARQUET, PARTITION_BY (p), ORDER_BY (v)); +-- +ok +== +SELECT count(*), count(DISTINCT v), sum(v) +FROM read_parquet('{TEST_DIR}/flush_join_race_ordered_{i}/**/*.parquet', hive_partitioning = true); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_group_by.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_group_by.test index c2c54b8..245dd48 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partitioned_group_by.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_group_by.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partitioned_group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE partitioned_tbl AS SELECT i%2 AS partition, i col1, i // 7 col2, (i%3)::VARCHAR col3 FROM range(10000) t(i) diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by.test index c80e8d4..4b4ec44 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partitioned_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ordered_source AS diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by_flush_race.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by_flush_race.test index 16f3f42..4647059 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by_flush_race.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_order_by_flush_race.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partitioned_order_by_flush_race.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA threads=6; diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_row_group_size_bytes_boundary.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_row_group_size_bytes_boundary.test new file mode 100644 index 0000000..d2baa6e --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_row_group_size_bytes_boundary.test @@ -0,0 +1,28 @@ +# source: test/sql/copy/partitioned/partitioned_row_group_size_bytes_boundary.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT repeat('w', 1024) AS name, '2026' AS year, '07' AS month, + CASE WHEN i < 2048 THEN '07' ELSE '08' END AS day + FROM range(4096) t(i) +) TO '__TEST_DIR__/boundary_partitions' (FORMAT PARQUET, PARTITION_BY (year, month, day), PRESERVE_ORDER false, ROW_GROUP_SIZE_BYTES '50MiB') +-- +ok +== +SELECT day, count(*) FROM read_parquet('__TEST_DIR__/boundary_partitions/**/*.parquet', hive_partitioning = true) GROUP BY ALL ORDER BY ALL +-- +ok +== +COPY ( + SELECT repeat('w', 1024) AS name, CASE WHEN i < 2048 THEN 'a' ELSE 'b' END AS part + FROM range(4096) t(i) +) TO '__TEST_DIR__/boundary_partitions_small' (FORMAT PARQUET, PARTITION_BY (part), PRESERVE_ORDER false, ROW_GROUP_SIZE_BYTES '256KiB') +-- +ok +== +SELECT part, count(*) FROM read_parquet('__TEST_DIR__/boundary_partitions_small/**/*.parquet', hive_partitioning = true) GROUP BY ALL ORDER BY ALL +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_window.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_window.test index a3c04a9..4623364 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/partitioned_window.test +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_window.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/partitioned_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE partitioned_tbl AS diff --git a/parser/testdata/corpus/sql/copy/partitioned/partitioned_write_backpressure.test b/parser/testdata/corpus/sql/copy/partitioned/partitioned_write_backpressure.test new file mode 100644 index 0000000..4695749 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/partitioned/partitioned_write_backpressure.test @@ -0,0 +1,39 @@ +# source: test/sql/copy/partitioned/partitioned_write_backpressure.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET memory_limit='1GB'; +-- +ok +== +COPY ( + SELECT i, 'one' AS p, repeat(md5(i::VARCHAR), 32) AS payload + FROM range(524288) t(i) +) TO '{TEST_DIR}/wide_source.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048); +-- +ok +== +SET memory_limit='128MB'; +-- +ok +== +SET max_temp_directory_size='0B'; +-- +ok +== +COPY (SELECT * FROM read_parquet('{TEST_DIR}/wide_source.parquet')) +TO '{TEST_DIR}/wide_partitioned' (FORMAT CSV, PARTITION_BY(p)); +-- +ok +== +SELECT count(*), count(DISTINCT i), sum(i) +FROM read_csv('{TEST_DIR}/wide_partitioned/**/*.csv'); +-- +ok +== +SELECT count(*) FROM read_csv('{TEST_DIR}/wide_partitioned/**/*.csv') +WHERE payload IS DISTINCT FROM repeat(md5(i::VARCHAR), 32); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/partitioned/skip_partition_column_writes.test b/parser/testdata/corpus/sql/copy/partitioned/skip_partition_column_writes.test index b7cd264..df500f5 100644 --- a/parser/testdata/corpus/sql/copy/partitioned/skip_partition_column_writes.test +++ b/parser/testdata/corpus/sql/copy/partitioned/skip_partition_column_writes.test @@ -1,6 +1,6 @@ # source: test/sql/copy/partitioned/skip_partition_column_writes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY test TO '{TEST_DIR}/no-part-cols' (FORMAT PARQUET, PARTITION_BY (part_col)); diff --git a/parser/testdata/corpus/sql/copy/per_thread_output.test b/parser/testdata/corpus/sql/copy/per_thread_output.test index 928312d..b6a42d3 100644 --- a/parser/testdata/corpus/sql/copy/per_thread_output.test +++ b/parser/testdata/corpus/sql/copy/per_thread_output.test @@ -1,6 +1,6 @@ # source: test/sql/copy/per_thread_output.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigdata AS SELECT i AS col_a, i AS col_b FROM range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/copy/return_files.test b/parser/testdata/corpus/sql/copy/return_files.test index 0ee259d..deb8e4d 100644 --- a/parser/testdata/corpus/sql/copy/return_files.test +++ b/parser/testdata/corpus/sql/copy/return_files.test @@ -1,6 +1,6 @@ # source: test/sql/copy/return_files.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT range i FROM range(200000); @@ -27,10 +27,6 @@ COPY integers TO '{TEST_DIR}/test_return_files_stats_conflict.parquet' (RETURN_F -- ok == -SET threads=2; --- -ok -== COPY integers TO '{TEST_DIR}/test_per_thread_output' (RETURN_FILES, PER_THREAD_OUTPUT); -- ok diff --git a/parser/testdata/corpus/sql/copy/return_stats.test b/parser/testdata/corpus/sql/copy/return_stats.test index ff7ec9c..199a406 100644 --- a/parser/testdata/corpus/sql/copy/return_stats.test +++ b/parser/testdata/corpus/sql/copy/return_stats.test @@ -1,6 +1,6 @@ # source: test/sql/copy/return_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bools AS SELECT i::bool i FROM range(2) i(i); @@ -95,6 +95,38 @@ CREATE TABLE array_test AS SELECT [i, i + 1, i + 2]::INT[3] AS array_val FROM ra -- ok == +CREATE TABLE struct_nan_test AS SELECT case when i%10=0 then null else {'x': case when i%10=5 then 'nan'::double else i/10.0 end, 'y': (i/10.0)::float} end struct_val FROM range(2500) t(i) +-- +ok +== +CREATE TABLE list_nan_test AS SELECT case when i%10=0 then null else [i/10.0, case when i%10=5 then 'nan'::double else null end] end l1, [case when i%5=0 then 'nan'::float else (i/10.0)::float end] l2 FROM range(2500) t(i) +-- +ok +== +CREATE TABLE map_nan_test AS SELECT MAP {'key'||i: case when i%10=5 then 'nan'::float else (i/10.0)::float end} map_val, MAP {case when i%5=0 then 'nan'::double else i/10.0 end: case when i%2=0 then 'nan'::double else i/10.0 end} fp_map FROM range(2500) t(i) +-- +ok +== +CREATE TABLE array_nan_test AS SELECT [i/10.0, case when i%10=5 then 'nan'::double else null end, i/10.0]::DOUBLE[3] AS array_val FROM range(2500) t(i) +-- +ok +== +CREATE TABLE nested_nan_test AS SELECT {'s': {'x': case when i%10=5 then 'nan'::double else i/10.0 end}, 'l': [case when i%5=0 then 'nan'::float else (i/10.0)::float end]} n, [{'a': case when i%2=0 then 'nan'::double else i/10.0 end}] ls FROM range(2500) t(i) +-- +ok +== +CREATE TABLE variant_nan_test AS SELECT case when i%10=5 then 'nan'::double::variant when i%10=3 then 'nan'::float::variant when i%10=7 then 'text'::variant else (i/10.0)::variant end v FROM range(2500) t(i) +-- +ok +== +CREATE TABLE variant_struct_nan_test AS SELECT {'a': case when i%10=5 then 'nan'::double else i/10.0 end, 'b': case when i%5=0 then 'nan'::float else (i/10.0)::float end}::variant v FROM range(2500) t(i) +-- +ok +== +CREATE TABLE variant_list_nan_test AS SELECT [i/10.0, case when i%10=5 then 'nan'::double else null end]::variant v FROM range(2500) t(i) +-- +ok +== CREATE TABLE partitioned_test AS SELECT range%2 as partition_key, range val FROM range(2500) -- ok @@ -151,6 +183,10 @@ COPY decimal_test TO '{TEST_DIR}/decimal_test.parquet' (RETURN_STATS); -- ok == +COPY (SELECT '10:34:56+00'::TIMETZ AS t UNION ALL SELECT '23:00:00+02'::TIMETZ UNION ALL SELECT '01:00:00-03'::TIMETZ) TO '{TEST_DIR}/timetz_test.parquet' (RETURN_STATS, ROW_GROUP_SIZE 1); +-- +ok +== COPY floating_point_test TO '{TEST_DIR}/fp.parquet' (RETURN_STATS); -- ok @@ -203,6 +239,38 @@ COPY array_test TO '{TEST_DIR}/array_test.parquet' (RETURN_STATS); -- ok == +COPY struct_nan_test TO '{TEST_DIR}/struct_nan_test.parquet' (RETURN_STATS); +-- +ok +== +COPY list_nan_test TO '{TEST_DIR}/list_nan_test.parquet' (RETURN_STATS); +-- +ok +== +COPY map_nan_test TO '{TEST_DIR}/map_nan_test.parquet' (RETURN_STATS); +-- +ok +== +COPY array_nan_test TO '{TEST_DIR}/array_nan_test.parquet' (RETURN_STATS); +-- +ok +== +COPY nested_nan_test TO '{TEST_DIR}/nested_nan_test.parquet' (RETURN_STATS); +-- +ok +== +COPY variant_nan_test TO '{TEST_DIR}/variant_nan_test.parquet' (SHREDDING {v: 'DOUBLE'}, RETURN_STATS); +-- +ok +== +COPY variant_struct_nan_test TO '{TEST_DIR}/variant_struct_nan_test.parquet' (SHREDDING {v: 'STRUCT(a DOUBLE, b FLOAT)'}, RETURN_STATS); +-- +ok +== +COPY variant_list_nan_test TO '{TEST_DIR}/variant_list_nan_test.parquet' (SHREDDING {v: 'DOUBLE[]'}, RETURN_STATS); +-- +ok +== COPY partitioned_test TO '{TEST_DIR}/partitioned_test' (FORMAT PARQUET, PARTITION_BY (partition_key), RETURN_STATS, OVERWRITE); -- ok @@ -227,3 +295,27 @@ COPY decimal128_multi_rg TO '{TEST_DIR}/decimal128_multi_rg.parquet' (FORMAT PAR -- ok == +CREATE TABLE nan_first_rg AS SELECT CASE WHEN i = 0 THEN 'nan'::double ELSE i::double END AS d FROM range(4096) t(i); +-- +ok +== +COPY nan_first_rg TO '{TEST_DIR}/nan_first_rg.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048, RETURN_STATS); +-- +ok +== +CREATE TABLE nan_every_rg AS SELECT CASE WHEN i % 1000 = 0 THEN 'nan'::float ELSE i::float END AS f FROM range(4096) t(i); +-- +ok +== +COPY nan_every_rg TO '{TEST_DIR}/nan_every_rg.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048, RETURN_STATS); +-- +ok +== +CREATE TABLE nested_nan_rg AS SELECT {'x': CASE WHEN i = 0 THEN 'nan'::double ELSE i::double END} s, [CASE WHEN i % 1000 = 0 THEN 'nan'::float ELSE i::float END] l, (CASE WHEN i IN (1, 2) THEN 'nan'::double ELSE i::double END)::VARIANT v FROM range(4096) t(i); +-- +ok +== +COPY nested_nan_rg TO '{TEST_DIR}/nested_nan_rg.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048, SHREDDING {v: 'DOUBLE'}, RETURN_STATS); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/return_stats_extra_info.test b/parser/testdata/corpus/sql/copy/return_stats_extra_info.test index af9f8f5..360f934 100644 --- a/parser/testdata/corpus/sql/copy/return_stats_extra_info.test +++ b/parser/testdata/corpus/sql/copy/return_stats_extra_info.test @@ -1,6 +1,6 @@ # source: test/sql/copy/return_stats_extra_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT range i FROM range(10000); diff --git a/parser/testdata/corpus/sql/copy/return_stats_nested.test b/parser/testdata/corpus/sql/copy/return_stats_nested.test new file mode 100644 index 0000000..e116e89 --- /dev/null +++ b/parser/testdata/corpus/sql/copy/return_stats_nested.test @@ -0,0 +1,123 @@ +# source: test/sql/copy/return_stats_nested.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE containers ( + kind INTEGER, + l INTEGER[], + s STRUCT(x INTEGER), + m MAP(VARCHAR, INTEGER), + a INTEGER[2] +); +-- +ok +== +INSERT INTO containers VALUES + (0, NULL, NULL, NULL, NULL), + (1, [NULL], {'x': NULL}, MAP {'key': NULL}, [NULL, NULL]), + (2, [], {'x': 42}, MAP {}, [42, 42]); +-- +ok +== +WITH stats AS ( + COPY containers TO '{TEST_DIR}/container_stats' + (FORMAT PARQUET, PARTITION_BY(kind), RETURN_STATS) +) +SELECT partition_keys['kind'], + column_statistics['"l"'], + column_statistics['"l"."element"']['null_count'], + column_statistics['"s"'], + column_statistics['"s"."x"']['null_count'], + column_statistics['"m"'], + column_statistics['"m"."value"']['null_count'], + column_statistics['"a"'], + column_statistics['"a"."element"']['null_count'] +FROM stats; +-- +ok +== +WITH stats AS ( + COPY containers TO '{TEST_DIR}/container_stats_flat.parquet' (RETURN_STATS) +) +SELECT UNNEST(map_keys(column_statistics)) FROM stats; +-- +ok +== +CREATE TABLE nested_containers ( + s STRUCT(inner_struct STRUCT(x INTEGER), l STRUCT(y INTEGER)[], + a INTEGER[2], m MAP(VARCHAR, STRUCT(z INTEGER))), + ll INTEGER[][] +); +-- +ok +== +INSERT INTO nested_containers VALUES + (NULL, NULL), + ({'inner_struct': NULL, 'l': NULL, 'a': NULL, 'm': NULL}, []), + ({'inner_struct': {'x': NULL}, 'l': [], 'a': [NULL, NULL], 'm': MAP {}}, + [NULL, [], [NULL], [1, NULL]]), + ({'inner_struct': {'x': 1}, 'l': [NULL, {'y': NULL}, {'y': 1}], + 'a': [1, NULL], 'm': MAP {'absent': NULL, 'null_field': {'z': NULL}, 'value': {'z': 1}}}, + [[1]]); +-- +ok +== +WITH stats AS ( + COPY nested_containers TO '{TEST_DIR}/nested_container_stats.parquet' (RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +WITH stats AS ( + COPY (SELECT * FROM nested_containers WHERE s IS NULL) + TO '{TEST_DIR}/absent_nested_container_stats.parquet' (RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +SELECT count(*) FROM ( + (SELECT * FROM nested_containers EXCEPT ALL + SELECT s, ll FROM read_parquet('{TEST_DIR}/nested_container_stats.parquet')) + UNION ALL + (SELECT s, ll FROM read_parquet('{TEST_DIR}/nested_container_stats.parquet') EXCEPT ALL + SELECT * FROM nested_containers) +); +-- +ok +== +WITH stats AS ( + COPY (SELECT * FROM nested_containers WHERE false) + TO '{TEST_DIR}/empty_nested_container_stats.parquet' (RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +CREATE TABLE repeated_containers AS +SELECT s, ll FROM range(2048), nested_containers; +-- +ok +== +SET threads={THREADS}; +-- +error: Parser Error: syntax error at or near "}" +== +WITH stats AS ( + COPY repeated_containers TO '{TEST_DIR}/repeated_container_stats.parquet' + (RETURN_STATS, ROW_GROUP_SIZE 2048) +) +SELECT count, entry.key, entry.value, extra_info['row_group_count']::INTEGER > 1 +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/return_stats_truncate.test b/parser/testdata/corpus/sql/copy/return_stats_truncate.test index 685abed..2cd1019 100644 --- a/parser/testdata/corpus/sql/copy/return_stats_truncate.test +++ b/parser/testdata/corpus/sql/copy/return_stats_truncate.test @@ -1,6 +1,6 @@ # source: test/sql/copy/return_stats_truncate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT repeat('\xFF', 300)::BLOB as blob) TO '{TEST_DIR}/test_truncate_blob.parquet' (RETURN_STATS); diff --git a/parser/testdata/corpus/sql/copy/return_stats_variant.test b/parser/testdata/corpus/sql/copy/return_stats_variant.test new file mode 100644 index 0000000..bb3044a --- /dev/null +++ b/parser/testdata/corpus/sql/copy/return_stats_variant.test @@ -0,0 +1,184 @@ +# source: test/sql/copy/return_stats_variant.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE list_variants AS +SELECT * FROM (VALUES + (0, NULL::VARIANT), + (1, []::INTEGER[]::VARIANT), + (2, [NULL]::INTEGER[]::VARIANT), + (3, [1, NULL]::VARIANT), + (4, 'fallback'::VARIANT) +) t(id, v); +-- +ok +== +WITH stats AS ( + COPY list_variants TO '{TEST_DIR}/variant_list_stats.parquet' + (SHREDDING {v: 'INTEGER[]'}, RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM list_variants WHERE id < 4) + TO '{TEST_DIR}/variant_fully_shredded_list_stats.parquet' + (SHREDDING {v: 'INTEGER[]'}, RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"'], + column_statistics['"v"."value"']['null_count'] = column_statistics['"v"."value"']['num_values'] +FROM stats; +-- +ok +== +WITH stats AS ( + COPY list_variants TO '{TEST_DIR}/variant_auto_stats.parquet' (RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"'] FROM stats; +-- +ok +== +CREATE TABLE unshredded_variants AS SELECT empty_struct::VARIANT v FROM test_all_types(); +-- +ok +== +WITH stats AS ( + COPY unshredded_variants TO '{TEST_DIR}/variant_unshredded_stats.parquet' (RETURN_STATS) +) +SELECT column_statistics['"v"']['null_count']::BIGINT = + (SELECT count(*) FROM unshredded_variants WHERE v IS NULL), + column_statistics['"v"']['num_values']::BIGINT = (SELECT count(*) FROM unshredded_variants), + map_contains(column_statistics, '"v"."typed_value"') +FROM stats; +-- +ok +== +SELECT (SELECT count(*) FROM read_parquet('{TEST_DIR}/variant_unshredded_stats.parquet') WHERE v IS NULL) = + (SELECT count(*) FROM unshredded_variants WHERE v IS NULL); +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM (VALUES (NULL::VARIANT), (42::VARIANT), ('fallback'::VARIANT)) t(v)) + TO '{TEST_DIR}/variant_primitive_stats.parquet' + (SHREDDING {v: 'INTEGER'}, RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"']['null_count'], + column_statistics['"v"."typed_value"']['num_values'] +FROM stats; +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM (VALUES (NULL::VARIANT), (42::VARIANT)) t(v)) + TO '{TEST_DIR}/variant_fully_shredded_primitive_stats.parquet' + (SHREDDING {v: 'INTEGER'}, RETURN_STATS) +) +SELECT column_statistics['"v"'], + column_statistics['"v"."typed_value"']['null_count'] = column_statistics['"v"']['null_count'] +FROM stats; +-- +ok +== +CREATE TABLE object_variants AS +SELECT * FROM (VALUES + (0, NULL::VARIANT), + (1, {'a': NULL}::VARIANT), + (2, {'a': []::INTEGER[]}::VARIANT), + (3, {'a': [1], 'extra': true}::VARIANT), + (4, {'b': 42}::VARIANT), + (5, 'fallback'::VARIANT) +) t(id, v); +-- +ok +== +WITH stats AS ( + COPY object_variants TO '{TEST_DIR}/variant_object_stats.parquet' + (SHREDDING {v: 'STRUCT(a INTEGER[])'}, RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM object_variants WHERE id = 3) + TO '{TEST_DIR}/variant_object_leftover_stats.parquet' + (SHREDDING {v: 'STRUCT(a INTEGER[])'}, RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"'], + column_statistics['"v"."value"']['null_count'], column_statistics['"v"."value"']['num_values'] +FROM stats; +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM object_variants WHERE id < 3) + TO '{TEST_DIR}/variant_fully_shredded_object_stats.parquet' + (SHREDDING {v: 'STRUCT(a INTEGER[])'}, RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"'], + column_statistics['"v"."value"']['null_count'] = column_statistics['"v"."value"']['num_values'] +FROM stats; +-- +ok +== +WITH stats AS ( + COPY (SELECT NULL::VARIANT v FROM range(3)) + TO '{TEST_DIR}/variant_all_null_stats.parquet' + (SHREDDING {v: 'INTEGER[]'}, RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM list_variants WHERE false) + TO '{TEST_DIR}/variant_empty_stats.parquet' + (SHREDDING {v: 'INTEGER[]'}, RETURN_STATS) +) +SELECT entry.key, entry.value +FROM stats, UNNEST(map_entries(column_statistics)) t(entry) +WHERE NOT map_contains(entry.value, 'column_size_bytes'); +-- +ok +== +SELECT count(*) FROM ( + (SELECT id, v::VARCHAR, v IS NULL FROM list_variants EXCEPT ALL + SELECT id, v::VARCHAR, v IS NULL FROM read_parquet('{TEST_DIR}/variant_{STORAGE}_stats.parquet')) + UNION ALL + (SELECT id, v::VARCHAR, v IS NULL FROM read_parquet('{TEST_DIR}/variant_{STORAGE}_stats.parquet') EXCEPT ALL + SELECT id, v::VARCHAR, v IS NULL FROM list_variants) +); +-- +ok +== +WITH stats AS ( + COPY (SELECT v FROM read_parquet('{TEST_DIR}/variant_list_stats.parquet')) + TO '{TEST_DIR}/variant_rewritten_stats.parquet' + (SHREDDING {v: 'INTEGER[]'}, RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"'] FROM stats; +-- +ok +== +CREATE TABLE repeated_variants AS SELECT v FROM range(2048), list_variants; +-- +ok +== +WITH stats AS ( + COPY repeated_variants TO '{TEST_DIR}/variant_repeated_stats.parquet' + (SHREDDING {v: 'INTEGER[]'}, ROW_GROUP_SIZE 2048, RETURN_STATS) +) +SELECT column_statistics['"v"'], column_statistics['"v"."typed_value"'], + extra_info['row_group_count']::INTEGER > 1 FROM stats; +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy/row_groups_per_file.test b/parser/testdata/corpus/sql/copy/row_groups_per_file.test index 90269b8..dae590c 100644 --- a/parser/testdata/corpus/sql/copy/row_groups_per_file.test +++ b/parser/testdata/corpus/sql/copy/row_groups_per_file.test @@ -1,6 +1,6 @@ # source: test/sql/copy/row_groups_per_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY bigdata TO '{TEST_DIR}/row_groups_per_file1' (FORMAT PARQUET, ROW_GROUP_SIZE 2000, ROW_GROUPS_PER_FILE 1) diff --git a/parser/testdata/corpus/sql/copy/tmp_file.test b/parser/testdata/corpus/sql/copy/tmp_file.test index 840ec4f..0ee47b3 100644 --- a/parser/testdata/corpus/sql/copy/tmp_file.test +++ b/parser/testdata/corpus/sql/copy/tmp_file.test @@ -1,6 +1,6 @@ # source: test/sql/copy/tmp_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42 as x) to '{TEST_DIR}/foo'; diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_different_types.test b/parser/testdata/corpus/sql/copy_database/copy_database_different_types.test index a19ad56..ab14073 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_different_types.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_different_types.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_different_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/copy_database_different_types.db' AS db1 diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_errors.test b/parser/testdata/corpus/sql/copy_database/copy_database_errors.test index 18a461a..16487b1 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_errors.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_errors.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE db1.test(a INTEGER, b INTEGER, c VARCHAR); diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_fk.test b/parser/testdata/corpus/sql/copy_database/copy_database_fk.test index f4ed0c5..79b32f1 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_fk.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_fk.test @@ -1,9 +1,33 @@ # source: test/sql/copy_database/copy_database_fk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -COPY FROM DATABASE memory TO db1 +SET threads = 4 +-- +ok +== +ATTACH ':memory:' AS source +-- +ok +== +USE source +-- +ok +== +COPY FROM DATABASE source TO db1 +-- +ok +== +SELECT i FROM db1.pk_integers ORDER BY i +-- +ok +== +SELECT j FROM db1.fk_integers ORDER BY j +-- +ok +== +UPDATE fk_integers SET j=4 WHERE j=2 -- ok == diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_fk_order.test b/parser/testdata/corpus/sql/copy_database/copy_database_fk_order.test new file mode 100644 index 0000000..62d3ea5 --- /dev/null +++ b/parser/testdata/corpus/sql/copy_database/copy_database_fk_order.test @@ -0,0 +1,101 @@ +# source: test/sql/copy_database/copy_database_fk_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET preserve_insertion_order = {preserve_order} +-- +error: Parser Error: syntax error at or near "}" +== +SET threads = {threads} +-- +error: Parser Error: syntax error at or near "}" +== +ATTACH ':memory:' AS target +-- +ok +== +CREATE SCHEMA source.first +-- +ok +== +CREATE SCHEMA source.second +-- +ok +== +CREATE TABLE source.first.parent(i INTEGER PRIMARY KEY) +-- +ok +== +CREATE TABLE source.second.root(i INTEGER PRIMARY KEY) +-- +ok +== +CREATE TABLE source.second.parent(i INTEGER PRIMARY KEY REFERENCES source.second.root(i)) +-- +ok +== +CREATE TABLE source.second.child(i INTEGER REFERENCES source.second.parent(i)) +-- +ok +== +INSERT INTO source.first.parent VALUES (42) +-- +ok +== +INSERT INTO source.second.root SELECT i FROM range(10000) t(i) +-- +ok +== +INSERT INTO source.second.parent SELECT i FROM range(10000) t(i) +-- +ok +== +INSERT INTO source.second.child SELECT i FROM range(10000) t(i) +-- +ok +== +INSERT INTO source.second.child VALUES (NULL) +-- +ok +== +COPY FROM DATABASE source TO target (SCHEMA) +-- +ok +== +COPY FROM DATABASE source TO target (DATA) +-- +ok +== +SELECT i FROM target.first.parent +-- +ok +== +SELECT count(*), sum(i) FROM target.second.root +-- +ok +== +SELECT count(*), sum(i) FROM target.second.parent +-- +ok +== +SELECT count(*), sum(i) FROM target.second.child +-- +ok +== +INSERT INTO target.second.child VALUES (10000) +-- +ok +== +DELETE FROM target.second.parent WHERE i = 42 +-- +ok +== +DETACH target +-- +ok +== +DETACH source +-- +ok +== diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_gen_col.test b/parser/testdata/corpus/sql/copy_database/copy_database_gen_col.test index b5c9b48..503db7a 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_gen_col.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_gen_col.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_gen_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into test VALUES (42); diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_index.test b/parser/testdata/corpus/sql/copy_database/copy_database_index.test index fcecd76..470bcb9 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_index.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_index.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/copy_database_index.db' AS db1; diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_multiple.test b/parser/testdata/corpus/sql/copy_database/copy_database_multiple.test index 5899d44..d0ec57d 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_multiple.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_multiple.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_multiple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE db1.tbl1 AS FROM range(3) r(i); diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_simple.test b/parser/testdata/corpus/sql/copy_database/copy_database_simple.test index ab66c80..633d0f1 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_simple.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_simple.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/copy_database_simple.db' AS db1 diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_with_index.test b/parser/testdata/corpus/sql/copy_database/copy_database_with_index.test index dad300e..f7423e4 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_with_index.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_with_index.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_with_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE data AS diff --git a/parser/testdata/corpus/sql/copy_database/copy_database_with_unique_index.test b/parser/testdata/corpus/sql/copy_database/copy_database_with_unique_index.test index 1b648a2..15d9641 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_database_with_unique_index.test +++ b/parser/testdata/corpus/sql/copy_database/copy_database_with_unique_index.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_database_with_unique_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/copy_db_old.db' AS old; diff --git a/parser/testdata/corpus/sql/copy_database/copy_table_with_sequence.test b/parser/testdata/corpus/sql/copy_database/copy_table_with_sequence.test index cb8849f..0ba097f 100644 --- a/parser/testdata/corpus/sql/copy_database/copy_table_with_sequence.test +++ b/parser/testdata/corpus/sql/copy_database/copy_table_with_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/copy_database/copy_table_with_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/backup.db'; diff --git a/parser/testdata/corpus/sql/create/create_as.test b/parser/testdata/corpus/sql/create/create_as.test index 64c2b24..49f8de9 100644 --- a/parser/testdata/corpus/sql/create/create_as.test +++ b/parser/testdata/corpus/sql/create/create_as.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_as.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 AS SELECT 1; diff --git a/parser/testdata/corpus/sql/create/create_as_issue_11968.test b/parser/testdata/corpus/sql/create/create_as_issue_11968.test index 1270174..ca577a5 100644 --- a/parser/testdata/corpus/sql/create/create_as_issue_11968.test +++ b/parser/testdata/corpus/sql/create/create_as_issue_11968.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_as_issue_11968.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x INTEGER[]); diff --git a/parser/testdata/corpus/sql/create/create_as_partition_sorted_options.test b/parser/testdata/corpus/sql/create/create_as_partition_sorted_options.test index 91b0a47..10e0588 100644 --- a/parser/testdata/corpus/sql/create/create_as_partition_sorted_options.test +++ b/parser/testdata/corpus/sql/create/create_as_partition_sorted_options.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_as_partition_sorted_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers PARTITIONED BY (i) as select range i from range(10); diff --git a/parser/testdata/corpus/sql/create/create_database.test b/parser/testdata/corpus/sql/create/create_database.test index 1635aa9..3d26b94 100644 --- a/parser/testdata/corpus/sql/create/create_database.test +++ b/parser/testdata/corpus/sql/create/create_database.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_database.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE DATABASE mydb; diff --git a/parser/testdata/corpus/sql/create/create_index_on_issue_13643.test b/parser/testdata/corpus/sql/create/create_index_on_issue_13643.test index 2ccfe75..45aaca4 100644 --- a/parser/testdata/corpus/sql/create/create_index_on_issue_13643.test +++ b/parser/testdata/corpus/sql/create/create_index_on_issue_13643.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_index_on_issue_13643.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA db0; diff --git a/parser/testdata/corpus/sql/create/create_objects_readonly.test b/parser/testdata/corpus/sql/create/create_objects_readonly.test index 1eab297..b70c1cc 100644 --- a/parser/testdata/corpus/sql/create/create_objects_readonly.test +++ b/parser/testdata/corpus/sql/create/create_objects_readonly.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_objects_readonly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select 'c1' as c1 diff --git a/parser/testdata/corpus/sql/create/create_or_replace.test b/parser/testdata/corpus/sql/create/create_or_replace.test index a31c00f..ca41b34 100644 --- a/parser/testdata/corpus/sql/create/create_or_replace.test +++ b/parser/testdata/corpus/sql/create/create_or_replace.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_or_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE integers(i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/create/create_schema_options.test b/parser/testdata/corpus/sql/create/create_schema_options.test new file mode 100644 index 0000000..971fece --- /dev/null +++ b/parser/testdata/corpus/sql/create/create_schema_options.test @@ -0,0 +1,57 @@ +# source: test/sql/create/create_schema_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA s1 WITH ('location'='s3://bucket/folder', 'format'='parquet'); +-- +ok +== +CREATE SCHEMA s1 WITH (location='s3://bucket/folder', format='parquet'); +-- +ok +== +CREATE SCHEMA s1 WITH (location, format); +-- +ok +== +CREATE SCHEMA IF NOT EXISTS s1 WITH (location='s3://bucket/folder'); +-- +ok +== +CREATE OR REPLACE SCHEMA s1 WITH (location='s3://bucket/folder'); +-- +ok +== +CREATE SCHEMA s1 WITH (location=getvariable('location_var')); +-- +ok +== +CREATE SCHEMA other_db.s1 WITH (location='s3://bucket/folder'); +-- +ok +== +CREATE SCHEMA parent_schema +-- +ok +== +CREATE SCHEMA parent_schema.child WITH (location='s3://bucket/folder'); +-- +ok +== +CREATE SCHEMA WITH (location='s3://bucket/folder') s1; +-- +error: Parser Error: syntax error at or near "WITH" +== +CREATE TABLE s1.t(i INTEGER); +-- +ok +== +SET debug_verify_statement='reparse_statement' +-- +ok +== +CREATE SCHEMA s2 WITH ('a''b'=1); +-- +ok +== diff --git a/parser/testdata/corpus/sql/create/create_table_as_duplicate_names.test b/parser/testdata/corpus/sql/create/create_table_as_duplicate_names.test index 97edf8c..38e9b87 100644 --- a/parser/testdata/corpus/sql/create/create_table_as_duplicate_names.test +++ b/parser/testdata/corpus/sql/create/create_table_as_duplicate_names.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_table_as_duplicate_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM range(5) tbl1(i) JOIN range(5) tbl2(i) ON tbl1.i=tbl2.i; diff --git a/parser/testdata/corpus/sql/create/create_table_as_error.test b/parser/testdata/corpus/sql/create/create_table_as_error.test index 15e91b4..1a0804b 100644 --- a/parser/testdata/corpus/sql/create/create_table_as_error.test +++ b/parser/testdata/corpus/sql/create/create_table_as_error.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_table_as_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS EXECUTE tbl; diff --git a/parser/testdata/corpus/sql/create/create_table_compression.test b/parser/testdata/corpus/sql/create/create_table_compression.test index 7ca8ca0..7dbba09 100644 --- a/parser/testdata/corpus/sql/create/create_table_compression.test +++ b/parser/testdata/corpus/sql/create/create_table_compression.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_table_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T (a INTEGER USING COMPRESSION RLE) diff --git a/parser/testdata/corpus/sql/create/create_table_empty_name.test b/parser/testdata/corpus/sql/create/create_table_empty_name.test index bc64903..da56185 100644 --- a/parser/testdata/corpus/sql/create/create_table_empty_name.test +++ b/parser/testdata/corpus/sql/create/create_table_empty_name.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_table_empty_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE '' AS SELECT 42; diff --git a/parser/testdata/corpus/sql/create/create_table_extra_options.test b/parser/testdata/corpus/sql/create/create_table_extra_options.test index c8938a3..acf334e 100644 --- a/parser/testdata/corpus/sql/create/create_table_extra_options.test +++ b/parser/testdata/corpus/sql/create/create_table_extra_options.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_table_extra_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER) PARTITIONED BY (i); diff --git a/parser/testdata/corpus/sql/create/create_table_with_arraybounds.test b/parser/testdata/corpus/sql/create/create_table_with_arraybounds.test index 6bf40ed..a858415 100644 --- a/parser/testdata/corpus/sql/create/create_table_with_arraybounds.test +++ b/parser/testdata/corpus/sql/create/create_table_with_arraybounds.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_table_with_arraybounds.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table T ( diff --git a/parser/testdata/corpus/sql/create/create_using_index.test b/parser/testdata/corpus/sql/create/create_using_index.test index 559fd80..cc23f67 100644 --- a/parser/testdata/corpus/sql/create/create_using_index.test +++ b/parser/testdata/corpus/sql/create/create_using_index.test @@ -1,6 +1,6 @@ # source: test/sql/create/create_using_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (i INT, CONSTRAINT any_constraint UNIQUE USING INDEX any_non_existed_index); diff --git a/parser/testdata/corpus/sql/cte/cte_bc.test b/parser/testdata/corpus/sql/cte/cte_bc.test index c1db848..98ae61d 100644 --- a/parser/testdata/corpus/sql/cte/cte_bc.test +++ b/parser/testdata/corpus/sql/cte/cte_bc.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_bc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/cte_v1.db' (READ_ONLY) diff --git a/parser/testdata/corpus/sql/cte/cte_colname_issue_10074.test b/parser/testdata/corpus/sql/cte/cte_colname_issue_10074.test index bc723aa..31606b1 100644 --- a/parser/testdata/corpus/sql/cte/cte_colname_issue_10074.test +++ b/parser/testdata/corpus/sql/cte/cte_colname_issue_10074.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_colname_issue_10074.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t as with q(id,s) as (values(1,42)), diff --git a/parser/testdata/corpus/sql/cte/cte_describe.test b/parser/testdata/corpus/sql/cte/cte_describe.test index 5a868c0..3af7b9c 100644 --- a/parser/testdata/corpus/sql/cte/cte_describe.test +++ b/parser/testdata/corpus/sql/cte/cte_describe.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_describe.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DESCRIBE select 42 AS a diff --git a/parser/testdata/corpus/sql/cte/cte_filter_pushdown_predicates.test b/parser/testdata/corpus/sql/cte/cte_filter_pushdown_predicates.test new file mode 100644 index 0000000..104efef --- /dev/null +++ b/parser/testdata/corpus/sql/cte/cte_filter_pushdown_predicates.test @@ -0,0 +1,88 @@ +# source: test/sql/cte/cte_filter_pushdown_predicates.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE strings(s VARCHAR, id INTEGER); +-- +ok +== +INSERT INTO strings VALUES ('1',1), ('2',2), ('3',3); +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) SELECT count(*) FROM c WHERE s::INTEGER=1; +-- +ok +== +EXPLAIN WITH c AS MATERIALIZED (SELECT * FROM strings) SELECT count(*) FROM c WHERE s::INTEGER=1; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) SELECT count(*) FROM c WHERE id=1 AND random()<2; +-- +ok +== +EXPLAIN WITH c AS MATERIALIZED (SELECT * FROM strings) SELECT count(*) FROM c WHERE id=1 AND random()<2; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT (SELECT count(*) FROM c WHERE id=1 AND random()<2), + (SELECT count(*) FROM c WHERE id=2 AND random()<2); +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT (SELECT count(*) FROM c WHERE id=1 AND random()<2), + (SELECT count(*) FROM c WHERE random()<2); +-- +ok +== +EXPLAIN WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT (SELECT count(*) FROM c WHERE id=1 AND random()<2), + (SELECT count(*) FROM c WHERE random()<2); +-- +ok +== +CREATE SEQUENCE filter_calls; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT count(*) FROM c WHERE nextval('filter_calls') <= 3; +-- +ok +== +SELECT currval('filter_calls'); +-- +ok +== +EXPLAIN WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT count(*) FROM c WHERE __internal_barrier(id=1); +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT count(*) FROM c WHERE id=1 AND __internal_barrier(s::INTEGER=1); +-- +ok +== +INSERT INTO strings VALUES ('invalid',4); +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT count(*) FROM c WHERE random()<0 AND s::INTEGER=1; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM strings) +SELECT count(*) FROM c WHERE id=4 AND random()<0 AND s::INTEGER=1; +-- +ok +== +RESET debug_verify_serializer; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/cte_inlining_empty_result.test b/parser/testdata/corpus/sql/cte/cte_inlining_empty_result.test new file mode 100644 index 0000000..0497e32 --- /dev/null +++ b/parser/testdata/corpus/sql/cte/cte_inlining_empty_result.test @@ -0,0 +1,55 @@ +# source: test/sql/cte/cte_inlining_empty_result.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE typed_scalars(id INT); +-- +ok +== +CREATE TABLE typed_data_2(flag BOOLEAN); +-- +ok +== +INSERT INTO typed_scalars VALUES (1); +-- +ok +== +INSERT INTO typed_data_2 VALUES (TRUE); +-- +ok +== +WITH q4 AS ( + SELECT TRY_CAST(DATE '0001-01-01' AS TIMESTAMP) AS c0 + FROM typed_scalars t2 JOIN typed_data_2 t3 ON (t3.flag <= TRUE) + WHERE (t3.flag AND NULL) + ORDER BY c0 ASC NULLS FIRST + LIMIT 61 +) +SELECT t5.c0, MAX(2147483647), MAX(COALESCE(CAST('nan' AS DOUBLE), -2147483648)) +FROM q4 t5 JOIN q4 t6 ON t5.c0 = t6.c0 +WHERE (9223372036854775807 <> -9223372036854775808) +GROUP BY ROLLUP (t5.c0, t5.c0); +-- +ok +== +WITH q AS (SELECT id AS c0 FROM typed_scalars WHERE NULL LIMIT 61) +SELECT t5.c0 FROM q t5 JOIN q t6 ON t5.c0 = t6.c0; +-- +ok +== +WITH q AS (SELECT id AS c0 FROM typed_scalars WHERE NULL ORDER BY 1 LIMIT 61) +SELECT t5.c0 FROM q t5 JOIN q t6 ON t5.c0 = t6.c0 JOIN q t7 ON t5.c0 = t7.c0; +-- +ok +== +WITH q AS (SELECT id AS c0 FROM typed_scalars LIMIT 61) +SELECT t5.c0 FROM q t5 JOIN q t6 ON t5.c0 = t6.c0; +-- +ok +== +EXPLAIN WITH q AS (SELECT id AS c0 FROM typed_scalars WHERE NULL LIMIT 61) +SELECT t5.c0 FROM q t5 JOIN q t6 ON t5.c0 = t6.c0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/cte_issue_17311.test b/parser/testdata/corpus/sql/cte/cte_issue_17311.test index 15bfaa3..f2931c4 100644 --- a/parser/testdata/corpus/sql/cte/cte_issue_17311.test +++ b/parser/testdata/corpus/sql/cte/cte_issue_17311.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_issue_17311.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE RECURSIVE VIEW nums (n) AS diff --git a/parser/testdata/corpus/sql/cte/cte_null_values.test b/parser/testdata/corpus/sql/cte/cte_null_values.test index 2baa311..e336c70 100644 --- a/parser/testdata/corpus/sql/cte/cte_null_values.test +++ b/parser/testdata/corpus/sql/cte/cte_null_values.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_null_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH diff --git a/parser/testdata/corpus/sql/cte/cte_on_conflict_issue.test b/parser/testdata/corpus/sql/cte/cte_on_conflict_issue.test index fd6d493..dbdb27f 100644 --- a/parser/testdata/corpus/sql/cte/cte_on_conflict_issue.test +++ b/parser/testdata/corpus/sql/cte/cte_on_conflict_issue.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_on_conflict_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 ( diff --git a/parser/testdata/corpus/sql/cte/cte_schema.test b/parser/testdata/corpus/sql/cte/cte_schema.test index 5fa5188..30326d1 100644 --- a/parser/testdata/corpus/sql/cte/cte_schema.test +++ b/parser/testdata/corpus/sql/cte/cte_schema.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table s1.tbl(a varchar); diff --git a/parser/testdata/corpus/sql/cte/cte_with_replacement_scan.test b/parser/testdata/corpus/sql/cte/cte_with_replacement_scan.test index f34c800..35ca86d 100644 --- a/parser/testdata/corpus/sql/cte/cte_with_replacement_scan.test +++ b/parser/testdata/corpus/sql/cte/cte_with_replacement_scan.test @@ -1,6 +1,6 @@ # source: test/sql/cte/cte_with_replacement_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42 as answer) to '{TEST_DIR}/df.parquet'; diff --git a/parser/testdata/corpus/sql/cte/dml_cte.test b/parser/testdata/corpus/sql/cte/dml_cte.test index 2d218f4..6dc7070 100644 --- a/parser/testdata/corpus/sql/cte/dml_cte.test +++ b/parser/testdata/corpus/sql/cte/dml_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/dml_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (i INTEGER, j INTEGER); @@ -48,10 +48,6 @@ SELECT * FROM ins; -- ok == -SELECT * FROM t; --- -ok -== WITH del AS ( DELETE FROM t WHERE i = 1 RETURNING i ) diff --git a/parser/testdata/corpus/sql/cte/incorrect_recursive_cte.test b/parser/testdata/corpus/sql/cte/incorrect_recursive_cte.test index ceafb15..6d8f89b 100644 --- a/parser/testdata/corpus/sql/cte/incorrect_recursive_cte.test +++ b/parser/testdata/corpus/sql/cte/incorrect_recursive_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/incorrect_recursive_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE cte AS (SELECT 42) SELECT * FROM cte; diff --git a/parser/testdata/corpus/sql/cte/insert_cte_bug_3417.test b/parser/testdata/corpus/sql/cte/insert_cte_bug_3417.test index 498cce4..0f4c458 100644 --- a/parser/testdata/corpus/sql/cte/insert_cte_bug_3417.test +++ b/parser/testdata/corpus/sql/cte/insert_cte_bug_3417.test @@ -1,6 +1,6 @@ # source: test/sql/cte/insert_cte_bug_3417.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE table1 (id INTEGER, a INTEGER); diff --git a/parser/testdata/corpus/sql/cte/lazy_cte_bind.test b/parser/testdata/corpus/sql/cte/lazy_cte_bind.test index 37cb2ba..532501b 100644 --- a/parser/testdata/corpus/sql/cte/lazy_cte_bind.test +++ b/parser/testdata/corpus/sql/cte/lazy_cte_bind.test @@ -1,6 +1,6 @@ # source: test/sql/cte/lazy_cte_bind.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte as (select * from read_parquet('does/not/exist/file.parquet')) diff --git a/parser/testdata/corpus/sql/cte/lazy_cte_bind_correlated.test b/parser/testdata/corpus/sql/cte/lazy_cte_bind_correlated.test index 0a08a5b..ee82406 100644 --- a/parser/testdata/corpus/sql/cte/lazy_cte_bind_correlated.test +++ b/parser/testdata/corpus/sql/cte/lazy_cte_bind_correlated.test @@ -1,6 +1,6 @@ # source: test/sql/cte/lazy_cte_bind_correlated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT query, diff --git a/parser/testdata/corpus/sql/cte/materialized/annotated_and_auto_materialized.test b/parser/testdata/corpus/sql/cte/materialized/annotated_and_auto_materialized.test index 6515b44..d5ff7b3 100644 --- a/parser/testdata/corpus/sql/cte/materialized/annotated_and_auto_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/annotated_and_auto_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/annotated_and_auto_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table batch ( diff --git a/parser/testdata/corpus/sql/cte/materialized/cte_filter_pusher.test b/parser/testdata/corpus/sql/cte/materialized/cte_filter_pusher.test index 3c10ed8..f2feda4 100644 --- a/parser/testdata/corpus/sql/cte/materialized/cte_filter_pusher.test +++ b/parser/testdata/corpus/sql/cte/materialized/cte_filter_pusher.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/cte_filter_pusher.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH @@ -107,3 +107,48 @@ WHERE x = 2 OR x IS NULL; -- ok == +CREATE TABLE cte_filter_context(x INTEGER); +-- +ok +== +INSERT INTO cte_filter_context VALUES (10), (20), (NULL); +-- +ok +== +EXPLAIN (FORMAT JSON) WITH cte AS MATERIALIZED ( + SELECT i AS k, i % 10 AS v FROM range(1000000000) t(i) +) +SELECT count(*) +FROM cte c, cte_filter_context s +WHERE c.v IN (1, 2, 3, 4, 5, 6) OR s.x > 100; +-- +ok +== +WITH cte AS MATERIALIZED ( + SELECT i AS k, i % 10 AS v FROM range(100) t(i) +) +SELECT count(*) +FROM cte c, cte_filter_context s +WHERE c.v IN (1, 2, 3, 4, 5, 6) OR s.x > 100; +-- +ok +== +EXPLAIN (FORMAT JSON) WITH cte AS MATERIALIZED ( + SELECT i AS k, i % 10 AS v FROM range(1000000000) t(i) +) +SELECT count(*) +FROM cte c, cte_filter_context s +WHERE c.v IN (1, 2, 3, 4, 5, 6) OR s.x > 100 +UNION ALL +SELECT count(*) FROM cte; +-- +ok +== +PRAGMA disable_optimizer; +-- +ok +== +PRAGMA enable_optimizer; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/materialized/dml_materialized_cte.test b/parser/testdata/corpus/sql/cte/materialized/dml_materialized_cte.test index 498961f..78ad002 100644 --- a/parser/testdata/corpus/sql/cte/materialized/dml_materialized_cte.test +++ b/parser/testdata/corpus/sql/cte/materialized/dml_materialized_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/dml_materialized_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a(i integer); diff --git a/parser/testdata/corpus/sql/cte/materialized/incorrect_recursive_cte_materialized.test b/parser/testdata/corpus/sql/cte/materialized/incorrect_recursive_cte_materialized.test index ccef574..9f3b89f 100644 --- a/parser/testdata/corpus/sql/cte/materialized/incorrect_recursive_cte_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/incorrect_recursive_cte_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/incorrect_recursive_cte_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE cte AS MATERIALIZED (SELECT 42) SELECT * FROM cte; diff --git a/parser/testdata/corpus/sql/cte/materialized/internal_3004.test b/parser/testdata/corpus/sql/cte/materialized/internal_3004.test index 76903fd..9fd7a84 100644 --- a/parser/testdata/corpus/sql/cte/materialized/internal_3004.test +++ b/parser/testdata/corpus/sql/cte/materialized/internal_3004.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/internal_3004.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with diff --git a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_modifiers.test b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_modifiers.test index d874321..0eccc01 100644 --- a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_modifiers.test +++ b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_modifiers.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/materialized_cte_modifiers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit call dsdgen(sf=0) diff --git a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_order_preservation.test b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_order_preservation.test index 38fccce..7749046 100644 --- a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_order_preservation.test +++ b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_order_preservation.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/materialized_cte_order_preservation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE cte_order_batch AS SELECT i FROM range(1000000) tbl(i); diff --git a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_buffered.test b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_buffered.test index 285e827..7b974de 100644 --- a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_buffered.test +++ b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_buffered.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/materialized_cte_parallel_buffered.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE cte_parallel_left AS SELECT i FROM range(600000) tbl(i); diff --git a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_scan.test b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_scan.test new file mode 100644 index 0000000..5dae844 --- /dev/null +++ b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_parallel_scan.test @@ -0,0 +1,106 @@ +# source: test/sql/cte/materialized/materialized_cte_parallel_scan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_progress='error'; +-- +ok +== +WITH c AS MATERIALIZED ( + SELECT i, CASE WHEN i % 7 = 0 THEN NULL ELSE 'long string payload ' || i::VARCHAR END s, + [i, NULL, i + 1] payload + FROM range({rows}) r(i) +) +SELECT count(*) = {rows}, + coalesce(sum(l.i), 0) = {rows}::BIGINT * ({rows} - 1) / 2, + count(*) FILTER (WHERE l.s IS DISTINCT FROM + CASE WHEN r.i % 7 = 0 THEN NULL ELSE 'long string payload ' || r.i::VARCHAR END + OR l.payload IS DISTINCT FROM [r.i, NULL, r.i + 1]) = 0 +FROM c l JOIN c r USING (i); +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE parallel_scan_ordered AS +WITH c AS MATERIALIZED ( + SELECT i, 'long string payload ' || i::VARCHAR AS s, [i, NULL, i + 1] AS payload + FROM range({rows}) r(i) +) +SELECT * FROM c WHERE i < (SELECT count(*) FROM c); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) = {rows}, + count(*) FILTER (WHERE i != rowid OR s IS DISTINCT FROM 'long string payload ' || i::VARCHAR + OR payload IS DISTINCT FROM [i, NULL, i + 1]) = 0 +FROM parallel_scan_ordered; +-- +error: Parser Error: syntax error at or near "}" +== +WITH c AS MATERIALIZED ( + SELECT i FROM range(1000003) r(i) WHERE i % 97 = 0 +) +SELECT (SELECT count(*) FROM c), (SELECT i FROM c ORDER BY i LIMIT 1 OFFSET 10000); +-- +ok +== +WITH RECURSIVE r(i, epoch) AS ( + SELECT i, 0 FROM range(125003) t(i) + UNION ALL + SELECT i, epoch + 1 FROM r WHERE epoch < 2 AND i % 7 = 0 +) +SELECT count(*), sum(i) FROM r; +-- +ok +== +SET threads=32; +-- +ok +== +PREPARE parallel_scan AS +WITH c AS MATERIALIZED (SELECT i FROM range(125003) r(i)) +SELECT count(*), sum(l.i) FROM c l JOIN c r USING (i); +-- +ok +== +EXECUTE parallel_scan; +-- +ok +== +EXPLAIN ANALYZE +CREATE OR REPLACE TABLE parallel_scan_ordered AS +WITH c AS MATERIALIZED (SELECT i FROM range(1000003) r(i)) +SELECT i FROM c WHERE i < (SELECT count(*) FROM c); +-- +ok +== +WITH c AS MATERIALIZED ( + SELECT i, CASE WHEN i % 7 = 0 THEN NULL ELSE 'long string payload ' || i::VARCHAR END s, + [i, NULL, i + 1] payload + FROM range(400003) r(i) +) +SELECT count(*) = 400003, + coalesce(sum(l.i), 0) = 400003::BIGINT * (400003 - 1) / 2, + count(*) FILTER (WHERE l.s IS DISTINCT FROM + CASE WHEN r.i % 7 = 0 THEN NULL ELSE 'long string payload ' || r.i::VARCHAR END + OR l.payload IS DISTINCT FROM [r.i, NULL, r.i + 1]) = 0 +FROM c l JOIN c r USING (i); +-- +ok +== +CREATE OR REPLACE TABLE parallel_scan_ordered AS +WITH c AS MATERIALIZED ( + SELECT i, 'long string payload ' || i::VARCHAR AS s, [i, NULL, i + 1] AS payload + FROM range(400003) r(i) +) +SELECT * FROM c WHERE i < (SELECT count(*) FROM c); +-- +ok +== +SELECT count(*) = 400003, + count(*) FILTER (WHERE i != rowid OR s IS DISTINCT FROM 'long string payload ' || i::VARCHAR + OR payload IS DISTINCT FROM [i, NULL, i + 1]) = 0 +FROM parallel_scan_ordered; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_prepared.test b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_prepared.test index 2598aae..26b3ccc 100644 --- a/parser/testdata/corpus/sql/cte/materialized/materialized_cte_prepared.test +++ b/parser/testdata/corpus/sql/cte/materialized/materialized_cte_prepared.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/materialized_cte_prepared.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE direct_fanout_cte AS diff --git a/parser/testdata/corpus/sql/cte/materialized/recursive_array_slice_materialized.test b/parser/testdata/corpus/sql/cte/materialized/recursive_array_slice_materialized.test index ea21839..9120fe6 100644 --- a/parser/testdata/corpus/sql/cte/materialized/recursive_array_slice_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/recursive_array_slice_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/recursive_array_slice_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE p(loc int8); diff --git a/parser/testdata/corpus/sql/cte/materialized/recursive_cte_complex_pipelines.test b/parser/testdata/corpus/sql/cte/materialized/recursive_cte_complex_pipelines.test index 92c5236..b451044 100644 --- a/parser/testdata/corpus/sql/cte/materialized/recursive_cte_complex_pipelines.test +++ b/parser/testdata/corpus/sql/cte/materialized/recursive_cte_complex_pipelines.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/recursive_cte_complex_pipelines.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t AS MATERIALIZED diff --git a/parser/testdata/corpus/sql/cte/materialized/recursive_cte_error_materialized.test b/parser/testdata/corpus/sql/cte/materialized/recursive_cte_error_materialized.test index 876a8a5..8983939 100644 --- a/parser/testdata/corpus/sql/cte/materialized/recursive_cte_error_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/recursive_cte_error_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/recursive_cte_error_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tag(id int, name string, subclassof int); diff --git a/parser/testdata/corpus/sql/cte/materialized/recursive_hang_2745_materialized.test b/parser/testdata/corpus/sql/cte/materialized/recursive_hang_2745_materialized.test index 69f3073..4cf951d 100644 --- a/parser/testdata/corpus/sql/cte/materialized/recursive_hang_2745_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/recursive_hang_2745_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/recursive_hang_2745_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with RECURSIVE parents_tab (id , value , parent ) diff --git a/parser/testdata/corpus/sql/cte/materialized/test_bug_922_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_bug_922_materialized.test index 1863c13..cf7cd82 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_bug_922_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_bug_922_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_bug_922_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH my_list(value) AS MATERIALIZED (VALUES (1), (2), (3)) diff --git a/parser/testdata/corpus/sql/cte/materialized/test_correlated_recursive_cte_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_correlated_recursive_cte_materialized.test index bf51618..e87e44e 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_correlated_recursive_cte_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_correlated_recursive_cte_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_correlated_recursive_cte_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT x, y diff --git a/parser/testdata/corpus/sql/cte/materialized/test_cte_hash_join_exchange.test b/parser/testdata/corpus/sql/cte/materialized/test_cte_hash_join_exchange.test index b9b7b2f..f174f42 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_cte_hash_join_exchange.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_cte_hash_join_exchange.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_cte_hash_join_exchange.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET disabled_optimizers='join_order,build_side_probe_side'; @@ -275,12 +275,14 @@ EXPLAIN ANALYZE WITH c AS MATERIALIZED ( SELECT i, repeat('x', 32) payload FROM range(10000) t(i) ) -SELECT count(*) +SELECT branch, count(*), sum(v) FROM ( - SELECT c.i FROM c JOIN range(10000) r(i) USING (i) + SELECT 1 branch, length(c.payload) v FROM c JOIN range(10000) r(i) USING (i) UNION ALL - SELECT c.i FROM c JOIN range(10000) r(i) USING (i) -); + SELECT 2 branch, length(c.payload) v FROM c JOIN range(10000) r(i) USING (i) +) +GROUP BY branch +ORDER BY branch; -- ok == diff --git a/parser/testdata/corpus/sql/cte/materialized/test_cte_in_cte_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_cte_in_cte_materialized.test index 84da086..3a78c37 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_cte_in_cte_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_cte_in_cte_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_cte_in_cte_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte1 as MATERIALIZED (Select i as j from a) select * from cte1; diff --git a/parser/testdata/corpus/sql/cte/materialized/test_cte_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_cte_materialized.test index 0674477..5f8c32f 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_cte_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_cte_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_cte_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte1 as MATERIALIZED (Select i as j from a) select x from cte1 t1(x); diff --git a/parser/testdata/corpus/sql/cte/materialized/test_cte_overflow_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_cte_overflow_materialized.test index 7e99eae..90f4148 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_cte_overflow_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_cte_overflow_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_cte_overflow_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a (id integer) diff --git a/parser/testdata/corpus/sql/cte/materialized/test_issue_10260.test b/parser/testdata/corpus/sql/cte/materialized/test_issue_10260.test index 10fac4d..4ae300f 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_issue_10260.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_issue_10260.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_issue_10260.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T0(C1 INT); diff --git a/parser/testdata/corpus/sql/cte/materialized/test_materialized_cte.test b/parser/testdata/corpus/sql/cte/materialized/test_materialized_cte.test index 6aad163..4e4a0f0 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_materialized_cte.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_materialized_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_materialized_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t(x) AS MATERIALIZED (SELECT 1) SELECT * FROM t; diff --git a/parser/testdata/corpus/sql/cte/materialized/test_nested_recursive_cte_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_nested_recursive_cte_materialized.test index 77436e6..ccf83c5 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_nested_recursive_cte_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_nested_recursive_cte_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_nested_recursive_cte_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(x) AS MATERIALIZED diff --git a/parser/testdata/corpus/sql/cte/materialized/test_outer_joins_recursive_cte_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_outer_joins_recursive_cte_materialized.test index 4330e66..235d5f7 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_outer_joins_recursive_cte_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_outer_joins_recursive_cte_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_outer_joins_recursive_cte_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v(x INT); diff --git a/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_tutorial_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_tutorial_materialized.test index 0b9aebc..7df47e8 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_tutorial_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_tutorial_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_recursive_cte_tutorial_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE emp (empno INTEGER PRIMARY KEY, diff --git a/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_all_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_all_materialized.test index f5efd98..d666a01 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_all_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_all_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_recursive_cte_union_all_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with recursive t as MATERIALIZED (select 1 as x union all select x+1 from t where x < 3) select * from t diff --git a/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_materialized.test b/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_materialized.test index cb3ef13..5cb9667 100644 --- a/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_materialized.test +++ b/parser/testdata/corpus/sql/cte/materialized/test_recursive_cte_union_materialized.test @@ -1,6 +1,6 @@ # source: test/sql/cte/materialized/test_recursive_cte_union_materialized.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with recursive t as MATERIALIZED (select 1 as x union select x+1 from t where x < 3) select * from t order by x diff --git a/parser/testdata/corpus/sql/cte/recursive_array_slice.test b/parser/testdata/corpus/sql/cte/recursive_array_slice.test index 3ace958..1964b1f 100644 --- a/parser/testdata/corpus/sql/cte/recursive_array_slice.test +++ b/parser/testdata/corpus/sql/cte/recursive_array_slice.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_array_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(y, arr) AS diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_batch_index.test b/parser/testdata/corpus/sql/cte/recursive_cte_batch_index.test index 1d38fa3..96da2c4 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_batch_index.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_batch_index.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_batch_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_column_pruning.test b/parser/testdata/corpus/sql/cte/recursive_cte_column_pruning.test index 072aba5..fc642d5 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_column_pruning.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_column_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_column_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN WITH RECURSIVE t(i, unused) AS ( diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_complex_pipelines.test b/parser/testdata/corpus/sql/cte/recursive_cte_complex_pipelines.test index 1eadac4..0288842 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_complex_pipelines.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_complex_pipelines.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_complex_pipelines.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t AS @@ -163,7 +163,3 @@ SELECT max(step), count(*) FROM t; -- ok == -RESET max_execution_time --- -ok -== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_correlated_bindings.test b/parser/testdata/corpus/sql/cte/recursive_cte_correlated_bindings.test new file mode 100644 index 0000000..bc6edce --- /dev/null +++ b/parser/testdata/corpus/sql/cte/recursive_cte_correlated_bindings.test @@ -0,0 +1,107 @@ +# source: test/sql/cte/recursive_cte_correlated_bindings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA {mode}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT * +FROM (SELECT {x: 1} AS a, {y: 3} AS b) seed, +LATERAL ( + WITH RECURSIVE t(n) USING KEY (n) AS ( + SELECT a.x + UNION ALL + SELECT n + 1 FROM t + WHERE n < b.y + AND NOT EXISTS (SELECT 1 FROM recurring.t r WHERE r.n = b.y) + ) + SELECT * FROM t +) q +ORDER BY n; +-- +ok +== +SELECT * +FROM (SELECT {y: 3} AS b, {x: 1} AS a) seed, +LATERAL ( + WITH RECURSIVE t(n) USING KEY (n) AS ( + SELECT a.x + UNION ALL + SELECT n + 1 FROM t + WHERE n < b.y + AND NOT EXISTS (SELECT 1 FROM recurring.t r WHERE r.n = b.y) + ) + SELECT * FROM t +) q +ORDER BY n; +-- +ok +== +SELECT a.x, b.x, n +FROM ( + SELECT {x: lo} AS a, {x: hi} AS b + FROM (VALUES (1, 3), (2, 4), (1, 3), (NULL, 3), (1, NULL)) bounds(lo, hi) +) seed, +LATERAL ( + WITH RECURSIVE t(n) USING KEY (n) AS ( + SELECT a.x + UNION ALL + SELECT n + 1 FROM t + WHERE n < b.x + AND NOT EXISTS (SELECT 1 FROM recurring.t r WHERE r.n = b.x) + ) + SELECT * FROM t +) q; +-- +ok +== +SELECT * +FROM (SELECT {x: 1} AS a, {y: 3} AS b) seed, +LATERAL ( + WITH RECURSIVE t(n) AS ( + SELECT a.x + UNION ALL + SELECT n + 1 FROM t + WHERE n < b.y + AND NOT EXISTS (SELECT 1 FROM t r WHERE r.n = b.y) + ) + SELECT * FROM t +) q +ORDER BY n; +-- +ok +== +SELECT n +FROM (SELECT {x: 1} AS a, {y: 5} AS b, {z: 3} AS c) seed, +LATERAL ( + WITH RECURSIVE t(n) USING KEY (n) AS ( + SELECT a.x + UNION ALL + SELECT n + 1 FROM t + WHERE n < b.y + AND NOT EXISTS (SELECT 1 FROM recurring.t r WHERE r.n = c.z) + ) + SELECT * FROM t +) q +ORDER BY n; +-- +ok +== +SELECT n +FROM (SELECT {x: 1} AS a, {y: 3} AS b) seed, +LATERAL ( + WITH RECURSIVE t(n) USING KEY (n) AS ( + SELECT a.x + UNION ALL + SELECT n + 1 FROM t + WHERE n < b.y + AND NOT EXISTS (SELECT 1 FROM recurring.t r WHERE r.n = b.y AND r.n = t.n) + ) + SELECT * FROM t +) q +ORDER BY n; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_correlated_complex.test b/parser/testdata/corpus/sql/cte/recursive_cte_correlated_complex.test index b5ffa48..a2135e4 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_correlated_complex.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_correlated_complex.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_correlated_complex.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s.s_name, COUNT(*) AS numwait diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_error.test b/parser/testdata/corpus/sql/cte/recursive_cte_error.test index 000690c..e8079bc 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_error.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_error.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE tag_hierarchy(id, source, path, target) AS ( diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build.test b/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build.test index 48b8d68..cf800e4 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_invariant_build.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET enable_caching_operators=true diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build_logging.test b/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build_logging.test index a49da15..31e776a 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build_logging.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_invariant_build_logging.test @@ -1,16 +1,12 @@ # source: test/sql/cte/recursive_cte_invariant_build_logging.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging('PhysicalOperator'); -- ok == -CALL truncate_duckdb_logs(); --- -ok -== WITH RECURSIVE r(i, sampled) AS ( VALUES (0, 0::BIGINT) UNION ALL @@ -136,3 +132,34 @@ WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary'; -- ok == +CREATE TABLE parallel_build_edges AS +SELECT i AS src, i + 1 AS dst FROM range(491520) t(i); +-- +ok +== +WITH RECURSIVE walk(node, depth) AS ( + SELECT 0::BIGINT, 0 + UNION ALL + SELECT e.dst, w.depth + 1 + FROM walk w + JOIN parallel_build_edges e ON e.src = w.node + WHERE w.depth < 2 +) +SELECT count(*), max(depth), sum(node) FROM walk; +-- +ok +== +SELECT info.retained_build_executions::UBIGINT +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'RuntimeMetrics' + AND parameters['CTE Name'] = 'walk'; +-- +ok +== +SELECT info.workers_max::UBIGINT, info.max_pipeline_workers::UBIGINT = {threads} +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary' + AND parameters['CTE Name'] = 'walk'; +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_aggregation.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_aggregation.test index 7eacbda..6374ae7 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_key_aggregation.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_aggregation.test @@ -1,11 +1,11 @@ # source: test/sql/cte/recursive_cte_key_aggregation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE tbl(a, b) USING KEY (a , max(b)) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT a, b - 1 FROM tbl WHERE b > 0) @@ -15,7 +15,7 @@ ok == WITH RECURSIVE tbl(a, b) USING KEY (a , avg(b)) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT a, b - 1 FROM tbl WHERE b > 0) @@ -25,7 +25,7 @@ ok == WITH RECURSIVE tbl(a, b, c) USING KEY (a , avg(b), list(c)) AS ( SELECT 1, 5, NULL :: DOUBLE - UNION + UNION ALL SELECT tbl.a, tbl.b - 1, rec.b FROM tbl, recurring.tbl AS rec WHERE tbl.b > 0) @@ -44,7 +44,7 @@ ok WITH RECURSIVE dvr(here, there, via, len) USING KEY (here, there , arg_min(via, len), min(len)) AS ( SELECT n.person1id AS here, n.person2id AS there, n.person2id AS via, 1 AS len FROM knows AS n - UNION + UNION ALL SELECT n.person1id AS here, dvr.there, dvr.here AS via, 1 + dvr.len AS len FROM dvr JOIN knows AS n ON @@ -59,7 +59,7 @@ FROM range(1, 4) AS _(l), LATERAL ( WITH RECURSIVE cte(a, b, c) USING KEY (a , list(b)) AS ( SELECT 1, l, 3 - union + UNION ALL SELECT a, l + 1, c - 1 FROM recurring.cte WHERE c > 0) @@ -69,7 +69,7 @@ ok == WITH RECURSIVE tbl(a,b,c) USING KEY (a, b , list(c), max(c)) AS ( SELECT 1, 1, NULL - UNION + UNION ALL SELECT tbl.a, tbl.b - 1, a.b FROM tbl, recurring.tbl AS a WHERE tbl.b > 0) @@ -79,7 +79,7 @@ ok == WITH RECURSIVE tbl(a,b,c) USING KEY (a, c , list(b), max(c)) AS ( SELECT 1, 1, NULL - UNION + UNION ALL SELECT tbl.a, tbl.b - 1, a.b FROM tbl, recurring.tbl AS a WHERE tbl.b > 0) @@ -89,7 +89,7 @@ ok == WITH RECURSIVE tbl(a,b,c) USING KEY (list(c)) AS ( SELECT 1, 4, NULL - UNION + UNION ALL SELECT a, b - 1, b FROM tbl WHERE tbl.b > 0) @@ -99,7 +99,7 @@ ok == WITH RECURSIVE tbl(a,b,c) USING KEY (a, a , list(b)) AS ( SELECT 1, 1, NULL :: INT[] - UNION + UNION ALL SELECT tbl.a, tbl.b - 1, a.b FROM tbl, recurring.tbl AS a WHERE tbl.b > 0) @@ -109,7 +109,7 @@ ok == WITH RECURSIVE tbl(a,b) USING KEY (a , string_agg(':a') AS b) AS ( VALUES (1,2), (1,3) - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 4) @@ -119,7 +119,7 @@ ok == WITH RECURSIVE tbl(a,b) USING KEY (a , string_agg(b, ', ') ) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT tbl.a, tbl.b - 1 FROM tbl WHERE tbl.b > 0) @@ -129,7 +129,7 @@ ok == WITH RECURSIVE tbl(a,b) USING KEY (a , any_value(b)) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT tbl.a, tbl.b - 1 FROM tbl WHERE tbl.b > 0) @@ -139,7 +139,7 @@ ok == WITH RECURSIVE tbl(a,b) USING KEY (a , arbitrary(b)) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT tbl.a, tbl.b - 1 FROM tbl WHERE tbl.b > 0) @@ -149,7 +149,7 @@ ok == WITH RECURSIVE tbl(key,b,c) USING KEY (key, arg_max(c, b) AS c) AS ( SELECT 1, 5, 5/5 - UNION + UNION ALL SELECT key, b - 1, 5 / b FROM tbl WHERE b > 0 @@ -159,7 +159,7 @@ ok == WITH RECURSIVE tbl(key,b) USING KEY (key , bit_or(b)) AS ( SELECT 1, '0001' :: BIT - UNION + UNION ALL SELECT key, b << 1 FROM tbl WHERE b < '1000' :: BIT @@ -169,7 +169,7 @@ ok == WITH RECURSIVE tbl(key,b) USING KEY (key, bit_and(b)) AS ( SELECT 1, '1111' :: BIT - UNION + UNION ALL SELECT key, b << 1 FROM tbl WHERE b > '0000' :: BIT @@ -179,7 +179,7 @@ ok == WITH RECURSIVE tbl(key,b) USING KEY (key , bit_xor(b)) AS ( SELECT 1, '1111' :: BIT - UNION + UNION ALL SELECT key, b << 1 FROM tbl WHERE b > '0000' :: BIT @@ -199,7 +199,7 @@ WITH RECURSIVE tbl(key, iter, acc) USING KEY (key, bitstring_agg(acc, 1, 12)) AS SELECT c, 1, d FROM tinyints WHERE c = 1 - UNION + UNION ALL SELECT key, iter + 1, d FROM tbl, tinyints AS t(c,d) WHERE c = iter AND iter < 8 @@ -209,7 +209,7 @@ ok == WITH RECURSIVE tbl(key, iter, b, c) USING KEY (key, bool_and(b), bool_or(c)) AS ( SELECT 1, 1, TRUE, TRUE - UNION + UNION ALL SELECT key, iter + 1, NOT b, NOT c FROM tbl WHERE iter < 8 @@ -219,7 +219,7 @@ ok == WITH RECURSIVE tbl(key, iter, c) USING KEY (key, count() AS iter, count(c)) AS ( SELECT 1, 1, 1 - UNION + UNION ALL SELECT key, iter + 1, c FROM tbl WHERE iter < 8 @@ -229,7 +229,7 @@ ok == WITH RECURSIVE tbl(key,b) USING KEY (key, countif(b % 2 = 0) AS b) AS ( SELECT 1, 0 - UNION + UNION ALL SELECT key, b + 1 FROM tbl WHERE b < 10) @@ -239,7 +239,7 @@ ok == WITH RECURSIVE tbl(key,b) USING KEY (key, histogram(b, [0, 1, 10]) AS b) AS ( SELECT 1, 0 :: DOUBLE - UNION + UNION ALL SELECT key, tbl.b + 0.5 FROM tbl WHERE tbl.b < 10) @@ -249,7 +249,7 @@ ok == WITH RECURSIVE tbl(key,b) USING KEY (key, min(b, 3) AS b) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT key, b - 1 FROM tbl WHERE b > 0) @@ -259,7 +259,7 @@ ok == WITH RECURSIVE tbl(key, b) USING KEY (key, product(b)) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT key, b - 1 FROM tbl WHERE b > 1) @@ -269,7 +269,7 @@ ok == WITH RECURSIVE tbl(key, iter, b) USING KEY (key, approx_quantile(b, [0.5, 0.4, 0.1]) AS b) AS ( SELECT 1, 1, 0 - UNION + UNION ALL SELECT key, iter + 1, iter FROM tbl, VALUES (2, 1), (3, 2), (4, 10) AS tab(id, col) WHERE iter + 1 = id) @@ -283,7 +283,7 @@ ok == WITH RECURSIVE tbl(key, iter, i) USING KEY (key, approx_top_k(i, 3) AS i) AS ( SELECT 1, 0, 0 - UNION + UNION ALL SELECT key, iter + 1, i FROM tbl, alternating_sequences AS a WHERE iter + 1 = a.it) @@ -303,7 +303,7 @@ WITH RECURSIVE tbl(iter, k, v, v2) USING KEY (k, corr(v, v2) AS v2) AS ( SELECT it, k, v, v2 FROM aggr WHERE it = 1 - UNION + UNION ALL SELECT tbl.iter + 1, tbl.k, a.v, a.v2 FROM tbl, aggr AS a WHERE tbl.iter + 1 = a.it AND tbl.k = a.k @@ -323,7 +323,7 @@ WITH RECURSIVE tbl(key, iter, x, y) USING KEY (key, covar_samp(x,y) AS x, covar_ SELECT 1, iter, x, y FROM integers WHERE iter = 1 - UNION + UNION ALL SELECT tbl.key, tbl.iter + 1, a.x, a.y FROM tbl, integers AS a WHERE tbl.iter + 1 = a.iter @@ -343,7 +343,7 @@ WITH RECURSIVE tbl (key, iter, name) USING KEY (key, entropy(name) AS name) AS ( SELECT 1, it, name FROM names WHERE it = 1 - UNION + UNION ALL SELECT tbl.key, tbl.iter + 1, n.name FROM tbl, names AS n WHERE tbl.iter + 1 = n.it) @@ -374,7 +374,7 @@ WITH RECURSIVE tbl(key, iter, k, v, v2) USING KEY (key, kurtosis(k) AS k, kurtos SELECT 1, it, k, v, v2 FROM kur WHERE it = 1 - UNION + UNION ALL SELECT 1, tbl.iter + 1, a.k, a.v, a.v2 FROM tbl, kur AS a WHERE tbl.iter + 1 = a.it @@ -384,7 +384,7 @@ ok == WITH RECURSIVE tbl (a,b) USING KEY (a, b+1) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -394,7 +394,7 @@ ok == WITH RECURSIVE tbl (a,b) USING KEY (a, avg(b) :: INT) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -404,7 +404,7 @@ ok == WITH RECURSIVE tbl (a,b) USING KEY (a, sum(b) OVER ()) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -414,7 +414,7 @@ ok == WITH RECURSIVE tbl(a, b) USING KEY (a, avg(*)) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -424,7 +424,7 @@ ok == WITH RECURSIVE tbl(a, b) USING KEY (a, avg(*) AS b) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -434,7 +434,7 @@ ok == WITH RECURSIVE tbl(a, b) USING KEY (a, avg(* :: Int) AS b) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -444,7 +444,7 @@ ok == WITH RECURSIVE tbl(a, b) USING KEY (a AS b, sum(b) AS b) AS ( SELECT 1, 1 - UNION + UNION ALL SELECT a, b + 1 FROM tbl WHERE b < 5) @@ -454,7 +454,7 @@ ok == WITH RECURSIVE tbl(a, b) USING KEY (a AS b, max(b)) AS ( SELECT 1, 5 - UNION + UNION ALL SELECT a, b - 1 FROM tbl WHERE b > 0) diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_final_drain.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_final_drain.test index 04f430f..cbea56d 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_key_final_drain.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_final_drain.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_key_final_drain.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET enable_caching_operators=true; diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_hll_aggregation.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_hll_aggregation.test index 3016057..07c3dea 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_key_hll_aggregation.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_hll_aggregation.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_key_hll_aggregation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table customers (id integer, cname varchar); @@ -15,7 +15,7 @@ WITH RECURSIVE tbl(key, id, acc) USING KEY (key, approx_count_distinct(acc)) AS SELECT 1, id, cname FROM customers WHERE id = 1 - UNION + UNION ALL SELECT key, tbl.id + 1, cname FROM tbl JOIN customers AS c ON c.id = tbl.id + 1) diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_probe.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_probe.test index d9b3a38..b830b07 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_key_probe.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_probe.test @@ -1,12 +1,8 @@ # source: test/sql/cte/recursive_cte_key_probe.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -PRAGMA explain_output='physical_only'; --- -ok -== EXPLAIN WITH RECURSIVE t(k, v) USING KEY (k) AS ( SELECT i, 0 FROM range(100) r(i) UNION ALL @@ -98,6 +94,90 @@ SELECT k, v FROM t; -- ok == +EXPLAIN WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (NULL::INTEGER, 0), (1, 0) + UNION ALL + SELECT n.k, r.v + 1 + FROM t n JOIN recurring.t r ON r.k IS NOT DISTINCT FROM n.k + WHERE n.v < 1 +) +SELECT * FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (NULL::INTEGER, 0), (1, 0) + UNION ALL + SELECT n.k, r.v + 1 + FROM t n JOIN recurring.t r ON r.k IS NOT DISTINCT FROM n.k + WHERE n.v < 1 +) +SELECT k, v FROM t; +-- +ok +== +EXPLAIN WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (1, NULL::INTEGER, 0), (NULL, 2, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM t n + JOIN recurring.t r ON r.k2 IS NOT DISTINCT FROM n.k2 AND r.k1 = n.k1 + WHERE n.v < 1 +) +SELECT * FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (1, NULL::INTEGER, 0), (1, 2, 0), (NULL, 2, 0), (NULL, NULL, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM t n + JOIN recurring.t r ON r.k2 IS NOT DISTINCT FROM n.k2 AND r.k1 = n.k1 + WHERE n.v < 1 +) +SELECT * FROM t; +-- +ok +== +WITH RECURSIVE +fast(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (1, NULL::INTEGER, 0), (1, 2, 0), (NULL, 2, 0), (NULL, NULL, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM fast n + JOIN recurring.fast r ON r.k2 IS NOT DISTINCT FROM n.k2 AND r.k1 = n.k1 + WHERE n.v < 1 +), +fallback(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (1, NULL::INTEGER, 0), (1, 2, 0), (NULL, 2, 0), (NULL, NULL, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM fallback n + JOIN (SELECT * FROM recurring.fallback WHERE v >= 0) r + ON r.k2 IS NOT DISTINCT FROM n.k2 AND r.k1 = n.k1 + WHERE n.v < 1 +) +SELECT count(*) FROM ( + (SELECT * FROM fast EXCEPT ALL SELECT * FROM fallback) + UNION ALL + (SELECT * FROM fallback EXCEPT ALL SELECT * FROM fast) +); +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + SELECT 'a' COLLATE nocase, 0 + UNION ALL + SELECT n.k, r.v + 1 + FROM (SELECT upper(k) AS k, v FROM t) n + JOIN recurring.t r ON r.k IS NOT DISTINCT FROM n.k + WHERE n.v < 1 +) +SELECT k, v FROM t; +-- +ok +== WITH RECURSIVE t(k, v) USING KEY (k) AS ( VALUES (1, 0), (2, 0) UNION ALL @@ -214,6 +294,53 @@ SELECT * FROM t; -- ok == +EXPLAIN WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (NULL::INTEGER, 1, 0), (1, 1, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM t n JOIN recurring.t r ON r.k1 IS NOT DISTINCT FROM n.k1 + WHERE n.v < 1 +) +SELECT * FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (NULL::INTEGER, 10, 0), (NULL, 20, 0), (1, 10, 0), (1, 20, 0), (2, 10, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM t n JOIN recurring.t r ON r.k1 IS NOT DISTINCT FROM n.k1 + WHERE n.v < 1 +) +SELECT * FROM t; +-- +ok +== +WITH RECURSIVE +fast(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (NULL::INTEGER, 10, 0), (NULL, 20, 0), (1, 10, 0), (1, 20, 0), (2, 10, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM fast n JOIN recurring.fast r ON r.k1 IS NOT DISTINCT FROM n.k1 + WHERE n.v < 1 +), +fallback(k1, k2, v) USING KEY (k1, k2) AS ( + VALUES (NULL::INTEGER, 10, 0), (NULL, 20, 0), (1, 10, 0), (1, 20, 0), (2, 10, 0) + UNION ALL + SELECT n.k1, n.k2, r.v + 1 + FROM fallback n + JOIN (SELECT * FROM recurring.fallback WHERE v >= 0) r + ON r.k1 IS NOT DISTINCT FROM n.k1 + WHERE n.v < 1 +) +SELECT count(*) FROM ( + (SELECT * FROM fast EXCEPT ALL SELECT * FROM fallback) + UNION ALL + (SELECT * FROM fallback EXCEPT ALL SELECT * FROM fast) +); +-- +ok +== WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2) AS ( VALUES (1, 10, 0), (2, 10, 0), (NULL, 10, 0), (1, NULL, 0) UNION ALL diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_snapshot.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_snapshot.test index 63dde0e..57724e9 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_key_snapshot.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_snapshot.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_key_snapshot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(k, v) USING KEY (k) AS ( diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_union.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_union.test new file mode 100644 index 0000000..f781967 --- /dev/null +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_union.test @@ -0,0 +1,586 @@ +# source: test/sql/cte/recursive_cte_key_union.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 0) + UNION + SELECT k, v FROM t +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + VALUES (1, 5) + UNION + SELECT k, v + delta + FROM t, (VALUES (0), (0), (1), (2)) offsets(delta) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 10) + UNION + SELECT k + 1, v + 10 FROM t WHERE k < 4 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(abs(v)) AS v) AS ( + VALUES (1, -5) + UNION + SELECT k + 1, -v FROM t WHERE k < 2 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, a, b) USING KEY (k) AS ( + VALUES (1, 0, 0), (2, 0, 0) + UNION + SELECT k, + CASE WHEN k = 1 THEN 1 ELSE a END, + CASE WHEN k = 2 THEN b + 1 ELSE b END + FROM t + WHERE (k = 1 AND a = 0) OR (k = 2 AND b < 2) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, total) USING KEY (k, sum(total)) AS ( + VALUES (1, 1::INTEGER) + UNION + SELECT k, 1 FROM t WHERE total < 3 +) +SELECT total FROM t; +-- +ok +== +WITH RECURSIVE t(k, total, recursive_type) USING KEY (k, sum(total)) AS ( + VALUES (1, 1::INTEGER, 'anchor') + UNION + SELECT k, 1, typeof(total) FROM t WHERE total < 2 +) +SELECT k, total, recursive_type FROM t; +-- +ok +== +WITH RECURSIVE t(k, total) USING KEY (k, sum(total)) AS ( + VALUES (1, 1), (1, 2) + UNION + SELECT k, 0 FROM t WHERE false +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, total, n, lo, hi) +USING KEY (k, sum(total), count(n) AS n, min(lo), max(hi)) AS ( + VALUES (1, 1::BIGINT, 1::BIGINT, 10, 10), (1, 2::BIGINT, 1::BIGINT, 9, 11) + UNION + SELECT k, x, 1, x, x + FROM t, (VALUES (8), (12)) candidates(x) + WHERE n = 2 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + VALUES (1, repeat('z', 32)) + UNION + SELECT k, repeat(chr(ascii(v[1]) - 1), 32) + FROM t + WHERE v > repeat('w', 32) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, NULL::INTEGER) + UNION + SELECT k, v FROM t +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 'NaN'::DOUBLE), (2, -0e0::DOUBLE) + UNION + SELECT k, CASE WHEN k = 1 THEN 'NaN'::DOUBLE ELSE 0e0::DOUBLE END + FROM t +) +SELECT count(*), count_if(isnan(v)), count_if(signbit(v)) FROM t; +-- +ok +== +WITH RECURSIVE t(k) USING KEY (k) AS ( + VALUES (1) + UNION + SELECT k FROM t +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, bit_xor(v)) AS ( + VALUES (1, 0) + UNION + SELECT k, 1 FROM t, range(2) duplicates(_) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, avg(v) AS v) AS ( + VALUES (1, 0), (1, 2) + UNION + SELECT k, x + FROM t, (VALUES (0), (2)) values_(x) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, first(v) AS v) AS ( + VALUES (1, 10) + UNION + SELECT k, v + 1 FROM t WHERE v = 10 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, string_agg(v, '') AS v) AS ( + VALUES (1, 'a') + UNION + SELECT k, v || 'b' FROM t WHERE length(v) < 4 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, lo, latest) USING KEY (k, min(lo)) AS ( + VALUES (1, 5, 0) + UNION + SELECT k, lo - 1, latest + 1 FROM t WHERE lo > 3 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, lo, latest) USING KEY (k, min(lo)) AS ( + VALUES (1, 100000::BIGINT, 0::BIGINT) + UNION + SELECT k, i, i + FROM t, range(current_setting('standard_vector_size')::BIGINT * 2 + 1) r(i) + WHERE lo = 100000 +) +SELECT count(*), min(lo) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + VALUES (1, 10), (2, 10) + UNION + SELECT CASE WHEN i % 4 = 0 THEN 3 ELSE k END, + CASE WHEN i % 4 = 0 THEN 7 WHEN k = 1 THEN 5 ELSE 11 END + FROM t, range(current_setting('standard_vector_size')::BIGINT * 4) r(i) + WHERE v = 10 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + SELECT i, 0::BIGINT FROM range(1, 101) r(i) + UNION + ( + SELECT k, 1 FROM t WHERE v = 0 + UNION ALL + SELECT k, v + 1 FROM t WHERE k = 1 AND v IN (1, 3) + UNION ALL + SELECT i, 3 FROM t, range(1, 101) r(i) WHERE t.k = 1 AND t.v = 2 + ) +) +SELECT count(*), sum(v)::BIGINT, max(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, min(v)) AS ( + VALUES (1, NULL::INTEGER, 5), (1, 2, 10) + UNION + SELECT k1, k2, v FROM t +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, [1, NULL]::INTEGER[]) + UNION + SELECT k, [1, NULL]::INTEGER[] FROM t +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k) USING KEY (k) AS ( + SELECT i FROM range(0) r(i) + UNION + SELECT k FROM t +) +SELECT count(*) FROM t; +-- +ok +== +SELECT limit_value, final_value +FROM range(4) limits(limit_value), LATERAL ( + WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 0) + UNION + SELECT k, v + 1 FROM t WHERE v < limit_value + ) + SELECT v AS final_value FROM t +); +-- +ok +== +WITH RECURSIVE t(k, total) USING KEY (k, sum(total)) AS ( + SELECT i, 1 FROM range(100) r(i) + UNION + SELECT n.k, r.total * 0 + 1 + FROM t n JOIN recurring.t r USING (k) + WHERE n.total < 3 +) +SELECT count(*), sum(total) FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, sum(v) AS v) AS ( + VALUES (1, 1, 1) + UNION + SELECT n.k1, n.k2 + 1, n.v + FROM t n JOIN recurring.t r ON r.k1 = n.k1 + WHERE n.k2 < 3 +) +TABLE t; +-- +ok +== +WITH RECURSIVE outer_cte(a, b) AS ( + SELECT 1, 1 + UNION + ( + WITH RECURSIVE inner_cte(k, v) USING KEY (k) AS ( + SELECT a, 0 FROM outer_cte WHERE b < 4 + UNION + SELECT k, v FROM inner_cte + ) + SELECT k, b + 1 + FROM inner_cte, outer_cte + WHERE b < 4 + ) +) +TABLE outer_cte; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 1), (1, 2) + UNION + VALUES (1, 3) +) +SELECT count(*), min(v) = max(v), min(v) IN (2, 3) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + SELECT 1, 'a' COLLATE nocase + UNION + SELECT CASE ascii(v) WHEN 97 THEN 1 ELSE 2 END, upper(v) FROM t +) +TABLE t; +-- +ok +== +SET default_collation='nocase'; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 'a') + UNION + SELECT CASE ascii(v) WHEN 97 THEN 1 ELSE 2 END, upper(v) FROM t +) +TABLE t; +-- +ok +== +PREPARE collated_delta AS +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 'a') + UNION + SELECT CASE ascii(v) WHEN 97 THEN 1 ELSE 2 END, upper(v) FROM t +) +TABLE t; +-- +ok +== +SET default_collation=''; +-- +ok +== +EXECUTE collated_delta; +-- +ok +== +DEALLOCATE collated_delta; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + SELECT 1, ['a' COLLATE nocase] + UNION + SELECT CASE ascii(v[1]) WHEN 97 THEN 1 ELSE 2 END, ['A' COLLATE nocase] FROM t +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, n, v) USING KEY (k) AS ( + SELECT * FROM (VALUES (1, 0, 'a' COLLATE nocase), (2, 0, 'a' COLLATE nocase)) + UNION + SELECT CASE ascii(v) WHEN 97 THEN k ELSE k + 10 END, + CASE WHEN ascii(v) = 97 AND k = 1 THEN 1 ELSE n END, + upper(v) + FROM t + WHERE k < 10 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(v, k2, k1) USING KEY (k1, k2, sum(v)) AS ( + VALUES (1, 20, 10), (2, 20, 10) + UNION + VALUES (3, 20, 10), (4, 21, 10) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, sum(v)) AS ( + VALUES (1, 1), (1, 1) + UNION + VALUES (1, 1) +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, sum(v)) AS ( + SELECT 'a' COLLATE nocase, 1 + UNION + SELECT 'A' COLLATE nocase, 2 +) +SELECT count(*), min(lower(k)), sum(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, sum(v)) AS ( + SELECT * FROM (VALUES ('a' COLLATE nocase, 1, 1), ('A' COLLATE nocase, 1, 2)) + UNION + SELECT 'A' COLLATE nocase, 2, 4 +) +SELECT count(*), sum(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, sum(v)) AS ( + VALUES ('a', 1) + UNION + VALUES ('A', 2) +) +SELECT count(*), sum(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, sum(v)) AS ( + SELECT ['a' COLLATE nocase], 1 + UNION + SELECT ['A' COLLATE nocase], 2 +) +SELECT count(*), sum(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT 'a' COLLATE nocase, 2 + UNION + SELECT upper(k), v - 1 FROM t WHERE v > 0 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT 'a' COLLATE nocase, 2 + UNION ALL + SELECT upper(k), v - 1 FROM t WHERE v > 0 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT (NULL::VARCHAR) COLLATE nocase, 1 + UNION + SELECT k, v FROM t +) +TABLE t; +-- +ok +== +PREPARE collated_recurring_key AS +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + VALUES ('a', 2) + UNION + SELECT upper(k), v - 1 FROM t WHERE v > 0 +) +TABLE t; +-- +ok +== +EXECUTE collated_recurring_key; +-- +ok +== +DEALLOCATE collated_recurring_key; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT ['a' COLLATE nocase], 2 + UNION + SELECT ['A' COLLATE nocase], v - 1 FROM t WHERE v > 0 +) +SELECT count(*), min(v), min(k[1]) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT array_value('a' COLLATE nocase), 2 + UNION + SELECT array_value('A' COLLATE nocase), v - 1 FROM t WHERE v > 0 +) +SELECT count(*), min(v), min(k[1]) FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, min(v)) AS ( + SELECT * FROM (VALUES ('a' COLLATE nocase, NULL::INTEGER, 2), ('A' COLLATE nocase, 1, 3)) + UNION + SELECT upper(k1), k2, v - 1 FROM t WHERE v > 0 +) +SELECT count(*), sum(v), count(*) FILTER (WHERE k2 IS NULL), min(lower(k1)) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT 'a' COLLATE nocase, 2 + UNION + SELECT CASE WHEN i % 2 = 0 THEN upper(k) ELSE k END, v - 1 + FROM t, range(current_setting('standard_vector_size')::BIGINT * 4) r(i) + WHERE v > 0 +) +SELECT count(*), min(lower(k)), min(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT 'a' COLLATE nocase, 2 + UNION + SELECT upper(n.k), r.v - 1 + FROM t n JOIN recurring.t r USING (k) + WHERE n.v > 0 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(label, id, v) USING KEY (label, id, min(v)) AS ( + SELECT 'a' COLLATE nocase, 1, 2 + UNION + SELECT upper(n.label), n.id, r.v - 1 + FROM t n JOIN recurring.t r ON r.label = n.label + WHERE n.v > 0 +) +SELECT count(*), min(lower(label)), min(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, min(v)) AS ( + SELECT i, i % 4, 2 + FROM range(current_setting('standard_vector_size')::BIGINT) r(i), range(8) duplicates(_) + UNION + SELECT n.k1, n.k2, r.v - 1 + FROM (SELECT t.*, duplicates._ FROM t, range(8) duplicates(_)) n + JOIN recurring.t r ON r.k1 = n.k1 + WHERE n.v > 0 +) +SELECT count(*) = current_setting('standard_vector_size')::BIGINT, sum(v), max(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 0) + UNION ALL + SELECT k, v + 1 FROM t WHERE v < 3 +) +TABLE t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT i, 100 FROM range(10000) r(i) + UNION + SELECT k, v - delta + FROM t, range(2) offsets(delta) + WHERE v > 98 +) +SELECT count(*), sum(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT CASE WHEN i % 2 = 0 THEN 'a' ELSE 'A' END COLLATE nocase, 2 + FROM range(10000) r(i) + UNION + SELECT upper(k), v - 1 FROM t WHERE v > 0 +) +SELECT count(*), sum(v) FROM t; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + VALUES (1, 5) + UNION + SELECT k, v + 1 FROM t +) +TABLE t; +-- +ok +== +SET deprecated_using_key_syntax='UNION_AS_UNION_ALL'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_key_union_plan.test b/parser/testdata/corpus/sql/cte/recursive_cte_key_union_plan.test new file mode 100644 index 0000000..9f37337 --- /dev/null +++ b/parser/testdata/corpus/sql/cte/recursive_cte_key_union_plan.test @@ -0,0 +1,62 @@ +# source: test/sql/cte/recursive_cte_key_union_plan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN WITH RECURSIVE t(k, total) USING KEY (k, sum(total)) AS ( + SELECT i, 1 FROM range(100) r(i) + UNION + SELECT n.k, r.total * 0 + 1 + FROM t n JOIN recurring.t r USING (k) + WHERE n.total < 3 +) +TABLE t; +-- +ok +== +EXPLAIN WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, sum(v) AS v) AS ( + VALUES (1, 1, 1) + UNION + SELECT n.k1, n.k2 + 1, n.v + FROM t n JOIN recurring.t r ON r.k1 = n.k1 + WHERE n.k2 < 3 +) +TABLE t; +-- +ok +== +EXPLAIN WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT 'a' COLLATE nocase, 2 + UNION + SELECT n.k, r.v - 1 + FROM t n JOIN recurring.t r USING (k) + WHERE n.v > 0 +) +TABLE t; +-- +ok +== +EXPLAIN WITH RECURSIVE t(label, id, v) USING KEY (label, id, min(v)) AS ( + SELECT 'a' COLLATE nocase, 1, 2 + UNION + SELECT upper(n.label), n.id, r.v - 1 + FROM t n JOIN recurring.t r ON r.label = n.label + WHERE n.v > 0 +) +TABLE t; +-- +ok +== +EXPLAIN WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, min(v)) AS ( + SELECT i, i % 4, 2 + FROM range(current_setting('standard_vector_size')::BIGINT) r(i), range(8) duplicates(_) + UNION + SELECT n.k1, n.k2, r.v - 1 + FROM (SELECT t.*, duplicates._ FROM t, range(8) duplicates(_)) n + JOIN recurring.t r ON r.k1 = n.k1 + WHERE n.v > 0 +) +TABLE t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_limit.test b/parser/testdata/corpus/sql/cte/recursive_cte_limit.test index e5b83a6..5779fd5 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_limit.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_limit.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(i) AS ( diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_logging.test b/parser/testdata/corpus/sql/cte/recursive_cte_logging.test index ce53974..d1e15e2 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_logging.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_logging.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_logging.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(i) AS ( @@ -378,3 +378,125 @@ WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary'; -- ok == +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + VALUES (1, 5), (1, 6), (2, 10) + UNION + SELECT k, CASE k WHEN 1 THEN v + 1 ELSE v - 1 END + FROM t + WHERE (k = 1 AND v = 5) OR (k = 2 AND v = 10) +) +TABLE t; +-- +ok +== +SELECT info.key_delta_work_ns::UBIGINT > 0, + info.key_delta_candidate_rows::UBIGINT = 5, + info.key_delta_touched_keys::UBIGINT = 4, + info.key_delta_new_keys::UBIGINT = 2, + info.key_delta_changed_keys::UBIGINT = 1, + info.key_delta_unchanged_keys::UBIGINT = 1, + info.key_preaggregation_work_ns::UBIGINT = 0, + info.key_preaggregation_combine_work_ns::UBIGINT = 0, + info.key_preaggregation_candidate_rows::UBIGINT = 0, + info.key_preaggregation_groups::UBIGINT = 0, + info.local_key_preaggregation_work_ns::UBIGINT = 0, + info.local_key_preaggregation_candidate_rows::UBIGINT = 0, + info.local_key_preaggregation_groups::UBIGINT = 0, + info.local_key_preaggregation_states::UBIGINT = 0, + info.local_key_preaggregation_residual_rows::UBIGINT = 0 +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary'; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + SELECT i, 3 + FROM range(current_setting('standard_vector_size')::BIGINT) r(i), range(8) duplicates(_) + UNION + SELECT k, v - 1 FROM t, range(8) duplicates(_) WHERE v > 0 +) +SELECT count(*) = current_setting('standard_vector_size')::BIGINT, max(v) FROM t; +-- +ok +== +SELECT info.key_preaggregation_classification_work_ns::UBIGINT > 0, + info.key_preaggregation_combine_work_ns::UBIGINT > 0, + info.local_key_preaggregation_classification_work_ns::UBIGINT > 0, + info.local_key_preaggregation_work_ns::UBIGINT > 0, + info.local_key_preaggregation_candidate_rows::UBIGINT > 0, + info.local_key_preaggregation_groups::UBIGINT > 0, + info.local_key_preaggregation_groups::UBIGINT <= info.local_key_preaggregation_candidate_rows::UBIGINT, + info.local_key_preaggregation_states::UBIGINT > 0, + info.local_key_preaggregation_residual_rows::UBIGINT > 0, + info.local_key_preaggregation_candidate_rows::UBIGINT + + info.local_key_preaggregation_residual_rows::UBIGINT = info.key_delta_candidate_rows::UBIGINT, + info.key_preaggregation_candidate_rows::UBIGINT <= info.local_key_preaggregation_residual_rows::UBIGINT, + info.key_delta_candidate_rows::UBIGINT = current_setting('standard_vector_size')::UBIGINT * 32, + info.key_delta_touched_keys::UBIGINT = current_setting('standard_vector_size')::UBIGINT * 4 +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary'; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS ( + ( + SELECT i, 2 + FROM range(current_setting('standard_vector_size')::BIGINT) r(i), range(32) duplicates(_) + ) + UNION ALL + ( + SELECT current_setting('standard_vector_size')::BIGINT + i, 2 + FROM range(1) r(i) + ) + UNION + SELECT k, v - 1 FROM t WHERE v > 0 +) +SELECT count(*) = current_setting('standard_vector_size')::BIGINT + 1, max(v) FROM t; +-- +ok +== +SELECT info.local_key_preaggregation_candidate_rows::UBIGINT > 0, + info.local_key_preaggregation_groups::UBIGINT > 0, + info.local_key_preaggregation_groups::UBIGINT < + info.local_key_preaggregation_candidate_rows::UBIGINT / 4, + info.local_key_preaggregation_states::UBIGINT > 0, + info.local_key_preaggregation_residual_rows::UBIGINT > 0, + info.local_key_preaggregation_candidate_rows::UBIGINT + + info.local_key_preaggregation_residual_rows::UBIGINT = + current_setting('standard_vector_size')::UBIGINT * 32 + 1, + info.key_delta_candidate_rows::UBIGINT = + current_setting('standard_vector_size')::UBIGINT * 32 + + (current_setting('standard_vector_size')::UBIGINT + 1) * 2 + 1, + info.key_delta_touched_keys::UBIGINT = (current_setting('standard_vector_size')::UBIGINT + 1) * 3, + info.key_delta_new_keys::UBIGINT = current_setting('standard_vector_size')::UBIGINT + 1, + info.key_delta_changed_keys::UBIGINT = (current_setting('standard_vector_size')::UBIGINT + 1) * 2 +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary'; +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS ( + VALUES (1, 0) + UNION + SELECT k, v + 1 FROM t WHERE v < 1 +) +TABLE t; +-- +ok +== +SELECT info.keyed_hash_commit_work_ns::UBIGINT > 0, + info.key_preaggregation_work_ns::UBIGINT = 0, + info.key_preaggregation_combine_work_ns::UBIGINT = 0, + info.key_preaggregation_candidate_rows::UBIGINT = 0, + info.key_preaggregation_groups::UBIGINT = 0, + info.local_key_preaggregation_classification_work_ns::UBIGINT = 0, + info.local_key_preaggregation_work_ns::UBIGINT = 0, + info.local_key_preaggregation_candidate_rows::UBIGINT = 0, + info.local_key_preaggregation_groups::UBIGINT = 0, + info.local_key_preaggregation_states::UBIGINT = 0, + info.local_key_preaggregation_residual_rows::UBIGINT = 0 +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_ordered_aggregate.test b/parser/testdata/corpus/sql/cte/recursive_cte_ordered_aggregate.test new file mode 100644 index 0000000..73ada23 --- /dev/null +++ b/parser/testdata/corpus/sql/cte/recursive_cte_ordered_aggregate.test @@ -0,0 +1,28 @@ +# source: test/sql/cte/recursive_cte_ordered_aggregate.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PREPARE recursive_sorted_aggregate AS +WITH RECURSIVE r(iter, asc_value, desc_value) AS ( + VALUES (0, 'seed'::VARCHAR, 'seed'::VARCHAR) + UNION ALL + SELECT iter + 1, + string_agg(v, ',' ORDER BY ord ASC NULLS FIRST), + string_agg(v, ',' ORDER BY ord DESC NULLS LAST) + FROM r, (VALUES ('a', 2), ('b', 1), ('n', NULL)) t(v, ord) + WHERE iter < 3 + GROUP BY iter +) +SELECT * FROM r WHERE iter = 3; +-- +ok +== +EXECUTE recursive_sorted_aggregate; +-- +ok +== +DEALLOCATE recursive_sorted_aggregate; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_ordered_member.test b/parser/testdata/corpus/sql/cte/recursive_cte_ordered_member.test new file mode 100644 index 0000000..9694d4d --- /dev/null +++ b/parser/testdata/corpus/sql/cte/recursive_cte_ordered_member.test @@ -0,0 +1,64 @@ +# source: test/sql/cte/recursive_cte_ordered_member.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PREPARE recursive_ordered_member AS +WITH RECURSIVE r(iter, v) AS ( + SELECT 0, i FROM range(64) t(i) + UNION ALL + SELECT iter + 1, v FROM (SELECT iter, v FROM r WHERE iter < 3 ORDER BY v DESC) s +) +SELECT iter, count(*), sum(v) FROM r GROUP BY iter ORDER BY iter; +-- +ok +== +EXECUTE recursive_ordered_member; +-- +ok +== +DEALLOCATE recursive_ordered_member; +-- +ok +== +WITH RECURSIVE r(iter, v) AS ( + SELECT 0, i FROM range(8) t(i) + UNION ALL + SELECT iter + 1, (v + 1) % 8 + FROM (SELECT iter, v, row_number() OVER () AS rn FROM (SELECT iter, v FROM r WHERE iter < 6 ORDER BY v DESC) o) s + WHERE rn <= 4 +) +SELECT iter, list(v ORDER BY v) FROM r GROUP BY iter ORDER BY iter; +-- +ok +== +WITH RECURSIVE r(iter, v) AS ( + SELECT 0, i FROM range(64) t(i) + UNION ALL + SELECT iter + 1, v FROM (SELECT iter, v FROM r WHERE iter < 3 ORDER BY {'a': v, 'b': v::VARCHAR} DESC) s +) +SELECT iter, count(*), sum(v) FROM r GROUP BY iter ORDER BY iter; +-- +ok +== +WITH RECURSIVE r(iter, v) AS ( + SELECT 0, i FROM range(64) t(i) + UNION ALL + SELECT iter + 1, v FROM (SELECT iter, v FROM r WHERE iter < 3 ORDER BY v::INTEGER ASC, v % 2 = 0 DESC) s +) +SELECT iter, count(*), sum(v) FROM r GROUP BY iter ORDER BY iter; +-- +ok +== +WITH RECURSIVE r(iter, v) AS ( + SELECT 0, i FROM range(8) t(i) + UNION ALL + SELECT iter + 1, v + FROM (SELECT iter, v, row_number() OVER () AS rn + FROM (SELECT iter, v FROM r WHERE iter < 3 ORDER BY row(v, v::VARCHAR) DESC) o) s + WHERE rn <= 2 +) +SELECT iter, sum(v) FROM r GROUP BY iter ORDER BY iter; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_parallel_output_publication.test b/parser/testdata/corpus/sql/cte/recursive_cte_parallel_output_publication.test new file mode 100644 index 0000000..98ddcee --- /dev/null +++ b/parser/testdata/corpus/sql/cte/recursive_cte_parallel_output_publication.test @@ -0,0 +1,30 @@ +# source: test/sql/cte/recursive_cte_parallel_output_publication.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH candidates AS MATERIALIZED ( + SELECT i FROM range(8192) r(i) +) +SELECT count(*), sum(i) +FROM candidates c +WHERE EXISTS ( + WITH RECURSIVE t(v) AS ( + VALUES (0) + UNION ALL + SELECT v + 1 FROM t WHERE v < c.i % 4 + ) + SELECT 1 FROM t WHERE v = c.i % 4 +); +-- +ok +== +SELECT count(*) +FROM duckdb_logs_parsed('PhysicalOperator') +WHERE class = 'PhysicalRecursiveCTE' AND event = 'RuntimeMetrics' + AND info.epochs::UBIGINT = 4 + AND info.scheduled_workers::UBIGINT > info.epochs::UBIGINT + AND info.scheduled_tasks::UBIGINT >= info.scheduled_workers::UBIGINT; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_all_sink.test b/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_all_sink.test index 305494d..45aa9e8 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_all_sink.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_all_sink.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_parallel_union_all_sink.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(i, level) AS ( diff --git a/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_distinct_sink.test b/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_distinct_sink.test index 1d7c821..bd18f01 100644 --- a/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_distinct_sink.test +++ b/parser/testdata/corpus/sql/cte/recursive_cte_parallel_union_distinct_sink.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_cte_parallel_union_distinct_sink.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(i, digest, level) AS ( diff --git a/parser/testdata/corpus/sql/cte/recursive_hang_2745.test b/parser/testdata/corpus/sql/cte/recursive_hang_2745.test index f839051..51e023f 100644 --- a/parser/testdata/corpus/sql/cte/recursive_hang_2745.test +++ b/parser/testdata/corpus/sql/cte/recursive_hang_2745.test @@ -1,6 +1,6 @@ # source: test/sql/cte/recursive_hang_2745.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with RECURSIVE parents_tab (id , value , parent ) diff --git a/parser/testdata/corpus/sql/cte/test_bug_922.test b/parser/testdata/corpus/sql/cte/test_bug_922.test index 448ea26..d1efb55 100644 --- a/parser/testdata/corpus/sql/cte/test_bug_922.test +++ b/parser/testdata/corpus/sql/cte/test_bug_922.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_bug_922.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH my_list(value) AS (VALUES (1), (2), (3)) diff --git a/parser/testdata/corpus/sql/cte/test_cte.test b/parser/testdata/corpus/sql/cte/test_cte.test index c5f305a..a8758df 100644 --- a/parser/testdata/corpus/sql/cte/test_cte.test +++ b/parser/testdata/corpus/sql/cte/test_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte1 as (Select i as j from a) select * from cte1; diff --git a/parser/testdata/corpus/sql/cte/test_cte_in_cte.test b/parser/testdata/corpus/sql/cte/test_cte_in_cte.test index fc54482..fb80987 100644 --- a/parser/testdata/corpus/sql/cte/test_cte_in_cte.test +++ b/parser/testdata/corpus/sql/cte/test_cte_in_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_cte_in_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte1 as (with b as (Select i as j from a) Select j from b) select x from cte1 t1(x); diff --git a/parser/testdata/corpus/sql/cte/test_cte_overflow.test b/parser/testdata/corpus/sql/cte/test_cte_overflow.test index eddada5..3f0c59c 100644 --- a/parser/testdata/corpus/sql/cte/test_cte_overflow.test +++ b/parser/testdata/corpus/sql/cte/test_cte_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_cte_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view va as (with v as (select * from a) select * from v) diff --git a/parser/testdata/corpus/sql/cte/test_issue_5673.test b/parser/testdata/corpus/sql/cte/test_issue_5673.test index 07599e9..3196dc6 100644 --- a/parser/testdata/corpus/sql/cte/test_issue_5673.test +++ b/parser/testdata/corpus/sql/cte/test_issue_5673.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_issue_5673.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table orders(ordered_at int); diff --git a/parser/testdata/corpus/sql/cte/test_moderate_union_all.test b/parser/testdata/corpus/sql/cte/test_moderate_union_all.test index 4f0a298..242338c 100644 --- a/parser/testdata/corpus/sql/cte/test_moderate_union_all.test +++ b/parser/testdata/corpus/sql/cte/test_moderate_union_all.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_moderate_union_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW union_view AS diff --git a/parser/testdata/corpus/sql/cte/test_nested_recursive_cte.test b/parser/testdata/corpus/sql/cte/test_nested_recursive_cte.test index bbd76c4..5befc03 100644 --- a/parser/testdata/corpus/sql/cte/test_nested_recursive_cte.test +++ b/parser/testdata/corpus/sql/cte/test_nested_recursive_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_nested_recursive_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(x) AS diff --git a/parser/testdata/corpus/sql/cte/test_outer_joins_recursive_cte.test b/parser/testdata/corpus/sql/cte/test_outer_joins_recursive_cte.test index c83030a..1d04c2c 100644 --- a/parser/testdata/corpus/sql/cte/test_outer_joins_recursive_cte.test +++ b/parser/testdata/corpus/sql/cte/test_outer_joins_recursive_cte.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_outer_joins_recursive_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE t(x) AS diff --git a/parser/testdata/corpus/sql/cte/test_recursive_cte_recurring.test b/parser/testdata/corpus/sql/cte/test_recursive_cte_recurring.test index 5d083b0..542bef2 100644 --- a/parser/testdata/corpus/sql/cte/test_recursive_cte_recurring.test +++ b/parser/testdata/corpus/sql/cte/test_recursive_cte_recurring.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_recursive_cte_recurring.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE deduction AS ( diff --git a/parser/testdata/corpus/sql/cte/test_recursive_cte_tutorial.test b/parser/testdata/corpus/sql/cte/test_recursive_cte_tutorial.test index aac04f4..60681c0 100644 --- a/parser/testdata/corpus/sql/cte/test_recursive_cte_tutorial.test +++ b/parser/testdata/corpus/sql/cte/test_recursive_cte_tutorial.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_recursive_cte_tutorial.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH RECURSIVE ctename AS ( diff --git a/parser/testdata/corpus/sql/cte/test_recursive_cte_union.test b/parser/testdata/corpus/sql/cte/test_recursive_cte_union.test index 8e506a7..3495146 100644 --- a/parser/testdata/corpus/sql/cte/test_recursive_cte_union.test +++ b/parser/testdata/corpus/sql/cte/test_recursive_cte_union.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_recursive_cte_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with recursive t as (select 1 as x union select x+1 from t where x < 3) select * from t order by x diff --git a/parser/testdata/corpus/sql/cte/test_recursive_cte_union_all.test b/parser/testdata/corpus/sql/cte/test_recursive_cte_union_all.test index 3d439ae..3d316ff 100644 --- a/parser/testdata/corpus/sql/cte/test_recursive_cte_union_all.test +++ b/parser/testdata/corpus/sql/cte/test_recursive_cte_union_all.test @@ -1,6 +1,6 @@ # source: test/sql/cte/test_recursive_cte_union_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with recursive t as (select 1 as x union all select x+1 from t where x < 3) select * from t diff --git a/parser/testdata/corpus/sql/cte/using_key_aggregate_qualification.test b/parser/testdata/corpus/sql/cte/using_key_aggregate_qualification.test new file mode 100644 index 0000000..739256f --- /dev/null +++ b/parser/testdata/corpus/sql/cte/using_key_aggregate_qualification.test @@ -0,0 +1,37 @@ +# source: test/sql/cte/using_key_aggregate_qualification.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH RECURSIVE r(k,v) USING KEY(k,system.main.max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v+1 FROM r WHERE k<3) SELECT * FROM r ORDER BY k; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v+1 FROM r WHERE k<3) SELECT * FROM r ORDER BY k; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,system.not_a_schema.max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v+1 FROM r WHERE k<3) SELECT * FROM r; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,system.not_a_schema.also_missing.max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v+1 FROM r WHERE k<3) SELECT * FROM r; +-- +ok +== +CREATE SCHEMA "payload calls"; +-- +ok +== +CREATE MACRO "payload calls".max(x) AS min(x); +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,"payload calls".max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v+1 FROM r WHERE k<3) SELECT * FROM r; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,system.max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v FROM r WHERE k<2) SELECT * FROM r ORDER BY k; +-- +ok +== diff --git a/parser/testdata/corpus/sql/cte/warn_deprecated_union_in_using_key.test b/parser/testdata/corpus/sql/cte/warn_deprecated_union_in_using_key.test deleted file mode 100644 index ead4018..0000000 --- a/parser/testdata/corpus/sql/cte/warn_deprecated_union_in_using_key.test +++ /dev/null @@ -1,31 +0,0 @@ -# source: test/sql/cte/warn_deprecated_union_in_using_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -CALL enable_logging(level='error'); --- -ok -== -WITH RECURSIVE cte(x,y) USING KEY (x) AS ( - SELECT 1, 0 - UNION - SELECT x, y+1 - FROM cte - WHERE y < 10 -) TABLE cte; --- -ok -== -SELECT log_level, message[0:42] FROM duckdb_logs --- -ok -== -CALL enable_logging(level='warning'); --- -ok -== -SET deprecated_using_key_syntax='UNION_AS_UNION_ALL'; --- -ok -== diff --git a/parser/testdata/corpus/sql/delete/bulk_delete_version_info_memory.test b/parser/testdata/corpus/sql/delete/bulk_delete_version_info_memory.test index 0d946a2..c0af942 100644 --- a/parser/testdata/corpus/sql/delete/bulk_delete_version_info_memory.test +++ b/parser/testdata/corpus/sql/delete/bulk_delete_version_info_memory.test @@ -1,6 +1,6 @@ # source: test/sql/delete/bulk_delete_version_info_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT i FROM range(1228800) t(i) diff --git a/parser/testdata/corpus/sql/delete/cleanup_delete_on_conflict.test b/parser/testdata/corpus/sql/delete/cleanup_delete_on_conflict.test index 36af479..d550761 100644 --- a/parser/testdata/corpus/sql/delete/cleanup_delete_on_conflict.test +++ b/parser/testdata/corpus/sql/delete/cleanup_delete_on_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/delete/cleanup_delete_on_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl FROM range(1000) t(i); diff --git a/parser/testdata/corpus/sql/delete/delete_compression_after_restart.test b/parser/testdata/corpus/sql/delete/delete_compression_after_restart.test index f8076bf..fe3b93e 100644 --- a/parser/testdata/corpus/sql/delete/delete_compression_after_restart.test +++ b/parser/testdata/corpus/sql/delete/delete_compression_after_restart.test @@ -1,6 +1,6 @@ # source: test/sql/delete/delete_compression_after_restart.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i FROM range(122880) t(i); diff --git a/parser/testdata/corpus/sql/delete/delete_compression_blocked_by_old_snapshot.test b/parser/testdata/corpus/sql/delete/delete_compression_blocked_by_old_snapshot.test index 19d76f3..cc17773 100644 --- a/parser/testdata/corpus/sql/delete/delete_compression_blocked_by_old_snapshot.test +++ b/parser/testdata/corpus/sql/delete/delete_compression_blocked_by_old_snapshot.test @@ -1,12 +1,8 @@ # source: test/sql/delete/delete_compression_blocked_by_old_snapshot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET debug_skip_checkpoint_on_commit=true --- -ok -== SET VARIABLE base_mem = (SELECT memory_usage_bytes FROM duckdb_memory() WHERE tag='BASE_TABLE') -- ok diff --git a/parser/testdata/corpus/sql/delete/delete_query_node.test b/parser/testdata/corpus/sql/delete/delete_query_node.test index 224462a..d60ba22 100644 --- a/parser/testdata/corpus/sql/delete/delete_query_node.test +++ b/parser/testdata/corpus/sql/delete/delete_query_node.test @@ -1,6 +1,6 @@ # source: test/sql/delete/delete_query_node.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(a INT, b TEXT, c DOUBLE); @@ -48,10 +48,6 @@ DELETE FROM t WHERE a IN (SELECT target_a FROM targets) RETURNING a; -- ok == -DELETE FROM t; --- -ok -== SELECT count(*) FROM t; -- ok diff --git a/parser/testdata/corpus/sql/delete/full_vector_delete_conflict.test b/parser/testdata/corpus/sql/delete/full_vector_delete_conflict.test index aee6adc..84223ba 100644 --- a/parser/testdata/corpus/sql/delete/full_vector_delete_conflict.test +++ b/parser/testdata/corpus/sql/delete/full_vector_delete_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/delete/full_vector_delete_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i FROM range(4096) t(i); diff --git a/parser/testdata/corpus/sql/delete/full_vector_delete_rollback.test b/parser/testdata/corpus/sql/delete/full_vector_delete_rollback.test index 227242e..a919641 100644 --- a/parser/testdata/corpus/sql/delete/full_vector_delete_rollback.test +++ b/parser/testdata/corpus/sql/delete/full_vector_delete_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/delete/full_vector_delete_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM tbl WHERE i < 100 diff --git a/parser/testdata/corpus/sql/delete/large_deletes_transactions.test b/parser/testdata/corpus/sql/delete/large_deletes_transactions.test index 7dad7f1..62c7ccf 100644 --- a/parser/testdata/corpus/sql/delete/large_deletes_transactions.test +++ b/parser/testdata/corpus/sql/delete/large_deletes_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/delete/large_deletes_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT * FROM range(1000000) t1(i); diff --git a/parser/testdata/corpus/sql/delete/list_delete.test b/parser/testdata/corpus/sql/delete/list_delete.test index 7f4caf9..bbb56ee 100644 --- a/parser/testdata/corpus/sql/delete/list_delete.test +++ b/parser/testdata/corpus/sql/delete/list_delete.test @@ -1,6 +1,6 @@ # source: test/sql/delete/list_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE aggr (k int[]); diff --git a/parser/testdata/corpus/sql/delete/masked_vector_further_delete.test b/parser/testdata/corpus/sql/delete/masked_vector_further_delete.test index 882172f..e9583bc 100644 --- a/parser/testdata/corpus/sql/delete/masked_vector_further_delete.test +++ b/parser/testdata/corpus/sql/delete/masked_vector_further_delete.test @@ -1,6 +1,6 @@ # source: test/sql/delete/masked_vector_further_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT i FROM range(4096) t(i) diff --git a/parser/testdata/corpus/sql/delete/masked_vector_rollback.test b/parser/testdata/corpus/sql/delete/masked_vector_rollback.test index 8376840..dfa6149 100644 --- a/parser/testdata/corpus/sql/delete/masked_vector_rollback.test +++ b/parser/testdata/corpus/sql/delete/masked_vector_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/delete/masked_vector_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE r AS SELECT i FROM range(4096) t(i) diff --git a/parser/testdata/corpus/sql/delete/partial_delete_version_info_memory.test b/parser/testdata/corpus/sql/delete/partial_delete_version_info_memory.test index 30f8091..e860c35 100644 --- a/parser/testdata/corpus/sql/delete/partial_delete_version_info_memory.test +++ b/parser/testdata/corpus/sql/delete/partial_delete_version_info_memory.test @@ -1,6 +1,6 @@ # source: test/sql/delete/partial_delete_version_info_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM a WHERE i % 2 = 0 diff --git a/parser/testdata/corpus/sql/delete/test_delete.test b/parser/testdata/corpus/sql/delete/test_delete.test index 5dcbb0e..5149fb5 100644 --- a/parser/testdata/corpus/sql/delete/test_delete.test +++ b/parser/testdata/corpus/sql/delete/test_delete.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(i INTEGER); @@ -15,6 +15,14 @@ SELECT COUNT(*) FROM a; -- ok == +DELETE FROM a AS WHERE i = 42; +-- +error: Parser Error: syntax error at or near "WHERE" +== +DELETE FROM a AS; +-- +error: Parser Error: syntax error at or near ";" +== DELETE FROM a; -- ok diff --git a/parser/testdata/corpus/sql/delete/test_delete_indexed.test b/parser/testdata/corpus/sql/delete/test_delete_indexed.test index 76baded..7836af6 100644 --- a/parser/testdata/corpus/sql/delete/test_delete_indexed.test +++ b/parser/testdata/corpus/sql/delete/test_delete_indexed.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_delete_indexed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id INT PRIMARY KEY, s TEXT, j BIGINT); @@ -116,3 +116,26 @@ DELETE FROM delete_using_indexed USING range(100) source(i) WHERE source.i = 0 R -- ok == +CREATE TABLE delete_using_duplicate_indexed(id INTEGER PRIMARY KEY, payload VARCHAR); +-- +ok +== +INSERT INTO delete_using_duplicate_indexed VALUES (0, 'zero'), (1, 'one'); +-- +ok +== +DELETE FROM delete_using_duplicate_indexed +USING (VALUES (0), (0), (1)) AS source(id) +WHERE delete_using_duplicate_indexed.id = source.id +RETURNING delete_using_duplicate_indexed.id; +-- +ok +== +INSERT INTO delete_using_duplicate_indexed VALUES (1, 'replacement'); +-- +ok +== +SELECT * FROM delete_using_duplicate_indexed; +-- +ok +== diff --git a/parser/testdata/corpus/sql/delete/test_large_delete.test b/parser/testdata/corpus/sql/delete/test_large_delete.test index f3e97cc..6b961e0 100644 --- a/parser/testdata/corpus/sql/delete/test_large_delete.test +++ b/parser/testdata/corpus/sql/delete/test_large_delete.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_large_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT * FROM range(0, 10000, 1) t1(i); diff --git a/parser/testdata/corpus/sql/delete/test_parallel_delete_transaction_local.test b/parser/testdata/corpus/sql/delete/test_parallel_delete_transaction_local.test new file mode 100644 index 0000000..fd125c7 --- /dev/null +++ b/parser/testdata/corpus/sql/delete/test_parallel_delete_transaction_local.test @@ -0,0 +1,25 @@ +# source: test/sql/delete/test_parallel_delete_transaction_local.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA threads=8 +-- +ok +== +CREATE OR REPLACE TABLE t AS SELECT range AS i FROM range(1000000) +-- +ok +== +INSERT INTO t SELECT range FROM range(1000000) +-- +ok +== +SELECT count(*), sum(i) FROM t +-- +ok +== +WITH deleted AS (DELETE FROM t WHERE i % 2 = 0 RETURNING i) SELECT count(*), sum(i) FROM deleted +-- +ok +== diff --git a/parser/testdata/corpus/sql/delete/test_segment_deletes.test b/parser/testdata/corpus/sql/delete/test_segment_deletes.test index 5ec16ad..04e3836 100644 --- a/parser/testdata/corpus/sql/delete/test_segment_deletes.test +++ b/parser/testdata/corpus/sql/delete/test_segment_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_segment_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a SELECT * FROM range(0, 1024, 1); diff --git a/parser/testdata/corpus/sql/delete/test_truncate.test b/parser/testdata/corpus/sql/delete/test_truncate.test index 1775dcc..29e50fb 100644 --- a/parser/testdata/corpus/sql/delete/test_truncate.test +++ b/parser/testdata/corpus/sql/delete/test_truncate.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_truncate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit TRUNCATE TABLE a @@ -11,3 +11,31 @@ TRUNCATE a -- ok == +TRUNCATE a AS ignored_alias +-- +ok +== +TRUNCATE TABLE a RESTRICT +-- +ok +== +TRUNCATE a AS ignored_alias RESTRICT +-- +ok +== +TRUNCATE a CASCADE +-- +ok +== +TRUNCATE TABLE a ignored_alias CASCADE +-- +ok +== +TRUNCATE a "cascade" +-- +ok +== +TRUNCATE a AS restrict +-- +ok +== diff --git a/parser/testdata/corpus/sql/delete/test_using_delete.test b/parser/testdata/corpus/sql/delete/test_using_delete.test index 8d35365..0852eb3 100644 --- a/parser/testdata/corpus/sql/delete/test_using_delete.test +++ b/parser/testdata/corpus/sql/delete/test_using_delete.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_using_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES (1), (2), (3); diff --git a/parser/testdata/corpus/sql/delete/test_using_delete_duplicates.test b/parser/testdata/corpus/sql/delete/test_using_delete_duplicates.test index 7c28970..a7b2723 100644 --- a/parser/testdata/corpus/sql/delete/test_using_delete_duplicates.test +++ b/parser/testdata/corpus/sql/delete/test_using_delete_duplicates.test @@ -1,6 +1,6 @@ # source: test/sql/delete/test_using_delete_duplicates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers as select * from generate_series(0, 9, 1); diff --git a/parser/testdata/corpus/sql/detailed_profiler/test_detailed_profiler.test b/parser/testdata/corpus/sql/detailed_profiler/test_detailed_profiler.test index 5a2dd56..4ba3f4c 100644 --- a/parser/testdata/corpus/sql/detailed_profiler/test_detailed_profiler.test +++ b/parser/testdata/corpus/sql/detailed_profiler/test_detailed_profiler.test @@ -1,6 +1,6 @@ # source: test/sql/detailed_profiler/test_detailed_profiler.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA enable_profiling='json' @@ -8,7 +8,7 @@ PRAGMA enable_profiling='json' ok == SELECT COUNT(*) > 0 -FROM read_csv('{TEST_DIR}/test.txt', columns={'c': 'VARCHAR'}, delim=NULL, header=0, quote=NULL, escape=NULL, auto_detect = false) +FROM read_csv('{TEST_DIR}/test.txt', columns={'c': 'VARCHAR'}, delim='', header=0, quote='', escape='', auto_detect = false) WHERE contains(c, 'optimizer'); -- ok diff --git a/parser/testdata/corpus/sql/error/aggregate_order_by.test b/parser/testdata/corpus/sql/error/aggregate_order_by.test index bb97d15..2f441c4 100644 --- a/parser/testdata/corpus/sql/error/aggregate_order_by.test +++ b/parser/testdata/corpus/sql/error/aggregate_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/error/aggregate_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lists_tbl AS SELECT i%20 as groups, i AS l FROM range(1000) tmp(i); diff --git a/parser/testdata/corpus/sql/error/correlated_at_clause.test b/parser/testdata/corpus/sql/error/correlated_at_clause.test index 60bddbf..e6be0da 100644 --- a/parser/testdata/corpus/sql/error/correlated_at_clause.test +++ b/parser/testdata/corpus/sql/error/correlated_at_clause.test @@ -1,6 +1,6 @@ # source: test/sql/error/correlated_at_clause.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (i VARCHAR) diff --git a/parser/testdata/corpus/sql/error/error_location_multicaret.test b/parser/testdata/corpus/sql/error/error_location_multicaret.test index b24a971..bbaf391 100644 --- a/parser/testdata/corpus/sql/error/error_location_multicaret.test +++ b/parser/testdata/corpus/sql/error/error_location_multicaret.test @@ -1,6 +1,6 @@ # source: test/sql/error/error_location_multicaret.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT foo_bar_col FROM (SELECT 1 AS a) diff --git a/parser/testdata/corpus/sql/error/error_location_not_duplicated.test b/parser/testdata/corpus/sql/error/error_location_not_duplicated.test index 115ef85..41492f4 100644 --- a/parser/testdata/corpus/sql/error/error_location_not_duplicated.test +++ b/parser/testdata/corpus/sql/error/error_location_not_duplicated.test @@ -1,6 +1,6 @@ # source: test/sql/error/error_location_not_duplicated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 AS foo frommmm b; diff --git a/parser/testdata/corpus/sql/error/error_position.test b/parser/testdata/corpus/sql/error/error_position.test index d85ea9d..2d01291 100644 --- a/parser/testdata/corpus/sql/error/error_position.test +++ b/parser/testdata/corpus/sql/error/error_position.test @@ -1,6 +1,6 @@ # source: test/sql/error/error_position.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set errors_as_json=true; diff --git a/parser/testdata/corpus/sql/error/error_position_json_execute.test b/parser/testdata/corpus/sql/error/error_position_json_execute.test index cfaefcd..1a9b7a0 100644 --- a/parser/testdata/corpus/sql/error/error_position_json_execute.test +++ b/parser/testdata/corpus/sql/error/error_position_json_execute.test @@ -1,6 +1,6 @@ # source: test/sql/error/error_position_json_execute.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1, 2 FROM json_execute_serialized_sql(json_serialize_sql('SELECT * FROM no_such_tbl')); diff --git a/parser/testdata/corpus/sql/error/escape_percent_sign.test b/parser/testdata/corpus/sql/error/escape_percent_sign.test index 6fbeca7..4bd0b37 100644 --- a/parser/testdata/corpus/sql/error/escape_percent_sign.test +++ b/parser/testdata/corpus/sql/error/escape_percent_sign.test @@ -1,6 +1,6 @@ # source: test/sql/error/escape_percent_sign.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW list_int AS diff --git a/parser/testdata/corpus/sql/error/extension_function_error.test b/parser/testdata/corpus/sql/error/extension_function_error.test index c9c4b59..569d121 100644 --- a/parser/testdata/corpus/sql/error/extension_function_error.test +++ b/parser/testdata/corpus/sql/error/extension_function_error.test @@ -1,6 +1,6 @@ # source: test/sql/error/extension_function_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT dbgen(); diff --git a/parser/testdata/corpus/sql/error/incorrect_sql.test b/parser/testdata/corpus/sql/error/incorrect_sql.test index 9b2f101..81f8fee 100644 --- a/parser/testdata/corpus/sql/error/incorrect_sql.test +++ b/parser/testdata/corpus/sql/error/incorrect_sql.test @@ -1,19 +1,19 @@ # source: test/sql/error/incorrect_sql.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELEC 42; -- -error: Parser Error: syntax error at or near "42" +error: Parser Error: syntax error at or near "SELEC" == SELEC 42, 'thisisareallylongstringloremipsumblablathisisareallylongstringloremipsumblablalthisisareallylongstringloremipsumblablalthisisareallylongstringloremipsumblablal'; -- -error: Parser Error: syntax error at or near "42" +error: Parser Error: syntax error at or near "SELEC" == SELEC 42, '🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆'; -- -error: Parser Error: syntax error at or near "42" +error: Parser Error: syntax error at or near "SELEC" == SELECT '🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆', x, '🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆'; -- @@ -59,7 +59,7 @@ error: Parser Error: syntax error at or near "SELECT" == SELECT 42; SELEC 42; -- -error: Parser Error: syntax error at or near "42" +error: Parser Error: syntax error at or near "SELEC" == SELECT * FROM integers2; -- diff --git a/parser/testdata/corpus/sql/error/lineitem_errors.test b/parser/testdata/corpus/sql/error/lineitem_errors.test index 94d492a..2fc54e4 100644 --- a/parser/testdata/corpus/sql/error/lineitem_errors.test +++ b/parser/testdata/corpus/sql/error/lineitem_errors.test @@ -1,6 +1,6 @@ # source: test/sql/error/lineitem_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lineitem(l_orderkey BIGINT NOT NULL, l_partkey BIGINT NOT NULL, l_suppkey BIGINT NOT NULL, l_linenumber BIGINT NOT NULL, l_quantity DECIMAL(15,2) NOT NULL, l_extendedprice DECIMAL(15,2) NOT NULL, l_discount DECIMAL(15,2) NOT NULL, l_tax DECIMAL(15,2) NOT NULL, l_returnflag VARCHAR NOT NULL, l_linestatus VARCHAR NOT NULL, l_shipdate DATE NOT NULL, l_commitdate DATE NOT NULL, l_receiptdate DATE NOT NULL, l_shipinstruct VARCHAR NOT NULL, l_shipmode VARCHAR NOT NULL, l_comment VARCHAR NOT NULL); diff --git a/parser/testdata/corpus/sql/error/missing_type.test b/parser/testdata/corpus/sql/error/missing_type.test index 8734a91..dae87b1 100644 --- a/parser/testdata/corpus/sql/error/missing_type.test +++ b/parser/testdata/corpus/sql/error/missing_type.test @@ -1,6 +1,6 @@ # source: test/sql/error/missing_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ''::blobb diff --git a/parser/testdata/corpus/sql/error/mix_aggregate_and_non_aggregate.test b/parser/testdata/corpus/sql/error/mix_aggregate_and_non_aggregate.test index b34c81e..2e66c33 100644 --- a/parser/testdata/corpus/sql/error/mix_aggregate_and_non_aggregate.test +++ b/parser/testdata/corpus/sql/error/mix_aggregate_and_non_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/error/mix_aggregate_and_non_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(name VARCHAR, style VARCHAR, brewery_id INTEGER, abv DOUBLE, ibu INTEGER); diff --git a/parser/testdata/corpus/sql/error/qualified_column_error.test b/parser/testdata/corpus/sql/error/qualified_column_error.test index 5740c59..7bfb548 100644 --- a/parser/testdata/corpus/sql/error/qualified_column_error.test +++ b/parser/testdata/corpus/sql/error/qualified_column_error.test @@ -1,6 +1,6 @@ # source: test/sql/error/qualified_column_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create schema "dbt_temp" diff --git a/parser/testdata/corpus/sql/error/subquery_single_column.test b/parser/testdata/corpus/sql/error/subquery_single_column.test index 827d04f..2530087 100644 --- a/parser/testdata/corpus/sql/error/subquery_single_column.test +++ b/parser/testdata/corpus/sql/error/subquery_single_column.test @@ -1,6 +1,6 @@ # source: test/sql/error/subquery_single_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT 42, 84) diff --git a/parser/testdata/corpus/sql/error/table_function_as_scalar_function.test b/parser/testdata/corpus/sql/error/table_function_as_scalar_function.test index b1dcc72..defe8e7 100644 --- a/parser/testdata/corpus/sql/error/table_function_as_scalar_function.test +++ b/parser/testdata/corpus/sql/error/table_function_as_scalar_function.test @@ -1,6 +1,6 @@ # source: test/sql/error/table_function_as_scalar_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT read_csv('test.csv') diff --git a/parser/testdata/corpus/sql/error/test_try_nested_conditional.test b/parser/testdata/corpus/sql/error/test_try_nested_conditional.test new file mode 100644 index 0000000..73ce33f --- /dev/null +++ b/parser/testdata/corpus/sql/error/test_try_nested_conditional.test @@ -0,0 +1,54 @@ +# source: test/sql/error/test_try_nested_conditional.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT * FROM (VALUES (0), (1), (2), (3), (4)) AS t(x); +-- +ok +== +SELECT TRY(COALESCE(1 // x, 999)) FROM t +-- +ok +== +SELECT TRY(COALESCE(NULL::INTEGER, 1 // x, 999)) FROM t +-- +ok +== +SELECT TRY(CASE WHEN x % 2 = 0 THEN 1 // (x - 2) ELSE -1 END) FROM t +-- +ok +== +SELECT TRY(COALESCE(CASE WHEN x > 2 THEN NULL ELSE 1 // x END, 42)) FROM t +-- +ok +== +SELECT TRY(COALESCE(repeat('a', 20 // x), 'none')) FROM t +-- +ok +== +SELECT CASE WHEN x > 1 THEN TRY(COALESCE(1 // (x - 2), 999)) ELSE -1 END FROM t +-- +ok +== +SELECT count(*), count(v) FROM ( + SELECT TRY(COALESCE(10000 // (i % 5000), -1)) AS v FROM range(10000) tbl(i) +) q +-- +ok +== +SELECT count(*) FROM ( + SELECT i, TRY(COALESCE(10000 // (i % 5000), -1)) AS v FROM range(10000) tbl(i) +) q +WHERE CASE WHEN i % 5000 = 0 THEN v IS NOT NULL ELSE v IS DISTINCT FROM 10000 // (i % 5000) END +-- +ok +== +SELECT TRY(COALESCE([1 // x], [999])) FROM t +-- +ok +== +SELECT TRY(COALESCE({'a': 1 // x}, {'a': 999})) FROM t +-- +ok +== diff --git a/parser/testdata/corpus/sql/error/unknown_window_function.test b/parser/testdata/corpus/sql/error/unknown_window_function.test index becd1fa..7cfbe9e 100644 --- a/parser/testdata/corpus/sql/error/unknown_window_function.test +++ b/parser/testdata/corpus/sql/error/unknown_window_function.test @@ -1,6 +1,6 @@ # source: test/sql/error/unknown_window_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT substr('hello', 3, 2) OVER (); diff --git a/parser/testdata/corpus/sql/execution/column_binding_resolver.test b/parser/testdata/corpus/sql/execution/column_binding_resolver.test new file mode 100644 index 0000000..96080d5 --- /dev/null +++ b/parser/testdata/corpus/sql/execution/column_binding_resolver.test @@ -0,0 +1,60 @@ +# source: test/sql/execution/column_binding_resolver.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE binding_left(i INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO binding_left VALUES (1, 'alpha'), (2, 'beta'), (3, 'gamma'); +-- +ok +== +CREATE TABLE binding_right(i INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO binding_right VALUES (1, 'a'), (2, 'z'), (4, 'gamma'); +-- +ok +== +SELECT l.i, r.i, l.s +FROM binding_left l +JOIN binding_right r ON l.i = r.i AND starts_with(l.s, r.s) +ORDER BY ALL; +-- +ok +== +SELECT l.i +FROM binding_left l +SEMI JOIN binding_right r ON l.i + r.i = 5 OR l.s = r.s +ORDER BY ALL; +-- +ok +== +SELECT l.i, (SELECT count(*) + FROM binding_right r + WHERE r.i <= l.i AND starts_with(l.s, r.s)) +FROM binding_left l +ORDER BY ALL; +-- +ok +== +CREATE INDEX binding_expression_index ON binding_left ((i + length(s))); +-- +ok +== +SELECT i FROM binding_left WHERE i + length(s) = 6; +-- +ok +== +WITH RECURSIVE binding_cte(i) AS ( + SELECT 1 + UNION ALL + SELECT i + 1 FROM binding_cte WHERE i < 3 +) +SELECT i FROM binding_cte ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/execution/function_null_verification.test b/parser/testdata/corpus/sql/execution/function_null_verification.test new file mode 100644 index 0000000..935a5dd --- /dev/null +++ b/parser/testdata/corpus/sql/execution/function_null_verification.test @@ -0,0 +1,33 @@ +# source: test/sql/execution/function_null_verification.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verification_mode = 'verify_functions' +-- +ok +== +SELECT abs(i) +FROM (VALUES (1), (NULL), (-2)) t(i) +-- +ok +== +SELECT abs(a + b), greatest(a, b) +FROM (VALUES (1, 2), (NULL, 3), (4, NULL)) t(a, b) +-- +ok +== +SELECT count(*), sum(i), min(i) +FROM range(0) t(i) +-- +ok +== +SELECT count(DISTINCT i), sum(DISTINCT i) +FROM (VALUES (1), (1), (2), (NULL)) t(i) +-- +ok +== +RESET debug_verification_mode +-- +ok +== diff --git a/parser/testdata/corpus/sql/execution/limit_percent_runtime.test b/parser/testdata/corpus/sql/execution/limit_percent_runtime.test new file mode 100644 index 0000000..5115888 --- /dev/null +++ b/parser/testdata/corpus/sql/execution/limit_percent_runtime.test @@ -0,0 +1,29 @@ +# source: test/sql/execution/limit_percent_runtime.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PREPARE runtime_percent AS SELECT i FROM range(10) t(i) LIMIT ?% +-- +ok +== +EXECUTE runtime_percent(NULL) +-- +ok +== +EXECUTE runtime_percent(-1) +-- +ok +== +PREPARE runtime_offset AS SELECT i FROM range(5) t(i) LIMIT 50% OFFSET ? +-- +ok +== +EXECUTE runtime_offset(NULL) +-- +ok +== +EXECUTE runtime_offset(9223372036854775807) +-- +ok +== diff --git a/parser/testdata/corpus/sql/execution/physical_verify_vector.test b/parser/testdata/corpus/sql/execution/physical_verify_vector.test new file mode 100644 index 0000000..664d25c --- /dev/null +++ b/parser/testdata/corpus/sql/execution/physical_verify_vector.test @@ -0,0 +1,99 @@ +# source: test/sql/execution/physical_verify_vector.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_vector = 'dictionary_operator' +-- +ok +== +SELECT i, CASE WHEN i % 2 = 0 THEN NULL ELSE i::VARCHAR END +FROM range(4) t(i) +-- +ok +== +SET debug_verify_vector = 'constant_operator' +-- +ok +== +SELECT i, i % 2 +FROM range(4) t(i) +-- +ok +== +SET debug_verify_vector = 'sequence_operator' +-- +ok +== +SELECT i::TINYINT, (i * 200)::SMALLINT, CASE WHEN i = 2 THEN NULL ELSE i END +FROM range(4) t(i) +-- +ok +== +SELECT i, i / 2, INTERVAL '1 day' * i +FROM range(4) t(i) +-- +ok +== +SELECT * +FROM (VALUES (1, 5), (1, 5), (2, 5), (4, 5)) t(irregular, constant_value) +-- +ok +== +SELECT * FROM (VALUES (1), (2), (4)) t(irregular) +-- +ok +== +SELECT * +FROM (VALUES + ((-128)::TINYINT, (-32768)::SMALLINT, (-2147483648)::INTEGER, (-9223372036854775808)::BIGINT), + (127::TINYINT, 32767::SMALLINT, 2147483647::INTEGER, 9223372036854775807::BIGINT) +) t(tiny_value, small_value, integer_value, bigint_value) +-- +ok +== +SELECT * FROM (VALUES (1), (NULL)) t(nullable_value) +-- +ok +== +SELECT unnest([empty_struct::VARIANT, struct::VARIANT]) FROM test_all_types(); +-- +ok +== +SELECT variant_typeof(v), variant_typeof(s.v), variant_typeof(l[1]), variant_typeof(a[1]) +FROM ( + SELECT v, {'v': v} AS s, [v] AS l, [v]::VARIANT[1] AS a + FROM (VALUES (42::VARIANT), (42::DOUBLE::VARIANT), ('42'::VARIANT), (NULL::VARIANT)) t(v) +); +-- +ok +== +SET debug_verify_vector = 'nested_shuffle' +-- +ok +== +SELECT [i, i + 1], {'id': i, 'label': i::VARCHAR} +FROM range(4) t(i) +-- +ok +== +SET debug_verify_vector = 'variant_vector' +-- +ok +== +SELECT i + 1 FROM range(4) t(i) +-- +ok +== +SET debug_verify_vector = 'shredded_vector' +-- +ok +== +SELECT i::VARIANT FROM range(4) t(i) +-- +ok +== +RESET debug_verify_vector +-- +ok +== diff --git a/parser/testdata/corpus/sql/execution/positional_scan_nested.test b/parser/testdata/corpus/sql/execution/positional_scan_nested.test new file mode 100644 index 0000000..7fa35a8 --- /dev/null +++ b/parser/testdata/corpus/sql/execution/positional_scan_nested.test @@ -0,0 +1,27 @@ +# source: test/sql/execution/positional_scan_nested.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * +FROM range(2) a(i) +POSITIONAL JOIN range(3) b(j) +POSITIONAL JOIN range(4) c(k) +-- +ok +== +SET debug_verify_serializer = true +-- +ok +== +SELECT * +FROM range(4) a(i) +POSITIONAL JOIN range(2) b(j) +POSITIONAL JOIN range(3) c(k) +-- +ok +== +RESET debug_verify_serializer +-- +ok +== diff --git a/parser/testdata/corpus/sql/explain/explain_all_statements.test b/parser/testdata/corpus/sql/explain/explain_all_statements.test index 23e0c25..b06e706 100644 --- a/parser/testdata/corpus/sql/explain/explain_all_statements.test +++ b/parser/testdata/corpus/sql/explain/explain_all_statements.test @@ -1,6 +1,6 @@ # source: test/sql/explain/explain_all_statements.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit explain PRAGMA enable_checkpoint_on_shutdown diff --git a/parser/testdata/corpus/sql/explain/explain_execute.test b/parser/testdata/corpus/sql/explain/explain_execute.test index ef18213..358354d 100644 --- a/parser/testdata/corpus/sql/explain/explain_execute.test +++ b/parser/testdata/corpus/sql/explain/explain_execute.test @@ -1,6 +1,6 @@ # source: test/sql/explain/explain_execute.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j INTEGER) diff --git a/parser/testdata/corpus/sql/explain/explain_formats.test b/parser/testdata/corpus/sql/explain/explain_formats.test index 0e20762..3c5ff1e 100644 --- a/parser/testdata/corpus/sql/explain/explain_formats.test +++ b/parser/testdata/corpus/sql/explain/explain_formats.test @@ -1,6 +1,6 @@ # source: test/sql/explain/explain_formats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE renderer_t AS SELECT i AS i, i % 7 AS g, 'v' || (i % 3)::VARCHAR AS s FROM range(200) t(i) @@ -41,6 +41,14 @@ EXPLAIN (FORMAT mermaid) SELECT * FROM renderer_plan -- ok == +EXPLAIN (FORMAT compact) SELECT * FROM renderer_plan +-- +ok +== +EXPLAIN ANALYZE (FORMAT compact) SELECT * FROM renderer_plan +-- +ok +== EXPLAIN (FORMAT default) SELECT * FROM renderer_plan -- ok diff --git a/parser/testdata/corpus/sql/explain/order_by_topn_explain_fqn.test b/parser/testdata/corpus/sql/explain/order_by_topn_explain_fqn.test index 732be36..0393727 100644 --- a/parser/testdata/corpus/sql/explain/order_by_topn_explain_fqn.test +++ b/parser/testdata/corpus/sql/explain/order_by_topn_explain_fqn.test @@ -1,6 +1,6 @@ # source: test/sql/explain/order_by_topn_explain_fqn.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE date_table (d DATE); diff --git a/parser/testdata/corpus/sql/explain/test_explain.test b/parser/testdata/corpus/sql/explain/test_explain.test index 0c78ef3..584ea24 100644 --- a/parser/testdata/corpus/sql/explain/test_explain.test +++ b/parser/testdata/corpus/sql/explain/test_explain.test @@ -1,6 +1,6 @@ # source: test/sql/explain/test_explain.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN SELECT * FROM integers diff --git a/parser/testdata/corpus/sql/explain/test_explain_analyze.test b/parser/testdata/corpus/sql/explain/test_explain_analyze.test index d70d0c1..14f2d6a 100644 --- a/parser/testdata/corpus/sql/explain/test_explain_analyze.test +++ b/parser/testdata/corpus/sql/explain/test_explain_analyze.test @@ -1,6 +1,6 @@ # source: test/sql/explain/test_explain_analyze.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(100) tbl(i); diff --git a/parser/testdata/corpus/sql/explain/test_explain_limit.test b/parser/testdata/corpus/sql/explain/test_explain_limit.test index edf29d5..b271df5 100644 --- a/parser/testdata/corpus/sql/explain/test_explain_limit.test +++ b/parser/testdata/corpus/sql/explain/test_explain_limit.test @@ -1,6 +1,6 @@ # source: test/sql/explain/test_explain_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(100) tbl(i) diff --git a/parser/testdata/corpus/sql/explain/tree_renderer_branches.test b/parser/testdata/corpus/sql/explain/tree_renderer_branches.test new file mode 100644 index 0000000..996f63d --- /dev/null +++ b/parser/testdata/corpus/sql/explain/tree_renderer_branches.test @@ -0,0 +1,220 @@ +# source: test/sql/explain/tree_renderer_branches.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA this_is_a_very_long_schema_name +-- +ok +== +CREATE TABLE this_is_a_very_long_schema_name."renderer`""table" ( + abcdefghijklmnopqrstu BIGINT, + vwxyzabcdefghijklmnop BIGINT, + cccccccccccccccccccc VARCHAR +) +-- +ok +== +INSERT INTO this_is_a_very_long_schema_name."renderer`""table" VALUES (1, 2, 'duck') +-- +ok +== +CREATE TABLE renderer_columns ( + column_one_with_long_name BIGINT, + column_two_with_long_name BIGINT, + column_three_with_long_name BIGINT, + column_four_with_long_name BIGINT, + column_five_with_long_name BIGINT, + column_six_with_long_name BIGINT, + column_seven_with_long_name BIGINT, + column_eight_with_long_name BIGINT, + column_nine_with_long_name BIGINT, + column_ten_with_long_name BIGINT +) +-- +ok +== +INSERT INTO renderer_columns VALUES (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) +-- +ok +== +SET profiling_renderer_settings = MAP { + 'maximum_render_width': '30', + 'max_extra_lines': '0', + 'thousand_separator': '', + 'decimal_separator': '.', + 'expand_all': 'false', + 'operator_casing': 'title', + 'ignored_by_text': 'yes' +} +-- +ok +== +EXPLAIN SELECT * +FROM this_is_a_very_long_schema_name."renderer`""table" +WHERE abcdefghijklmnopqrstu > 0 +-- +ok +== +EXPLAIN SELECT * FROM renderer_columns +-- +ok +== +EXPLAIN (FORMAT yaml) +SELECT * FROM this_is_a_very_long_schema_name."renderer`""table" +-- +ok +== +EXPLAIN (FORMAT mermaid) +SELECT * FROM this_is_a_very_long_schema_name."renderer`""table" +-- +ok +== +EXPLAIN (FORMAT html) SELECT * FROM range(2) +-- +ok +== +SET profiling_renderer_settings = MAP {'operator_casing': 'upper'} +-- +ok +== +EXPLAIN SELECT * FROM range(2) +-- +ok +== +SET profiling_renderer_settings = MAP {'operator_casing': 'title'} +-- +ok +== +SET profiling_renderer_settings = MAP {'thousand_separator': 'xx'} +-- +ok +== +SET profiling_renderer_settings = MAP {'decimal_separator': ''} +-- +ok +== +SET profiling_renderer_settings = MAP {'operator_casing': 'mixed'} +-- +ok +== +SET profiling_renderer_settings = MAP { + 'maximum_render_width': '44', + 'thousand_separator': ',', + 'expand_all': 'false', + 'operator_casing': 'title' +} +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) +FROM ( + SELECT x, row_number() OVER (ORDER BY x) AS rn + FROM (SELECT sleep_ms(10) AS x FROM range(1)) + QUALIFY rn <= 10 + ORDER BY x + LIMIT 5 +) +-- +ok +== +EXPLAIN ANALYZE +SELECT sum(x) +FROM ( + SELECT sleep_ms(10)::BIGINT AS x FROM range(1) + UNION ALL SELECT i + 1 FROM range(1) t(i) + UNION ALL SELECT i + 2 FROM range(1) t(i) + UNION ALL SELECT i + 3 FROM range(1) t(i) + UNION ALL SELECT i + 4 FROM range(1) t(i) + UNION ALL SELECT i + 5 FROM range(1) t(i) + UNION ALL SELECT i + 6 FROM range(1) t(i) + UNION ALL SELECT i + 7 FROM range(1) t(i) + UNION ALL SELECT i + 8 FROM range(1) t(i) + UNION ALL SELECT i + 9 FROM range(1) t(i) + UNION ALL SELECT i + 10 FROM range(1) t(i) + UNION ALL SELECT i + 11 FROM range(1) t(i) + UNION ALL SELECT i + 12 FROM range(1) t(i) + UNION ALL SELECT i + 13 FROM range(1) t(i) + UNION ALL SELECT i + 14 FROM range(1) t(i) + UNION ALL SELECT i + 15 FROM range(1) t(i) +) +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) +FROM ( + SELECT * FROM range(2) + UNION ALL SELECT * FROM range(1500) + UNION ALL SELECT * FROM range(200) + UNION ALL SELECT * FROM range(2000) +) +-- +ok +== +RESET profiling_renderer_settings +-- +ok +== +PRAGMA enable_profiling = 'html' +-- +ok +== +PRAGMA profiling_output = '{TEST_DIR}/tree_renderer_profile.html' +-- +error: Parser Error: Profiler file type ({TEST_DIR}/tree_renderer_profile.html) must either have the same file extension as the profiling output type (query_tree), or be a '.txt' file. Set "enable_profiling = 'html'" first. +== +SELECT 42 WHERE 'left<&' <> 'right>' /* renderer comment */ +-- +ok +== +SELECT contains(content, 'sql-num'), + contains(content, 'sql-str'), + contains(content, 'sql-comment'), + contains(content, '<'), + contains(content, '&') +FROM read_text('{TEST_DIR}/tree_renderer_profile.html') +-- +ok +== +RESET profiling_output +-- +ok +== +COPY (SELECT i FROM range(10) t(i)) TO '{TEST_DIR}/tree_renderer_input.csv' (HEADER) +-- +ok +== +PRAGMA enable_profiling = 'compact' +-- +ok +== +PRAGMA profiling_output = '{TEST_DIR}/tree_renderer_compact.txt' +-- +ok +== +SELECT count(*) FROM read_csv_auto('{TEST_DIR}/tree_renderer_input.csv') +-- +ok +== +SELECT contains(content, 'read=') FROM read_text('{TEST_DIR}/tree_renderer_compact.txt') +-- +ok +== +PRAGMA profiling_output = '{TEST_DIR}/tree_renderer_compact_write.txt' +-- +ok +== +COPY (SELECT i FROM range(10) t(i)) TO '{TEST_DIR}/tree_renderer_output.csv' +-- +ok +== +SELECT contains(content, 'written=') FROM read_text('{TEST_DIR}/tree_renderer_compact_write.txt') +-- +ok +== +RESET enable_profiling +-- +ok +== diff --git a/parser/testdata/corpus/sql/create/create_table_empty_name.test.metadata.json b/parser/testdata/corpus/sql/explain/tree_renderer_branches.test.metadata.json similarity index 74% rename from parser/testdata/corpus/sql/create/create_table_empty_name.test.metadata.json rename to parser/testdata/corpus/sql/explain/tree_renderer_branches.test.metadata.json index 0f5f060..4c97020 100644 --- a/parser/testdata/corpus/sql/create/create_table_empty_name.test.metadata.json +++ b/parser/testdata/corpus/sql/explain/tree_renderer_branches.test.metadata.json @@ -1,5 +1,5 @@ { "todo": { - "6d38638491130c28": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + "918d65e8d7ad44fd": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" } } diff --git a/parser/testdata/corpus/sql/export/empty_export.test b/parser/testdata/corpus/sql/export/empty_export.test index 353818f..3b37b6a 100644 --- a/parser/testdata/corpus/sql/export/empty_export.test +++ b/parser/testdata/corpus/sql/export/empty_export.test @@ -1,6 +1,6 @@ # source: test/sql/export/empty_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPORT DATABASE '{TEST_DIR}/empty_export' (FORMAT CSV) diff --git a/parser/testdata/corpus/sql/export/export_compression_level.test b/parser/testdata/corpus/sql/export/export_compression_level.test index 3c62e75..abd7b26 100644 --- a/parser/testdata/corpus/sql/export/export_compression_level.test +++ b/parser/testdata/corpus/sql/export/export_compression_level.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_compression_level.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_table ( diff --git a/parser/testdata/corpus/sql/export/export_csv_empty_strings.test b/parser/testdata/corpus/sql/export/export_csv_empty_strings.test new file mode 100644 index 0000000..15a5bb1 --- /dev/null +++ b/parser/testdata/corpus/sql/export/export_csv_empty_strings.test @@ -0,0 +1,41 @@ +# source: test/sql/export/export_csv_empty_strings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE m AS ENUM ('', 'a'); +-- +ok +== +CREATE TABLE t(e m, b BLOB, v VARCHAR, n VARCHAR); +-- +ok +== +INSERT INTO t VALUES ('', '', '', NULL), (NULL, NULL, NULL, 'x'), ('a', 'b', 'c', ''); +-- +ok +== +EXPORT DATABASE '{TEST_DIR}/export_csv_empty_strings' (FORMAT csv); +-- +ok +== +DROP TYPE m; +-- +ok +== +IMPORT DATABASE '{TEST_DIR}/export_csv_empty_strings'; +-- +ok +== +SELECT e IS NULL, b IS NULL, v IS NULL, n IS NULL, v, n FROM t ORDER BY ALL +-- +ok +== +EXPORT DATABASE '{TEST_DIR}/export_csv_empty_strings_nullstr' (FORMAT csv, NULLSTR 'null'); +-- +ok +== +IMPORT DATABASE '{TEST_DIR}/export_csv_empty_strings_nullstr'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/export/export_database.test b/parser/testdata/corpus/sql/export/export_database.test index b71114b..0da5b79 100644 --- a/parser/testdata/corpus/sql/export/export_database.test +++ b/parser/testdata/corpus/sql/export/export_database.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_database.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPORT DATABASE '' (FORMAT X!); @@ -19,15 +19,15 @@ EXPORT DATABASE '' (FORMAT lower('csv')); -- error: Parser Error: Unsupported parameter type for FORMAT: expected e.g. FORMAT 'csv', 'parquet' == -CREATE TABLE integers(i INTEGER, j INTEGER, CHECK(i+j<10)) +EXPORT DATABASE '' (FORMAT parquet, FORMAT csv); -- -ok +error: Parser Error: Unexpected duplicate option "format" == -CREATE TABLE strings(v VARCHAR, d DATE, PRIMARY KEY(d)) +CREATE TABLE integers(i INTEGER, j INTEGER, CHECK(i+j<10)) -- ok == -CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); +CREATE TABLE strings(v VARCHAR, d DATE, PRIMARY KEY(d)) -- ok == diff --git a/parser/testdata/corpus/sql/export/export_external_access.test b/parser/testdata/corpus/sql/export/export_external_access.test index f7b7bec..35b4789 100644 --- a/parser/testdata/corpus/sql/export/export_external_access.test +++ b/parser/testdata/corpus/sql/export/export_external_access.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_external_access.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPORT DATABASE '{TEST_DIR}/export_permissions_test' (FORMAT CSV) diff --git a/parser/testdata/corpus/sql/export/export_functions.test b/parser/testdata/corpus/sql/export/export_functions.test index d57c8f8..69c03f0 100644 --- a/parser/testdata/corpus/sql/export/export_functions.test +++ b/parser/testdata/corpus/sql/export/export_functions.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl( diff --git a/parser/testdata/corpus/sql/export/export_generated_columns.test b/parser/testdata/corpus/sql/export/export_generated_columns.test index 8271cd3..8a8f79d 100644 --- a/parser/testdata/corpus/sql/export/export_generated_columns.test +++ b/parser/testdata/corpus/sql/export/export_generated_columns.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_generated_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma storage_compatibility_version='v1.2.0' diff --git a/parser/testdata/corpus/sql/export/export_hive_path.test b/parser/testdata/corpus/sql/export/export_hive_path.test index 719c3ef..1752614 100644 --- a/parser/testdata/corpus/sql/export/export_hive_path.test +++ b/parser/testdata/corpus/sql/export/export_hive_path.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_hive_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (42); diff --git a/parser/testdata/corpus/sql/export/export_indexes.test b/parser/testdata/corpus/sql/export/export_indexes.test index 2437cc4..65e6159 100644 --- a/parser/testdata/corpus/sql/export/export_indexes.test +++ b/parser/testdata/corpus/sql/export/export_indexes.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_indexes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO elaborate_macro(x, y := 7) AS x + y; diff --git a/parser/testdata/corpus/sql/export/export_macros.test b/parser/testdata/corpus/sql/export/export_macros.test index 060ff99..d6c8bdb 100644 --- a/parser/testdata/corpus/sql/export/export_macros.test +++ b/parser/testdata/corpus/sql/export/export_macros.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_macros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set enable_macro_dependencies=true; diff --git a/parser/testdata/corpus/sql/export/export_quoted_enum.test b/parser/testdata/corpus/sql/export/export_quoted_enum.test index c5e97a5..0be8946 100644 --- a/parser/testdata/corpus/sql/export/export_quoted_enum.test +++ b/parser/testdata/corpus/sql/export/export_quoted_enum.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_quoted_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE "group" AS ENUM ( 'one', 'two'); diff --git a/parser/testdata/corpus/sql/export/export_quoted_structs.test b/parser/testdata/corpus/sql/export/export_quoted_structs.test index c381ef7..b08a815 100644 --- a/parser/testdata/corpus/sql/export/export_quoted_structs.test +++ b/parser/testdata/corpus/sql/export/export_quoted_structs.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_quoted_structs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a (s STRUCT("end" VARCHAR)); diff --git a/parser/testdata/corpus/sql/export/export_quoted_union.test b/parser/testdata/corpus/sql/export/export_quoted_union.test index 51eecce..d1366ea 100644 --- a/parser/testdata/corpus/sql/export/export_quoted_union.test +++ b/parser/testdata/corpus/sql/export/export_quoted_union.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_quoted_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a ( diff --git a/parser/testdata/corpus/sql/export/export_temp_tables.test b/parser/testdata/corpus/sql/export/export_temp_tables.test index a7d69c6..c5dd95c 100644 --- a/parser/testdata/corpus/sql/export/export_temp_tables.test +++ b/parser/testdata/corpus/sql/export/export_temp_tables.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_temp_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE temp_only AS SELECT 42 AS i diff --git a/parser/testdata/corpus/sql/export/export_typed_null.test b/parser/testdata/corpus/sql/export/export_typed_null.test new file mode 100644 index 0000000..fb87c3c --- /dev/null +++ b/parser/testdata/corpus/sql/export/export_typed_null.test @@ -0,0 +1,21 @@ +# source: test/sql/export/export_typed_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO typed_null(value := NULL::INTEGER) AS value +-- +ok +== +EXPORT DATABASE '{TEST_DIR}/export_typed_null' (FORMAT CSV) +-- +ok +== +IMPORT DATABASE '{TEST_DIR}/export_typed_null' +-- +ok +== +SELECT typeof(typed_null()), typed_null() IS NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/export/export_types.test b/parser/testdata/corpus/sql/export/export_types.test index a4a9db3..9aeee3d 100644 --- a/parser/testdata/corpus/sql/export/export_types.test +++ b/parser/testdata/corpus/sql/export/export_types.test @@ -1,6 +1,6 @@ # source: test/sql/export/export_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE doom as mood; @@ -39,6 +39,30 @@ CREATE TABLE tbl3 (my_struct doom_mood); -- ok == +CREATE TABLE tbl4 (a mood_list, b mood_map, d my_special_type); +-- +ok +== +CREATE TABLE tbl5 (c my_union); +-- +ok +== +INSERT INTO tbl1 VALUES ('happy', 'sad'); +-- +ok +== +INSERT INTO tbl2 VALUES ({'a': 'curious', 'b': 'happy'}); +-- +ok +== +INSERT INTO tbl3 VALUES ({'a': 'sad', 'b': 'curious'}); +-- +ok +== +INSERT INTO tbl4 VALUES (['happy', 'sad'], map(['curious'], ['happy']), 'type alias'); +-- +ok +== EXPORT DATABASE '{TEST_DIR}/export_types' (FORMAT CSV); -- ok @@ -47,3 +71,31 @@ IMPORT DATABASE '{TEST_DIR}/export_types' -- ok == +SELECT count(*) FROM tbl5 +-- +ok +== +INSERT INTO tbl5 VALUES (union_value(b := 'sad'::mood)) +-- +ok +== +SELECT a, b FROM tbl1 +-- +ok +== +SELECT my_struct.a, my_struct.b FROM tbl2 +-- +ok +== +SELECT my_struct.a, my_struct.b FROM tbl3 +-- +ok +== +SELECT a, b, union_tag(c), c.b, d FROM tbl4, tbl5 +-- +ok +== +SELECT enum_range(NULL::mood), enum_range(NULL::doom), enum_range(a[1]), enum_range(c.b) FROM tbl4, tbl5 +-- +ok +== diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_bit.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_bit.test index 19e825f..5fcbb32 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_bit.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_bit.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_bit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select "bit" from test_all_types(), range(3); diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_enum.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_enum.test index 27b6897..40acd0d 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_enum.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_enum.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create type my_enum as enum ('1', '2', '3') diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_hugeint.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_hugeint.test index 7df57f7..73ae6bb 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_hugeint.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_hugeint.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select "hugeint" from test_all_types(), range(3); diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_json.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_json.test index 6531126..875c1d5 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_json.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_json.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select val from ( select json_structure('{"a": 42}') val), range(3); diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_list.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_list.test index 6c84eb9..75c54a0 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_list.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_list.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select val from ( diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_map.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_map.test index c83f9e0..1064212 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_map.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_map.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table unsupported_key as select val from ( diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_struct.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_struct.test index 6cb6eeb..0544296 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_struct.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_struct.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select val from ( diff --git a/parser/testdata/corpus/sql/export/parquet/export_parquet_union.test b/parser/testdata/corpus/sql/export/parquet/export_parquet_union.test index c1f5672..829ca7f 100644 --- a/parser/testdata/corpus/sql/export/parquet/export_parquet_union.test +++ b/parser/testdata/corpus/sql/export/parquet/export_parquet_union.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet/export_parquet_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select "union" from test_all_types(), range(3); diff --git a/parser/testdata/corpus/sql/export/parquet_export.test b/parser/testdata/corpus/sql/export/parquet_export.test index cf1b797..b89d5c4 100644 --- a/parser/testdata/corpus/sql/export/parquet_export.test +++ b/parser/testdata/corpus/sql/export/parquet_export.test @@ -1,6 +1,6 @@ # source: test/sql/export/parquet_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER NOT NULL, j INTEGER) diff --git a/parser/testdata/corpus/sql/extensions/aliasing.test b/parser/testdata/corpus/sql/extensions/aliasing.test index 673b260..5231eae 100644 --- a/parser/testdata/corpus/sql/extensions/aliasing.test +++ b/parser/testdata/corpus/sql/extensions/aliasing.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/aliasing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit LOAD '{BUILD_DIRECTORY}/test/extension/loadable_extension_demo.duckdb_extension' AS demo diff --git a/parser/testdata/corpus/sql/extensions/allowed_directories_install.test b/parser/testdata/corpus/sql/extensions/allowed_directories_install.test index bca559c..40eeec3 100644 --- a/parser/testdata/corpus/sql/extensions/allowed_directories_install.test +++ b/parser/testdata/corpus/sql/extensions/allowed_directories_install.test @@ -1,13 +1,17 @@ # source: test/sql/extensions/allowed_directories_install.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set extension_directory='{TEST_DIR}/extension_dir' -- ok == -SET allowed_directories=['{TEST_DIR}', 'http://foo.com/bar', 'https://foo.com/baz']; +SET allowed_directories=['{TEST_DIR}', 'http://127.0.0.1:1/allowed', 'https://foo.com/baz']; +-- +ok +== +INSTALL bogus FROM 'http://127.0.0.1:1/allowed'; -- ok == @@ -15,6 +19,30 @@ INSTALL bogus FROM 'http://example.com'; -- ok == +INSTALL 'http://example.com/bogus.duckdb_extension'; +-- +ok +== +INSTALL bogus FROM 'http://127.0.0.1:1/allowed_not'; +-- +ok +== +INSTALL bogus FROM 'http://127.0.0.1:1/allowed/..'; +-- +ok +== +SET custom_extension_repository='http://example.com/repository'; +-- +ok +== +INSTALL bogus; +-- +ok +== +RESET custom_extension_repository; +-- +ok +== set extension_directory='/tmp' -- ok diff --git a/parser/testdata/corpus/sql/extensions/attach_type_alias_conflict.test b/parser/testdata/corpus/sql/extensions/attach_type_alias_conflict.test index 36eb34c..52ae508 100644 --- a/parser/testdata/corpus/sql/extensions/attach_type_alias_conflict.test +++ b/parser/testdata/corpus/sql/extensions/attach_type_alias_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/attach_type_alias_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET autoinstall_known_extensions=true; diff --git a/parser/testdata/corpus/sql/extensions/checked_load.test b/parser/testdata/corpus/sql/extensions/checked_load.test index 14ded89..4cd4966 100644 --- a/parser/testdata/corpus/sql/extensions/checked_load.test +++ b/parser/testdata/corpus/sql/extensions/checked_load.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/checked_load.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit LOAD 'README.md'; diff --git a/parser/testdata/corpus/sql/extensions/concurrent_failed_aliased_load.test b/parser/testdata/corpus/sql/extensions/concurrent_failed_aliased_load.test new file mode 100644 index 0000000..0313d03 --- /dev/null +++ b/parser/testdata/corpus/sql/extensions/concurrent_failed_aliased_load.test @@ -0,0 +1,13 @@ +# source: test/sql/extensions/concurrent_failed_aliased_load.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +LOAD does_not_exist_extension AS concurrent_alias; +-- +ok +== +SELECT count(*) FROM duckdb_extensions(); +-- +ok +== diff --git a/parser/testdata/corpus/sql/extensions/extension_repositories.test b/parser/testdata/corpus/sql/extensions/extension_repositories.test new file mode 100644 index 0000000..16d5869 --- /dev/null +++ b/parser/testdata/corpus/sql/extensions/extension_repositories.test @@ -0,0 +1,221 @@ +# source: test/sql/extensions/extension_repositories.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET extension_repository_directory='{TEST_DIR}/extension_repositories' +-- +ok +== +CREATE EXTENSION REPOSITORY acme WITH PREFIX 'http://extensions.acme.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +SELECT repository_name, prefix FROM duckdb_extension_repositories() WHERE type='USER_PROVIDED' +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/extension_repositories/acme.duckdb_extension.repo.json') +-- +ok +== +CREATE EXTENSION REPOSITORY 'other' WITH PREFIX 'http://example.com/extensions' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +SELECT repository_name FROM duckdb_extension_repositories() WHERE type='USER_PROVIDED' ORDER BY repository_name +-- +ok +== +CREATE EXTENSION REPOSITORY acme WITH PREFIX 'http://other.acme.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +CREATE EXTENSION REPOSITORY IF NOT EXISTS acme WITH PREFIX 'http://other.acme.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +SELECT prefix FROM duckdb_extension_repositories() WHERE repository_name='acme' +-- +ok +== +CREATE OR REPLACE EXTENSION REPOSITORY acme WITH PREFIX 'http://other.acme.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +CREATE EXTENSION REPOSITORY multi WITH PREFIX 'http://multi.com' USING PUBLIC KEYS 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB', 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA42wcKQCSwoEFA89qFVyjug5NIRKtExLQ+cCIdb8tbKICvGmiK6aQY5sO1iNiTxaRzfeDcxH4dSVxBIY7RZoNPjPpakd1K06gGv2R31LUg2JZY6P/oqvliHdhxMOcMdMnzsyQPJuSXFrzBXsy4xpAbYfNbdjZfPgH27iORiiUEjG6gmEeXzWe9bis5hEExvWD5GIRV6B+YCaAt41+g+nP4byZ5MPCw9dXHIk5+OMakOsiM/dTj66SxdRfeYJE7HBdmk2zXD2t1st3gHydJQyX3Ov6a1Q/mhnWJq3tni5ZzkmaDKHHcnitI7iQxrCp+XWzVsT5N9wQeFvQLcFLcrR9ZQIDAQAB' +-- +ok +== +SELECT public_keys FROM duckdb_extension_repositories() WHERE repository_name='multi' +-- +ok +== +DROP EXTENSION REPOSITORY multi +-- +ok +== +COPY (SELECT 1 AS a) TO '{TEST_DIR}/.well-known' (FORMAT csv, PER_THREAD_OUTPUT true) +-- +ok +== +COPY (SELECT '{"signature_keys":["-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB-----END PUBLIC KEY-----"]}') TO '{TEST_DIR}/.well-known/duckdb-extension-repo.json' (FORMAT csv, HEADER false, QUOTE '', USE_TMP_FILE false) +-- +ok +== +CREATE EXTENSION REPOSITORY fetched WITH PREFIX '{TEST_DIR}' +-- +ok +== +SELECT public_keys FROM duckdb_extension_repositories() WHERE repository_name='fetched' +-- +ok +== +DROP EXTENSION REPOSITORY fetched +-- +ok +== +COPY (SELECT '{"signature_keys":["-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB-----END PUBLIC KEY-----","-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA42wcKQCSwoEFA89qFVyjug5NIRKtExLQ+cCIdb8tbKICvGmiK6aQY5sO1iNiTxaRzfeDcxH4dSVxBIY7RZoNPjPpakd1K06gGv2R31LUg2JZY6P/oqvliHdhxMOcMdMnzsyQPJuSXFrzBXsy4xpAbYfNbdjZfPgH27iORiiUEjG6gmEeXzWe9bis5hEExvWD5GIRV6B+YCaAt41+g+nP4byZ5MPCw9dXHIk5+OMakOsiM/dTj66SxdRfeYJE7HBdmk2zXD2t1st3gHydJQyX3Ov6a1Q/mhnWJq3tni5ZzkmaDKHHcnitI7iQxrCp+XWzVsT5N9wQeFvQLcFLcrR9ZQIDAQAB-----END PUBLIC KEY-----"]}') TO '{TEST_DIR}/.well-known/duckdb-extension-repo.json' (FORMAT csv, HEADER false, QUOTE '', USE_TMP_FILE false) +-- +ok +== +CREATE EXTENSION REPOSITORY fetched_multi WITH PREFIX '{TEST_DIR}' +-- +ok +== +DROP EXTENSION REPOSITORY fetched_multi +-- +ok +== +COPY (SELECT 'not json at all') TO '{TEST_DIR}/.well-known/duckdb-extension-repo.json' (FORMAT csv, HEADER false, QUOTE '', USE_TMP_FILE false) +-- +ok +== +CREATE EXTENSION REPOSITORY bad_json WITH PREFIX '{TEST_DIR}' +-- +ok +== +COPY (SELECT '{"other":1}') TO '{TEST_DIR}/.well-known/duckdb-extension-repo.json' (FORMAT csv, HEADER false, QUOTE '', USE_TMP_FILE false) +-- +ok +== +CREATE EXTENSION REPOSITORY no_keys WITH PREFIX '{TEST_DIR}' +-- +ok +== +CREATE EXTENSION REPOSITORY no_key WITH PREFIX '{TEST_DIR}/no_such_repo' +-- +ok +== +CREATE EXTENSION REPOSITORY pem_repo WITH PREFIX 'http://pem.com' USING PUBLIC KEY '-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdX +APV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTt +y9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0j +N0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6 +AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGR +exqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxD +ZQIDAQAB +-----END PUBLIC KEY-----' +-- +ok +== +SELECT public_keys FROM duckdb_extension_repositories() WHERE repository_name='pem_repo' +-- +ok +== +DROP EXTENSION REPOSITORY pem_repo +-- +ok +== +CREATE EXTENSION REPOSITORY invalid_key WITH PREFIX 'http://foo.com' USING PUBLIC KEY 'not a key' +-- +ok +== +CREATE EXTENSION REPOSITORY invalid_key WITH PREFIX 'http://foo.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdX' +-- +ok +== +CREATE EXTENSION REPOSITORY invalid_key WITH PREFIX 'http://foo.com' USING PUBLIC KEYS 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB', 'not a key' +-- +ok +== +CREATE EXTENSION REPOSITORY core WITH PREFIX 'http://foo.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +CREATE EXTENSION REPOSITORY '../escape' WITH PREFIX 'http://foo.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +INSTALL some_extension FROM acme +-- +ok +== +INSTALL some_extension FROM 'acme' +-- +ok +== +DROP EXTENSION REPOSITORY unknown_repository +-- +ok +== +DROP EXTENSION REPOSITORY IF EXISTS unknown_repository +-- +ok +== +DROP EXTENSION REPOSITORY acme +-- +ok +== +DROP EXTENSION REPOSITORY other +-- +ok +== +SELECT count(*) FROM duckdb_extension_repositories() WHERE type='USER_PROVIDED' +-- +ok +== +SELECT repository_name, type, key_fingerprints FROM duckdb_extension_repositories() WHERE repository_name IN ('core', 'community') +-- +ok +== +LOAD some_extension FROM not_a_repo +-- +ok +== +LOAD some_extension FROM acme +-- +ok +== +COPY (SELECT '{"version":1,"name":"core","url":"http://evil.example.com","public_keys":["MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB"]}') TO '{TEST_DIR}/extension_repositories/core.duckdb_extension.repo.json' (FORMAT csv, HEADER false, QUOTE '') +-- +ok +== +SELECT repository_name, type, key_fingerprints FROM duckdb_extension_repositories() WHERE repository_name='core' +-- +ok +== +SELECT count(*) FROM duckdb_extension_repositories() WHERE prefix='http://evil.example.com' +-- +ok +== +SET allow_extension_repositories='undecided' +-- +ok +== +SELECT repository_name FROM duckdb_extension_repositories() WHERE type='USER_PROVIDED' +-- +ok +== +SET allow_extension_repositories='forbidden' +-- +ok +== +CREATE EXTENSION REPOSITORY foo WITH PREFIX 'http://foo.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +SET allow_extension_repositories='allowed' +-- +ok +== diff --git a/parser/testdata/corpus/sql/extensions/extension_repositories_lock.test b/parser/testdata/corpus/sql/extensions/extension_repositories_lock.test new file mode 100644 index 0000000..47fbbf8 --- /dev/null +++ b/parser/testdata/corpus/sql/extensions/extension_repositories_lock.test @@ -0,0 +1,17 @@ +# source: test/sql/extensions/extension_repositories_lock.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET extension_repository_directory='{TEST_DIR}/extension_repositories_lock' +-- +ok +== +SET lock_configuration=true +-- +ok +== +CREATE EXTENSION REPOSITORY evil WITH PREFIX 'http://evil.com' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== diff --git a/parser/testdata/corpus/sql/extensions/extension_repository_not_autoloaded.test b/parser/testdata/corpus/sql/extensions/extension_repository_not_autoloaded.test new file mode 100644 index 0000000..a42bc4d --- /dev/null +++ b/parser/testdata/corpus/sql/extensions/extension_repository_not_autoloaded.test @@ -0,0 +1,37 @@ +# source: test/sql/extensions/extension_repository_not_autoloaded.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET extension_directory='{TEST_DIR}/repo_not_autoloaded' +-- +ok +== +SET extension_repository_directory='{TEST_DIR}/repo_not_autoloaded_repos' +-- +ok +== +CREATE EXTENSION REPOSITORY myrepo WITH PREFIX '{TEST_DIR}/repo_not_autoloaded_prefix' USING PUBLIC KEY 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9+KeDkWJa7SiBb7AMdXAPV2qpRunztoC2c7DtRmN9+Lq2YQm4rMQmmAQcwyxTxcK8vwPKOiE4mLMwmQMvTty9tL+buREfvg5KJ+FY3Bv05cZYsf7VuYgUDcw41zSEE5W1thh5PiafcrMn7CPF0jN0oFfVvAHB/fAM0yaZGPKs3WYqnHAHa6v/cVMeiWZ/lQORCBqqL2hii1fEiuIqw6AOEoZVsN0/lqm7GfnD899zrzLOPRuP4YFg46drL1UyNdg+4TquJ2OV9kR4CAfdGRexqHFWLmoxkTfnUxJ4yL+gkV57K1H+smEdKrDhDX68pEFM/34E2eVKZoRU/0paxDZQIDAQAB' +-- +ok +== +INSTALL some_ext FROM myrepo +-- +ok +== +SELECT count(*) FROM glob('{TEST_DIR}/repo_not_autoloaded/*/*/repositories/myrepo') +-- +ok +== +LOAD some_ext FROM myrepo +-- +ok +== +LOAD some_ext +-- +ok +== +SET extension_directory='{TEST_DIR}/repo_not_autoloaded/v0/plat/repositories/myrepo' +-- +ok +== diff --git a/parser/testdata/corpus/sql/extensions/load_arbitrary_path.test b/parser/testdata/corpus/sql/extensions/load_arbitrary_path.test index 227174b..9ea2ec2 100644 --- a/parser/testdata/corpus/sql/extensions/load_arbitrary_path.test +++ b/parser/testdata/corpus/sql/extensions/load_arbitrary_path.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/load_arbitrary_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit LOAD 'folder/a.csv'; diff --git a/parser/testdata/corpus/sql/extensions/load_use_extension_one_query.test b/parser/testdata/corpus/sql/extensions/load_use_extension_one_query.test index c0f8daa..60ab931 100644 --- a/parser/testdata/corpus/sql/extensions/load_use_extension_one_query.test +++ b/parser/testdata/corpus/sql/extensions/load_use_extension_one_query.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/load_use_extension_one_query.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit LOAD '{BUILD_DIRECTORY}/test/extension/loadable_extension_demo.duckdb_extension'; quack quack quack; diff --git a/parser/testdata/corpus/sql/extensions/permissions_duckdb_extension.test b/parser/testdata/corpus/sql/extensions/permissions_duckdb_extension.test index ad2524d..5653cf3 100644 --- a/parser/testdata/corpus/sql/extensions/permissions_duckdb_extension.test +++ b/parser/testdata/corpus/sql/extensions/permissions_duckdb_extension.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/permissions_duckdb_extension.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 42) TO '{TEMP_DIR}/name.duckdb_extension'; @@ -19,6 +19,34 @@ COPY (SELECT NULL::BLOB) TO '{TEMP_DIR}/name.duckdb_extensionz' (FORMAT BLOB); -- ok == +COPY (SELECT 42) TO '{TEMP_DIR}/name.duckdb_extension.info' (FORMAT CSV); +-- +ok +== +COPY (SELECT 42) TO '{TEMP_DIR}/acme.duckdb_extension.repo.json' (FORMAT CSV); +-- +ok +== +COPY (SELECT 42) TO '{TEMP_DIR}/name.duckdb_extension.anything' (FORMAT CSV); +-- +ok +== +COPY (SELECT 42) TO '{TEMP_DIR}/name.duckdb_extensionz.info' (FORMAT CSV); +-- +ok +== +COPY (SELECT 42) TO '{TEMP_DIR}/name.duckdb_extension_repo.json' (FORMAT CSV); +-- +ok +== +COPY (SELECT 42) TO '{TEMP_DIR}/duckdb_extension.csv' (FORMAT CSV); +-- +ok +== +ATTACH '{TEMP_DIR}/my_name.duckdb_extension.info' +-- +ok +== ATTACH '{TEMP_DIR}/my_name.duckdb_extension' -- ok diff --git a/parser/testdata/corpus/sql/extensions/quack_peeling.test b/parser/testdata/corpus/sql/extensions/quack_peeling.test index 4f2f2c5..4361e15 100644 --- a/parser/testdata/corpus/sql/extensions/quack_peeling.test +++ b/parser/testdata/corpus/sql/extensions/quack_peeling.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/quack_peeling.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit LOAD '{BUILD_DIRECTORY}/test/extension/loadable_extension_demo.duckdb_extension'; @@ -13,7 +13,7 @@ error: Parser Error: syntax error at or near "quack" == QUACK quack QuAcK; -- -error: Parser Error: syntax error at or near "quack" +error: Parser Error: syntax error at or near "QUACK" == quack quack quack; SELECT 42; -- @@ -45,5 +45,5 @@ error: Parser Error: syntax error at or near "quack" == quak SELECT 32; -- -error: Parser Error: syntax error at or near "SELECT" +error: Parser Error: syntax error at or near "quak" == diff --git a/parser/testdata/corpus/sql/extensions/require_direct_load.test b/parser/testdata/corpus/sql/extensions/require_direct_load.test new file mode 100644 index 0000000..60151b5 --- /dev/null +++ b/parser/testdata/corpus/sql/extensions/require_direct_load.test @@ -0,0 +1,13 @@ +# source: test/sql/extensions/require_direct_load.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) +FROM duckdb_extensions() +WHERE extension_name = 'tpcds' + AND loaded + AND install_mode IN ('NOT_INSTALLED', 'STATICALLY_LINKED'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/extensions/sqlite_alter_table_add_pk.test b/parser/testdata/corpus/sql/extensions/sqlite_alter_table_add_pk.test index 2f2bc9a..d2013df 100644 --- a/parser/testdata/corpus/sql/extensions/sqlite_alter_table_add_pk.test +++ b/parser/testdata/corpus/sql/extensions/sqlite_alter_table_add_pk.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/sqlite_alter_table_add_pk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/my_sqlite' AS sqlite_db (TYPE SQLITE); diff --git a/parser/testdata/corpus/sql/extensions/version_is_valid_sqlite.test b/parser/testdata/corpus/sql/extensions/version_is_valid_sqlite.test index 2f574d3..8716a11 100644 --- a/parser/testdata/corpus/sql/extensions/version_is_valid_sqlite.test +++ b/parser/testdata/corpus/sql/extensions/version_is_valid_sqlite.test @@ -1,6 +1,6 @@ # source: test/sql/extensions/version_is_valid_sqlite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET GLOBAL sqlite_all_varchar = true; diff --git a/parser/testdata/corpus/sql/filter/filter_cache.test b/parser/testdata/corpus/sql/filter/filter_cache.test index 094d8fe..f822477 100644 --- a/parser/testdata/corpus/sql/filter/filter_cache.test +++ b/parser/testdata/corpus/sql/filter/filter_cache.test @@ -1,6 +1,6 @@ # source: test/sql/filter/filter_cache.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT a FROM generate_series(0, 9999, 1) tbl(a), generate_series(0, 9, 1) tbl2(b); diff --git a/parser/testdata/corpus/sql/filter/filter_cache_dictionary.test b/parser/testdata/corpus/sql/filter/filter_cache_dictionary.test index 5afff9f..1c04bd5 100644 --- a/parser/testdata/corpus/sql/filter/filter_cache_dictionary.test +++ b/parser/testdata/corpus/sql/filter/filter_cache_dictionary.test @@ -1,6 +1,6 @@ # source: test/sql/filter/filter_cache_dictionary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='dictionary' @@ -56,7 +56,3 @@ SELECT count(*), sum(id) FROM t WHERE id % 100 = 7 -- ok == -SET disabled_optimizers='' --- -ok -== diff --git a/parser/testdata/corpus/sql/filter/null_selection.test b/parser/testdata/corpus/sql/filter/null_selection.test new file mode 100644 index 0000000..7d7b4e0 --- /dev/null +++ b/parser/testdata/corpus/sql/filter/null_selection.test @@ -0,0 +1,177 @@ +# source: test/sql/filter/null_selection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE null_inputs AS +SELECT i, + CASE WHEN i%4<>0 THEN i END AS n, + CASE WHEN i%4<>0 THEN repeat('value', 5) || i::VARCHAR END AS s, + CASE WHEN i%4<>0 THEN [CASE WHEN i%7<>0 THEN i END] END AS l, + CASE WHEN i%4<>0 THEN {'v': CASE WHEN i%7<>0 THEN i END} END AS st, + CASE WHEN i%4<>0 THEN map(['v'], [CASE WHEN i%7<>0 THEN i END]) END AS m +FROM range(5003) t(i); +-- +ok +== +SET debug_verify_vector='{mode}'; +-- +ok +== +WITH actual AS ( + SELECT 0 AS kind, i FROM null_inputs WHERE {col} IS NULL + UNION ALL + SELECT 1, i FROM null_inputs WHERE {col} IS NOT NULL + UNION ALL + SELECT 2, i FROM null_inputs WHERE i%3=1 AND {col} IS NULL + UNION ALL + SELECT 3, i FROM null_inputs WHERE {col} IS NOT NULL AND i%3=1 + UNION ALL + SELECT 4, i FROM null_inputs + WHERE (i%3=1 AND {col} IS NULL) OR (i%5=2 AND {col} IS NOT NULL) +), expected AS ( + SELECT 0 AS kind, i FROM null_inputs WHERE i%4=0 + UNION ALL + SELECT 1, i FROM null_inputs WHERE i%4<>0 + UNION ALL + SELECT 2, i FROM null_inputs WHERE i%3=1 AND i%4=0 + UNION ALL + SELECT 3, i FROM null_inputs WHERE i%4<>0 AND i%3=1 + UNION ALL + SELECT 4, i FROM null_inputs + WHERE (i%3=1 AND i%4=0) OR (i%5=2 AND i%4<>0) +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM null_inputs WHERE + CASE WHEN i%3=1 THEN 10 + WHEN {col} IS NULL THEN 20 + WHEN i%5=2 OR {col} IS NOT NULL THEN 30 + ELSE 40 END + IS DISTINCT FROM + CASE WHEN i%3=1 THEN 10 + WHEN i%4=0 THEN 20 + WHEN i%5=2 OR i%4<>0 THEN 30 + ELSE 40 END; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM null_inputs WHERE + CASE WHEN i%3=1 THEN {col} + ELSE COALESCE({col}, (SELECT {col} FROM null_inputs WHERE i=1)) END IS NULL; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*), sum(i) FROM null_inputs +WHERE i%5=2 AND NULL::INTEGER IS NULL AND 42 IS NOT NULL; +-- +ok +== +SELECT count(*) FROM null_inputs WHERE 42 IS NULL OR NULL::INTEGER IS NOT NULL; +-- +ok +== +SELECT count(*) FROM null_inputs WHERE i<0 AND CAST(s AS INTEGER) IS NULL; +-- +ok +== +RESET debug_verify_vector; +-- +ok +== +SELECT count(*) FROM null_inputs WHERE CAST(s AS INTEGER) IS NULL; +-- +ok +== +SELECT count(*), sum(i) FROM null_inputs +WHERE TRY_CAST(s AS INTEGER) IS NULL; +-- +ok +== +CREATE SEQUENCE null_selection_seq; +-- +ok +== +SELECT count(*) FROM range(5003) WHERE nextval('null_selection_seq') IS NOT NULL; +-- +ok +== +SELECT currval('null_selection_seq'); +-- +ok +== +SELECT count(*) FROM range(5003) WHERE nextval('null_selection_seq') IS NULL; +-- +ok +== +WITH actual AS ( + SELECT true AS is_null, n FROM test_vector_types(NULL::INTEGER, all_flat=false) t(n) WHERE n IS NULL + UNION ALL + SELECT false AS is_null, n FROM test_vector_types(NULL::INTEGER, all_flat=false) t(n) WHERE n IS NOT NULL +), expected AS ( + SELECT n IS NULL AS is_null, n FROM test_vector_types(NULL::INTEGER, all_flat=true) t(n) +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +ok +== +DROP TABLE null_inputs; +-- +ok +== +DROP SEQUENCE null_selection_seq; +-- +ok +== +SET force_compression='rle'; +-- +ok +== +CREATE TABLE null_runs AS +SELECT i, CASE WHEN i%7<>0 THEN i%31 END AS n FROM range(20003) t(i); +-- +ok +== +WITH actual AS ( + SELECT i FROM null_runs WHERE n IS NULL OR (n IS NOT NULL AND n%3=0) +), expected AS ( + SELECT i FROM null_runs WHERE i%7=0 OR (i%7<>0 AND (i%31)%3=0) +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +ok +== +SELECT count(*) FROM null_runs WHERE n IS NULL; +-- +ok +== +SELECT count(*) FROM null_runs WHERE n IS NOT NULL; +-- +ok +== +CREATE TABLE non_null_runs AS SELECT i AS n FROM range(20003) t(i); +-- +ok +== +SELECT count(*), sum(n) FROM non_null_runs WHERE NULLIF(n,7) IS NOT NULL; +-- +ok +== +SELECT count(*), sum(n) FROM non_null_runs WHERE NULLIF(n,7) IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/filter/test_alias_filter.test b/parser/testdata/corpus/sql/filter/test_alias_filter.test index 7384b55..1dbe7f2 100644 --- a/parser/testdata/corpus/sql/filter/test_alias_filter.test +++ b/parser/testdata/corpus/sql/filter/test_alias_filter.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_alias_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i % 2 AS k FROM integers WHERE k<>0; diff --git a/parser/testdata/corpus/sql/filter/test_columns_filter.test b/parser/testdata/corpus/sql/filter/test_columns_filter.test new file mode 100644 index 0000000..53a116d --- /dev/null +++ b/parser/testdata/corpus/sql/filter/test_columns_filter.test @@ -0,0 +1,50 @@ +# source: test/sql/filter/test_columns_filter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) +FROM (VALUES (1, 10, 100), (2, NULL, 200), (3, 30, NULL)) v(x, a, b); +-- +ok +== +SELECT coalesce(sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL), 0) +FROM (VALUES (1, 10, 100), (2, NULL, 200), (3, 30, NULL)) v(x, a, b); +-- +ok +== +SELECT sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) OVER () +FROM (VALUES (1, 10, 100), (2, NULL, 200), (3, 30, NULL)) v(x, a, b); +-- +ok +== +SELECT g, sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) AS s +FROM (VALUES (1, 1000, NULL, 1), (1, 1, 1, 1), (2, 100, 1, 1)) v(g, x, a, b) +GROUP BY g +ORDER BY sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL); +-- +ok +== +SELECT DISTINCT ON (sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL)) g, + sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) AS s +FROM (VALUES (1, 1, 1, NULL), (1, 1, NULL, 1), (2, 1, 1, 1), (2, 1, NULL, NULL)) v(g, x, a, b) +GROUP BY g +ORDER BY sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) DESC, g; +-- +ok +== +SELECT g, sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) AS s +FROM (VALUES (1, 1, 1, NULL), (1, 1, NULL, 1), (2, 1, 1, 1), (2, 1, NULL, NULL)) v(g, x, a, b) +GROUP BY g +HAVING sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) > 0 +ORDER BY g; +-- +ok +== +SELECT g, x +FROM (VALUES (1, 1, 1, NULL), (1, 1, NULL, 1), (2, 1, 1, 1), (2, 1, NULL, NULL)) v(g, x, a, b) +QUALIFY sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) OVER (PARTITION BY g) > 0 +ORDER BY g, x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/filter/test_constant_comparisons.test b/parser/testdata/corpus/sql/filter/test_constant_comparisons.test index 7271a14..6c5934a 100644 --- a/parser/testdata/corpus/sql/filter/test_constant_comparisons.test +++ b/parser/testdata/corpus/sql/filter/test_constant_comparisons.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_constant_comparisons.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(a INTEGER, b INTEGER) diff --git a/parser/testdata/corpus/sql/filter/test_dynamic_filter_nullable.test b/parser/testdata/corpus/sql/filter/test_dynamic_filter_nullable.test new file mode 100644 index 0000000..1a24cee --- /dev/null +++ b/parser/testdata/corpus/sql/filter/test_dynamic_filter_nullable.test @@ -0,0 +1,13 @@ +# source: test/sql/filter/test_dynamic_filter_nullable.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t0(c3 JSON); +-- +ok +== +SELECT 'x'::BLOB AS c0 UNION ALL SELECT c3 FROM t0 ORDER BY c0 LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/filter/test_expression_executor_select.test b/parser/testdata/corpus/sql/filter/test_expression_executor_select.test index 99efafb..d1eb801 100644 --- a/parser/testdata/corpus/sql/filter/test_expression_executor_select.test +++ b/parser/testdata/corpus/sql/filter/test_expression_executor_select.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_expression_executor_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE const_eq AS diff --git a/parser/testdata/corpus/sql/filter/test_illegal_filters.test b/parser/testdata/corpus/sql/filter/test_illegal_filters.test index 53b2164..aded11a 100644 --- a/parser/testdata/corpus/sql/filter/test_illegal_filters.test +++ b/parser/testdata/corpus/sql/filter/test_illegal_filters.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_illegal_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE SUM(a)>10 diff --git a/parser/testdata/corpus/sql/filter/test_last_option_corruption.test b/parser/testdata/corpus/sql/filter/test_last_option_corruption.test index 29259b3..c1ef5fa 100644 --- a/parser/testdata/corpus/sql/filter/test_last_option_corruption.test +++ b/parser/testdata/corpus/sql/filter/test_last_option_corruption.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_last_option_corruption.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('binary_as_string')::BOOLEAN; diff --git a/parser/testdata/corpus/sql/filter/test_like_null.test b/parser/testdata/corpus/sql/filter/test_like_null.test new file mode 100644 index 0000000..80f345b --- /dev/null +++ b/parser/testdata/corpus/sql/filter/test_like_null.test @@ -0,0 +1,61 @@ +# source: test/sql/filter/test_like_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(c1 VARCHAR); +-- +ok +== +INSERT INTO t VALUES ('Jd*q^c'),(''),('x'); +-- +ok +== +SELECT count(*) FROM t WHERE c1 ILIKE (CASE CAST(NULL AS BLOB) WHEN NULL THEN c1 END); +-- +ok +== +SELECT c1, (CASE CAST(NULL AS BLOB) WHEN NULL THEN c1 END) AS case_value, c1 ILIKE (CASE CAST(NULL AS BLOB) WHEN NULL THEN c1 END) AS predicate FROM t; +-- +ok +== +SELECT count(*) FROM t WHERE c1 ILIKE (CASE WHEN true THEN 'x' ELSE 'other' END); +-- +ok +== +SELECT count(*) FROM t WHERE c1 ILIKE (CASE WHEN false THEN 'other' ELSE 'x' END); +-- +ok +== +SELECT count(*) FROM t WHERE c1 LIKE (CASE CAST(NULL AS BLOB) WHEN NULL THEN c1 END); +-- +ok +== +SELECT count(*) FROM t WHERE c1 ILIKE (CASE WHEN false THEN c1 END); +-- +ok +== +SELECT count(*) FROM t WHERE c1 ILIKE (CASE WHEN false THEN c1 ELSE NULL END); +-- +ok +== +SELECT count(*) FROM t WHERE c1 ILIKE NULL; +-- +ok +== +SELECT count(*) FROM t WHERE c1 NOT ILIKE NULL; +-- +ok +== +SELECT count(*) FROM t WHERE c1 LIKE NULL; +-- +ok +== +SELECT count(*) FROM t WHERE c1 NOT LIKE NULL; +-- +ok +== +SELECT 'x' LIKE NULL, 'x' NOT LIKE NULL, 'x' ILIKE NULL, 'x' NOT ILIKE NULL, NULL LIKE NULL, NULL ILIKE NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/filter/test_obsolete_filters.test b/parser/testdata/corpus/sql/filter/test_obsolete_filters.test index 25112d5..756c627 100644 --- a/parser/testdata/corpus/sql/filter/test_obsolete_filters.test +++ b/parser/testdata/corpus/sql/filter/test_obsolete_filters.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_obsolete_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 10), (2, 12), (3, 14), (4, 16), (5, NULL), (NULL, NULL) diff --git a/parser/testdata/corpus/sql/filter/test_or_pushdown.test b/parser/testdata/corpus/sql/filter/test_or_pushdown.test index 335f566..d7cd6c6 100644 --- a/parser/testdata/corpus/sql/filter/test_or_pushdown.test +++ b/parser/testdata/corpus/sql/filter/test_or_pushdown.test @@ -1,12 +1,8 @@ # source: test/sql/filter/test_or_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -PRAGMA explain_output = PHYSICAL_ONLY; --- -ok -== create table t1 as select range a, 'foo' || (range%100)::VARCHAR b, 100000-range c, timestamp '1992-01-01' + interval (range * 20) minute d from range(900000); -- ok diff --git a/parser/testdata/corpus/sql/filter/test_struct_pushdown.test b/parser/testdata/corpus/sql/filter/test_struct_pushdown.test index eb03ab1..b3dcc92 100644 --- a/parser/testdata/corpus/sql/filter/test_struct_pushdown.test +++ b/parser/testdata/corpus/sql/filter/test_struct_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_struct_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_structs(i STRUCT(a integer, b bool)); diff --git a/parser/testdata/corpus/sql/filter/test_throwing_filter_pushdown.test b/parser/testdata/corpus/sql/filter/test_throwing_filter_pushdown.test new file mode 100644 index 0000000..a489c18 --- /dev/null +++ b/parser/testdata/corpus/sql/filter/test_throwing_filter_pushdown.test @@ -0,0 +1,51 @@ +# source: test/sql/filter/test_throwing_filter_pushdown.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE dict_strings AS + SELECT (i % 5)::INTEGER AS id, CASE WHEN i % 5 = 0 THEN 'not_a_number' ELSE ((i % 5) * 10)::VARCHAR END AS s + FROM range(100000) t(i) +-- +ok +== +CREATE TABLE rle_values AS + SELECT (i // 20000)::INTEGER AS grp, CASE WHEN i < 20000 THEN 100000 ELSE 5 END::INTEGER AS val + FROM range(100000) t(i) +-- +ok +== +SELECT count(*) > 0 FROM pragma_storage_info('dict_strings') +WHERE column_name = 's' AND compression IN ('DICT_FSST', 'Dictionary') +-- +ok +== +SELECT count(*) > 0 FROM pragma_storage_info('rle_values') WHERE column_name = 'val' AND compression = 'RLE' +-- +ok +== +SELECT count(*) FROM dict_strings WHERE id <> 0 AND s::INT = 10 +-- +ok +== +SELECT count(*) FROM rle_values WHERE grp <> 0 AND val::TINYINT = 5 +-- +ok +== +COPY (SELECT CASE WHEN i < 50000 THEN (i % 100)::VARCHAR ELSE 'not_a_number' END AS s FROM range(100000) t(i)) + TO '{TEST_DIR}/throwing_filter_pushdown.parquet' (FORMAT parquet) +-- +ok +== +SELECT s FROM '{TEST_DIR}/throwing_filter_pushdown.parquet' WHERE s::INT = 10 LIMIT 1 +-- +ok +== +SELECT count(*) FROM dict_strings WHERE s::INT = 10 +-- +ok +== +SELECT count(*) FROM '{TEST_DIR}/throwing_filter_pushdown.parquet' WHERE s::INT = 10 +-- +ok +== diff --git a/parser/testdata/corpus/sql/filter/test_transitive_filters.test b/parser/testdata/corpus/sql/filter/test_transitive_filters.test index fc79b82..4419173 100644 --- a/parser/testdata/corpus/sql/filter/test_transitive_filters.test +++ b/parser/testdata/corpus/sql/filter/test_transitive_filters.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_transitive_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE vals1 AS SELECT i AS i, i AS j FROM range(0, 11, 1) t1(i) diff --git a/parser/testdata/corpus/sql/filter/test_try_filter_doesnt_mutate_columns.test b/parser/testdata/corpus/sql/filter/test_try_filter_doesnt_mutate_columns.test index f51450d..d90ac82 100644 --- a/parser/testdata/corpus/sql/filter/test_try_filter_doesnt_mutate_columns.test +++ b/parser/testdata/corpus/sql/filter/test_try_filter_doesnt_mutate_columns.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_try_filter_doesnt_mutate_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 INT, c1 INT); diff --git a/parser/testdata/corpus/sql/filter/test_variant_filter.test b/parser/testdata/corpus/sql/filter/test_variant_filter.test index c55e41b..fbcf968 100644 --- a/parser/testdata/corpus/sql/filter/test_variant_filter.test +++ b/parser/testdata/corpus/sql/filter/test_variant_filter.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_variant_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte as ( diff --git a/parser/testdata/corpus/sql/filter/test_zonemap_disjunctions.test b/parser/testdata/corpus/sql/filter/test_zonemap_disjunctions.test new file mode 100644 index 0000000..8f57e59 --- /dev/null +++ b/parser/testdata/corpus/sql/filter/test_zonemap_disjunctions.test @@ -0,0 +1,53 @@ +# source: test/sql/filter/test_zonemap_disjunctions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TEMPORARY TABLE t AS SELECT range a, length(range::VARCHAR) b, mod(range,10000) c, 5 d, 10000 e FROM range(1000000); +-- +ok +== +select count(*) from t where a > 500 or a <= 700 +-- +ok +== +explain select count(*) from t where (a > 500 and b = 3) or (a > 7000 and b = 2) +-- +ok +== +select count(*) from t where (a > 500 and b = 3) or (a > 7000 and b = 2) +-- +ok +== +explain select count(*) from t where (a > 500 AND b = 3) OR (a > 400) OR (a > 300 AND b=4) OR (a > 600 AND a > 300) +-- +ok +== +select count(*) from t where (a > 500 AND b = 3) OR (a > 400) OR (a > 300 AND b=4) OR (a > 600 AND a > 300) +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE (a > 500 AND b = 3) OR (c = 100) OR (a > 300 AND b = 4) OR (a > 600 AND a > 300); +-- +ok +== +SELECT count(*) FROM t WHERE (a > 500 AND b = 3) OR (c = 100) OR (a > 300 AND b = 4) OR (a > 600 AND a > 300); +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE (a > 500 AND b = 3) OR (c = 400) OR (a > 300 AND b = 4) OR (a > 600 AND a > 300) OR (d < 10); +-- +ok +== +SELECT count(*) FROM t WHERE (a > 500 AND b = 3) OR (c = 400) OR (a > 300 AND b = 4) OR (a > 600 AND a > 300) OR (d < 10); +-- +ok +== +explain select count(*) from t where (a > 500 AND b = 1) OR b < 2 +-- +ok +== +select count(*) from t where (a > 500 AND b = 1) OR b < 2 +-- +ok +== diff --git a/parser/testdata/corpus/sql/filter/test_zonemap_segment.test b/parser/testdata/corpus/sql/filter/test_zonemap_segment.test index a5f4f27..0cdbe6f 100644 --- a/parser/testdata/corpus/sql/filter/test_zonemap_segment.test +++ b/parser/testdata/corpus/sql/filter/test_zonemap_segment.test @@ -1,6 +1,6 @@ # source: test/sql/filter/test_zonemap_segment.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT 1 FROM range(65534); diff --git a/parser/testdata/corpus/sql/filter/transitive_filter_bounds.test b/parser/testdata/corpus/sql/filter/transitive_filter_bounds.test new file mode 100644 index 0000000..0b1ee7c --- /dev/null +++ b/parser/testdata/corpus/sql/filter/transitive_filter_bounds.test @@ -0,0 +1,153 @@ +# source: test/sql/filter/transitive_filter_bounds.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SEQUENCE transitive_calls; +-- +ok +== +SELECT i FROM range(5) t(i) WHERE i > 0 AND nextval('transitive_calls') >= i ORDER BY i; +-- +ok +== +SELECT last_value BETWEEN 4 AND 5 FROM duckdb_sequences() WHERE sequence_name='transitive_calls'; +-- +ok +== +CREATE SEQUENCE transitive_reordered_calls; +-- +ok +== +SELECT i FROM range(5) t(i) WHERE nextval('transitive_reordered_calls') >= i AND i > 0 ORDER BY i; +-- +ok +== +SELECT last_value BETWEEN 4 AND 5 FROM duckdb_sequences() WHERE sequence_name='transitive_reordered_calls'; +-- +ok +== +CREATE SEQUENCE transitive_join_calls; +-- +ok +== +SELECT i FROM range(5) t(i), range(1) u(j) +WHERE i+j > 0 AND nextval('transitive_join_calls') >= i+j ORDER BY i; +-- +ok +== +SELECT last_value BETWEEN 4 AND 5 FROM duckdb_sequences() WHERE sequence_name='transitive_join_calls'; +-- +ok +== +CREATE SEQUENCE transitive_join_bound_calls; +-- +ok +== +SELECT i FROM range(5) t(i), range(4,5) u(j) +WHERE i > 0 AND nextval('transitive_join_bound_calls') >= i AND j >= i ORDER BY i; +-- +ok +== +SELECT last_value BETWEEN 4 AND 5 FROM duckdb_sequences() WHERE sequence_name='transitive_join_bound_calls'; +-- +ok +== +SELECT i FROM (VALUES (1, '2'), (2, '2'), (3, '2'), (NULL, '2')) t(i,s) +WHERE i >= 1 AND s::INTEGER >= i ORDER BY i; +-- +ok +== +SELECT i FROM (VALUES (1, 'bad')) t(i,s) WHERE i >= 1 AND s::INTEGER >= i; +-- +ok +== +CREATE TABLE bounds(a INTEGER, b INTEGER, c INTEGER); +-- +ok +== +INSERT INTO bounds VALUES (0,0,0), (1,1,2), (1,1,2), (1,2,3), + (2,1,3), (NULL,1,2), (1,NULL,2), (1,1,NULL); +-- +ok +== +SELECT * FROM bounds WHERE a >= 0 AND b >= a AND a >= b AND c > b; +-- +ok +== +SELECT * FROM bounds WHERE a >= 1 AND b >= a AND c > a; +-- +ok +== +SELECT * FROM bounds WHERE a > 0 AND a = b AND b > a; +-- +ok +== +CREATE TABLE lhs AS SELECT * FROM (VALUES (1), (2)) t(i); +-- +ok +== +CREATE TABLE rhs AS SELECT * FROM (VALUES (0), (1), (NULL)) t(j); +-- +ok +== +SELECT i,j FROM lhs LEFT JOIN rhs ON j >= i WHERE i >= 1; +-- +ok +== +SELECT i,j FROM rhs RIGHT JOIN lhs ON j >= i WHERE i >= 1; +-- +ok +== +CREATE TABLE single_scan AS SELECT range i0, range i1, range i2, range i3, + range i4, range i5, range i6, range i7 FROM range(10); +-- +ok +== +PRAGMA explain_output='OPTIMIZED_ONLY'; +-- +ok +== +EXPLAIN SELECT * FROM single_scan +WHERE i0 >= 5 AND i1 >= i0 AND i2 >= i1 AND i3 >= i2 AND i4 >= i3 + AND i5 >= i4 AND i6 >= i5 AND i7 >= i6; +-- +ok +== +SELECT i7 FROM single_scan +WHERE i0 >= 5 AND i1 >= i0 AND i2 >= i1 AND i3 >= i2 AND i4 >= i3 + AND i5 >= i4 AND i6 >= i5 AND i7 >= i6 ORDER BY i7; +-- +ok +== +EXPLAIN SELECT * FROM single_scan, range(1) u(j) +WHERE i0 >= 5 AND i1 >= i0 AND i2 >= i1 AND i3 >= i2 AND i4 >= i3 + AND i5 >= i4 AND i6 >= i5 AND i7 >= i6 AND i0 >= j; +-- +ok +== +SELECT i7 FROM single_scan, range(1) u(j) +WHERE i0 >= 5 AND i1 >= i0 AND i2 >= i1 AND i3 >= i2 AND i4 >= i3 + AND i5 >= i4 AND i6 >= i5 AND i7 >= i6 AND i0 >= j ORDER BY i7; +-- +ok +== +SET disabled_optimizers='expression_rewriter'; +-- +ok +== +SELECT i,j FROM (VALUES (1), (2)) t(i), (VALUES (1::DOUBLE), (2::DOUBLE)) u(j) +WHERE CAST(i AS DOUBLE) >= 1::DOUBLE AND j >= CAST(i AS DOUBLE) ORDER BY i,j; +-- +ok +== +SELECT i,j FROM (VALUES (1), (2)) t(i), (VALUES (1::DOUBLE), (2::DOUBLE)) u(j) +WHERE TRY_CAST(i AS DOUBLE) >= 1::DOUBLE AND j >= TRY_CAST(i AS DOUBLE) ORDER BY i,j; +-- +ok +== +SELECT i,j FROM (VALUES (1), (2)) t(i), (VALUES (1::DOUBLE), (2::DOUBLE)) u(j) +WHERE j >= CAST(i AS DOUBLE) AND CAST(i AS DOUBLE) >= 1::DOUBLE ORDER BY i,j; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/array/array_and_map.test b/parser/testdata/corpus/sql/function/array/array_and_map.test index 58a7b7f..b32d430 100644 --- a/parser/testdata/corpus/sql/function/array/array_and_map.test +++ b/parser/testdata/corpus/sql/function/array/array_and_map.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_and_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP([MAP([ARRAY_VALUE('1', NULL), ARRAY_VALUE(NULL, '2')], [1, 2])], [1]); diff --git a/parser/testdata/corpus/sql/function/array/array_cosine_distance.test b/parser/testdata/corpus/sql/function/array/array_cosine_distance.test index ff5dc86..282ed70 100644 --- a/parser/testdata/corpus/sql/function/array/array_cosine_distance.test +++ b/parser/testdata/corpus/sql/function/array/array_cosine_distance.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_cosine_distance.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_cosine_distance([1, 2, 3]::{type}[3], [1, 2, 3]::{type}[3]); diff --git a/parser/testdata/corpus/sql/function/array/array_cosine_similarity.test b/parser/testdata/corpus/sql/function/array/array_cosine_similarity.test index cbc42ce..b2e139f 100644 --- a/parser/testdata/corpus/sql/function/array/array_cosine_similarity.test +++ b/parser/testdata/corpus/sql/function/array/array_cosine_similarity.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_cosine_similarity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_cosine_similarity([1, 2, 3]::{type}[3], [1, 2, 3]::{type}[3]); diff --git a/parser/testdata/corpus/sql/function/array/array_cosine_similarity_extreme.test b/parser/testdata/corpus/sql/function/array/array_cosine_similarity_extreme.test new file mode 100644 index 0000000..c1bc6a2 --- /dev/null +++ b/parser/testdata/corpus/sql/function/array/array_cosine_similarity_extreme.test @@ -0,0 +1,29 @@ +# source: test/sql/function/array/array_cosine_similarity_extreme.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT array_cosine_similarity([1e308,1e308,1e308]::DOUBLE[3], [1e308,1e308,1e308]::DOUBLE[3]) +-- +ok +== +SELECT array_cosine_similarity([1e-320,0,0]::DOUBLE[3], [1e-320,0,0]::DOUBLE[3]) +-- +ok +== +SELECT array_cosine_similarity([1e10,1e10,1e10]::FLOAT[3], [1e10,1e10,1e10]::FLOAT[3]) +-- +ok +== +SELECT array_cosine_distance([1e308,1e308,1e308]::DOUBLE[3], [-1e308,-1e308,-1e308]::DOUBLE[3]) +-- +ok +== +SELECT list_cosine_similarity([1e308, 1e308], [1e308, 1e308]) +-- +ok +== +SELECT isnan(array_cosine_similarity(['nan'::DOUBLE,1,1]::DOUBLE[3], [1,1,1]::DOUBLE[3])), isnan(array_cosine_similarity([0,0,0]::DOUBLE[3], [1,2,3]::DOUBLE[3])), isnan(array_cosine_distance(['inf'::DOUBLE,1,1]::DOUBLE[3], [1,1,1]::DOUBLE[3])) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/array/array_cross_product.test b/parser/testdata/corpus/sql/function/array/array_cross_product.test index fa90bf2..fb09333 100644 --- a/parser/testdata/corpus/sql/function/array/array_cross_product.test +++ b/parser/testdata/corpus/sql/function/array/array_cross_product.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_cross_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_cross_product(l, r) FROM (VALUES diff --git a/parser/testdata/corpus/sql/function/array/array_distance.test b/parser/testdata/corpus/sql/function/array/array_distance.test index 3ea9e3c..d884f59 100644 --- a/parser/testdata/corpus/sql/function/array/array_distance.test +++ b/parser/testdata/corpus/sql/function/array/array_distance.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_distance.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_distance([1, 2, 3]::{type}[3], [1, 2, 3]::{type}[3]); diff --git a/parser/testdata/corpus/sql/function/array/array_flatten.test b/parser/testdata/corpus/sql/function/array/array_flatten.test index c88de75..3fedb5d 100644 --- a/parser/testdata/corpus/sql/function/array/array_flatten.test +++ b/parser/testdata/corpus/sql/function/array/array_flatten.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_flatten.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select flatten(['a', 'b', 'c']::varchar[3]); diff --git a/parser/testdata/corpus/sql/function/array/array_inner_product.test b/parser/testdata/corpus/sql/function/array/array_inner_product.test index 09890ec..209d4a2 100644 --- a/parser/testdata/corpus/sql/function/array/array_inner_product.test +++ b/parser/testdata/corpus/sql/function/array/array_inner_product.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_inner_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_inner_product('foo', 'bar'); @@ -35,3 +35,22 @@ SELECT array_inner_product([1, 2, 3]::{type}[3], [1, 2, 3, 4]::{type}[4]); -- error: Parser Error: syntax error at or near "{" == +ATTACH '{TEST_DIR}/array_fold_validity.duckdb' AS array_fold_db (ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE TABLE array_fold_db.inputs AS +SELECT NULL::DOUBLE[2] AS a, [1::DOUBLE, 1]::DOUBLE[2] AS b +FROM range(6144) tbl(i) +-- +ok +== +SELECT count(*) FROM array_fold_db.inputs WHERE array_inner_product(a, b) IS NOT NULL; +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) FROM array_fold_db.inputs WHERE array_inner_product(a, b) IS NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/array/array_length.test b/parser/testdata/corpus/sql/function/array/array_length.test index af2c7e7..5dae37a 100644 --- a/parser/testdata/corpus/sql/function/array/array_length.test +++ b/parser/testdata/corpus/sql/function/array/array_length.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT length(array_value(1, 2, 3)); @@ -43,3 +43,23 @@ SELECT array_length(array_value(array_value(1, 2, 2), array_value(3, 4, 3)), 0); -- ok == +CREATE TABLE null_arrays AS SELECT * FROM (VALUES (1, [1, 2]::INT[2]), (2, NULL), (3, [3, 4]::INT[2])) v(id, a); +-- +ok +== +SELECT id, array_length(a), array_length(a, 1), array_length(a::INT[], 1) FROM null_arrays ORDER BY id; +-- +ok +== +SELECT id, generate_subscripts(a, 1) FROM null_arrays ORDER BY ALL; +-- +ok +== +SELECT array_length(a, NULL) FROM null_arrays ORDER BY id; +-- +ok +== +SELECT array_length(a, 2) FROM null_arrays; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/array/array_list_functions.test b/parser/testdata/corpus/sql/function/array/array_list_functions.test index 3d0eda7..fbd9ded 100644 --- a/parser/testdata/corpus/sql/function/array/array_list_functions.test +++ b/parser/testdata/corpus/sql/function/array/array_list_functions.test @@ -1,6 +1,6 @@ # source: test/sql/function/array/array_list_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_distinct(array_value(1,1,2,3,3)) = list_distinct([1,1,2,3,3]); diff --git a/parser/testdata/corpus/sql/function/array/array_value_size_mismatch.test b/parser/testdata/corpus/sql/function/array/array_value_size_mismatch.test new file mode 100644 index 0000000..4274843 --- /dev/null +++ b/parser/testdata/corpus/sql/function/array/array_value_size_mismatch.test @@ -0,0 +1,29 @@ +# source: test/sql/function/array/array_value_size_mismatch.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT array_value(array_value(1, 2), array_value(3, 4, 3)); +-- +ok +== +CREATE TABLE t(a INT[2], b INT[3]); +-- +ok +== +INSERT INTO t VALUES ([1, 2], [3, 4, 5]); +-- +ok +== +SELECT array_value(a, b) FROM t; +-- +ok +== +SELECT TRY(array_value(a, b)) FROM t; +-- +ok +== +SELECT array_value(b, b) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/autocomplete/alter_table.test b/parser/testdata/corpus/sql/function/autocomplete/alter_table.test index 73c3035..59eab19 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/alter_table.test +++ b/parser/testdata/corpus/sql/function/autocomplete/alter_table.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/alter_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE my_table(first_column bigint); diff --git a/parser/testdata/corpus/sql/function/autocomplete/copy.test b/parser/testdata/corpus/sql/function/autocomplete/copy.test index 4e9adf5..25150f7 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/copy.test +++ b/parser/testdata/corpus/sql/function/autocomplete/copy.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('COP') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/create_function.test b/parser/testdata/corpus/sql/function/autocomplete/create_function.test index 7d73c70..ccc4bd2 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/create_function.test +++ b/parser/testdata/corpus/sql/function/autocomplete/create_function.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/create_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE MA') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/create_schema.test b/parser/testdata/corpus/sql/function/autocomplete/create_schema.test index 63750b6..2badfdc 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/create_schema.test +++ b/parser/testdata/corpus/sql/function/autocomplete/create_schema.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/create_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start, suggestion_type FROM sql_auto_complete('CREATE SCH') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/create_sequence.test b/parser/testdata/corpus/sql/function/autocomplete/create_sequence.test index cfe3ea7..ba197e9 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/create_sequence.test +++ b/parser/testdata/corpus/sql/function/autocomplete/create_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/create_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE SEQ') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/create_table.test b/parser/testdata/corpus/sql/function/autocomplete/create_table.test index 2df8463..385c706 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/create_table.test +++ b/parser/testdata/corpus/sql/function/autocomplete/create_table.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/create_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('CR') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/create_type.test b/parser/testdata/corpus/sql/function/autocomplete/create_type.test index 53be38b..4e00b5c 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/create_type.test +++ b/parser/testdata/corpus/sql/function/autocomplete/create_type.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/create_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE TY') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/drop.test b/parser/testdata/corpus/sql/function/autocomplete/drop.test index 2299a46..d2188b9 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/drop.test +++ b/parser/testdata/corpus/sql/function/autocomplete/drop.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/drop.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('DRO') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/explain_sql.test b/parser/testdata/corpus/sql/function/autocomplete/explain_sql.test new file mode 100644 index 0000000..5a82cf2 --- /dev/null +++ b/parser/testdata/corpus/sql/function/autocomplete/explain_sql.test @@ -0,0 +1,19 @@ +# source: test/sql/function/autocomplete/explain_sql.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT sum(i) AS total FROM range(5) t(i) WHERE i > 1; +-- +ok +== +CREATE TABLE formatted_completion(format_me INTEGER); +-- +ok +== +SELECT suggestion_start FROM sql_auto_complete(' +SELECT + format_m') WHERE suggestion='format_me'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/autocomplete/expressions.test b/parser/testdata/corpus/sql/function/autocomplete/expressions.test index 7528012..1c4dfdd 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/expressions.test +++ b/parser/testdata/corpus/sql/function/autocomplete/expressions.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT NULL FR') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/hidden_database.test b/parser/testdata/corpus/sql/function/autocomplete/hidden_database.test new file mode 100644 index 0000000..417744c --- /dev/null +++ b/parser/testdata/corpus/sql/function/autocomplete/hidden_database.test @@ -0,0 +1,13 @@ +# source: test/sql/function/autocomplete/hidden_database.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM sql_auto_complete('SELECT * FROM hidden_') WHERE suggestion LIKE 'hidden_db%' +-- +ok +== +SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM shown_') LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/autocomplete/identical_schema_table.test b/parser/testdata/corpus/sql/function/autocomplete/identical_schema_table.test index b00434d..216fa14 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/identical_schema_table.test +++ b/parser/testdata/corpus/sql/function/autocomplete/identical_schema_table.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/identical_schema_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA my_catalog_entry; diff --git a/parser/testdata/corpus/sql/function/autocomplete/insert_into.test b/parser/testdata/corpus/sql/function/autocomplete/insert_into.test index 737ef95..3fb08ab 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/insert_into.test +++ b/parser/testdata/corpus/sql/function/autocomplete/insert_into.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/insert_into.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('INS') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/pragma.test b/parser/testdata/corpus/sql/function/autocomplete/pragma.test index 559af57..a086d5e 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/pragma.test +++ b/parser/testdata/corpus/sql/function/autocomplete/pragma.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/pragma.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('PRAGMA show_t') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/scalar_functions.test b/parser/testdata/corpus/sql/function/autocomplete/scalar_functions.test index dd22f9a..9bf1410 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/scalar_functions.test +++ b/parser/testdata/corpus/sql/function/autocomplete/scalar_functions.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/scalar_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('select gam') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/select.test b/parser/testdata/corpus/sql/function/autocomplete/select.test index cc7e1cf..57a930e 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/select.test +++ b/parser/testdata/corpus/sql/function/autocomplete/select.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('SEL') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/setting.test b/parser/testdata/corpus/sql/function/autocomplete/setting.test index 8396d3d..25d7039 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/setting.test +++ b/parser/testdata/corpus/sql/function/autocomplete/setting.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/setting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('SET e_directory') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/show.test b/parser/testdata/corpus/sql/function/autocomplete/show.test index 2b84458..32c1c8e 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/show.test +++ b/parser/testdata/corpus/sql/function/autocomplete/show.test @@ -1,17 +1,17 @@ # source: test/sql/function/autocomplete/show.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('DESCR') LIMIT 1; -- ok == -SELECT suggestion, suggestion_start FROM sql_auto_complete('SHOW my_') LIMIT 1; +SELECT suggestion, suggestion_start FROM sql_auto_complete('DESCRIBE my_') LIMIT 1; -- ok == -SELECT suggestion, suggestion_start FROM sql_auto_complete('SHOW my_s') LIMIT 1; +SELECT suggestion, suggestion_start FROM sql_auto_complete('DESCRIBE my_s') LIMIT 1; -- ok == @@ -19,3 +19,59 @@ SELECT suggestion, suggestion_start FROM sql_auto_complete('DESCRIBE my_schema.t -- ok == +SELECT suggestion, suggestion_start FROM sql_auto_complete('SHOW thr') LIMIT 1; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW data') WHERE suggestion = 'databases '; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW sch') WHERE suggestion = 'schemas '; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW vari') WHERE suggestion = 'variables '; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW tab') WHERE suggestion = 'tables '; +-- +ok +== +CREATE TABLE thermostat(id INTEGER); +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW therm') WHERE suggestion = 'thermostat'; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW thr') WHERE suggestion = 'threads'; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('DESCRIBE thr') WHERE suggestion = 'threads'; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SUMMARIZE thr') WHERE suggestion = 'threads'; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('DESCRIBE therm') WHERE suggestion = 'thermostat'; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SHOW ') WHERE suggestion = '('; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('DESCRIBE ') WHERE suggestion = '('; +-- +ok +== +SELECT count(*) FROM sql_auto_complete('SUMMARIZE ') WHERE suggestion = '('; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/autocomplete/sql_format.test b/parser/testdata/corpus/sql/function/autocomplete/sql_format.test index 00ff7b1..51f8f84 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/sql_format.test +++ b/parser/testdata/corpus/sql/function/autocomplete/sql_format.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/sql_format.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT duckdb_format_sql('select a,b,c from t where x=1 and y=2 group by a,b order by a desc limit 10') = $$SELECT a, b, c diff --git a/parser/testdata/corpus/sql/function/autocomplete/sql_format_literals.test b/parser/testdata/corpus/sql/function/autocomplete/sql_format_literals.test new file mode 100644 index 0000000..29ccea5 --- /dev/null +++ b/parser/testdata/corpus/sql/function/autocomplete/sql_format_literals.test @@ -0,0 +1,89 @@ +# source: test/sql/function/autocomplete/sql_format_literals.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT duckdb_format_sql($query$SELECT 'a + b + c'$query$) = $query$SELECT 'a + b + c'$query$; +-- +ok +== +SELECT duckdb_format_sql($query$SELECT 42 AS "a + b + c"$query$) = $query$SELECT 42 AS "a + b + c"$query$; +-- +ok +== +SELECT duckdb_format_sql($query$SELECT 42 AS `a + b + c`$query$) = $query$SELECT 42 AS `a + b + c`$query$; +-- +ok +== +SELECT duckdb_format_sql($query$SELECT $$a + b + c$$$query$) = $query$SELECT $$a + b + c$$$query$; +-- +ok +== +SELECT * FROM query(duckdb_format_sql($query$SELECT $value$CASE WHEN x THEN x ELSE y END$value$ AS s$query$, MAP {'inline_threshold': '20'})); +-- +ok +== +SELECT * FROM query(duckdb_format_sql($query$SELECT coalesce($value$x, (y,z), CASE WHEN x THEN y END$value$, 'fallback') AS s$query$, MAP {'inline_threshold': '20'})); +-- +ok +== +SELECT * FROM query(duckdb_format_sql('SELECT 1 -- first +FROM range(2)')); +-- +ok +== +SELECT duckdb_format_sql('CREATE TABLE "foo(bar,baz)"(a INTEGER, b INTEGER)') = 'CREATE TABLE "foo(bar,baz)"( + a INTEGER, + b INTEGER +)'; +-- +ok +== +SELECT duckdb_format_sql('CREATE TABLE "foo(bar,baz"(a INTEGER, b INTEGER)', MAP {'inline_threshold': '0'}) = 'CREATE TABLE "foo(bar,baz"( + a INTEGER, + b INTEGER +)'; +-- +ok +== +SELECT duckdb_format_sql('CREATE TABLE t(`a,b` INTEGER, c INTEGER)') = 'CREATE TABLE t( + `a,b` INTEGER, + c INTEGER +)'; +-- +ok +== +SELECT duckdb_format_sql('CREATE TABLE t(`a``b,c` INTEGER, c INTEGER)') = 'CREATE TABLE t( + `a``b,c` INTEGER, + c INTEGER +)'; +-- +ok +== +SELECT duckdb_format_sql('CREATE TABLE `foo(bar,baz`(a INTEGER, b INTEGER)', MAP {'inline_threshold': '0'}) = 'CREATE TABLE `foo(bar,baz`( + a INTEGER, + b INTEGER +)'; +-- +ok +== +SELECT "CASE WHEN x THEN y ELSE z END" FROM query(duckdb_format_sql($query$SELECT 42 AS `CASE WHEN x THEN y ELSE z END`$query$, MAP {'inline_threshold': '20'})); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/autocomplete/suggest_file.test b/parser/testdata/corpus/sql/function/autocomplete/suggest_file.test index 3af48d0..7072441 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/suggest_file.test +++ b/parser/testdata/corpus/sql/function/autocomplete/suggest_file.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/suggest_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion FROM sql_auto_complete('COPY tbl FROM ''{DATA_DIR}/parq') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/table_functions.test b/parser/testdata/corpus/sql/function/autocomplete/table_functions.test index da0bae6..37e3a12 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/table_functions.test +++ b/parser/testdata/corpus/sql/function/autocomplete/table_functions.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/table_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('call histo') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/tpch.test b/parser/testdata/corpus/sql/function/autocomplete/tpch.test index 80025dd..4c72f8e 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/tpch.test +++ b/parser/testdata/corpus/sql/function/autocomplete/tpch.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/tpch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT l_ord') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/autocomplete/views.test b/parser/testdata/corpus/sql/function/autocomplete/views.test index 94708a2..be063d0 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/views.test +++ b/parser/testdata/corpus/sql/function/autocomplete/views.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT 42 my_column_name diff --git a/parser/testdata/corpus/sql/function/autocomplete/window.test b/parser/testdata/corpus/sql/function/autocomplete/window.test index 80e4e5c..4ad2179 100644 --- a/parser/testdata/corpus/sql/function/autocomplete/window.test +++ b/parser/testdata/corpus/sql/function/autocomplete/window.test @@ -1,6 +1,6 @@ # source: test/sql/function/autocomplete/window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT row_number() OVER (RANG') LIMIT 1; diff --git a/parser/testdata/corpus/sql/function/blob/base64.test b/parser/testdata/corpus/sql/function/blob/base64.test index 7196e9d..22f17fd 100644 --- a/parser/testdata/corpus/sql/function/blob/base64.test +++ b/parser/testdata/corpus/sql/function/blob/base64.test @@ -1,6 +1,6 @@ # source: test/sql/function/blob/base64.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT base64(encode('')) diff --git a/parser/testdata/corpus/sql/function/blob/create_sort_key.test b/parser/testdata/corpus/sql/function/blob/create_sort_key.test index 12cfee4..26c4e8a 100644 --- a/parser/testdata/corpus/sql/function/blob/create_sort_key.test +++ b/parser/testdata/corpus/sql/function/blob/create_sort_key.test @@ -1,6 +1,6 @@ # source: test/sql/function/blob/create_sort_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers ORDER BY create_sort_key(i, 'ASC NULLS LAST') diff --git a/parser/testdata/corpus/sql/function/blob/create_sort_key_blob_escapes.test b/parser/testdata/corpus/sql/function/blob/create_sort_key_blob_escapes.test index 9afc9aa..730c92c 100644 --- a/parser/testdata/corpus/sql/function/blob/create_sort_key_blob_escapes.test +++ b/parser/testdata/corpus/sql/function/blob/create_sort_key_blob_escapes.test @@ -1,6 +1,6 @@ # source: test/sql/function/blob/create_sort_key_blob_escapes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT hex(create_sort_key('\xAA\x00\xBB\x01\xCC'::BLOB, 'ASC NULLS LAST')) diff --git a/parser/testdata/corpus/sql/function/blob/encode.test b/parser/testdata/corpus/sql/function/blob/encode.test index c81faeb..0f4b2ca 100644 --- a/parser/testdata/corpus/sql/function/blob/encode.test +++ b/parser/testdata/corpus/sql/function/blob/encode.test @@ -1,6 +1,6 @@ # source: test/sql/function/blob/encode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT encode('ü') diff --git a/parser/testdata/corpus/sql/function/blob/test_blob_array_slice.test b/parser/testdata/corpus/sql/function/blob/test_blob_array_slice.test index 9ac174e..d69aea7 100644 --- a/parser/testdata/corpus/sql/function/blob/test_blob_array_slice.test +++ b/parser/testdata/corpus/sql/function/blob/test_blob_array_slice.test @@ -1,6 +1,6 @@ # source: test/sql/function/blob/test_blob_array_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select array_slice(blob '\x00\x01\x02\x03\x04\x05', 2, 4) diff --git a/parser/testdata/corpus/sql/function/blob/test_concat_blob.test b/parser/testdata/corpus/sql/function/blob/test_concat_blob.test index 7dc92a7..19963d9 100644 --- a/parser/testdata/corpus/sql/function/blob/test_concat_blob.test +++ b/parser/testdata/corpus/sql/function/blob/test_concat_blob.test @@ -1,6 +1,6 @@ # source: test/sql/function/blob/test_concat_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT blob 'aaa\x80' || blob 'aaa\x80' diff --git a/parser/testdata/corpus/sql/function/comparison/between_physical_types.test b/parser/testdata/corpus/sql/function/comparison/between_physical_types.test new file mode 100644 index 0000000..49061f4 --- /dev/null +++ b/parser/testdata/corpus/sql/function/comparison/between_physical_types.test @@ -0,0 +1,25 @@ +# source: test/sql/function/comparison/between_physical_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) +FROM (VALUES (0::{type}), (1::{type}), (2::{type}), (3::{type}), (NULL::{type})) t(v) +WHERE v BETWEEN 1::{type} AND 2::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) +FROM (VALUES (INTERVAL '1 day'), (INTERVAL '2 days'), (INTERVAL '3 days')) t(v) +WHERE v BETWEEN INTERVAL '1 day' AND INTERVAL '2 days'; +-- +ok +== +SELECT count(*) FROM (VALUES ('a'), ('b'), ('c')) t(v) WHERE v BETWEEN 'a' AND 'b'; +-- +ok +== +SELECT count(*) FROM (VALUES (false), (true), (NULL)) t(v) WHERE v BETWEEN false AND true; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/date/date_add.test b/parser/testdata/corpus/sql/function/date/date_add.test index 522c410..8107127 100644 --- a/parser/testdata/corpus/sql/function/date/date_add.test +++ b/parser/testdata/corpus/sql/function/date/date_add.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/date_add.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO dates VALUES (DATE '1992-01-01') diff --git a/parser/testdata/corpus/sql/function/date/date_diff_extreme_dates.test b/parser/testdata/corpus/sql/function/date/date_diff_extreme_dates.test index baa9970..a851c89 100644 --- a/parser/testdata/corpus/sql/function/date/date_diff_extreme_dates.test +++ b/parser/testdata/corpus/sql/function/date/date_diff_extreme_dates.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/date_diff_extreme_dates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT datediff('week', DATE '-5877641-06-25', DATE '5881580-07-10'); diff --git a/parser/testdata/corpus/sql/function/date/date_part_stats.test b/parser/testdata/corpus/sql/function/date/date_part_stats.test index 9f701ea..8d37ac5 100644 --- a/parser/testdata/corpus/sql/function/date/date_part_stats.test +++ b/parser/testdata/corpus/sql/function/date/date_part_stats.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/date_part_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT EXTRACT(year FROM d) FROM dates; diff --git a/parser/testdata/corpus/sql/function/date/date_trunc_4202.test b/parser/testdata/corpus/sql/function/date/date_trunc_4202.test index 56c8e86..b1225d7 100644 --- a/parser/testdata/corpus/sql/function/date/date_trunc_4202.test +++ b/parser/testdata/corpus/sql/function/date/date_trunc_4202.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/date_trunc_4202.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 (date timestamp); diff --git a/parser/testdata/corpus/sql/function/date/date_trunc_min_date.test b/parser/testdata/corpus/sql/function/date/date_trunc_min_date.test new file mode 100644 index 0000000..5946b75 --- /dev/null +++ b/parser/testdata/corpus/sql/function/date/date_trunc_min_date.test @@ -0,0 +1,17 @@ +# source: test/sql/function/date/date_trunc_min_date.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT date_trunc('week', DATE '-5877641-06-25') +-- +ok +== +SELECT date_trunc('isoyear', DATE '-5877641-06-25') +-- +ok +== +SELECT date_trunc('week', DATE '2024-10-06'), date_trunc('isoyear', DATE '2024-10-06'), date_trunc('week', DATE 'infinity') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/date/date_trunc_stats.test b/parser/testdata/corpus/sql/function/date/date_trunc_stats.test index 7c7ea3c..a83d188 100644 --- a/parser/testdata/corpus/sql/function/date/date_trunc_stats.test +++ b/parser/testdata/corpus/sql/function/date/date_trunc_stats.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/date_trunc_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE table T1(A0 TIMESTAMP) diff --git a/parser/testdata/corpus/sql/function/date/date_trunc_stats_out_of_range.test b/parser/testdata/corpus/sql/function/date/date_trunc_stats_out_of_range.test new file mode 100644 index 0000000..5264ac9 --- /dev/null +++ b/parser/testdata/corpus/sql/function/date/date_trunc_stats_out_of_range.test @@ -0,0 +1,25 @@ +# source: test/sql/function/date/date_trunc_stats_out_of_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE d(dt DATE, s VARCHAR); +-- +ok +== +INSERT INTO d VALUES ('5877642-06-25', 'A'), ('2024-01-01', 'b'); +-- +ok +== +SELECT date_trunc('day', dt) FROM d WHERE s = 'b'; +-- +ok +== +SELECT date_trunc('month', dt) FROM d WHERE s = 'b'; +-- +ok +== +SELECT date_trunc('day', dt) FROM d; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/date/strftime_iso_year_range.test b/parser/testdata/corpus/sql/function/date/strftime_iso_year_range.test new file mode 100644 index 0000000..e6a607a --- /dev/null +++ b/parser/testdata/corpus/sql/function/date/strftime_iso_year_range.test @@ -0,0 +1,13 @@ +# source: test/sql/function/date/strftime_iso_year_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT strftime(d, '%Y|%G|%V') FROM (VALUES (DATE '12345-06-01'), (DATE '-0005-06-01'), (DATE '0000-01-01'), (DATE '-12345-06-01'), (DATE '2024-12-30'), (DATE '0001-01-01')) t(d) +-- +ok +== +SELECT strftime(TIMESTAMP '12345-06-01 10:00:00', '%G-%Y %H') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/date/test_date_part.test b/parser/testdata/corpus/sql/function/date/test_date_part.test index df27e33..37c85be 100644 --- a/parser/testdata/corpus/sql/function/date/test_date_part.test +++ b/parser/testdata/corpus/sql/function/date/test_date_part.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_date_part.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(d DATE, s VARCHAR); @@ -122,6 +122,18 @@ select timezone(interval '4 minute', '12:15:37.123456-08'::TIMETZ); -- ok == +select timezone(interval '-15 hours -59 minutes -59 seconds', '12:00:00+00'::TIMETZ); +-- +ok +== +select timezone(interval '16 hours', '12:00:00+00'::TIMETZ); +-- +ok +== +select timezone(interval '9223372036854775807 microseconds', '12:00:00+00'::TIMETZ); +-- +ok +== SELECT LAST_DAY(DATE '1900-02-12'), LAST_DAY(DATE '1992-02-12'), LAST_DAY(DATE '2000-02-12'); -- ok @@ -134,6 +146,10 @@ SELECT LAST_DAY(d::timestamp) FROM dates; -- ok == +SELECT last_day(DATE '5881580-07-10'); +-- +ok +== SELECT MONTHNAME(d) FROM dates; -- ok diff --git a/parser/testdata/corpus/sql/function/date/test_date_trunc.test b/parser/testdata/corpus/sql/function/date/test_date_trunc.test index bf612c5..c8f6a42 100644 --- a/parser/testdata/corpus/sql/function/date/test_date_trunc.test +++ b/parser/testdata/corpus/sql/function/date/test_date_trunc.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_date_trunc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(d TIMESTAMP, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/date/test_extract.test b/parser/testdata/corpus/sql/function/date/test_extract.test index 28bde2f..9a1f196 100644 --- a/parser/testdata/corpus/sql/function/date/test_extract.test +++ b/parser/testdata/corpus/sql/function/date/test_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(i DATE) diff --git a/parser/testdata/corpus/sql/function/date/test_extract_edge_cases.test b/parser/testdata/corpus/sql/function/date/test_extract_edge_cases.test index ae83711..9a99cc3 100644 --- a/parser/testdata/corpus/sql/function/date/test_extract_edge_cases.test +++ b/parser/testdata/corpus/sql/function/date/test_extract_edge_cases.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_extract_edge_cases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT EXTRACT(century FROM cast('2000-10-10' AS DATE)); diff --git a/parser/testdata/corpus/sql/function/date/test_extract_month.test b/parser/testdata/corpus/sql/function/date/test_extract_month.test index de40137..dfbce3e 100644 --- a/parser/testdata/corpus/sql/function/date/test_extract_month.test +++ b/parser/testdata/corpus/sql/function/date/test_extract_month.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_extract_month.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select date '1992-01-01' + interval (i) days, month(date '1992-01-01' + interval (i) days) from range(0, 366) tbl(i); diff --git a/parser/testdata/corpus/sql/function/date/test_extract_year.test b/parser/testdata/corpus/sql/function/date/test_extract_year.test index db9c1ef..7d47f6b 100644 --- a/parser/testdata/corpus/sql/function/date/test_extract_year.test +++ b/parser/testdata/corpus/sql/function/date/test_extract_year.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_extract_year.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates AS SELECT date '1970-01-01' + concat(i, ' years')::interval AS d from range(0, 430) tbl(i); diff --git a/parser/testdata/corpus/sql/function/date/test_strftime.test b/parser/testdata/corpus/sql/function/date/test_strftime.test index 9614191..86b6470 100644 --- a/parser/testdata/corpus/sql/function/date/test_strftime.test +++ b/parser/testdata/corpus/sql/function/date/test_strftime.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_strftime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT strftime(DATE '1992-01-01', '%Y'); diff --git a/parser/testdata/corpus/sql/function/date/test_strftime_exhaustive.test b/parser/testdata/corpus/sql/function/date/test_strftime_exhaustive.test index 45f4dc1..fff2186 100644 --- a/parser/testdata/corpus/sql/function/date/test_strftime_exhaustive.test +++ b/parser/testdata/corpus/sql/function/date/test_strftime_exhaustive.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_strftime_exhaustive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(d DATE); diff --git a/parser/testdata/corpus/sql/function/date/test_time_bucket_date.test b/parser/testdata/corpus/sql/function/date/test_time_bucket_date.test index d51f156..e32d007 100644 --- a/parser/testdata/corpus/sql/function/date/test_time_bucket_date.test +++ b/parser/testdata/corpus/sql/function/date/test_time_bucket_date.test @@ -1,6 +1,6 @@ # source: test/sql/function/date/test_time_bucket_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(w INTERVAL, d DATE, shift INTERVAL, origin DATE); diff --git a/parser/testdata/corpus/sql/function/date/yearweek_bc_statistics.test b/parser/testdata/corpus/sql/function/date/yearweek_bc_statistics.test new file mode 100644 index 0000000..2aa23ec --- /dev/null +++ b/parser/testdata/corpus/sql/function/date/yearweek_bc_statistics.test @@ -0,0 +1,33 @@ +# source: test/sql/function/date/yearweek_bc_statistics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE wt AS SELECT DATE '0100-01-01 (BC)' + INTERVAL (i) DAY d FROM range(3000) r(i); +-- +ok +== +SELECT count(*) FROM wt WHERE yearweek(d) = -9910; +-- +ok +== +SELECT count(*) FROM wt WHERE yearweek(d::TIMESTAMP) = -9910; +-- +ok +== +SELECT min(yearweek(d)), max(yearweek(d)) FROM wt; +-- +ok +== +CREATE TABLE mixed AS SELECT DATE '0002-01-01 (BC)' + INTERVAL (i) DAY d FROM range(1500) r(i); +-- +ok +== +SELECT count(*) FROM mixed WHERE yearweek(d) = -10; +-- +ok +== +SELECT count(*) FROM mixed WHERE yearweek(d) BETWEEN 101 AND 153; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/enum/enum_range_large.test b/parser/testdata/corpus/sql/function/enum/enum_range_large.test new file mode 100644 index 0000000..f8fb449 --- /dev/null +++ b/parser/testdata/corpus/sql/function/enum/enum_range_large.test @@ -0,0 +1,25 @@ +# source: test/sql/function/enum/enum_range_large.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE big AS ENUM (SELECT 'value_' || i FROM range(100000) t(i)); +-- +ok +== +SELECT length(r), r[1], r[100000] FROM (SELECT enum_range(NULL::big) r); +-- +ok +== +SELECT count(*), count(DISTINCT length(enum_range(e))) FROM (SELECT ('value_' || i)::big e FROM range(3000) t(i)); +-- +ok +== +SELECT enum_range(e)[i + 1] = e::VARCHAR FROM (SELECT ('value_' || i)::big e, i FROM range(5) t(i)) ORDER BY ALL; +-- +ok +== +SELECT length(enum_range(e)) FROM (SELECT NULL::big e UNION ALL SELECT 'value_7'::big) ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/enum/test_enum_code.test b/parser/testdata/corpus/sql/function/enum/test_enum_code.test index 77e9bd2..2710e88 100644 --- a/parser/testdata/corpus/sql/function/enum/test_enum_code.test +++ b/parser/testdata/corpus/sql/function/enum/test_enum_code.test @@ -1,6 +1,6 @@ # source: test/sql/function/enum/test_enum_code.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy', 'anxious') diff --git a/parser/testdata/corpus/sql/function/enum/test_enum_first.test b/parser/testdata/corpus/sql/function/enum/test_enum_first.test index 5a40fed..409bf6d 100644 --- a/parser/testdata/corpus/sql/function/enum/test_enum_first.test +++ b/parser/testdata/corpus/sql/function/enum/test_enum_first.test @@ -1,6 +1,6 @@ # source: test/sql/function/enum/test_enum_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple'); diff --git a/parser/testdata/corpus/sql/function/enum/test_enum_last.test b/parser/testdata/corpus/sql/function/enum/test_enum_last.test index 0265161..19f81ea 100644 --- a/parser/testdata/corpus/sql/function/enum/test_enum_last.test +++ b/parser/testdata/corpus/sql/function/enum/test_enum_last.test @@ -1,6 +1,6 @@ # source: test/sql/function/enum/test_enum_last.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT enum_last(null::rainbow) diff --git a/parser/testdata/corpus/sql/function/enum/test_enum_range.test b/parser/testdata/corpus/sql/function/enum/test_enum_range.test index 6d0afac..7f98db5 100644 --- a/parser/testdata/corpus/sql/function/enum/test_enum_range.test +++ b/parser/testdata/corpus/sql/function/enum/test_enum_range.test @@ -1,6 +1,6 @@ # source: test/sql/function/enum/test_enum_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE currency AS ENUM ('usd', 'brl', 'eur'); @@ -27,6 +27,22 @@ SELECT enum_range_boundary('orange'::rainbow, NULL) -- ok == +SELECT enum_range_boundary(NULL, NULL::rainbow) +-- +ok +== +SELECT enum_range_boundary(NULL::rainbow, NULL) +-- +ok +== +SELECT enum_range_boundary(NULL::rainbow, NULL::rainbow) +-- +ok +== +SELECT enum_range_boundary(NULL::rainbow, 'orange'::rainbow) +-- +ok +== SELECT enum_range_boundary('orange'::rainbow, 'brl'::currency) -- ok diff --git a/parser/testdata/corpus/sql/function/generic/assert_true.test b/parser/testdata/corpus/sql/function/generic/assert_true.test index 506a7d2..dca5dd7 100644 --- a/parser/testdata/corpus/sql/function/generic/assert_true.test +++ b/parser/testdata/corpus/sql/function/generic/assert_true.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/assert_true.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT assert_true(true) diff --git a/parser/testdata/corpus/sql/function/generic/can_cast_implicitly.test b/parser/testdata/corpus/sql/function/generic/can_cast_implicitly.test index 5085839..6a88b1b 100644 --- a/parser/testdata/corpus/sql/function/generic/can_cast_implicitly.test +++ b/parser/testdata/corpus/sql/function/generic/can_cast_implicitly.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/can_cast_implicitly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT * FROM range(10) tbl(i) @@ -23,3 +23,15 @@ SELECT can_cast_implicitly(i, NULL::VARCHAR) FROM tbl LIMIT 1 -- ok == +PREPARE implicit_cast_parameter AS SELECT can_cast_implicitly(?, NULL::BIGINT) +-- +ok +== +EXECUTE implicit_cast_parameter(1) +-- +ok +== +EXECUTE implicit_cast_parameter('one') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/case_condition.test b/parser/testdata/corpus/sql/function/generic/case_condition.test index a3bf1b0..a7fcb95 100644 --- a/parser/testdata/corpus/sql/function/generic/case_condition.test +++ b/parser/testdata/corpus/sql/function/generic/case_condition.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/case_condition.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM tbl diff --git a/parser/testdata/corpus/sql/function/generic/case_null_fill.test b/parser/testdata/corpus/sql/function/generic/case_null_fill.test new file mode 100644 index 0000000..8a8c693 --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/case_null_fill.test @@ -0,0 +1,192 @@ +# source: test/sql/function/generic/case_null_fill.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE case_inputs AS +SELECT i, NULLIF(i%101, 0)::INTEGER AS n, + NULLIF(i%101, 0)::DECIMAL(30,2) AS d, + repeat('value', 5) || i::VARCHAR AS s, + [i, NULLIF(i%101, 0)] AS l, + {'n': NULLIF(i%101, 0), 's': repeat('value', 5) || i::VARCHAR} AS st, + map(['n'], [NULLIF(i%101, 0)]) AS m +FROM range(5003) t(i); +-- +ok +== +WITH actual AS ( + SELECT i, CASE WHEN i%11=0 THEN {col} + WHEN i%3=0 THEN NULL + WHEN i%5=0 THEN {col} + ELSE NULL END AS v + FROM case_inputs +), expected AS ( + SELECT i, {col} AS v FROM case_inputs WHERE i%11=0 + UNION ALL + SELECT i, {col} FROM case_inputs WHERE i%11<>0 AND i%3<>0 AND i%5=0 + UNION ALL + SELECT i, NULL FROM case_inputs WHERE i%11<>0 AND (i%3=0 OR i%5<>0) +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +WITH actual AS ( + SELECT i, CASE WHEN i%13=1 + THEN CASE WHEN i%7=2 THEN {col} + WHEN i%7=3 THEN NULL + ELSE {col} END + ELSE NULL END AS v + FROM case_inputs +), expected AS ( + SELECT i, {col} AS v FROM case_inputs WHERE i%13=1 AND i%7<>3 + UNION ALL + SELECT i, NULL FROM case_inputs WHERE i%13<>1 OR i%7=3 +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +WITH actual AS ( + SELECT i, {col} AS original, + coalesce(CASE WHEN i%7=0 THEN {col} END, + CASE WHEN i%7<>0 THEN {col} END) AS v + FROM case_inputs +), expected AS ( + SELECT i, {col} AS original, {col} AS v FROM case_inputs +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +WITH actual AS ( + SELECT i, CASE WHEN i%64=0 THEN n + WHEN i%64=63 THEN NULL + WHEN i%64=1 THEN n + ELSE NULL END AS v + FROM case_inputs WHERE i<{endpoint} +), expected AS ( + SELECT i, n AS v FROM case_inputs WHERE i<{endpoint} AND i%64 IN (0,1) + UNION ALL + SELECT i, NULL FROM case_inputs WHERE i<{endpoint} AND i%64 NOT IN (0,1) +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM case_inputs +WHERE CASE WHEN NULL THEN n WHEN n IS NULL THEN NULL ELSE n END IS DISTINCT FROM n; +-- +ok +== +WITH actual AS ( + SELECT CASE WHEN v=1 THEN v WHEN v=2 THEN NULL ELSE v END AS v + FROM test_vector_types(1::INTEGER, 2::INTEGER, NULL::INTEGER, all_flat=false) t(v) +), expected AS ( + SELECT v FROM test_vector_types(1::INTEGER, 2::INTEGER, NULL::INTEGER, all_flat=true) t(v) + WHERE v IS DISTINCT FROM 2 + UNION ALL + SELECT NULL FROM test_vector_types(1::INTEGER, 2::INTEGER, NULL::INTEGER, all_flat=true) t(v) + WHERE v=2 +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +ok +== +SELECT sum(CASE WHEN i%3=0 THEN NULL + WHEN i%3=1 THEN CAST('42' AS INTEGER) + ELSE CAST(i::VARCHAR AS INTEGER) END) +FROM range(12) t(i); +-- +ok +== +SELECT count(CASE WHEN i>=0 THEN NULL ELSE CAST(i || 'bad' AS INTEGER) END) +FROM range(5003) t(i); +-- +ok +== +SELECT CASE WHEN i=0 THEN NULL ELSE CAST(i || 'bad' AS INTEGER) END FROM range(3) t(i); +-- +ok +== +CREATE SEQUENCE case_fill_seq; +-- +ok +== +SELECT count(v), sum(v) FROM ( + SELECT CASE WHEN i%3=0 THEN NULL + WHEN i%3=1 THEN nextval('case_fill_seq') + ELSE NULL END AS v + FROM range(12) t(i) +); +-- +ok +== +SELECT currval('case_fill_seq'); +-- +ok +== +CREATE SEQUENCE case_when_seq; +-- +ok +== +SELECT count(v), sum(v) FROM ( + SELECT CASE WHEN nextval('case_when_seq')%3=0 THEN NULL + WHEN i%2=0 THEN i ELSE NULL END AS v + FROM range(12) t(i) +); +-- +ok +== +SELECT currval('case_when_seq'); +-- +ok +== +PREPARE case_fill AS +SELECT count(*), sum(v) FROM ( + SELECT CASE WHEN i%7=$1 THEN n WHEN i%3=0 THEN NULL ELSE n END AS v + FROM case_inputs +); +-- +ok +== +EXECUTE case_fill(0); +-- +ok +== +EXECUTE case_fill(6); +-- +ok +== +DROP TABLE case_inputs; +-- +ok +== +DROP SEQUENCE case_fill_seq; +-- +ok +== +DROP SEQUENCE case_when_seq; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/case_short_circuit.test b/parser/testdata/corpus/sql/function/generic/case_short_circuit.test index 6b8bf2b..a4a1113 100644 --- a/parser/testdata/corpus/sql/function/generic/case_short_circuit.test +++ b/parser/testdata/corpus/sql/function/generic/case_short_circuit.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/case_short_circuit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (n text); diff --git a/parser/testdata/corpus/sql/function/generic/case_varchar.test b/parser/testdata/corpus/sql/function/generic/case_varchar.test index 6f546d0..9d682fe 100644 --- a/parser/testdata/corpus/sql/function/generic/case_varchar.test +++ b/parser/testdata/corpus/sql/function/generic/case_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/case_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i, 'thisisalongstring' || i::VARCHAR s FROM range(10) tbl(i) diff --git a/parser/testdata/corpus/sql/function/generic/cast_to_type.test b/parser/testdata/corpus/sql/function/generic/cast_to_type.test index 28fdf6a..17d3b6c 100644 --- a/parser/testdata/corpus/sql/function/generic/cast_to_type.test +++ b/parser/testdata/corpus/sql/function/generic/cast_to_type.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/cast_to_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT cast_to_type(' 42', NULL::INT) diff --git a/parser/testdata/corpus/sql/function/generic/cast_to_type_collation.test b/parser/testdata/corpus/sql/function/generic/cast_to_type_collation.test new file mode 100644 index 0000000..239442e --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/cast_to_type_collation.test @@ -0,0 +1,29 @@ +# source: test/sql/function/generic/cast_to_type_collation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT cast_to_type('a', NULL::VARCHAR COLLATE nocase) = 'A' +-- +ok +== +SELECT cast_to_type('a' COLLATE nocase, NULL::VARCHAR COLLATE "binary") = 'A' +-- +ok +== +SELECT list_sort(cast_to_type(['a','B'], [NULL::VARCHAR COLLATE nocase]), 'ASC', 'NULLS FIRST') +-- +ok +== +SELECT list_sort(cast_to_type(['a' COLLATE nocase,'B'], [NULL::VARCHAR COLLATE "binary"]), 'ASC', 'NULLS FIRST') +-- +ok +== +SELECT cast_to_type('42', NULL::INTEGER) +-- +ok +== +SELECT cast_to_type(NULL, NULL::INTEGER) IS NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/constant_or_null.test b/parser/testdata/corpus/sql/function/generic/constant_or_null.test index 3ec1682..bc2b2bd 100644 --- a/parser/testdata/corpus/sql/function/generic/constant_or_null.test +++ b/parser/testdata/corpus/sql/function/generic/constant_or_null.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/constant_or_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT constant_or_null(1, NULL), constant_or_null(1, 10) diff --git a/parser/testdata/corpus/sql/function/generic/error.test b/parser/testdata/corpus/sql/function/generic/error.test index 82c2a8e..0164515 100644 --- a/parser/testdata/corpus/sql/function/generic/error.test +++ b/parser/testdata/corpus/sql/function/generic/error.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT error('test') diff --git a/parser/testdata/corpus/sql/function/generic/fold_constant_arguments.test b/parser/testdata/corpus/sql/function/generic/fold_constant_arguments.test new file mode 100644 index 0000000..73c0014 --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/fold_constant_arguments.test @@ -0,0 +1,37 @@ +# source: test/sql/function/generic/fold_constant_arguments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA enable_verification +-- +ok +== +SELECT length('a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a' || 'a'); +-- +ok +== +SELECT 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1; +-- +ok +== +SELECT typeof(repeat(NULL::VARCHAR || 'z', 2)); +-- +ok +== +SELECT abs(('1' || 'x')::INT); +-- +ok +== +SELECT CASE WHEN 1 = 0 THEN abs(('1' || 'x')::INT) ELSE 42 END; +-- +ok +== +SELECT list_transform([1, 2], lambda x: 40 + 2); +-- +ok +== +SELECT make_type('STRUCT', a := make_type('INTEGER'), b := make_type('var' || 'char'))::VARCHAR; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/hash_func.test b/parser/testdata/corpus/sql/function/generic/hash_func.test index 60d6dd2..08f9420 100644 --- a/parser/testdata/corpus/sql/function/generic/hash_func.test +++ b/parser/testdata/corpus/sql/function/generic/hash_func.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/hash_func.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT HASH(NULL::{datatype}); diff --git a/parser/testdata/corpus/sql/function/generic/invoke.test b/parser/testdata/corpus/sql/function/generic/invoke.test index fcb6b9e..a89708a 100644 --- a/parser/testdata/corpus/sql/function/generic/invoke.test +++ b/parser/testdata/corpus/sql/function/generic/invoke.test @@ -1,12 +1,46 @@ # source: test/sql/function/generic/invoke.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select invoke(lambda x: x * x, 2) as square_of_x -- ok == +CREATE SEQUENCE invoke_cse_seq START 1 +-- +ok +== +SELECT count(*) FILTER (WHERE a = b), count(*) +FROM ( + SELECT + invoke(lambda x: nextval('invoke_cse_seq'), i) a, + invoke(lambda x: nextval('invoke_cse_seq'), i) b + FROM range(10000) tbl(i) +) +-- +ok +== +CREATE SEQUENCE invoke_constant_seq START 1 +-- +ok +== +SELECT count(DISTINCT invoke(lambda x: nextval('invoke_constant_seq'), 1)) FROM range(10000) +-- +ok +== +SELECT invoke(lambda x: error('expected'), 1) +-- +ok +== +CREATE TABLE invoke_consistency_tbl(i INTEGER) +-- +ok +== +CREATE INDEX invoke_consistency_idx ON invoke_consistency_tbl (invoke(lambda x: current_schema(), i)) +-- +ok +== select invoke(lambda a: invoke(lambda b: a + b, 4), 3) as sum_ab -- ok @@ -83,10 +117,70 @@ CREATE VIEW invoke_order_view AS SELECT invoke(lambda x, y, z: x * 100 + y * 10 -- ok == +CREATE TABLE invoke_dictionary_tbl AS + SELECT CASE WHEN i % 2 = 0 THEN 'x' ELSE 'y' END s FROM range(10000) tbl(i) +-- +ok +== +CREATE SEQUENCE invoke_dictionary_seq START 1 +-- +ok +== +CREATE SEQUENCE invoke_stored_volatile_seq START 1 +-- +ok +== +CREATE VIEW invoke_stored_volatile_view AS + SELECT + invoke(lambda x: nextval('invoke_stored_volatile_seq'), i) a, + invoke(lambda x: nextval('invoke_stored_volatile_seq'), i) b + FROM range(1000) tbl(i) +-- +ok +== +CREATE SEQUENCE invoke_stored_constant_seq START 1 +-- +ok +== +CREATE VIEW invoke_stored_constant_view AS + SELECT invoke(lambda x: nextval('invoke_stored_constant_seq'), 1) v FROM range(10000) +-- +ok +== +CREATE VIEW invoke_stored_error_view AS + SELECT invoke(lambda x: error('stored expected'), 1) v +-- +ok +== +CREATE TABLE invoke_throw_dictionary_tbl AS + SELECT CASE WHEN i % 2 = 0 THEN '1' ELSE 'bad' END s FROM range(10000) tbl(i) +-- +ok +== SELECT result FROM invoke_order_view -- ok == +SELECT count(*) FILTER (WHERE a = b), count(*) FROM invoke_stored_volatile_view +-- +ok +== +SELECT count(DISTINCT v) FROM invoke_stored_constant_view +-- +ok +== +SELECT * FROM invoke_stored_error_view +-- +ok +== +SELECT count(DISTINCT invoke(lambda x: nextval('invoke_dictionary_seq'), s)) FROM invoke_dictionary_tbl +-- +ok +== +SELECT sum(invoke(lambda x: x::INTEGER, s)) FROM invoke_throw_dictionary_tbl WHERE s = '1' +-- +ok +== SELECT invoke(lambda x: x + x, 2, 4, 6); -- ok @@ -99,3 +193,15 @@ SELECT invoke(NULL, 1); -- ok == +SELECT invoke(lambda x: x::INTEGER, 'abc'); +-- +ok +== +SELECT invoke(lambda x: error('boom'), 1); +-- +ok +== +SELECT invoke(lambda x: x * 2, 9223372036854775807::BIGINT); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/least_greatest_enum.test b/parser/testdata/corpus/sql/function/generic/least_greatest_enum.test index 33d4a4d..72b255f 100644 --- a/parser/testdata/corpus/sql/function/generic/least_greatest_enum.test +++ b/parser/testdata/corpus/sql/function/generic/least_greatest_enum.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/least_greatest_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE t AS ENUM ('z','y','x'); diff --git a/parser/testdata/corpus/sql/function/generic/least_greatest_types.test b/parser/testdata/corpus/sql/function/generic/least_greatest_types.test index a5a1574..a8de5f3 100644 --- a/parser/testdata/corpus/sql/function/generic/least_greatest_types.test +++ b/parser/testdata/corpus/sql/function/generic/least_greatest_types.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/least_greatest_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types AS FROM test_all_types() diff --git a/parser/testdata/corpus/sql/function/generic/make_type_empty_name.test b/parser/testdata/corpus/sql/function/generic/make_type_empty_name.test new file mode 100644 index 0000000..c1109ff --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/make_type_empty_name.test @@ -0,0 +1,25 @@ +# source: test/sql/function/generic/make_type_empty_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT make_type(''); +-- +error: Parser Error: Zero-length identifier in qualified name! (input: ) +== +SELECT make_type('', 1); +-- +error: Parser Error: Zero-length identifier in qualified name! (input: ) +== +SELECT make_type('.INTEGER'); +-- +error: Parser Error: Zero-length identifier in qualified name! (input: .INTEGER) +== +SELECT make_type('INTEGER'); +-- +ok +== +SELECT make_type('a'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/make_type_empty_name.test.metadata.json b/parser/testdata/corpus/sql/function/generic/make_type_empty_name.test.metadata.json new file mode 100644 index 0000000..1e8851b --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/make_type_empty_name.test.metadata.json @@ -0,0 +1,7 @@ +{ + "todo": { + "7cc5d44a1b149b8d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "88d0afd9f92a2bcd": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "981750407eadef8d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/function/generic/null_constant_collation.test b/parser/testdata/corpus/sql/function/generic/null_constant_collation.test new file mode 100644 index 0000000..4f8d002 --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/null_constant_collation.test @@ -0,0 +1,63 @@ +# source: test/sql/function/generic/null_constant_collation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT get_type(lower(NULL::VARCHAR COLLATE NOCASE))=get_type(NULL::VARCHAR COLLATE NOCASE), + get_type(upper(NULL::VARCHAR COLLATE NOCASE))=get_type(NULL::VARCHAR COLLATE NOCASE); +-- +ok +== +SELECT get_type(lower(upper(NULL::VARCHAR COLLATE NOCASE)))=get_type(NULL::VARCHAR COLLATE NOCASE), + lower(upper(NULL::VARCHAR COLLATE NOCASE)) IS NULL; +-- +ok +== +CREATE TABLE null_collation_input(s VARCHAR COLLATE NOCASE); +-- +ok +== +INSERT INTO null_collation_input VALUES (NULL), ('A'); +-- +ok +== +SELECT bool_and(get_type(lower(s))=get_type(lower(NULL::VARCHAR COLLATE NOCASE))), + bool_and(get_type(upper(s))=get_type(upper(NULL::VARCHAR COLLATE NOCASE))) +FROM null_collation_input; +-- +ok +== +SELECT get_type(lower(NULL::VARCHAR))=get_type(NULL::VARCHAR), + typeof(NULL || 'x'), lower(NULL::VARCHAR) IS NULL; +-- +ok +== +SELECT get_type(struct_pack(s := lower(NULL::VARCHAR COLLATE NOCASE)))= + get_type(struct_pack(s := NULL::VARCHAR COLLATE NOCASE)); +-- +ok +== +SELECT typeof(lower(NULL)), lpad(NULL::VARCHAR, CAST('bad' AS INTEGER), 'x'); +-- +ok +== +SELECT strftime(NULL::DATE, '%Q'); +-- +ok +== +SELECT index_key(NULL::STRUCT(t VARCHAR), 'PRIMARY_tbl1_0', 1); +-- +ok +== +SELECT get_type(lower(string := NULL::VARCHAR COLLATE NOCASE))=get_type(NULL::VARCHAR COLLATE NOCASE); +-- +ok +== +SELECT replace(NULL::VARCHAR COLLATE NOCASE, 'a' COLLATE NOACCENT, 'b'); +-- +ok +== +SELECT replace('a' COLLATE NOCASE, 'a' COLLATE NOACCENT, 'b'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/null_constant_return_type.test b/parser/testdata/corpus/sql/function/generic/null_constant_return_type.test new file mode 100644 index 0000000..5d91378 --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/null_constant_return_type.test @@ -0,0 +1,145 @@ +# source: test/sql/function/generic/null_constant_return_type.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(repeat(CAST(NULL AS VARCHAR) || 'z', 2)) +-- +ok +== +SELECT s = 'a' || chr(9) || 'b', length(s), typeof(s) FROM ( + SELECT ('a' || chr(9) || 'b') AS s UNION ALL + SELECT repeat(CAST(NULL AS VARCHAR) || 'z', 2)) u WHERE s IS NOT NULL +-- +ok +== +SELECT typeof(s) FROM ( + SELECT ('a' || chr(9) || 'b') AS s UNION ALL + SELECT repeat(CAST(NULL AS VARCHAR) || 'z', 2)) u +-- +ok +== +SELECT typeof(NULL::VARCHAR || 'z'), typeof('z' || NULL::VARCHAR), typeof(NULL::VARCHAR || NULL::VARCHAR), typeof(NULL::INT || 'z') +-- +ok +== +SELECT typeof(NULL::BLOB || 'z'::BLOB), typeof('z'::BLOB || NULL::BLOB), typeof(NULL::BLOB || NULL::BLOB) +-- +ok +== +SELECT typeof(NULL::BLOB || 'z'), typeof('z'::BLOB || 'z') +-- +ok +== +SELECT typeof([1] || NULL::INT[]), typeof(NULL::INT[] || [2]), typeof(NULL::INT[] || NULL::INT[]) +-- +ok +== +SELECT typeof([1] || NULL::BIGINT[]), typeof(NULL::INT[3] || [2]) +-- +ok +== +SELECT typeof(list_extract(NULL::INT[], 1)), typeof(array_extract(NULL::DATE[3], 1)), typeof(list_aggr(NULL::INT[], 'sum')), typeof(struct_insert(NULL::STRUCT(x INT), a := 'a')) +-- +ok +== +SELECT typeof(struct_extract(NULL::STRUCT(a DATE), 'a')), typeof(union_extract(NULL::UNION(a DATE, b INT), 'a')) +-- +ok +== +SELECT typeof(list_concat(NULL::INT[], [1::BIGINT])), typeof(array_slice(NULL::INT[3], 1, 2)), typeof(map_extract(NULL::MAP(INT, DATE), 1)) +-- +ok +== +SELECT NULL::VARCHAR || 'z', [1] || NULL::INT[], NULL::BLOB || 'z'::BLOB, list_extract(NULL::INT[], 1) +-- +ok +== +SELECT typeof(nullif('a', 'a') || 'z'), typeof(repeat(nullif('a', 'a') || 'z', 2)), typeof(upper(NULL::VARCHAR) || 'z') +-- +ok +== +SELECT typeof((CASE WHEN 1=1 THEN NULL::INT[] END) || [1]), typeof(list_extract((CASE WHEN 1=1 THEN NULL::DATE[] END), 1)) +-- +ok +== +SELECT typeof(struct_pack(a := NULL::VARCHAR || 'z')), typeof([NULL::VARCHAR || 'z']), typeof(coalesce(NULL::BLOB || 'z'::BLOB, 'q'::BLOB)) +-- +ok +== +SELECT typeof(repeat(NULL::BLOB || 'z'::BLOB, 2)), typeof(length(NULL::VARCHAR || 'z')), typeof(list_extract([NULL::INT[] || [1]], 1)) +-- +ok +== +SELECT typeof(repeat('z', 2)), typeof(repeat(NULL::VARCHAR || 'z', 2)), typeof(repeat('z'::BLOB, 2)), typeof(repeat(NULL::BLOB || 'z'::BLOB, 2)) +-- +ok +== +SELECT typeof(s) FROM (SELECT 'a' AS s UNION ALL SELECT NULL::VARCHAR || 'z') u +-- +ok +== +SELECT typeof(s) FROM (SELECT [1] AS s UNION ALL SELECT NULL::INT[] || [2]) u +-- +ok +== +CREATE TABLE tbl AS SELECT NULL::VARCHAR || 'z' AS s, NULL::INT[] || [1] AS l, NULL::BLOB || 'z'::BLOB AS b +-- +ok +== +SELECT typeof(s), typeof(l), typeof(b) FROM tbl +-- +ok +== +CREATE VIEW v AS SELECT repeat(NULL::VARCHAR || 'z', 2) AS s +-- +ok +== +SELECT data_type FROM duckdb_columns() WHERE table_name = 'v' +-- +ok +== +CREATE MACRO concat_null(x) AS x || NULL::VARCHAR +-- +ok +== +SELECT typeof(concat_null('a')), typeof(repeat(concat_null('a'), 2)) +-- +ok +== +PREPARE p AS SELECT typeof(repeat(?::VARCHAR || 'z', 2)) +-- +ok +== +EXECUTE p(NULL) +-- +ok +== +CREATE TABLE nulls AS SELECT NULL::VARCHAR AS s, NULL::INT[] AS l +-- +ok +== +SELECT typeof(repeat(s || 'z', 2)), typeof(l || [1]) FROM nulls +-- +ok +== +SELECT [1] || NULL::VARCHAR +-- +ok +== +SELECT struct_extract(NULL::INT, 'a') +-- +ok +== +SELECT typeof(NULL || 'z'), typeof([1] || NULL), typeof(NULL || NULL), typeof(list_extract(NULL, 1)) +-- +ok +== +SELECT typeof(upper(NULL::VARCHAR)), typeof(concat(NULL::VARCHAR, 'z')), typeof(length(NULL::VARCHAR)), typeof(abs(NULL::DOUBLE)) +-- +ok +== +SELECT coalesce(NULL::VARCHAR, 'z'), list_concat(NULL::INT[], [1]), constant_or_null('a', NULL::INT) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/replace_type.test b/parser/testdata/corpus/sql/function/generic/replace_type.test index 6e6a3cd..f42af8b 100644 --- a/parser/testdata/corpus/sql/function/generic/replace_type.test +++ b/parser/testdata/corpus/sql/function/generic/replace_type.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/replace_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT replace_type(' 42', NULL::VARCHAR, NULL::INT) @@ -39,3 +39,31 @@ select replace_type([3.141592653589793, 2.718281828459045]::DOUBLE[2], NULL::DOU -- ok == +SELECT replace_type({'a': 42, 'b': 'duck', 'c': true}, NULL::INTEGER, NULL::BIGINT) +-- +ok +== +SELECT replace_type((42, 'duck', true), NULL::INTEGER, NULL::BIGINT) +-- +ok +== +SELECT replace_type('duck'::UNION(a INTEGER, b VARCHAR, c BOOLEAN), NULL::INTEGER, NULL::BIGINT) +-- +ok +== +SELECT typeof(replace_type(NULL::STRUCT(a INTEGER, b VARCHAR, c BOOLEAN), NULL::INTEGER, NULL::BIGINT)) +-- +ok +== +SELECT typeof(replace_type(NULL::TUPLE(INTEGER, VARCHAR, BOOLEAN), NULL::INTEGER, NULL::BIGINT)) +-- +ok +== +SELECT typeof(replace_type(NULL::UNION(a INTEGER, b VARCHAR, c BOOLEAN), NULL::INTEGER, NULL::BIGINT)) +-- +ok +== +SELECT typeof(replace_type(NULL::MAP(INTEGER, STRUCT(a VARCHAR, b INTEGER[2], c BOOLEAN[])), NULL::INTEGER, NULL::BIGINT)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/table_func_varargs.test b/parser/testdata/corpus/sql/function/generic/table_func_varargs.test index d91601b..9f7575b 100644 --- a/parser/testdata/corpus/sql/function/generic/table_func_varargs.test +++ b/parser/testdata/corpus/sql/function/generic/table_func_varargs.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/table_func_varargs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM repeat_row(1, 2, 'foo', num_rows=3) diff --git a/parser/testdata/corpus/sql/function/generic/test_approx_database_count.test b/parser/testdata/corpus/sql/function/generic/test_approx_database_count.test index 5caa03c..3f6911f 100644 --- a/parser/testdata/corpus/sql/function/generic/test_approx_database_count.test +++ b/parser/testdata/corpus/sql/function/generic/test_approx_database_count.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_approx_database_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/board1.db' AS b1; diff --git a/parser/testdata/corpus/sql/function/generic/test_barrier.test b/parser/testdata/corpus/sql/function/generic/test_barrier.test new file mode 100644 index 0000000..ff5298f --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/test_barrier.test @@ -0,0 +1,85 @@ +# source: test/sql/function/generic/test_barrier.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT __internal_barrier(42), __internal_barrier('hello'), __internal_barrier(NULL), __internal_barrier([1, 2, 3]), __internal_barrier({'a': 1}) +-- +ok +== +SELECT typeof(__internal_barrier(42::TINYINT)) +-- +ok +== +SELECT __internal_barrier(i) FROM range(3) t(i) ORDER BY 1 +-- +ok +== +SELECT __internal_barrier(error('boom')) +-- +ok +== +CREATE TABLE secrets(id INTEGER, s VARCHAR) +-- +ok +== +INSERT INTO secrets VALUES (1, 'top_secret'), (2, '42') +-- +ok +== +CREATE TABLE allowed(id INTEGER) +-- +ok +== +INSERT INTO allowed VALUES (2) +-- +ok +== +SET disabled_optimizers='join_filter_pushdown' +-- +ok +== +SELECT sec.s FROM secrets sec JOIN allowed a ON (sec.id = a.id) WHERE sec.s::INT = 42 +-- +ok +== +SELECT sec.s FROM secrets sec JOIN allowed a ON (sec.id = a.id) WHERE __internal_barrier(sec.s::INT = 42) +-- +ok +== +EXPLAIN SELECT sec.s FROM secrets sec JOIN allowed a ON (sec.id = a.id) WHERE __internal_barrier(sec.s::INT = 42) +-- +ok +== +RESET disabled_optimizers +-- +ok +== +EXPLAIN SELECT * FROM secrets WHERE __internal_barrier(s::INT = 42) AND id = 2 +-- +ok +== +SELECT * FROM secrets WHERE __internal_barrier(s::INT = 42) AND id = 2 +-- +ok +== +SELECT * FROM secrets WHERE id = 2 AND __internal_barrier(s::INT = 42) +-- +ok +== +CREATE TABLE t AS SELECT i FROM range(10) t(i) +-- +ok +== +SELECT count(*) FROM (SELECT * FROM t LIMIT 3) WHERE __internal_barrier(nextval('seq') >= 0) +-- +ok +== +EXPLAIN SELECT * FROM (SELECT i * 2 AS k FROM t) WHERE __internal_barrier(k = 4) +-- +ok +== +SELECT * FROM (SELECT i * 2 AS k FROM t) WHERE __internal_barrier(k = 4) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/test_between.test b/parser/testdata/corpus/sql/function/generic/test_between.test index 2199f8f..ad8187d 100644 --- a/parser/testdata/corpus/sql/function/generic/test_between.test +++ b/parser/testdata/corpus/sql/function/generic/test_between.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_between.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 10 BETWEEN 10 AND 20 diff --git a/parser/testdata/corpus/sql/function/generic/test_between_sideeffects.test b/parser/testdata/corpus/sql/function/generic/test_between_sideeffects.test index cd92704..4a5f030 100644 --- a/parser/testdata/corpus/sql/function/generic/test_between_sideeffects.test +++ b/parser/testdata/corpus/sql/function/generic/test_between_sideeffects.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_between_sideeffects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT ? BETWEEN 1 AND 2 diff --git a/parser/testdata/corpus/sql/function/generic/test_boolean_test.test b/parser/testdata/corpus/sql/function/generic/test_boolean_test.test index 2954844..4af8d03 100644 --- a/parser/testdata/corpus/sql/function/generic/test_boolean_test.test +++ b/parser/testdata/corpus/sql/function/generic/test_boolean_test.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_boolean_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select true is true diff --git a/parser/testdata/corpus/sql/function/generic/test_connection_count.test b/parser/testdata/corpus/sql/function/generic/test_connection_count.test index c016908..12eaf80 100644 --- a/parser/testdata/corpus/sql/function/generic/test_connection_count.test +++ b/parser/testdata/corpus/sql/function/generic/test_connection_count.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_connection_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count FROM duckdb_connection_count(); diff --git a/parser/testdata/corpus/sql/function/generic/test_if.test b/parser/testdata/corpus/sql/function/generic/test_if.test index adc1687..f82eaad 100644 --- a/parser/testdata/corpus/sql/function/generic/test_if.test +++ b/parser/testdata/corpus/sql/function/generic/test_if.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_if.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT IF(true, 1, 10), IF(false, 1, 10), IF(NULL, 1, 10) diff --git a/parser/testdata/corpus/sql/function/generic/test_if_null.test b/parser/testdata/corpus/sql/function/generic/test_if_null.test index cd01fb5..1dd9ef3 100644 --- a/parser/testdata/corpus/sql/function/generic/test_if_null.test +++ b/parser/testdata/corpus/sql/function/generic/test_if_null.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_if_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT IFNULL(NULL, NULL), IFNULL(NULL, 10), IFNULL(1, 10) diff --git a/parser/testdata/corpus/sql/function/generic/test_in.test b/parser/testdata/corpus/sql/function/generic/test_in.test index 0d097ec..5419773 100644 --- a/parser/testdata/corpus/sql/function/generic/test_in.test +++ b/parser/testdata/corpus/sql/function/generic/test_in.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_in.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE i IN (1, 2) ORDER BY i diff --git a/parser/testdata/corpus/sql/function/generic/test_least_greatest.test b/parser/testdata/corpus/sql/function/generic/test_least_greatest.test index c9cab29..16606e3 100644 --- a/parser/testdata/corpus/sql/function/generic/test_least_greatest.test +++ b/parser/testdata/corpus/sql/function/generic/test_least_greatest.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_least_greatest.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT LEAST(1) diff --git a/parser/testdata/corpus/sql/function/generic/test_null_if.test b/parser/testdata/corpus/sql/function/generic/test_null_if.test index 1d5a3c1..0abd30d 100644 --- a/parser/testdata/corpus/sql/function/generic/test_null_if.test +++ b/parser/testdata/corpus/sql/function/generic/test_null_if.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_null_if.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULLIF(NULLIF ('hello', 'world'), 'blabla'); diff --git a/parser/testdata/corpus/sql/function/generic/test_resolve_types.test b/parser/testdata/corpus/sql/function/generic/test_resolve_types.test new file mode 100644 index 0000000..e1e352e --- /dev/null +++ b/parser/testdata/corpus/sql/function/generic/test_resolve_types.test @@ -0,0 +1,49 @@ +# source: test/sql/function/generic/test_resolve_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 99999999999999999999999999999999999999::DECIMAL(38,0) + 1::DECIMAL(38,0); +-- +ok +== +SELECT 1.5::DECIMAL(38,1) * 2.5::DECIMAL(38,1); +-- +ok +== +SELECT 10.5::DECIMAL(4,1) % 3::DECIMAL(2,0), typeof(10.5::DECIMAL(4,1) % 3::DECIMAL(2,0)); +-- +ok +== +SELECT round(95::DECIMAL(2,0), -1), typeof(round(95::DECIMAL(2,0), -1)); +-- +ok +== +SELECT round(99999999999999999999999999999999999999::DECIMAL(38,0), -1); +-- +ok +== +SELECT list_aggr([1, 2, 3]::INTEGER[3], 'sum'), list_distinct([1, 1, 2]::INTEGER[3]).list_sort(), list_resize([1, 2]::INTEGER[2], 3); +-- +ok +== +SELECT array_length([[1, 2], [3, 4], [5, 6]]::INTEGER[2][3], 2), len([1, 2]::INTEGER[2]); +-- +ok +== +SELECT list_filter(NULL, lambda x: x > 1), list_transform(NULL, lambda x: x + 1); +-- +ok +== +SELECT current_schemas('true'); +-- +ok +== +SELECT struct_extract(row(1, 2), 'a'); +-- +ok +== +SELECT SWITCH(2, MAP {1: 'a', 2: 'b'}, 'c'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/generic/test_set.test b/parser/testdata/corpus/sql/function/generic/test_set.test index e828cb4..ec530ad 100644 --- a/parser/testdata/corpus/sql/function/generic/test_set.test +++ b/parser/testdata/corpus/sql/function/generic/test_set.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_set.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CURRENT_SETTING('a'); diff --git a/parser/testdata/corpus/sql/function/generic/test_sleep.test b/parser/testdata/corpus/sql/function/generic/test_sleep.test index e7f7e03..1dd167f 100644 --- a/parser/testdata/corpus/sql/function/generic/test_sleep.test +++ b/parser/testdata/corpus/sql/function/generic/test_sleep.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_sleep.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sleep_ms(1) diff --git a/parser/testdata/corpus/sql/function/generic/test_stats.test b/parser/testdata/corpus/sql/function/generic/test_stats.test index 99a08cb..4fd7c6b 100644 --- a/parser/testdata/corpus/sql/function/generic/test_stats.test +++ b/parser/testdata/corpus/sql/function/generic/test_stats.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 1=1 diff --git a/parser/testdata/corpus/sql/function/generic/test_table_param.test b/parser/testdata/corpus/sql/function/generic/test_table_param.test index a7afc20..4913020 100644 --- a/parser/testdata/corpus/sql/function/generic/test_table_param.test +++ b/parser/testdata/corpus/sql/function/generic/test_table_param.test @@ -1,6 +1,6 @@ # source: test/sql/function/generic/test_table_param.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a (i double, j double); @@ -19,3 +19,15 @@ SELECT * FROM summary((SELECT * FROM a)) -- ok == +SELECT count(*) FROM summary(NULL); +-- +ok +== +SELECT * FROM summary('abc') LIMIT 3; +-- +ok +== +PREPARE p AS SELECT count(*) FROM summary($1); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/index/index_key.test b/parser/testdata/corpus/sql/function/index/index_key.test index 1a225ec..041a6a1 100644 --- a/parser/testdata/corpus/sql/function/index/index_key.test +++ b/parser/testdata/corpus/sql/function/index/index_key.test @@ -1,6 +1,6 @@ # source: test/sql/function/index/index_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1( @@ -236,10 +236,6 @@ SELECT index_key({'table': 'tbl1'}, 'tbl1_idx_composite', NULL::INTEGER, NULL::V -- ok == -SELECT index_key(NULL::STRUCT(t VARCHAR), 'PRIMARY_tbl1_0', 1); --- -ok -== SELECT index_key({'table': 'tbl1'}, 'PRIMARY_tbl1_0', v.id) FROM (VALUES (1), (NULL), (2), (NULL), (3)) AS v(id); -- diff --git a/parser/testdata/corpus/sql/function/interval/date_part_monotonicity.test b/parser/testdata/corpus/sql/function/interval/date_part_monotonicity.test new file mode 100644 index 0000000..5bc9e08 --- /dev/null +++ b/parser/testdata/corpus/sql/function/interval/date_part_monotonicity.test @@ -0,0 +1,141 @@ +# source: test/sql/function/interval/date_part_monotonicity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE intervals(i INTERVAL); +-- +ok +== +INSERT INTO intervals VALUES (INTERVAL '0 days'), (INTERVAL '{years} years'), (INTERVAL '{days} days'), (NULL); +-- +ok +== +SELECT count(*) FROM intervals WHERE {part}(i) = 1; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM intervals WHERE {part}(i) IS NULL; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE TABLE reversed_intervals AS SELECT i FROM intervals WHERE i IS NOT NULL AND i <> INTERVAL '0 days'; +-- +ok +== +SELECT {part}(i) FROM reversed_intervals; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE TABLE equal_intervals AS SELECT INTERVAL '{years} years' AS i UNION ALL SELECT {years} * INTERVAL '360 days'; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM equal_intervals WHERE {part}(i) = 1; +-- +error: Parser Error: syntax error at or near "}" +== +DROP TABLE intervals; +-- +ok +== +DROP TABLE reversed_intervals; +-- +ok +== +DROP TABLE equal_intervals; +-- +ok +== +CREATE TABLE epochs(i INTERVAL); +-- +ok +== +INSERT INTO epochs VALUES (INTERVAL '0 days'), (INTERVAL '1 year'), (INTERVAL '361 days'), (NULL); +-- +ok +== +SELECT count(*) FROM epochs WHERE epoch(i) > epoch(INTERVAL '362 days'); +-- +ok +== +SELECT count(*) FROM epochs WHERE epoch(i) IS NULL; +-- +ok +== +CREATE TABLE reversed_epochs AS SELECT i FROM epochs WHERE i IS NOT NULL AND i <> INTERVAL '0 days'; +-- +ok +== +SELECT epoch(i) FROM reversed_epochs; +-- +ok +== +CREATE TABLE equal_epochs AS SELECT INTERVAL '1 year' AS i UNION ALL SELECT INTERVAL '360 days'; +-- +ok +== +SELECT count(*) FROM equal_epochs WHERE epoch(i) = 31557600; +-- +ok +== +CREATE TABLE milliseconds(i INTERVAL); +-- +ok +== +INSERT INTO milliseconds VALUES (INTERVAL '0 days'), (INTERVAL '1 day -999 microseconds'), (INTERVAL '86399999002 microseconds'), (NULL); +-- +ok +== +SELECT count(*) FROM milliseconds WHERE epoch_ms(i) = 86400000; +-- +ok +== +SELECT count(*) FROM milliseconds WHERE epoch_ms(i) IS NULL; +-- +ok +== +CREATE TABLE reversed_milliseconds AS SELECT i FROM milliseconds WHERE i IS NOT NULL AND i <> INTERVAL '0 days'; +-- +ok +== +SELECT epoch_ms(i) FROM reversed_milliseconds; +-- +ok +== +CREATE TABLE equal_milliseconds AS SELECT INTERVAL '1 day -999 microseconds' AS i UNION ALL SELECT INTERVAL '86399999001 microseconds'; +-- +ok +== +SELECT count(*) FROM equal_milliseconds WHERE epoch_ms(i) = 86400000; +-- +ok +== +SELECT epoch_us(i), epoch_ns(i) FROM reversed_milliseconds ORDER BY i; +-- +ok +== +SELECT count(*) FROM equal_milliseconds WHERE epoch_us(i) = 86399999001 AND epoch_ns(i) = 86399999001000; +-- +ok +== +CREATE TABLE temporal_values(t {type}); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO temporal_values VALUES ('1970-01-01'), ('2000-01-01'), ('2020-01-01'), (NULL); +-- +ok +== +SELECT count(*) = {count} FROM temporal_values WHERE {part}(t) = {value}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM temporal_values WHERE {part}(t) IS NULL; +-- +error: Parser Error: syntax error at or near "}" +== +DROP TABLE temporal_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/interval/test_date_part.test b/parser/testdata/corpus/sql/function/interval/test_date_part.test index a2cd057..83ca491 100644 --- a/parser/testdata/corpus/sql/function/interval/test_date_part.test +++ b/parser/testdata/corpus/sql/function/interval/test_date_part.test @@ -1,6 +1,6 @@ # source: test/sql/function/interval/test_date_part.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE intervals(i INTERVAL, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/interval/test_extract.test b/parser/testdata/corpus/sql/function/interval/test_extract.test index 677abf2..8ad454f 100644 --- a/parser/testdata/corpus/sql/function/interval/test_extract.test +++ b/parser/testdata/corpus/sql/function/interval/test_extract.test @@ -1,12 +1,8 @@ # source: test/sql/function/interval/test_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE TABLE intervals(i INTERVAL); --- -ok -== INSERT INTO intervals VALUES ('2 years'), ('16 months'), ('42 days'), ('2066343400 microseconds'), (NULL); -- ok diff --git a/parser/testdata/corpus/sql/function/interval/test_interval_muldiv.test b/parser/testdata/corpus/sql/function/interval/test_interval_muldiv.test index 38a8175..2cdcf1f 100644 --- a/parser/testdata/corpus/sql/function/interval/test_interval_muldiv.test +++ b/parser/testdata/corpus/sql/function/interval/test_interval_muldiv.test @@ -1,6 +1,6 @@ # source: test/sql/function/interval/test_interval_muldiv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE INTERVAL_MULDIV_TBL (span interval); diff --git a/parser/testdata/corpus/sql/function/interval/test_interval_trunc.test b/parser/testdata/corpus/sql/function/interval/test_interval_trunc.test index 80bcf37..22c8839 100644 --- a/parser/testdata/corpus/sql/function/interval/test_interval_trunc.test +++ b/parser/testdata/corpus/sql/function/interval/test_interval_trunc.test @@ -1,6 +1,6 @@ # source: test/sql/function/interval/test_interval_trunc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO intervals VALUES diff --git a/parser/testdata/corpus/sql/function/list/aggregates/any_value.test b/parser/testdata/corpus/sql/function/list/aggregates/any_value.test index a27847e..0e59e01 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/any_value.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/any_value.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/any_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_aggr([NULL, 1, 2], 'any_value') diff --git a/parser/testdata/corpus/sql/function/list/aggregates/approx_count_distinct.test b/parser/testdata/corpus/sql/function/list/aggregates/approx_count_distinct.test index 3411dde..c8d7afb 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/approx_count_distinct.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/approx_count_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/approx_count_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE list_ints (l INTEGER[]); diff --git a/parser/testdata/corpus/sql/function/list/aggregates/avg.test b/parser/testdata/corpus/sql/function/list/aggregates/avg.test index 8fc168c..9756ef1 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/avg.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/avg.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_avg([nextval('seq')]); diff --git a/parser/testdata/corpus/sql/function/list/aggregates/bigints_sum_avg.test b/parser/testdata/corpus/sql/function/list/aggregates/bigints_sum_avg.test index 68e4821..e76b650 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/bigints_sum_avg.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/bigints_sum_avg.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/bigints_sum_avg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigints (i BIGINT[]); diff --git a/parser/testdata/corpus/sql/function/list/aggregates/bit_and.test b/parser/testdata/corpus/sql/function/list/aggregates/bit_and.test index 4c2b701..e14eb94 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/bit_and.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/bit_and.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/bit_and.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_bit_and([nextval('seq')]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/bit_or.test b/parser/testdata/corpus/sql/function/list/aggregates/bit_or.test index a85bde2..e7731cf 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/bit_or.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/bit_or.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/bit_or.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_bit_or([nextval('seq')]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/bit_xor.test b/parser/testdata/corpus/sql/function/list/aggregates/bit_xor.test index ac98a5c..ac0b73c 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/bit_xor.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/bit_xor.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/bit_xor.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_bit_xor([nextval('seq')]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/bool_and_or.test b/parser/testdata/corpus/sql/function/list/aggregates/bool_and_or.test index 7c2e30e..1128a0a 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/bool_and_or.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/bool_and_or.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/bool_and_or.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_bool_or() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/count.test b/parser/testdata/corpus/sql/function/list/aggregates/count.test index 430a337..27fff82 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/count.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/count.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_count([1, 2, 3]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/entropy.test b/parser/testdata/corpus/sql/function/list/aggregates/entropy.test index 518ea5d..8f76a7d 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/entropy.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/entropy.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/entropy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_entropy() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/first.test b/parser/testdata/corpus/sql/function/list/aggregates/first.test index 7ae1305..c0e3b4e 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/first.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/first.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_aggr([1, 2], 'arbitrary') diff --git a/parser/testdata/corpus/sql/function/list/aggregates/histogram.test b/parser/testdata/corpus/sql/function/list/aggregates/histogram.test index 7b0f8eb..6112c9c 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/histogram.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/histogram.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/histogram.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE const AS SELECT LIST(2) AS i FROM range(200) t1(i) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/histogram_decimal.test b/parser/testdata/corpus/sql/function/list/aggregates/histogram_decimal.test index 8aa50cb..917f2c2 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/histogram_decimal.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/histogram_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/histogram_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte AS (FROM (VALUES (0.0), (9.9)) df(l_orderkey)) SELECT * FROM histogram_values(cte, l_orderkey) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/hugeint.test b/parser/testdata/corpus/sql/function/list/aggregates/hugeint.test index d35e2b1..f5616be 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/hugeint.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/hugeint.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints(h HUGEINT[]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/incorrect.test b/parser/testdata/corpus/sql/function/list/aggregates/incorrect.test index 755ec64..9dfdb2d 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/incorrect.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_aggr([1], 2) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/kurtosis.test b/parser/testdata/corpus/sql/function/list/aggregates/kurtosis.test index 134c979..da42d5c 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/kurtosis.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/kurtosis.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/kurtosis.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_kurtosis([1]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/last.test b/parser/testdata/corpus/sql/function/list/aggregates/last.test index 5883fe1..cd8651b 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/last.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/last.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/last.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_last() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/mad.test b/parser/testdata/corpus/sql/function/list/aggregates/mad.test index 5b091e2..becd7e7 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/mad.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/mad.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/mad.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_mad([1]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/max.test b/parser/testdata/corpus/sql/function/list/aggregates/max.test index eba8c6c..e9841d9 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/max.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/max.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/max.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_max() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/median.test b/parser/testdata/corpus/sql/function/list/aggregates/median.test index 24bd7d5..7abfa24 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/median.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/median.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/median.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE quantile AS SELECT LIST(r::{type}) AS r FROM range(10000) t1(r); diff --git a/parser/testdata/corpus/sql/function/list/aggregates/min.test b/parser/testdata/corpus/sql/function/list/aggregates/min.test index 14eaacc..e069862 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/min.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/min.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/min.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_min() @@ -24,3 +24,11 @@ FROM five_complex -- ok == +SELECT list_aggregate([NULL], 'min'), list_aggregate([NULL, NULL], 'min'), list_aggregate([NULL::INT], 'min'); +-- +ok +== +SELECT list_aggregate([NULL], 'first'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/aggregates/minmax_nested.test b/parser/testdata/corpus/sql/function/list/aggregates/minmax_nested.test index 8443858..9c7cf03 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/minmax_nested.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/minmax_nested.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/minmax_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE structs AS SELECT {'i': i} s FROM range(1000) t(i); diff --git a/parser/testdata/corpus/sql/function/list/aggregates/mode.test b/parser/testdata/corpus/sql/function/list/aggregates/mode.test index 174c096..a3b5f9c 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/mode.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/mode.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_mode() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/nested.test b/parser/testdata/corpus/sql/function/list/aggregates/nested.test index f286596..778e13f 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/nested.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/nested.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_min(list_concat([1, 2], [-1])) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/null_or_empty.test b/parser/testdata/corpus/sql/function/list/aggregates/null_or_empty.test index ccb3bd5..fd1029b 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/null_or_empty.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/null_or_empty.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/null_or_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_aggr(NULL, '{func_name}') diff --git a/parser/testdata/corpus/sql/function/list/aggregates/product.test b/parser/testdata/corpus/sql/function/list/aggregates/product.test index 9ea0fc4..4c4081a 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/product.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/product.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_product() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/sem.test b/parser/testdata/corpus/sql/function/list/aggregates/sem.test index 831be38..ca5c6e8 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/sem.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/sem.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/sem.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_sem() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/skewness.test b/parser/testdata/corpus/sql/function/list/aggregates/skewness.test index 101ef6c..cde5bc3 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/skewness.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/skewness.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/skewness.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_skewness() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/string_agg.test b/parser/testdata/corpus/sql/function/list/aggregates/string_agg.test index bbeff52..75e14ad 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/string_agg.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/string_agg.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/string_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_string_agg() diff --git a/parser/testdata/corpus/sql/function/list/aggregates/sum.test b/parser/testdata/corpus/sql/function/list/aggregates/sum.test index ee88281..d5b7f58 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/sum.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/sum.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/sum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_sum([2, 2]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/sum_bool.test b/parser/testdata/corpus/sql/function/list/aggregates/sum_bool.test index 0f108f9..019b221 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/sum_bool.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/sum_bool.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/sum_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT CASE WHEN i%3=0 THEN NULL ELSE i END i FROM range(10000) t(i); diff --git a/parser/testdata/corpus/sql/function/list/aggregates/sum_no_overflow.test b/parser/testdata/corpus/sql/function/list/aggregates/sum_no_overflow.test index 2ccecbb..bca6138 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/sum_no_overflow.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/sum_no_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/sum_no_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sum_no_overflow(42) @@ -11,3 +11,11 @@ SELECT sum_no_overflow(42.5) -- ok == +SELECT typeof(sum_no_overflow(42::BIGINT)), typeof(sum_no_overflow(42.5)) +-- +ok +== +SELECT sum_no_overflow(i::SMALLINT) FROM range(10) t(i) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/aggregates/uhugeint.test b/parser/testdata/corpus/sql/function/list/aggregates/uhugeint.test index c16ed2e..c860987 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/uhugeint.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/uhugeint.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/uhugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uhugeints(h UHUGEINT[]) diff --git a/parser/testdata/corpus/sql/function/list/aggregates/var_stddev.test b/parser/testdata/corpus/sql/function/list/aggregates/var_stddev.test index 5c25b5e..fa52fed 100644 --- a/parser/testdata/corpus/sql/function/list/aggregates/var_stddev.test +++ b/parser/testdata/corpus/sql/function/list/aggregates/var_stddev.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/aggregates/var_stddev.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table stddev_test(val integer[]) diff --git a/parser/testdata/corpus/sql/function/list/array_length.test b/parser/testdata/corpus/sql/function/list/array_length.test index 925c95c..446f79e 100644 --- a/parser/testdata/corpus/sql/function/list/array_length.test +++ b/parser/testdata/corpus/sql/function/list/array_length.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/array_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT length([1,2,3]) diff --git a/parser/testdata/corpus/sql/function/list/array_to_string.test b/parser/testdata/corpus/sql/function/list/array_to_string.test index 933236e..87404e9 100644 --- a/parser/testdata/corpus/sql/function/list/array_to_string.test +++ b/parser/testdata/corpus/sql/function/list/array_to_string.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/array_to_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_to_string([1,2,3], '') diff --git a/parser/testdata/corpus/sql/function/list/array_to_string_comma_default.test b/parser/testdata/corpus/sql/function/list/array_to_string_comma_default.test index 29d7581..75ca7e7 100644 --- a/parser/testdata/corpus/sql/function/list/array_to_string_comma_default.test +++ b/parser/testdata/corpus/sql/function/list/array_to_string_comma_default.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/array_to_string_comma_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_to_string_comma_default([1,2,3]) diff --git a/parser/testdata/corpus/sql/function/list/cardinality_list.test b/parser/testdata/corpus/sql/function/list/cardinality_list.test new file mode 100644 index 0000000..6abcaca --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/cardinality_list.test @@ -0,0 +1,49 @@ +# source: test/sql/function/list/cardinality_list.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT cardinality([1, 2, 3]) +-- +ok +== +SELECT cardinality([]) +-- +ok +== +SELECT cardinality(NULL::INTEGER[]) +-- +ok +== +SELECT cardinality(['a', NULL, 'c']) +-- +ok +== +SELECT cardinality([[1, 2], [3]]) +-- +ok +== +SELECT cardinality(array_value(1, 2, 3, 4)) +-- +ok +== +SELECT cardinality(MAP {'a': 1, 'b': 2}) +-- +ok +== +CREATE TABLE lists AS SELECT * FROM (VALUES ([1, 2]), ([]), (NULL), ([5, 6, 7])) t(l); +-- +ok +== +SELECT cardinality(l) FROM lists +-- +ok +== +SELECT cardinality(42) +-- +ok +== +SELECT cardinality('abc') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/flatten.test b/parser/testdata/corpus/sql/function/list/flatten.test index 3b22c36..f97afc4 100644 --- a/parser/testdata/corpus/sql/function/list/flatten.test +++ b/parser/testdata/corpus/sql/function/list/flatten.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/flatten.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT flatten([[1, 2, 3, 4]]) @@ -117,3 +117,28 @@ select v.*, flatten(v.list_of_lists) from v_list_of_lists v; -- ok == +ATTACH '{TEST_DIR}/flatten_validity.duckdb' AS flatten_db (ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE TABLE flatten_db.inputs AS +SELECT CASE + WHEN i < 2048 THEN NULL::INTEGER[][] + WHEN i < 4096 THEN [NULL::INTEGER[]] + ELSE [[i::INTEGER]] + END AS nested +FROM range(6144) tbl(i) +-- +ok +== +SELECT count(*) FROM flatten_db.inputs WHERE flatten(nested) IS NOT NULL; +-- +ok +== +EXPLAIN ANALYZE +SELECT sum(array_length(flatten(nested))) +FROM flatten_db.inputs +WHERE flatten(nested) IS NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/generate_series.test b/parser/testdata/corpus/sql/function/list/generate_series.test index 3cde0f6..1c95f9e 100644 --- a/parser/testdata/corpus/sql/function/list/generate_series.test +++ b/parser/testdata/corpus/sql/function/list/generate_series.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/generate_series.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT range(3) diff --git a/parser/testdata/corpus/sql/function/list/generate_series_timestamp.test b/parser/testdata/corpus/sql/function/list/generate_series_timestamp.test index b18d3d2..cbb7857 100644 --- a/parser/testdata/corpus/sql/function/list/generate_series_timestamp.test +++ b/parser/testdata/corpus/sql/function/list/generate_series_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/generate_series_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT generate_series(timestamp '2020-01-01', timestamp '2020-07-01', interval '3' month); diff --git a/parser/testdata/corpus/sql/function/list/generate_subscripts.test b/parser/testdata/corpus/sql/function/list/generate_subscripts.test index d7fd609..4584ff5 100644 --- a/parser/testdata/corpus/sql/function/list/generate_subscripts.test +++ b/parser/testdata/corpus/sql/function/list/generate_subscripts.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/generate_subscripts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT generate_subscripts([4,5,6], 1) diff --git a/parser/testdata/corpus/sql/function/list/icu_generate_series_timestamptz.test b/parser/testdata/corpus/sql/function/list/icu_generate_series_timestamptz.test index 68a27f8..964e774 100644 --- a/parser/testdata/corpus/sql/function/list/icu_generate_series_timestamptz.test +++ b/parser/testdata/corpus/sql/function/list/icu_generate_series_timestamptz.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/icu_generate_series_timestamptz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT generate_series(timestamptz '2020-01-01', timestamptz '2020-07-01', interval '3' month); diff --git a/parser/testdata/corpus/sql/function/list/lambda_constant_null.test b/parser/testdata/corpus/sql/function/list/lambda_constant_null.test index b7198b6..2fe445c 100644 --- a/parser/testdata/corpus/sql/function/list/lambda_constant_null.test +++ b/parser/testdata/corpus/sql/function/list/lambda_constant_null.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambda_constant_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT quantile(NULL, filter(NULL, (lambda c103: 'babea54a-2261-4b0c-b14b-1d0e9b794e1a'))); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/expression_iterator_cases_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/expression_iterator_cases_deprecated.test index 5788d77..5453fcb 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/expression_iterator_cases_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/expression_iterator_cases_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/expression_iterator_cases_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET lambda_syntax='ENABLE_SINGLE_ARROW' diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/filter_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/filter_deprecated.test index 21b65e9..2b2123d 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/filter_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/filter_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/filter_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1] AS l, list_filter([1], l -> l > 1) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambda_scope_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambda_scope_deprecated.test index 40d37a5..18ec9ff 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambda_scope_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambda_scope_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/lambda_scope_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT [1, 2, 3] AS x; diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_functions_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_functions_deprecated.test index 088bd35..7c9abab 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_functions_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_functions_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/lambdas_and_functions_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE function demo(n, z) AS TABLE ( diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_group_by_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_group_by_deprecated.test index 92f9188..e80ae97 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_group_by_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_group_by_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/lambdas_and_group_by_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (tag_product VARCHAR); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_macros_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_macros_deprecated.test index 57d4d47..e280087 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_macros_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/lambdas_and_macros_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/lambdas_and_macros_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select range i from range(3); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/list_comprehension_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/list_comprehension_deprecated.test index be1fb2d..81ca990 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/list_comprehension_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/list_comprehension_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/list_comprehension_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_transform(list_filter([0, 1, 2, 3, 4, 5], x -> x % 2 = 0), y -> y * y) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_deprecated.test index 943b9fe..67518db 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/reduce_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_reduce([1, 2, 3], (x, y) -> x + y); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_initial_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_initial_deprecated.test index b6ff86e..2866486 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_initial_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/reduce_initial_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/reduce_initial_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_reduce([1, 2, 3], (x, y) -> x + y, 100); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/rhs_parameters_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/rhs_parameters_deprecated.test index f3ba9a5..167c129 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/rhs_parameters_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/rhs_parameters_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/rhs_parameters_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_apply([1,2], x -> list_apply([3,4], y -> {'x': x, 'y': y})) AS bug; diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/storage_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/storage_deprecated.test index 2d4a0cf..ba2a24c 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/storage_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/storage_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/storage_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO my_transform(list) AS list_transform(list, x -> x * x) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/table_functions_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/table_functions_deprecated.test index fc83c3a..71ed570 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/table_functions_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/table_functions_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/table_functions_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tmp AS SELECT range AS id FROM range(10); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_deprecated_lambda.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_deprecated_lambda.test index da7fa71..86fdd96 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_deprecated_lambda.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_deprecated_lambda.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/test_deprecated_lambda.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET lambda_syntax='DISABLE_SINGLE_ARROW' diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_lambda_arrow_storage_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_lambda_arrow_storage_deprecated.test index 5617bc3..f0449b6 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_lambda_arrow_storage_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/test_lambda_arrow_storage_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/test_lambda_arrow_storage_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/deprecated_syntax.db'; diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_deprecated.test index 95f2c67..9a7b6fe 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/transform_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1] AS l, list_transform([1], l -> l + 1) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_with_index_deprecated.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_with_index_deprecated.test index 0e2b2e5..210e0b1 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_with_index_deprecated.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/transform_with_index_deprecated.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/transform_with_index_deprecated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_transform([1, 2, 3], x -> list_transform([4, 5, 6], (y, y_i) -> x + y + y_i)); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/arrow/warn_deprecated_arrow.test b/parser/testdata/corpus/sql/function/list/lambdas/arrow/warn_deprecated_arrow.test index f98074f..2e4c6a2 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/arrow/warn_deprecated_arrow.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/arrow/warn_deprecated_arrow.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/arrow/warn_deprecated_arrow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT log_level, message[0:37] FROM duckdb_logs diff --git a/parser/testdata/corpus/sql/function/list/lambdas/expression_iterator_cases.test b/parser/testdata/corpus/sql/function/list/lambdas/expression_iterator_cases.test index da427d5..692221a 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/expression_iterator_cases.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/expression_iterator_cases.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/expression_iterator_cases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_transform([10], lambda x: sum(1) + x) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/filter.test b/parser/testdata/corpus/sql/function/list/lambdas/filter.test index cefa605..a9b7370 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/filter.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/filter.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1] AS l, list_filter([1], lambda l: l > 1) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/incorrect.test b/parser/testdata/corpus/sql/function/list/lambdas/incorrect.test index 6586d22..7a5d1fb 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/incorrect.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/incorrect.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/incorrect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE incorrect_test (i INTEGER); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/lambda_aggregate_reference.test b/parser/testdata/corpus/sql/function/list/lambdas/lambda_aggregate_reference.test new file mode 100644 index 0000000..7ecc2ff --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/lambdas/lambda_aggregate_reference.test @@ -0,0 +1,37 @@ +# source: test/sql/function/list/lambdas/lambda_aggregate_reference.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT [fruit for fruit in ['apple', 'banana'] if string_agg(fruit, 'a')]; +-- +ok +== +SELECT list_filter(['apple', 'banana'], lambda x: count(x) > 0); +-- +ok +== +SELECT list_transform([1, 2, 3], lambda x: sum(x)); +-- +ok +== +CREATE TABLE t AS SELECT range i, [range, range + 1] l FROM range(3); +-- +ok +== +SELECT list_transform([1, 2], lambda x: sum(i) FILTER (WHERE i > x)) FROM t; +-- +ok +== +SELECT list_transform([1, 2], lambda x: list(i ORDER BY i * x)) FROM t; +-- +ok +== +SELECT list_transform([1, 2], lambda x: x + sum(i)) FROM t; +-- +ok +== +SELECT sum(list_reduce(l, lambda x, y: x + y)) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/lambdas/lambda_scope.test b/parser/testdata/corpus/sql/function/list/lambdas/lambda_scope.test index b530e48..b46f9a3 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/lambda_scope.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/lambda_scope.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/lambda_scope.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_apply(['hello'], lambda x: x) FROM t1; diff --git a/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_functions.test b/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_functions.test index 338fe3a..197c2e1 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_functions.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_functions.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/lambdas_and_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE function demo(n, z) AS TABLE ( diff --git a/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_group_by.test b/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_group_by.test index bd7b51b..baa49c4 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_group_by.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_group_by.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/lambdas_and_group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT tag_product, list_aggr(list_transform( diff --git a/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_macros.test b/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_macros.test index 91b9993..3a4c007 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_macros.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/lambdas_and_macros.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/lambdas_and_macros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT range i FROM range(3); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/list_comprehension.test b/parser/testdata/corpus/sql/function/list/lambdas/list_comprehension.test index 61094a3..d484402 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/list_comprehension.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/list_comprehension.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/list_comprehension.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_transform(list_filter([0, 1, 2, 3, 4, 5], lambda x: x % 2 = 0), lambda y: y * y) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/reduce.test b/parser/testdata/corpus/sql/function/list/lambdas/reduce.test index 939825d..00c7eda 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/reduce.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/reduce.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/reduce.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_reduce([1, 2, 3], lambda x, y: x * y); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/reduce_alias_initial_value_type.test b/parser/testdata/corpus/sql/function/list/lambdas/reduce_alias_initial_value_type.test new file mode 100644 index 0000000..115d1ee --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/lambdas/reduce_alias_initial_value_type.test @@ -0,0 +1,21 @@ +# source: test/sql/function/list/lambdas/reduce_alias_initial_value_type.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT reduce([1.0, 2.0, 3.0], lambda x, y: x + y, 100), array_reduce([1.0, 2.0, 3.0], lambda x, y: x + y, 100), list_reduce([1.0, 2.0, 3.0], lambda x, y: x + y, 100), reduce([1.5, 2.5], lambda x, y: x + y, 100); +-- +ok +== +SELECT reduce([1, 1000, 3], lambda x, y: x + y, 100), reduce([1, 1e308, 3], lambda x, y: x + y, 100); +-- +ok +== +SELECT reduce([1.0, 2.5], lambda x, y: x + y); +-- +ok +== +SELECT reduce(l, lambda x, y: x + y, 100) FROM (VALUES ([1.5, 2.5]), ([0.5]), (NULL), ([])) t(l) ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/lambdas/reduce_captured_columns.test b/parser/testdata/corpus/sql/function/list/lambdas/reduce_captured_columns.test new file mode 100644 index 0000000..88a186d --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/lambdas/reduce_captured_columns.test @@ -0,0 +1,51 @@ +# source: test/sql/function/list/lambdas/reduce_captured_columns.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list_reduce(l, lambda acc, x: acc + x + v, 0) +FROM (VALUES ([1], 10), ([1, 2], 30)) t(l, v); +-- +ok +== +SELECT v, list_reduce(l, lambda acc, x: acc + x + v, 0) +FROM (VALUES ([], 0), ([1], 10), ([1, 2], 30)) t(l, v) +WHERE v > 0; +-- +ok +== +CREATE TABLE t (l INTEGER[], v INTEGER, initial INTEGER); +-- +ok +== +INSERT INTO t VALUES ([1], 10, 100), ([], 20, 200), (NULL, 25, 250), ([1, 2], 30, 300), ([1, 2, 3], NULL, 400); +-- +ok +== +SELECT list_reduce(l, lambda acc, x: acc + x + v, 0), + list_reduce(l, lambda acc, x: acc + x + v, initial) +FROM t; +-- +ok +== +SELECT list_reduce(l, lambda acc, x: acc + x + v + initial, 0), + list_reduce(l, lambda acc, x, i: acc + x + v + i, 0) +FROM t; +-- +ok +== +SELECT list_reduce(l, lambda acc, x: acc + x + v) +FROM t WHERE len(l) > 0; +-- +ok +== +SELECT label, list_reduce(l, lambda acc, x: acc || label || x, '') +FROM (VALUES (['x'], 'A'), (['x', 'y'], 'B')) t(l, label); +-- +ok +== +SELECT list_reduce(l, lambda acc, x: acc + x + v, 0) +FROM (VALUES ([1], NULL), ([1, 2], 30)) t(l, v); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/lambdas/reduce_initial.test b/parser/testdata/corpus/sql/function/list/lambdas/reduce_initial.test index 5f06f38..c977f56 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/reduce_initial.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/reduce_initial.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/reduce_initial.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_reduce([1, 2, 3], lambda x, y: x + y, 100); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/rhs_parameters.test b/parser/testdata/corpus/sql/function/list/lambdas/rhs_parameters.test index 396c52c..0ffa630 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/rhs_parameters.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/rhs_parameters.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/rhs_parameters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_apply([1,2], lambda x: list_apply([3,4], lambda y: {'x': x, 'y': y})) AS bug; diff --git a/parser/testdata/corpus/sql/function/list/lambdas/storage.test b/parser/testdata/corpus/sql/function/list/lambdas/storage.test index b02ab3a..67b046f 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/storage.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/storage.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO my_transform(list) AS list_transform(list, lambda x: x * x) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/table_functions.test b/parser/testdata/corpus/sql/function/list/lambdas/table_functions.test index b98c55b..a7bc63e 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/table_functions.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/table_functions.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/table_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM read_parquet('{TEST_DIR}/my_file_' || diff --git a/parser/testdata/corpus/sql/function/list/lambdas/test_lambda_storage.test b/parser/testdata/corpus/sql/function/list/lambdas/test_lambda_storage.test index 819c28e..771a6dd 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/test_lambda_storage.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/test_lambda_storage.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/test_lambda_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(list_i[1]) FROM lambda_view; diff --git a/parser/testdata/corpus/sql/function/list/lambdas/transform.test b/parser/testdata/corpus/sql/function/list/lambdas/transform.test index 14b8629..0aa4411 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/transform.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/transform.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/transform.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1] AS l, list_transform([1], lambda l: l + 1) diff --git a/parser/testdata/corpus/sql/function/list/lambdas/transform_with_index.test b/parser/testdata/corpus/sql/function/list/lambdas/transform_with_index.test index 717c868..9338cc4 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/transform_with_index.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/transform_with_index.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/transform_with_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_transform([1, 2, 3], lambda x: list_transform([4, 5, 6], lambda y, y_i: x + y + y_i)); diff --git a/parser/testdata/corpus/sql/function/list/lambdas/vector_types.test b/parser/testdata/corpus/sql/function/list/lambdas/vector_types.test index 150ceed..7b6ccfa 100644 --- a/parser/testdata/corpus/sql/function/list/lambdas/vector_types.test +++ b/parser/testdata/corpus/sql/function/list/lambdas/vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/lambdas/vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [x for x in c if x IS NOT NULL] FROM test_vector_types(NULL::INT[]) t(c); diff --git a/parser/testdata/corpus/sql/function/list/list_concat.test b/parser/testdata/corpus/sql/function/list/list_concat.test index 0e7dcb0..e37f80c 100644 --- a/parser/testdata/corpus/sql/function/list/list_concat.test +++ b/parser/testdata/corpus/sql/function/list/list_concat.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_concat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_concat([1, 2], [3, 4]) diff --git a/parser/testdata/corpus/sql/function/list/list_contains.test b/parser/testdata/corpus/sql/function/list/list_contains.test index b5dd0ef..17e9106 100644 --- a/parser/testdata/corpus/sql/function/list/list_contains.test +++ b/parser/testdata/corpus/sql/function/list/list_contains.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table TEST2 (i int[], j int); diff --git a/parser/testdata/corpus/sql/function/list/list_cosine_similarity.test b/parser/testdata/corpus/sql/function/list/list_cosine_similarity.test index 3a6501d..6af5b76 100644 --- a/parser/testdata/corpus/sql/function/list/list_cosine_similarity.test +++ b/parser/testdata/corpus/sql/function/list/list_cosine_similarity.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_cosine_similarity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_cosine_similarity([1, 2, 3]::{type}[], [1, 2, 3]::{type}[]); diff --git a/parser/testdata/corpus/sql/function/list/list_distance.test b/parser/testdata/corpus/sql/function/list/list_distance.test index c08e761..76f6a7c 100644 --- a/parser/testdata/corpus/sql/function/list/list_distance.test +++ b/parser/testdata/corpus/sql/function/list/list_distance.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_distance.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_distance([1, 2, 3]::{type}[], [1, 2, 3]::{type}[]); @@ -31,3 +31,31 @@ SELECT list_distance([], []); -- ok == +SELECT [1.0, 2.0] <-> [2.0, 4.0]; +-- +ok +== +SELECT [1.0, 2.0]<->[2.0, 4.0]; +-- +ok +== +SELECT ([0.0, 0.0] <-> [3.0, 4.0]) + 1; +-- +ok +== +SELECT [0.0, 0.0] <-> [3.0, 4.0] = 5.0; +-- +ok +== +SELECT [1.0, 2.0] <=> [2.0, 4.0]; +-- +ok +== +PREPARE list_distance_operator AS SELECT $1::DOUBLE[] <-> $2::DOUBLE[]; +-- +ok +== +EXECUTE list_distance_operator([1.0, 2.0], [2.0, 4.0]); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_distinct.test b/parser/testdata/corpus/sql/function/list/list_distinct.test index aa43ff3..272dcad 100644 --- a/parser/testdata/corpus/sql/function/list/list_distinct.test +++ b/parser/testdata/corpus/sql/function/list/list_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_distinct(NULL) diff --git a/parser/testdata/corpus/sql/function/list/list_functions_constant_child.test b/parser/testdata/corpus/sql/function/list/list_functions_constant_child.test new file mode 100644 index 0000000..1582927 --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_functions_constant_child.test @@ -0,0 +1,13 @@ +# source: test/sql/function/list/list_functions_constant_child.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list_select(TRY_CAST(l AS UUID[]), [2, 1]), list_where(TRY_CAST(l AS UUID[]), [true, false]) FROM (SELECT [1, 2, 3] l) +-- +ok +== +SELECT {func}(TRY_CAST(a AS FLOAT[3]), [1, 2, 3]::FLOAT[3]) FROM (SELECT [uuid(), uuid(), uuid()]::UUID[3] a) +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/function/list/list_grade_up_variant.test b/parser/testdata/corpus/sql/function/list/list_grade_up_variant.test new file mode 100644 index 0000000..f288abc --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_grade_up_variant.test @@ -0,0 +1,37 @@ +# source: test/sql/function/list/list_grade_up_variant.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list_grade_up(CAST({'a': 1, 'z': regexp_matches('q', repeat(chr(81), 224) || chr(96)||chr(59)||chr(120)||chr(3)||chr(0)||chr(0)||chr(0))} AS VARIANT)) +-- +ok +== +SELECT list_grade_up(CAST({'a': 1, 'z': 2} AS VARIANT)) +-- +ok +== +SELECT list_sort(CAST({'a': 1, 'z': 2} AS VARIANT)) +-- +ok +== +PREPARE p AS SELECT list_grade_up(?) +-- +ok +== +EXECUTE p([3, 1, 2]) +-- +ok +== +SELECT list_grade_up([3, 1, 2]) +-- +ok +== +SELECT list_grade_up(NULL) +-- +ok +== +SELECT list_grade_up(NULL::INT[]) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_has_any_and_has_all.test b/parser/testdata/corpus/sql/function/list/list_has_any_and_has_all.test index b3dc7b7..f8fc873 100644 --- a/parser/testdata/corpus/sql/function/list/list_has_any_and_has_all.test +++ b/parser/testdata/corpus/sql/function/list/list_has_any_and_has_all.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_has_any_and_has_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_has_any([1,2,3], [2,3,4]); diff --git a/parser/testdata/corpus/sql/function/list/list_inner_product.test b/parser/testdata/corpus/sql/function/list/list_inner_product.test index 76092e9..1afc6f9 100644 --- a/parser/testdata/corpus/sql/function/list/list_inner_product.test +++ b/parser/testdata/corpus/sql/function/list/list_inner_product.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_inner_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_inner_product([], []); diff --git a/parser/testdata/corpus/sql/function/list/list_intersect.test b/parser/testdata/corpus/sql/function/list/list_intersect.test index 5a91ec5..7ca6661 100644 --- a/parser/testdata/corpus/sql/function/list/list_intersect.test +++ b/parser/testdata/corpus/sql/function/list/list_intersect.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_intersect.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_sort({f}([1,2,3], [2,3,4])); diff --git a/parser/testdata/corpus/sql/function/list/list_position.test b/parser/testdata/corpus/sql/function/list/list_position.test index 84b2503..80a9c0e 100644 --- a/parser/testdata/corpus/sql/function/list/list_position.test +++ b/parser/testdata/corpus/sql/function/list/list_position.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_position.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select list_position(i, j) from TEST2 diff --git a/parser/testdata/corpus/sql/function/list/list_position_nan.test b/parser/testdata/corpus/sql/function/list/list_position_nan.test index a15dc6d..b6daa6c 100644 --- a/parser/testdata/corpus/sql/function/list/list_position_nan.test +++ b/parser/testdata/corpus/sql/function/list/list_position_nan.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_position_nan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_position(['NaN'::DOUBLE], 'NaN'::DOUBLE) diff --git a/parser/testdata/corpus/sql/function/list/list_position_null_needle.test b/parser/testdata/corpus/sql/function/list/list_position_null_needle.test new file mode 100644 index 0000000..66c7697 --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_position_null_needle.test @@ -0,0 +1,65 @@ +# source: test/sql/function/list/list_position_null_needle.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT a, list_position(a, NULL) IS NOT NULL +FROM VALUES ([2, 2, 3, NULL, NULL]), (NULL), ([]::INTEGER[]), ([NULL]) df(a) +-- +ok +== +SELECT a, list_position(a, NULL) +FROM VALUES ([2, 2, 3, NULL, NULL]), (NULL), ([]::INTEGER[]), ([NULL]) df(a) +-- +ok +== +CREATE TABLE lists AS +SELECT a FROM VALUES ([2, 2, 3, NULL, NULL]), (NULL), ([]::INTEGER[]), ([NULL]) df(a); +-- +ok +== +SELECT a, list_position(a, NULL) FROM lists +-- +ok +== +SELECT count(*) FROM lists WHERE list_position(a, NULL) IS NOT NULL +-- +ok +== +CREATE TABLE no_null_elements AS SELECT [i, i + 1] AS a FROM range(3) tbl(i); +-- +ok +== +SELECT a, list_position(a, NULL) FROM no_null_elements +-- +ok +== +SELECT count(*) FROM no_null_elements WHERE list_position(a, NULL) IS NOT NULL +-- +ok +== +CREATE TABLE only_null_elements AS SELECT [NULL::INTEGER, NULL] AS a FROM range(3); +-- +ok +== +SELECT a, list_position(a, NULL), list_position(a, 42) FROM only_null_elements +-- +ok +== +CREATE TABLE null_lists AS SELECT NULL::INTEGER[] AS a FROM range(3); +-- +ok +== +SELECT list_position(a, NULL), list_position(a, 42) FROM null_lists +-- +ok +== +SELECT a, list_contains(a, NULL) FROM lists +-- +ok +== +SELECT a, list_position(a, b) +FROM VALUES ([1, NULL], NULL), ([1, NULL], 1), ([1, 2], NULL) df(a, b) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_resize.test b/parser/testdata/corpus/sql/function/list/list_resize.test index 97f3bb4..6ba5eab 100644 --- a/parser/testdata/corpus/sql/function/list/list_resize.test +++ b/parser/testdata/corpus/sql/function/list/list_resize.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_resize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_resize([1, 2, 4], 2); diff --git a/parser/testdata/corpus/sql/function/list/list_resize_error.test b/parser/testdata/corpus/sql/function/list/list_resize_error.test index 4dae98c..e77bf7e 100644 --- a/parser/testdata/corpus/sql/function/list/list_resize_error.test +++ b/parser/testdata/corpus/sql/function/list/list_resize_error.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_resize_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit execute {q}([1, 2, 3], 'a'); diff --git a/parser/testdata/corpus/sql/function/list/list_resize_vector_types.test b/parser/testdata/corpus/sql/function/list/list_resize_vector_types.test new file mode 100644 index 0000000..44ed6cb --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_resize_vector_types.test @@ -0,0 +1,17 @@ +# source: test/sql/function/list/list_resize_vector_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(list_resize([1, 2], 3, b)) FROM test_vector_types(NULL::INT) t(b) +-- +ok +== +SELECT count(list_resize(a, 3, b)) FROM test_vector_types(NULL::INT[], NULL::INT) t(a, b) +-- +ok +== +SELECT list_resize([1], 4, i) FROM range(3) t(i) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_reverse.test b/parser/testdata/corpus/sql/function/list/list_reverse.test index 0ea9a38..3fb6501 100644 --- a/parser/testdata/corpus/sql/function/list/list_reverse.test +++ b/parser/testdata/corpus/sql/function/list/list_reverse.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_reverse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_reverse(NULL); diff --git a/parser/testdata/corpus/sql/function/list/list_select.test b/parser/testdata/corpus/sql/function/list/list_select.test new file mode 100644 index 0000000..5c8f73b --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_select.test @@ -0,0 +1,21 @@ +# source: test/sql/function/list/list_select.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list_select(values, positions) +FROM (VALUES + (1, [1, 2, NULL, 4], [4, 2, 5, -1]), + (2, [1, 2, NULL, 4], [3]), + (3, NULL::INTEGER[], [1]), + (4, [1, 2], NULL::INTEGER[]), + (5, []::INTEGER[], []::INTEGER[]) +) t(id, values, positions) +ORDER BY id +-- +ok +== +SELECT list_select([1, 2, 3], [NULL]) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_slice_min_step.test b/parser/testdata/corpus/sql/function/list/list_slice_min_step.test new file mode 100644 index 0000000..b11212d --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_slice_min_step.test @@ -0,0 +1,9 @@ +# source: test/sql/function/list/list_slice_min_step.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list_slice([1,2,3,4,5], 5, 1, -9223372036854775808), [1,2,3,4,5][5:1:-9223372036854775808], list_slice([1,2,3,4,5], 1, 5, 9223372036854775807), list_slice([1,2,3,4,5], 5, 1, -2) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_sort_having.test b/parser/testdata/corpus/sql/function/list/list_sort_having.test index abdb4c7..578ed76 100644 --- a/parser/testdata/corpus/sql/function/list/list_sort_having.test +++ b/parser/testdata/corpus/sql/function/list/list_sort_having.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_sort_having.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table test1 as ( diff --git a/parser/testdata/corpus/sql/function/list/list_sort_interval.test b/parser/testdata/corpus/sql/function/list/list_sort_interval.test new file mode 100644 index 0000000..0eb1cdc --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_sort_interval.test @@ -0,0 +1,61 @@ +# source: test/sql/function/list/list_sort_interval.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT i FROM (VALUES (INTERVAL '31 days'), (INTERVAL '1 month')) t(i) ORDER BY i +-- +ok +== +SELECT list_sort([INTERVAL '31 days', INTERVAL '1 month']) +-- +ok +== +SELECT list_reverse_sort([INTERVAL '31 days', INTERVAL '1 month']) +-- +ok +== +SELECT list_sort([INTERVAL '31 days', INTERVAL '1 month'], 'DESC') +-- +ok +== +SELECT list_grade_up([INTERVAL '31 days', INTERVAL '1 month']) +-- +ok +== +SELECT list_sort(list_distinct([INTERVAL '31 days', INTERVAL '1 month', INTERVAL '31 days'])) +-- +ok +== +SELECT list_sort([INTERVAL '25 hours', INTERVAL '1 day 1 hour', INTERVAL '1500 minutes']) +-- +ok +== +SELECT list_sort([INTERVAL '25 hours', INTERVAL '1 day 1 hour', INTERVAL '1500 minutes'], 'DESC') +-- +ok +== +SELECT list_sort([INTERVAL '31 days', NULL, INTERVAL '1 month'], 'ASC', 'NULLS FIRST') +-- +ok +== +SELECT list_sort([INTERVAL '31 days', NULL, INTERVAL '1 month'], 'ASC', 'NULLS LAST') +-- +ok +== +SELECT i FROM (VALUES (INTERVAL '-31 days'), (INTERVAL '-1 month')) t(i) ORDER BY i +-- +ok +== +SELECT list_sort([INTERVAL '-31 days', INTERVAL '-1 month']) +-- +ok +== +SELECT list_sort([INTERVAL '-31 days', INTERVAL '-1 month'], 'DESC') +-- +ok +== +SELECT create_sort_key(INTERVAL '31 days', 'ASC NULLS LAST') < create_sort_key(INTERVAL '1 month', 'ASC NULLS LAST') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_sort_typed_null.test b/parser/testdata/corpus/sql/function/list/list_sort_typed_null.test new file mode 100644 index 0000000..bbd8156 --- /dev/null +++ b/parser/testdata/corpus/sql/function/list/list_sort_typed_null.test @@ -0,0 +1,38 @@ +# source: test/sql/function/list/list_sort_typed_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(i INT); +-- +ok +== +SELECT typeof(list_sort(NULL::INT[])), typeof(list_reverse_sort(NULL::INT[])), typeof(array_sort(NULL::INT[3])), + typeof(list_grade_up(NULL::INT[])), typeof(list_sort(NULL::VARCHAR[], 'DESC')); +-- +ok +== +SELECT typeof(list_sort(NULL::INT[])[1]), list_sort(NULL::INT[])[1]; +-- +ok +== +SELECT list_transform(list_filter(list_sort(NULL::INT[]), lambda x: x > i), lambda x: x + 1) FROM t; +-- +ok +== +CREATE TABLE t2 AS SELECT list_sort(NULL::INT[]) l, list_grade_up(NULL::INT[]) g; +-- +ok +== +SELECT typeof(l), typeof(g) FROM t2; +-- +ok +== +SELECT list_sort([3, 1, 2]), list_grade_up([3, 1, 2]); +-- +ok +== +SELECT list_sort(NULL); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/list/list_sort_vector_types.test b/parser/testdata/corpus/sql/function/list/list_sort_vector_types.test index 1f15951..11a1f0a 100644 --- a/parser/testdata/corpus/sql/function/list/list_sort_vector_types.test +++ b/parser/testdata/corpus/sql/function/list/list_sort_vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_sort_vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_sort(l) FROM test_vector_types(NULL::INT[], all_flat={flatten}) tbl(l) diff --git a/parser/testdata/corpus/sql/function/list/list_unique.test b/parser/testdata/corpus/sql/function/list/list_unique.test index 405900e..b933051 100644 --- a/parser/testdata/corpus/sql/function/list/list_unique.test +++ b/parser/testdata/corpus/sql/function/list/list_unique.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_unique.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_unique(NULL) diff --git a/parser/testdata/corpus/sql/function/list/list_value_arrays.test b/parser/testdata/corpus/sql/function/list/list_value_arrays.test index bde4ede..2d7da4b 100644 --- a/parser/testdata/corpus/sql/function/list/list_value_arrays.test +++ b/parser/testdata/corpus/sql/function/list/list_value_arrays.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_value_arrays.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_value([3, 2, 1]::INTEGER[3], [4, 5, 6]::INTEGER[3]); diff --git a/parser/testdata/corpus/sql/function/list/list_value_nested_lists.test b/parser/testdata/corpus/sql/function/list/list_value_nested_lists.test index 8bc874a..bac0644 100644 --- a/parser/testdata/corpus/sql/function/list/list_value_nested_lists.test +++ b/parser/testdata/corpus/sql/function/list/list_value_nested_lists.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_value_nested_lists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT LIST_VALUE([1, 7], [2], [3]); diff --git a/parser/testdata/corpus/sql/function/list/list_value_structs.test b/parser/testdata/corpus/sql/function/list/list_value_structs.test index 1c828fb..cfcdc3d 100644 --- a/parser/testdata/corpus/sql/function/list/list_value_structs.test +++ b/parser/testdata/corpus/sql/function/list/list_value_structs.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_value_structs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_value({'a': 1, 'b': 'a'}, {'a': 2, 'b': 'b'}); diff --git a/parser/testdata/corpus/sql/function/list/list_where.test b/parser/testdata/corpus/sql/function/list/list_where.test index 8f37afb..6c8a1a7 100644 --- a/parser/testdata/corpus/sql/function/list/list_where.test +++ b/parser/testdata/corpus/sql/function/list/list_where.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_where.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers (i int[]) diff --git a/parser/testdata/corpus/sql/function/list/list_zip.test b/parser/testdata/corpus/sql/function/list/list_zip.test index 13adebe..7954b1d 100644 --- a/parser/testdata/corpus/sql/function/list/list_zip.test +++ b/parser/testdata/corpus/sql/function/list/list_zip.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/list_zip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bools (b bool) diff --git a/parser/testdata/corpus/sql/function/list/repeat_list.test b/parser/testdata/corpus/sql/function/list/repeat_list.test index 962eba9..5f7fb53 100644 --- a/parser/testdata/corpus/sql/function/list/repeat_list.test +++ b/parser/testdata/corpus/sql/function/list/repeat_list.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/repeat_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT repeat([1], 10); diff --git a/parser/testdata/corpus/sql/function/list/test_lambda_with_struct_aliases.test b/parser/testdata/corpus/sql/function/list/test_lambda_with_struct_aliases.test index 61b7a95..db75fb8 100644 --- a/parser/testdata/corpus/sql/function/list/test_lambda_with_struct_aliases.test +++ b/parser/testdata/corpus/sql/function/list/test_lambda_with_struct_aliases.test @@ -1,6 +1,6 @@ # source: test/sql/function/list/test_lambda_with_struct_aliases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COALESCE(*COLUMNS(lambda c: {'title': c}.title IN ('a', 'c'))) diff --git a/parser/testdata/corpus/sql/function/nested/array_extract_unnamed_struct.test b/parser/testdata/corpus/sql/function/nested/array_extract_unnamed_struct.test index 00650f2..ee2a8df 100644 --- a/parser/testdata/corpus/sql/function/nested/array_extract_unnamed_struct.test +++ b/parser/testdata/corpus/sql/function/nested/array_extract_unnamed_struct.test @@ -1,6 +1,6 @@ # source: test/sql/function/nested/array_extract_unnamed_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (ROW(42, 84))['element'] diff --git a/parser/testdata/corpus/sql/function/nested/test_issue_5437.test b/parser/testdata/corpus/sql/function/nested/test_issue_5437.test index f772a4d..201d9bb 100644 --- a/parser/testdata/corpus/sql/function/nested/test_issue_5437.test +++ b/parser/testdata/corpus/sql/function/nested/test_issue_5437.test @@ -1,6 +1,6 @@ # source: test/sql/function/nested/test_issue_5437.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with data as ( diff --git a/parser/testdata/corpus/sql/function/nested/test_struct_insert.test b/parser/testdata/corpus/sql/function/nested/test_struct_insert.test index 80439f1..8732647 100644 --- a/parser/testdata/corpus/sql/function/nested/test_struct_insert.test +++ b/parser/testdata/corpus/sql/function/nested/test_struct_insert.test @@ -1,6 +1,6 @@ # source: test/sql/function/nested/test_struct_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT struct_insert ({a: 1, b: 2}, c := 3); @@ -44,3 +44,27 @@ SELECT struct_insert(col, a := NULL, b := NULL::VARCHAR, c := [NULL]) FROM tbl O -- ok == +PREPARE q AS SELECT struct_insert($1, b := $2) r; +-- +ok +== +EXECUTE q({'a': 1}, 2); +-- +ok +== +EXECUTE q({'x': 'y'}, [1, 2]); +-- +ok +== +EXECUTE q(1, 2); +-- +ok +== +PREPARE q2 AS SELECT struct_insert({'a': 1}, b := $1) r; +-- +ok +== +EXECUTE q2('z'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/nested/test_struct_update.test b/parser/testdata/corpus/sql/function/nested/test_struct_update.test index 33ba567..1bfe518 100644 --- a/parser/testdata/corpus/sql/function/nested/test_struct_update.test +++ b/parser/testdata/corpus/sql/function/nested/test_struct_update.test @@ -1,6 +1,6 @@ # source: test/sql/function/nested/test_struct_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT struct_update ({a: 1, b: 2}, c := 3); @@ -76,3 +76,27 @@ SELECT struct_update(col, i := col.i+10, a := NULL, b := NULL::VARCHAR, c := [NU -- ok == +CREATE TABLE t0(c0 STRUCT(a INT, b INT), c1 INT); +-- +ok +== +INSERT INTO t0 VALUES ({'a': 1, 'b': 2}, 5), ({'a': 3, 'b': 4}, NULL), (NULL, 1), ({'a': 7, 'b': 8}, 7); +-- +ok +== +SELECT * FROM t0 WHERE struct_update(c0, a := c1) = c0; +-- +ok +== +SELECT * FROM t0 WHERE struct_update(c0, a := c1, c := c1) = {'a': 7, 'b': 8, 'c': 7}; +-- +ok +== +SELECT * FROM t0 WHERE struct_insert(c0, c := c1) = {'a': 7, 'b': 8, 'c': 7}; +-- +ok +== +SELECT struct_update(c0, a := c1) = c0 FROM t0 ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/numeric/abs.test b/parser/testdata/corpus/sql/function/numeric/abs.test index 04afa25..6d0e317 100644 --- a/parser/testdata/corpus/sql/function/numeric/abs.test +++ b/parser/testdata/corpus/sql/function/numeric/abs.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/abs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT abs('-0.0'::float), abs('-0.0'::double) diff --git a/parser/testdata/corpus/sql/function/numeric/decimal_mod.test b/parser/testdata/corpus/sql/function/numeric/decimal_mod.test index 7532e1b..b2adb51 100644 --- a/parser/testdata/corpus/sql/function/numeric/decimal_mod.test +++ b/parser/testdata/corpus/sql/function/numeric/decimal_mod.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/decimal_mod.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 10 % 2.4, -10 % 2.4 @@ -31,3 +31,7 @@ SELECT 10.0 % 0.0 -- ok == +SELECT TRY(10.0 % 0.0) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/numeric/set_seed_for_sample.test b/parser/testdata/corpus/sql/function/numeric/set_seed_for_sample.test index ec531e3..58d7d8b 100644 --- a/parser/testdata/corpus/sql/function/numeric/set_seed_for_sample.test +++ b/parser/testdata/corpus/sql/function/numeric/set_seed_for_sample.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/set_seed_for_sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select * from generate_series(1,50) as t(number); diff --git a/parser/testdata/corpus/sql/function/numeric/test_arithmetic_aliases.test b/parser/testdata/corpus/sql/function/numeric/test_arithmetic_aliases.test index 991aecd..5683622 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_arithmetic_aliases.test +++ b/parser/testdata/corpus/sql/function/numeric/test_arithmetic_aliases.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_arithmetic_aliases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a integer) diff --git a/parser/testdata/corpus/sql/function/numeric/test_binom.test b/parser/testdata/corpus/sql/function/numeric/test_binom.test index 7368a8c..538251e 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_binom.test +++ b/parser/testdata/corpus/sql/function/numeric/test_binom.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_binom.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT binom(5, 2); diff --git a/parser/testdata/corpus/sql/function/numeric/test_bit_count.test b/parser/testdata/corpus/sql/function/numeric/test_bit_count.test index 2c557ad..98fbaea 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_bit_count.test +++ b/parser/testdata/corpus/sql/function/numeric/test_bit_count.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_bit_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bits(t tinyint, s smallint, i integer, b bigint, h hugeint) diff --git a/parser/testdata/corpus/sql/function/numeric/test_even.test b/parser/testdata/corpus/sql/function/numeric/test_even.test index f2a50ee..7e59ee9 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_even.test +++ b/parser/testdata/corpus/sql/function/numeric/test_even.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_even.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select i, even(i + 0.4) from generate_series(-4,4) tbl(i); diff --git a/parser/testdata/corpus/sql/function/numeric/test_factorial.test b/parser/testdata/corpus/sql/function/numeric/test_factorial.test index 7330ec2..033b729 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_factorial.test +++ b/parser/testdata/corpus/sql/function/numeric/test_factorial.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_factorial.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT factorial(0); diff --git a/parser/testdata/corpus/sql/function/numeric/test_fdiv_fmod.test b/parser/testdata/corpus/sql/function/numeric/test_fdiv_fmod.test index 72aa2b4..c788833 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_fdiv_fmod.test +++ b/parser/testdata/corpus/sql/function/numeric/test_fdiv_fmod.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_fdiv_fmod.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET ieee_floating_point_ops=false; @@ -27,11 +27,15 @@ SELECT fmod(42, 0) -- ok == -SELECT fmod(0, 0) +SELECT fdiv(42, 0) -- ok == -SELECT fdiv(42, 0) +SET error_on_division_by_zero=false; +-- +ok +== +SELECT fmod(0, 0) -- ok == @@ -43,6 +47,10 @@ SELECT fdiv(0, 0) -- ok == +SET error_on_division_by_zero=true; +-- +ok +== SELECT fmod(12.3456789, 5) -- ok diff --git a/parser/testdata/corpus/sql/function/numeric/test_floor_ceil.test b/parser/testdata/corpus/sql/function/numeric/test_floor_ceil.test index 5f0f09d..e6f669c 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_floor_ceil.test +++ b/parser/testdata/corpus/sql/function/numeric/test_floor_ceil.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_floor_ceil.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(n DOUBLE) diff --git a/parser/testdata/corpus/sql/function/numeric/test_gamma.test b/parser/testdata/corpus/sql/function/numeric/test_gamma.test index b70e7ab..d6047ef 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_gamma.test +++ b/parser/testdata/corpus/sql/function/numeric/test_gamma.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_gamma.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET ieee_floating_point_ops = false; diff --git a/parser/testdata/corpus/sql/function/numeric/test_gcd_lcm.test b/parser/testdata/corpus/sql/function/numeric/test_gcd_lcm.test index 4c6dc46..d285a37 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_gcd_lcm.test +++ b/parser/testdata/corpus/sql/function/numeric/test_gcd_lcm.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_gcd_lcm.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a, b, gcd(a, b), gcd(a, -b), gcd(b, a), gcd(-b, a) diff --git a/parser/testdata/corpus/sql/function/numeric/test_geomean.test b/parser/testdata/corpus/sql/function/numeric/test_geomean.test index 6cab46e..ae8284e 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_geomean.test +++ b/parser/testdata/corpus/sql/function/numeric/test_geomean.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_geomean.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(x DOUBLE) diff --git a/parser/testdata/corpus/sql/function/numeric/test_invalid_math.test b/parser/testdata/corpus/sql/function/numeric/test_invalid_math.test index 22e746f..eb960ed 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_invalid_math.test +++ b/parser/testdata/corpus/sql/function/numeric/test_invalid_math.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_invalid_math.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT log(0); diff --git a/parser/testdata/corpus/sql/function/numeric/test_is_nan.test b/parser/testdata/corpus/sql/function/numeric/test_is_nan.test index 5e55054..6284fe1 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_is_nan.test +++ b/parser/testdata/corpus/sql/function/numeric/test_is_nan.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_is_nan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT isnan(3::{type}), isnan('nan'::{type}), isnan(NULL::{type}) diff --git a/parser/testdata/corpus/sql/function/numeric/test_mod.test b/parser/testdata/corpus/sql/function/numeric/test_mod.test index ae0aa63..17900c6 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_mod.test +++ b/parser/testdata/corpus/sql/function/numeric/test_mod.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_mod.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE modme(a DOUBLE, b INTEGER) diff --git a/parser/testdata/corpus/sql/function/numeric/test_nextafter.test b/parser/testdata/corpus/sql/function/numeric/test_nextafter.test index d2ba881..3c7bade 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_nextafter.test +++ b/parser/testdata/corpus/sql/function/numeric/test_nextafter.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_nextafter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select nextafter() diff --git a/parser/testdata/corpus/sql/function/numeric/test_pg_math.test b/parser/testdata/corpus/sql/function/numeric/test_pg_math.test index b0bfdd5..761ea73 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_pg_math.test +++ b/parser/testdata/corpus/sql/function/numeric/test_pg_math.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_pg_math.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select abs(-17.4) diff --git a/parser/testdata/corpus/sql/function/numeric/test_pow.test b/parser/testdata/corpus/sql/function/numeric/test_pow.test index 6cfe013..7a35cdc 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_pow.test +++ b/parser/testdata/corpus/sql/function/numeric/test_pow.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_pow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE powerme(a DOUBLE, b INTEGER) diff --git a/parser/testdata/corpus/sql/function/numeric/test_random.test b/parser/testdata/corpus/sql/function/numeric/test_random.test index 6d30546..c5e8535 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_random.test +++ b/parser/testdata/corpus/sql/function/numeric/test_random.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_random.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT [random() for a IN range(1)] FROM range(2); diff --git a/parser/testdata/corpus/sql/function/numeric/test_round.test b/parser/testdata/corpus/sql/function/numeric/test_round.test index be26ed7..122a7b3 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_round.test +++ b/parser/testdata/corpus/sql/function/numeric/test_round.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_round.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE roundme(a DOUBLE, b INTEGER) @@ -55,3 +55,19 @@ SELECT round(1.0::DOUBLE, (-2147483648)::INT); -- ok == +SELECT round(0.5, 0), round(1.5, 0), round(2.5, 0), round(-0.5, 0), round(-2.5, 0) +-- +ok +== +SELECT round(0.125, 2), round(0.135, 2), round(-0.125, 2) +-- +ok +== +SELECT round(0.5::DOUBLE, 0), round(2.5::DOUBLE, 0), round(0.125::DOUBLE, 2) +-- +ok +== +SELECT round(12345678901234567890123456789012344.5::DECIMAL(38,1), 0), round(-12345678901234567890123456789012344.5::DECIMAL(38,1), 0) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/numeric/test_round_even.test b/parser/testdata/corpus/sql/function/numeric/test_round_even.test index aceaa41..85e49b1 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_round_even.test +++ b/parser/testdata/corpus/sql/function/numeric/test_round_even.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_round_even.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT roundBankers(45, -1) @@ -31,6 +31,10 @@ SELECT roundBankers(45.55, 1), roundBankers(45.45, 1) -- ok == +SELECT round_even(128.045, 2), round_even(1.005, 2) +-- +ok +== SELECT roundBankers(-45, -1), roundBankers(-35, -1) -- ok @@ -43,6 +47,10 @@ SELECT roundBankers(-45.55, 1), roundBankers(-45.45, 1) -- ok == +SELECT round_even(-128.045, 2) +-- +ok +== SELECT roundBankers(45::DOUBLE, -1), roundBankers(35::DOUBLE, -1) -- ok @@ -59,3 +67,19 @@ SELECT roundBankers(NULL, 1), roundBankers(45, NULL), roundBankers(NULL, NULL) -- ok == +SELECT round_even(1.125, 3) +-- +ok +== +SELECT round_even(9999::DECIMAL(4,0), -1), typeof(round_even(9999::DECIMAL(4,0), -1)) +-- +ok +== +SELECT round_even(99999999999999999999999999999999999995::DECIMAL(38,0), -1) +-- +ok +== +SELECT round_even(12345678901234567890123456789012344.5::DECIMAL(38,1), 0), round_even(-12345678901234567890123456789012344.5::DECIMAL(38,1), 0) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/numeric/test_round_integers.test b/parser/testdata/corpus/sql/function/numeric/test_round_integers.test index 98847d3..347d2c2 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_round_integers.test +++ b/parser/testdata/corpus/sql/function/numeric/test_round_integers.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_round_integers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE zz AS @@ -37,3 +37,66 @@ from test_all_types(); -- ok == +SELECT + round(124::TINYINT, -1), + round((-124)::TINYINT, -1), + round(32764::SMALLINT, -1), + round((-32764)::SMALLINT, -1), + round(2147483644::INTEGER, -1), + round((-2147483644)::INTEGER, -1), + round(9223372036854775804::BIGINT, -1), + round((-9223372036854775804)::BIGINT, -1); +-- +ok +== +SELECT + round(4000000000000000000::BIGINT, -19), + round('170141183460469231731687303715884105724'::HUGEINT, -1), + round('-170141183460469231731687303715884105724'::HUGEINT, -1); +-- +ok +== +SELECT round(127::TINYINT, -1); +-- +ok +== +SELECT round((-128)::TINYINT, -1); +-- +ok +== +SELECT round(32767::SMALLINT, -1); +-- +ok +== +SELECT round((-32768)::SMALLINT, -1); +-- +ok +== +SELECT round(2147483647::INTEGER, -1); +-- +ok +== +SELECT round((-2147483647 - 1)::INTEGER, -1); +-- +ok +== +SELECT round(9223372036854775807::BIGINT, -1); +-- +ok +== +SELECT round((-9223372036854775807 - 1)::BIGINT, -1); +-- +ok +== +SELECT round(9223372036854775807::BIGINT, -19); +-- +ok +== +SELECT round('170141183460469231731687303715884105727'::HUGEINT, -1); +-- +ok +== +SELECT round('-170141183460469231731687303715884105728'::HUGEINT, -1); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/numeric/test_sign_bit.test b/parser/testdata/corpus/sql/function/numeric/test_sign_bit.test index bc94310..85f679a 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_sign_bit.test +++ b/parser/testdata/corpus/sql/function/numeric/test_sign_bit.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_sign_bit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT signbit(3::{type}), signbit(-3::{type}), signbit(NULL::{type}) diff --git a/parser/testdata/corpus/sql/function/numeric/test_trigo.test b/parser/testdata/corpus/sql/function/numeric/test_trigo.test index df7a788..5f65281 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_trigo.test +++ b/parser/testdata/corpus/sql/function/numeric/test_trigo.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_trigo.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO numbers VALUES (-42),(-1),(0), (1), (42), (NULL) diff --git a/parser/testdata/corpus/sql/function/numeric/test_trunc.test b/parser/testdata/corpus/sql/function/numeric/test_trunc.test index f075f1d..ab5cf64 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_trunc.test +++ b/parser/testdata/corpus/sql/function/numeric/test_trunc.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_trunc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE truncme(a DOUBLE, b INTEGER, c UINTEGER) diff --git a/parser/testdata/corpus/sql/function/numeric/test_trunc_precision.test b/parser/testdata/corpus/sql/function/numeric/test_trunc_precision.test index 3e087e5..86f805d 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_trunc_precision.test +++ b/parser/testdata/corpus/sql/function/numeric/test_trunc_precision.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_trunc_precision.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO truncme VALUES (42.123456, 37, 19), (-3.141592, -75, 5); diff --git a/parser/testdata/corpus/sql/function/numeric/test_type_resolution.test b/parser/testdata/corpus/sql/function/numeric/test_type_resolution.test index 5dbd92d..147db64 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_type_resolution.test +++ b/parser/testdata/corpus/sql/function/numeric/test_type_resolution.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_type_resolution.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1::TINYINT + 1::TINYINT diff --git a/parser/testdata/corpus/sql/function/numeric/test_unary.test b/parser/testdata/corpus/sql/function/numeric/test_unary.test index fe9822e..efdc113 100644 --- a/parser/testdata/corpus/sql/function/numeric/test_unary.test +++ b/parser/testdata/corpus/sql/function/numeric/test_unary.test @@ -1,6 +1,6 @@ # source: test/sql/function/numeric/test_unary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (2) diff --git a/parser/testdata/corpus/sql/function/operator/test_arithmetic.test b/parser/testdata/corpus/sql/function/operator/test_arithmetic.test index 5979feb..4540669 100644 --- a/parser/testdata/corpus/sql/function/operator/test_arithmetic.test +++ b/parser/testdata/corpus/sql/function/operator/test_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i+2=5, 5=i+2 FROM integers ORDER BY i diff --git a/parser/testdata/corpus/sql/function/operator/test_arithmetic_sqllogic.test b/parser/testdata/corpus/sql/function/operator/test_arithmetic_sqllogic.test index fae7412..c1dbaa4 100644 --- a/parser/testdata/corpus/sql/function/operator/test_arithmetic_sqllogic.test +++ b/parser/testdata/corpus/sql/function/operator/test_arithmetic_sqllogic.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_arithmetic_sqllogic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER); diff --git a/parser/testdata/corpus/sql/function/operator/test_bitwise_ops.test b/parser/testdata/corpus/sql/function/operator/test_bitwise_ops.test index 50886df..30df58e 100644 --- a/parser/testdata/corpus/sql/function/operator/test_bitwise_ops.test +++ b/parser/testdata/corpus/sql/function/operator/test_bitwise_ops.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_bitwise_ops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 << 2, NULL << 2, 2 << NULL @@ -63,3 +63,11 @@ SELECT 2::UINT32 << 31 -- ok == +SELECT 0::UBIGINT << 64 +-- +ok +== +SELECT 0::BIGINT << 64 +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/operator/test_bitwise_ops_types.test b/parser/testdata/corpus/sql/function/operator/test_bitwise_ops_types.test index 820bc51..50eb962 100644 --- a/parser/testdata/corpus/sql/function/operator/test_bitwise_ops_types.test +++ b/parser/testdata/corpus/sql/function/operator/test_bitwise_ops_types.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_bitwise_ops_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bitwise_test(i TINYINT, j TINYINT) diff --git a/parser/testdata/corpus/sql/function/operator/test_comparison.test b/parser/testdata/corpus/sql/function/operator/test_comparison.test index bac990e..43f9668 100644 --- a/parser/testdata/corpus/sql/function/operator/test_comparison.test +++ b/parser/testdata/corpus/sql/function/operator/test_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 == 1, 1 = 1, 1 == 0, 1 = 0, 1 == NULL diff --git a/parser/testdata/corpus/sql/function/operator/test_conjunction.test b/parser/testdata/corpus/sql/function/operator/test_conjunction.test index c75748e..f4cb3dd 100644 --- a/parser/testdata/corpus/sql/function/operator/test_conjunction.test +++ b/parser/testdata/corpus/sql/function/operator/test_conjunction.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_conjunction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a (i integer, j integer); diff --git a/parser/testdata/corpus/sql/function/operator/test_date_arithmetic.test b/parser/testdata/corpus/sql/function/operator/test_date_arithmetic.test index d5c7ee6..15c592b 100644 --- a/parser/testdata/corpus/sql/function/operator/test_date_arithmetic.test +++ b/parser/testdata/corpus/sql/function/operator/test_date_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_date_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO dates VALUES diff --git a/parser/testdata/corpus/sql/function/operator/test_division_by_zero.test b/parser/testdata/corpus/sql/function/operator/test_division_by_zero.test new file mode 100644 index 0000000..a455d22 --- /dev/null +++ b/parser/testdata/corpus/sql/function/operator/test_division_by_zero.test @@ -0,0 +1,129 @@ +# source: test/sql/function/operator/test_division_by_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE numbers(i INTEGER); +-- +ok +== +INSERT INTO numbers VALUES (7), (0), (NULL), (2); +-- +ok +== +SELECT 7::{type} // 2::{type}, 7::{type} % 2::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} // 0::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} % 0::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} // i::{type} FROM numbers +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} % i::{type} FROM numbers +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} % 2::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT TRY(7::{type} // 0::{type}), TRY(7::{type} % 0::{type}) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT divide(7, 0) +-- +ok +== +SELECT mod(7, 0) +-- +ok +== +SET integer_division=true; +-- +ok +== +SELECT 7 / 0 +-- +ok +== +SET integer_division=false; +-- +ok +== +SELECT 7 / 0, 7.5::DOUBLE / 0, -7.5::FLOAT / 0 +-- +ok +== +SELECT isnan(7.5::DOUBLE % 0) +-- +ok +== +SELECT 7.5::{type} / 0::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7.5::{type} % 0::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7.5::{type} / i::{type} FROM numbers +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7.5::{type} / 2::{type}, 7.5::{type} % 2::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SET ieee_floating_point_ops=true; +-- +ok +== +SELECT INTERVAL '1 day' / 0 +-- +ok +== +SELECT INTERVAL '1 day' / i FROM numbers +-- +ok +== +SELECT INTERVAL '1 day' / 2 +-- +ok +== +SELECT 7::{type} // 0::{type}, 7::{type} % 0::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} % i::{type} FROM numbers ORDER BY i NULLS LAST +-- +error: Parser Error: syntax error at or near "{" +== +SELECT divide(7, 0), mod(7, 0) +-- +ok +== +SELECT 7.5::DOUBLE / 0 +-- +ok +== +SELECT 7.5::{type} / 0::{type}, 7.5::{type} % 0::{type} +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7::{type} / i::{type} FROM numbers ORDER BY i NULLS LAST +-- +error: Parser Error: syntax error at or near "{" +== +SELECT 7 // 0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/operator/test_division_overflow.test b/parser/testdata/corpus/sql/function/operator/test_division_overflow.test index 929a366..54ceb25 100644 --- a/parser/testdata/corpus/sql/function/operator/test_division_overflow.test +++ b/parser/testdata/corpus/sql/function/operator/test_division_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_division_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (-128)::TINYINT // (-1)::TINYINT diff --git a/parser/testdata/corpus/sql/function/operator/test_in_empty_table.test b/parser/testdata/corpus/sql/function/operator/test_in_empty_table.test index 33a5ed3..0fcd87b 100644 --- a/parser/testdata/corpus/sql/function/operator/test_in_empty_table.test +++ b/parser/testdata/corpus/sql/function/operator/test_in_empty_table.test @@ -1,6 +1,6 @@ # source: test/sql/function/operator/test_in_empty_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE test (a INTEGER) diff --git a/parser/testdata/corpus/sql/function/string/format_bytes.test b/parser/testdata/corpus/sql/function/string/format_bytes.test index c889ff6..7d96b90 100644 --- a/parser/testdata/corpus/sql/function/string/format_bytes.test +++ b/parser/testdata/corpus/sql/function/string/format_bytes.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/format_bytes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT format_bytes(0); diff --git a/parser/testdata/corpus/sql/function/string/format_large_precision.test b/parser/testdata/corpus/sql/function/string/format_large_precision.test new file mode 100644 index 0000000..c9509d5 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/format_large_precision.test @@ -0,0 +1,17 @@ +# source: test/sql/function/string/format_large_precision.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT length(format('{:.{}f}', 1.5, 200000000)) +-- +ok +== +SELECT length(printf('%.*f', 200000000, 1.5)) +-- +ok +== +SELECT format('{:.3f}', 1.5), printf('%.2f', 2.25), length(format('{:.{}f}', 1.5, 1000000)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/hex.test b/parser/testdata/corpus/sql/function/string/hex.test index edf21ae..ba41717 100644 --- a/parser/testdata/corpus/sql/function/string/hex.test +++ b/parser/testdata/corpus/sql/function/string/hex.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/hex.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT to_hex('duckdb'); diff --git a/parser/testdata/corpus/sql/function/string/hive_partition_component.test b/parser/testdata/corpus/sql/function/string/hive_partition_component.test new file mode 100644 index 0000000..ff2f731 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/hive_partition_component.test @@ -0,0 +1,45 @@ +# source: test/sql/function/string/hive_partition_component.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT hive_partition_component('year', 2024); +-- +ok +== +SELECT hive_partition_component('year', NULL); +-- +ok +== +SELECT hive_partition_component('a/b', 'c d'); +-- +ok +== +SELECT hive_partition_component('p', 'a b%2Fc'); +-- +ok +== +SELECT hive_partition_component('p', '__HIVE_DEFAULT_PARTITION__'); +-- +ok +== +SELECT hive_partition_component('p', ''); +-- +ok +== +SELECT hive_partition_component('k', TIMESTAMP '2024-01-15 10:30:00'); +-- +ok +== +SELECT hive_partition_component('k', {'x': 'a/b'}); +-- +ok +== +SELECT path_join(hive_partition_component('year', 2024), hive_partition_component('month', 1)); +-- +ok +== +SELECT k, hive_partition_component('p', k) FROM (VALUES ('a'), (NULL), ('b')) v(k) ORDER BY 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/like_unicode.test b/parser/testdata/corpus/sql/function/string/like_unicode.test index 67a721d..12a322d 100644 --- a/parser/testdata/corpus/sql/function/string/like_unicode.test +++ b/parser/testdata/corpus/sql/function/string/like_unicode.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/like_unicode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 VARCHAR); diff --git a/parser/testdata/corpus/sql/function/string/md5.test b/parser/testdata/corpus/sql/function/string/md5.test index e411612..b4c8118 100644 --- a/parser/testdata/corpus/sql/function/string/md5.test +++ b/parser/testdata/corpus/sql/function/string/md5.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/md5.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select md5('hello'), md5(NULL) diff --git a/parser/testdata/corpus/sql/function/string/null_byte.test b/parser/testdata/corpus/sql/function/string/null_byte.test index 4f67997..23b8f57 100644 --- a/parser/testdata/corpus/sql/function/string/null_byte.test +++ b/parser/testdata/corpus/sql/function/string/null_byte.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/null_byte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT chr(0) diff --git a/parser/testdata/corpus/sql/function/string/overlay.test b/parser/testdata/corpus/sql/function/string/overlay.test index 394acb2..301763e 100644 --- a/parser/testdata/corpus/sql/function/string/overlay.test +++ b/parser/testdata/corpus/sql/function/string/overlay.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/overlay.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT OVERLAY('abcdef' PLACING 'XX' FROM 3) diff --git a/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test b/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test index 3d5b005..81d10db 100644 --- a/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test +++ b/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/parse_formatted_bytes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT parse_formatted_bytes('0 B'); @@ -163,3 +163,35 @@ SELECT try(parse_formatted_bytes('null')); -- ok == +SELECT parse_formatted_bytes('17179869183 GiB'); +-- +ok +== +SELECT parse_formatted_bytes('17179869184 GiB'); +-- +ok +== +SELECT parse_formatted_bytes('18014398509481982 KiB'); +-- +ok +== +SELECT parse_formatted_bytes('18014398509481984 KiB'); +-- +ok +== +SELECT parse_formatted_bytes('18446744073709 KB'); +-- +ok +== +SELECT parse_formatted_bytes('18446744073709551 KB'); +-- +ok +== +SELECT parse_formatted_bytes('18446744073709552 KB'); +-- +ok +== +SET memory_limit='17179869184GiB'; +-- +error: Parser Error: Memory value out of range: value is too large +== diff --git a/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test.metadata.json b/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test.metadata.json new file mode 100644 index 0000000..e435b63 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/parse_formatted_bytes.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "ea71d35ad3c38208": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/function/string/parse_path.test b/parser/testdata/corpus/sql/function/string/parse_path.test index d5f6ec1..50b6ae4 100644 --- a/parser/testdata/corpus/sql/function/string/parse_path.test +++ b/parser/testdata/corpus/sql/function/string/parse_path.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/parse_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (VALUES (parse_path('path/to/file.csv', 'system')), (parse_path('path/to/file.csv\file2.csv', 'both_slash')), (parse_path('path/to/file.csv', 'forward_slash')), (parse_path('path\to\file.csv/file2.csv', 'backslash'))) tbl(i); diff --git a/parser/testdata/corpus/sql/function/string/parse_path_separator.test b/parser/testdata/corpus/sql/function/string/parse_path_separator.test new file mode 100644 index 0000000..29b731a --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/parse_path_separator.test @@ -0,0 +1,76 @@ +# source: test/sql/function/string/parse_path_separator.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE paths (id INTEGER, path VARCHAR, separator VARCHAR); +-- +ok +== +INSERT INTO paths VALUES + (1, 'a/b\c', 'forward_slash'), + (2, 'a/b\c', 'backslash'), + (3, 'a/b\c', NULL), + (4, 'a/b\c', 'both_slash'), + (5, '', 'backslash'), + (6, NULL, 'forward_slash'), + (7, 'a/b\c', ''), + (8, 'a/b\c', '@'); +-- +ok +== +SELECT id, parse_path(path, separator) FROM paths ORDER BY id; +-- +ok +== +SELECT parse_path('a/b\c', separator) +FROM (VALUES (1, NULL), (2, 'forward_slash'), (3, 'backslash')) t(id, separator) +ORDER BY id; +-- +ok +== +SELECT parse_path(path), parse_path(path, 'backslash'), parse_path(path, NULL) +FROM paths WHERE id <= 3 ORDER BY id; +-- +ok +== +SELECT id, parse_path(path[1], separator) +FROM (VALUES (0, ['a/b\c'], 'forward_slash'), (1, ['a/b\c'], 'backslash'), (2, ['a/b\c'], NULL)) t(id, path, separator) +WHERE id <> 0 ORDER BY id; +-- +ok +== +SELECT id, parse_path(path[1], separator) +FROM (VALUES (0, ['a/b\c'], NULL), (1, ['a/b\c'], 'forward_slash'), (2, ['a/b\c'], 'backslash')) t(id, path, separator) +WHERE id <> 0 ORDER BY id; +-- +ok +== +WITH inputs AS ( + SELECT i, CASE i % 3 WHEN 0 THEN 'forward_slash' WHEN 1 THEN 'backslash' ELSE NULL END AS separator + FROM range(8193) t(i) +) +SELECT count(*) FROM inputs +WHERE parse_path('a/b\c', separator) IS DISTINCT FROM + CASE i % 3 WHEN 0 THEN ['a', 'b\c'] WHEN 1 THEN ['a/b', 'c'] ELSE ['a', 'b', 'c'] END; +-- +ok +== +SELECT sep, parse_dirname('a/b\c.txt', sep), parse_dirpath('a/b\c.txt', sep), parse_filename('a/b\c.txt', sep) +FROM (VALUES (1, NULL), (2, 'backslash'), (3, 'forward_slash')) v(id, sep) ORDER BY id +-- +ok +== +SELECT sep, parse_dirname('a/b\c.txt', sep), parse_dirpath('a/b\c.txt', sep), parse_filename('a/b\c.txt', sep) +FROM (VALUES (1, 'backslash'), (2, NULL), (3, 'forward_slash')) v(id, sep) ORDER BY id +-- +ok +== +SELECT id, parse_filename('a/b\c.txt', trim, sep) FROM (VALUES (1, NULL, 'backslash'), (2, true, NULL), (3, true, 'backslash'), (4, false, 'forward_slash')) v(id, trim, sep) ORDER BY id +-- +ok +== +SELECT parse_dirname(p, 'backslash') FROM (VALUES ('a\b'), (NULL)) v(p) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/parse_path_windows.test b/parser/testdata/corpus/sql/function/string/parse_path_windows.test index 0ec5207..796eaee 100644 --- a/parser/testdata/corpus/sql/function/string/parse_path_windows.test +++ b/parser/testdata/corpus/sql/function/string/parse_path_windows.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/parse_path_windows.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (VALUES (parse_path('path\to\file.csv/file2.csv', 'system')), (parse_path('path/to/file.csv\file2.csv', 'both_slash')), (parse_path('path/to/file.csv', 'forward_slash')), (parse_path('path\to\file.csv/file2.csv', 'backslash'))) tbl(i); diff --git a/parser/testdata/corpus/sql/function/string/path_join.test b/parser/testdata/corpus/sql/function/string/path_join.test index 59dc449..95d5ead 100644 --- a/parser/testdata/corpus/sql/function/string/path_join.test +++ b/parser/testdata/corpus/sql/function/string/path_join.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/path_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT path_join('dir//subdir/', './file'); @@ -104,3 +104,15 @@ SELECT path_join(A, B, C, B, A) FROM (SELECT A:'a', B: 'b', C: 'c'); -- ok == +SELECT path_join('file://localhost'); +-- +ok +== +SELECT path_join('file://localhost', 'a/b'); +-- +ok +== +SELECT path_join('file://otherhost'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/regex_capture.test b/parser/testdata/corpus/sql/function/string/regex_capture.test index 52d36c1..41c36f6 100644 --- a/parser/testdata/corpus/sql/function/string/regex_capture.test +++ b/parser/testdata/corpus/sql/function/string/regex_capture.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_capture.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE filenames (filename VARCHAR); @@ -110,3 +110,7 @@ FROM filenames -- ok == +SELECT regexp_extract(NULL, '(a)', ['letter']); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/regex_escape.test b/parser/testdata/corpus/sql/function/string/regex_escape.test index 0d7bba6..61b823c 100644 --- a/parser/testdata/corpus/sql/function/string/regex_escape.test +++ b/parser/testdata/corpus/sql/function/string/regex_escape.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_escape.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_escape('https://duckdb.org'); diff --git a/parser/testdata/corpus/sql/function/string/regex_extract.test b/parser/testdata/corpus/sql/function/string/regex_extract.test index e65eae1..7db882e 100644 --- a/parser/testdata/corpus/sql/function/string/regex_extract.test +++ b/parser/testdata/corpus/sql/function/string/regex_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_extract('foobarbaz', 'b..') @@ -84,6 +84,54 @@ SELECT regexp_extract('foobarbaz', 'b..', '1') -- ok == +SELECT regexp_extract('I am the DUCKIEST duck to ever duck', 'D..k', 'c') +-- +ok +== +SELECT regexp_extract('I am the DUCKIEST duck to ever duck', 'duck', 'il') +-- +ok +== +SELECT regexp_extract('bibitybobbitybarbazity', '(b..)(b..)', 'i') +-- +ok +== +SELECT regexp_extract('to quack or not to quack', 'lalalala', 'g') +-- +ok +== +CREATE TABLE test_opts (s VARCHAR, p VARCHAR, o VARCHAR) +-- +ok +== +INSERT INTO test_opts VALUES ('foobarbaz', 'b..', 'i'), ('FOOBARBAZ', 'b..', 'i') +-- +ok +== +SELECT regexp_extract(s, p, o) FROM test_opts +-- +ok +== +SELECT regexp_extract('all hail Anas platyrhynchos', 'zzzz', 'k') +-- +ok +== +SELECT regexp_extract('glory to Anas platyrhynchos', 'p....', 'k') +-- +ok +== +SELECT regexp_extract('how much good would a good duck duck if a good duck could duck good????', 'g..', '') +-- +ok +== +SELECT regexp_extract('foobarbaz', 'B..', CAST(NULL as CHAR)) +-- +ok +== +SELECT regexp_extract('abcdefg', 'A..', 'i', 'c'); +-- +ok +== SELECT regexp_extract('foobarbaz', '(zzz)', 1, 'k') -- ok @@ -104,3 +152,8 @@ SELECT regexp_replace('foobarbaz', 'b..', 'X', 'k') -- ok == +SELECT regexp_extract(s, pattern, 1) +FROM (VALUES ('abc', '(b)'), ('def', '(x)')) t(s, pattern); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/regex_extract_all.test b/parser/testdata/corpus/sql/function/string/regex_extract_all.test index 16185d0..d5a5af8 100644 --- a/parser/testdata/corpus/sql/function/string/regex_extract_all.test +++ b/parser/testdata/corpus/sql/function/string/regex_extract_all.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_extract_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_extract_all('1a 2b 14m', '(\d+)', 1); diff --git a/parser/testdata/corpus/sql/function/string/regex_extract_all_struct.test b/parser/testdata/corpus/sql/function/string/regex_extract_all_struct.test index 44ad07a..66b04ae 100644 --- a/parser/testdata/corpus/sql/function/string/regex_extract_all_struct.test +++ b/parser/testdata/corpus/sql/function/string/regex_extract_all_struct.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_extract_all_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_extract_all('Peter:33 Paul:14', '(\w+):(\d+)', ['name','num']) AS res; diff --git a/parser/testdata/corpus/sql/function/string/regex_extract_dictionary.test b/parser/testdata/corpus/sql/function/string/regex_extract_dictionary.test new file mode 100644 index 0000000..5d532f0 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/regex_extract_dictionary.test @@ -0,0 +1,61 @@ +# source: test/sql/function/string/regex_extract_dictionary.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET force_compression='dictionary' +-- +ok +== +CREATE TABLE strings AS SELECT i, CASE i % 3 WHEN 0 THEN 'abcdefghijklé://foo' WHEN 1 THEN 'äabcdefghijk://bar' ELSE NULL END AS s FROM range(300000) t(i) +-- +ok +== +SELECT count(*) FROM strings WHERE regexp_extract(s, '^([^:]+)://', 1) = 'abcdefghijklé' +-- +ok +== +SELECT count(*) FILTER (WHERE k = 'abcdefghijklé'), count(*) FILTER (WHERE k = 'äabcdefghijk') FROM (SELECT regexp_extract(s, '^([^:]+)://', 1) AS k FROM strings) +-- +ok +== +SELECT count(*) FROM strings WHERE regexp_extract(s, '^([^:]+)://', 1, 'i') = 'äabcdefghijk' +-- +ok +== +SELECT count(*) FROM strings WHERE regexp_extract(s, '://', 'l') = '://' +-- +ok +== +SELECT count(*) FROM strings WHERE regexp_extract(s, '(missing)', 1, 'k') = s +-- +ok +== +SELECT count(*) FROM strings WHERE s LIKE 'a%' AND regexp_extract(s, '\C') = 'a' +-- +ok +== +SELECT count(TRY(regexp_extract(s, '\C'))) FROM strings +-- +ok +== +PREPARE invalid_constant_pattern AS SELECT regexp_extract(s, '[') FROM strings +-- +ok +== +EXECUTE invalid_constant_pattern +-- +ok +== +SELECT count(TRY(regexp_extract(s, CASE i % 3 WHEN 0 THEN '^a' ELSE '[' END))) FROM strings +-- +ok +== +SELECT count(regexp_extract(s, '^([^:]+)://', NULL)) FROM strings +-- +ok +== +SELECT count(*) FROM strings WHERE regexp_extract(s, '^([^:]+)://', ['protocol']).protocol = 'äabcdefghijk' +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/regex_extract_empty_group_name.test b/parser/testdata/corpus/sql/function/string/regex_extract_empty_group_name.test new file mode 100644 index 0000000..b854c18 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/regex_extract_empty_group_name.test @@ -0,0 +1,21 @@ +# source: test/sql/function/string/regex_extract_empty_group_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT regexp_extract_all('ababcd', '(ab){2}cd', ['']); +-- +ok +== +SELECT regexp_extract('ab', '(a)', ['']); +-- +ok +== +SELECT regexp_extract_all('ab', '(a)(b)', ['', 'y']); +-- +ok +== +SELECT regexp_extract('ab', '(a)(b)', ['x', 'y']); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/regex_filter_pushdown.test b/parser/testdata/corpus/sql/function/string/regex_filter_pushdown.test index 26c59ad..cc3fbfd 100644 --- a/parser/testdata/corpus/sql/function/string/regex_filter_pushdown.test +++ b/parser/testdata/corpus/sql/function/string/regex_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE regex(s STRING) diff --git a/parser/testdata/corpus/sql/function/string/regex_operators.test b/parser/testdata/corpus/sql/function/string/regex_operators.test index a32359a..9409f2f 100644 --- a/parser/testdata/corpus/sql/function/string/regex_operators.test +++ b/parser/testdata/corpus/sql/function/string/regex_operators.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_operators.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('regex_match_operator_semantics') diff --git a/parser/testdata/corpus/sql/function/string/regex_operators_v1_5_view.test b/parser/testdata/corpus/sql/function/string/regex_operators_v1_5_view.test index 21d7bf9..6e723b5 100644 --- a/parser/testdata/corpus/sql/function/string/regex_operators_v1_5_view.test +++ b/parser/testdata/corpus/sql/function/string/regex_operators_v1_5_view.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_operators_v1_5_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET regex_match_operator_semantics = 'partial' diff --git a/parser/testdata/corpus/sql/function/string/regex_replace.test b/parser/testdata/corpus/sql/function/string/regex_replace.test index 12c9df5..d89c5a2 100644 --- a/parser/testdata/corpus/sql/function/string/regex_replace.test +++ b/parser/testdata/corpus/sql/function/string/regex_replace.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_replace('foobarbaz', 'b..', 'X') @@ -117,6 +117,21 @@ SELECT regexp_replace(E'https://www.example.com/path\nsecond-line', -- ok == +PRAGMA explain_output = 'OPTIMIZED_ONLY'; +-- +ok +== +EXPLAIN SELECT regexp_replace(s, '^(foo)-(.*)$', '\2', 'i') +FROM (VALUES ('FOO-bar')) t(s); +-- +ok +== +SELECT regexp_replace(s, '^(foo)-(.*)$', '\2', 'i') +FROM (VALUES ('FOO-bar'), ('no-match')) t(s) +ORDER BY s; +-- +ok +== SELECT COUNT(*) FROM (SELECT E'a\nb') t1(a) JOIN (SELECT regexp_replace(s, '^(?m)(a).*$', '\1') FROM (VALUES (E'a\nb')) v(s)) t2(a) USING (a); -- @@ -162,6 +177,18 @@ SELECT regexp_replace(s, pat, repl) FROM t_repl_invalid; -- ok == +SELECT + regexp_replace(s, pattern, replacement), + regexp_replace(s, pattern, replacement, 'g') +FROM (VALUES ('abcabc', 'b', 'X')) t(s, pattern, replacement); +-- +ok +== +SELECT regexp_replace(s, 'b', 'X') || regexp_replace(s, 'b', 'X') +FROM (VALUES ('abc')) t(s); +-- +ok +== DELETE FROM t_repl_invalid; -- ok diff --git a/parser/testdata/corpus/sql/function/string/regex_search.test b/parser/testdata/corpus/sql/function/string/regex_search.test index de58d96..95fb994 100644 --- a/parser/testdata/corpus/sql/function/string/regex_search.test +++ b/parser/testdata/corpus/sql/function/string/regex_search.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regex_search.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 as FROM VALUES('asdf') t(c0); @@ -23,6 +23,12 @@ SELECT regexp_matches(c0, '') from t0; -- ok == +SELECT regexp_matches(s, E'a\n') +FROM (VALUES ('a'), (E'a\n')) values_table(s) +ORDER BY length(s) +-- +ok +== SELECT regexp_matches(c0, 'sd') from t0; -- ok diff --git a/parser/testdata/corpus/sql/function/string/regex_single_byte.test b/parser/testdata/corpus/sql/function/string/regex_single_byte.test new file mode 100644 index 0000000..ea2c3b3 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/regex_single_byte.test @@ -0,0 +1,93 @@ +# source: test/sql/function/string/regex_single_byte.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT 'ä' AS s, 'aäb' AS s2, '\C' AS p, 'a\C' AS p2 +-- +ok +== +SELECT regexp_replace('ä', '\C', 'x') +-- +ok +== +SELECT regexp_extract('ä', '\C') +-- +ok +== +SELECT regexp_extract('ä', '(\C)', ['g']) +-- +ok +== +SELECT regexp_extract_all('ä', '\C') +-- +ok +== +SELECT regexp_extract_all('ä', '(\C)', ['g']) +-- +ok +== +SELECT string_split_regex('aäb', 'a\C') +-- +ok +== +SELECT regexp_split_to_array('aäb', 'a\C') +-- +ok +== +SELECT regexp_replace(s, p, 'x') FROM t +-- +ok +== +SELECT regexp_replace(s2, p2, '', 'g') FROM t +-- +ok +== +SELECT regexp_extract(s, p) FROM t +-- +ok +== +SELECT regexp_extract_all(s, p) FROM t +-- +ok +== +SELECT string_split_regex(s2, p2) FROM t +-- +ok +== +SELECT strip_accents(regexp_replace(s, p, '')) FROM t +-- +ok +== +SELECT instr(regexp_replace(s, p, '') || 'b', 'b') FROM t +-- +ok +== +SELECT regexp_replace('abc', '\C', 'x') +-- +ok +== +SELECT regexp_replace('äb', '\C\C', 'x') +-- +ok +== +SELECT regexp_replace(s, p, '', 'g') FROM t +-- +ok +== +SELECT string_split_regex('ä', '\C') +-- +ok +== +SELECT regexp_matches('ä', '\C') +-- +ok +== +SELECT regexp_extract_all(s2, '([a])\C|', 1) FROM t +-- +ok +== +SELECT string_split('aäb', 'a\C') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/regexp_split_to_table.test b/parser/testdata/corpus/sql/function/string/regexp_split_to_table.test index 7902568..2d92799 100644 --- a/parser/testdata/corpus/sql/function/string/regexp_split_to_table.test +++ b/parser/testdata/corpus/sql/function/string/regexp_split_to_table.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regexp_split_to_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT regexp_split_to_table('a b c', ' ') diff --git a/parser/testdata/corpus/sql/function/string/regexp_unicode_literal.test b/parser/testdata/corpus/sql/function/string/regexp_unicode_literal.test index a78195b..4496163 100644 --- a/parser/testdata/corpus/sql/function/string/regexp_unicode_literal.test +++ b/parser/testdata/corpus/sql/function/string/regexp_unicode_literal.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/regexp_unicode_literal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE data(wsc INT, zipcode VARCHAR) diff --git a/parser/testdata/corpus/sql/function/string/sha1.test b/parser/testdata/corpus/sql/function/string/sha1.test index b2adf5b..2ae30ed 100644 --- a/parser/testdata/corpus/sql/function/string/sha1.test +++ b/parser/testdata/corpus/sql/function/string/sha1.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/sha1.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sha1('hello'), sha1(NULL) diff --git a/parser/testdata/corpus/sql/function/string/sha256.test b/parser/testdata/corpus/sql/function/string/sha256.test index 5db99dc..a208943 100644 --- a/parser/testdata/corpus/sql/function/string/sha256.test +++ b/parser/testdata/corpus/sql/function/string/sha256.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/sha256.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sha256('hello'), sha256(NULL) diff --git a/parser/testdata/corpus/sql/function/string/strip_accents.test b/parser/testdata/corpus/sql/function/string/strip_accents.test index 8270be3..89ab3d6 100644 --- a/parser/testdata/corpus/sql/function/string/strip_accents.test +++ b/parser/testdata/corpus/sql/function/string/strip_accents.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/strip_accents.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT strip_accents('hello'), strip_accents('héllo') diff --git a/parser/testdata/corpus/sql/function/string/test_array_extract.test b/parser/testdata/corpus/sql/function/string/test_array_extract.test index 2b09127..a1f438d 100644 --- a/parser/testdata/corpus/sql/function/string/test_array_extract.test +++ b/parser/testdata/corpus/sql/function/string/test_array_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_array_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(s VARCHAR, off INTEGER); diff --git a/parser/testdata/corpus/sql/function/string/test_ascii.test b/parser/testdata/corpus/sql/function/string/test_ascii.test index bbe0edc..4c038d6 100644 --- a/parser/testdata/corpus/sql/function/string/test_ascii.test +++ b/parser/testdata/corpus/sql/function/string/test_ascii.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_ascii.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ascii('x') diff --git a/parser/testdata/corpus/sql/function/string/test_bar.test b/parser/testdata/corpus/sql/function/string/test_bar.test index 0dfe7c1..6d8d144 100644 --- a/parser/testdata/corpus/sql/function/string/test_bar.test +++ b/parser/testdata/corpus/sql/function/string/test_bar.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_bar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select bar(x * x, 0, 100) from range(0, 11) t(x) diff --git a/parser/testdata/corpus/sql/function/string/test_bit_length.test b/parser/testdata/corpus/sql/function/string/test_bit_length.test index 539bf6f..9bc1a9b 100644 --- a/parser/testdata/corpus/sql/function/string/test_bit_length.test +++ b/parser/testdata/corpus/sql/function/string/test_bit_length.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_bit_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select BIT_LENGTH(NULL), BIT_LENGTH(''), BIT_LENGTH('$'), BIT_LENGTH('¢'), BIT_LENGTH('€'), BIT_LENGTH('𐍈') diff --git a/parser/testdata/corpus/sql/function/string/test_caseconvert.test b/parser/testdata/corpus/sql/function/string/test_caseconvert.test index df00637..5d5c451 100644 --- a/parser/testdata/corpus/sql/function/string/test_caseconvert.test +++ b/parser/testdata/corpus/sql/function/string/test_caseconvert.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_caseconvert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select UPPER('áaaá'), UPPER('ö'), LOWER('S̈'), UPPER('ω') diff --git a/parser/testdata/corpus/sql/function/string/test_complex_unicode.test b/parser/testdata/corpus/sql/function/string/test_complex_unicode.test index 1c9508f..6018d41 100644 --- a/parser/testdata/corpus/sql/function/string/test_complex_unicode.test +++ b/parser/testdata/corpus/sql/function/string/test_complex_unicode.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_complex_unicode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT length_grapheme('S̈a') diff --git a/parser/testdata/corpus/sql/function/string/test_concat.test b/parser/testdata/corpus/sql/function/string/test_concat.test index 5295c8e..bfa4ffe 100644 --- a/parser/testdata/corpus/sql/function/string/test_concat.test +++ b/parser/testdata/corpus/sql/function/string/test_concat.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_concat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s || ' ' || s FROM strings ORDER BY s diff --git a/parser/testdata/corpus/sql/function/string/test_concat_binding.test b/parser/testdata/corpus/sql/function/string/test_concat_binding.test index caab4b1..1830650 100644 --- a/parser/testdata/corpus/sql/function/string/test_concat_binding.test +++ b/parser/testdata/corpus/sql/function/string/test_concat_binding.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_concat_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select [1] || [2]; diff --git a/parser/testdata/corpus/sql/function/string/test_concat_function.test b/parser/testdata/corpus/sql/function/string/test_concat_function.test index 7976db9..41867d1 100644 --- a/parser/testdata/corpus/sql/function/string/test_concat_function.test +++ b/parser/testdata/corpus/sql/function/string/test_concat_function.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_concat_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select CONCAT(a, 'SUFFIX') FROM strings diff --git a/parser/testdata/corpus/sql/function/string/test_concat_ws.test b/parser/testdata/corpus/sql/function/string/test_concat_ws.test index 948bc4b..4c3099b 100644 --- a/parser/testdata/corpus/sql/function/string/test_concat_ws.test +++ b/parser/testdata/corpus/sql/function/string/test_concat_ws.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_concat_ws.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select CONCAT_WS(',',a, 'SUFFIX') FROM strings @@ -95,3 +95,75 @@ select CONCAT_WS(a, NULL, b, '') FROM strings ORDER BY a -- ok == +select CONCAT_WS(',', ['a', 'b', 'c']) +-- +ok +== +select CONCAT_WS(',', ['a', 'b'], 'c') +-- +ok +== +select CONCAT_WS(',', 'a', ['b', 'c']) +-- +ok +== +select CONCAT_WS(',', ['a', 'b'], ['c', 'd']) +-- +ok +== +select CONCAT_WS(',', ['a', NULL, 'b']) +-- +ok +== +select CONCAT_WS(',', []) +-- +ok +== +select CONCAT_WS(',', ['a', '']) +-- +ok +== +select CONCAT_WS(',', [1, 2, 3]) +-- +ok +== +select CONCAT_WS(',', ['a', 'b'], 5) +-- +ok +== +select CONCAT_WS(',', [['a', 'b'], ['c']]) +-- +ok +== +select CONCAT_WS(',', NULL::VARCHAR[], 'a') +-- +ok +== +select CONCAT_WS(NULL, ['a', 'b']) +-- +ok +== +select CONCAT_WS(',', [NULL, NULL]) +-- +ok +== +select CONCAT_WS(',', [], 'a', ['b','c']) +-- +ok +== +CREATE TABLE lists(sep VARCHAR, l VARCHAR[]); +-- +ok +== +INSERT INTO lists VALUES (',', ['a','b']), (';', ['x']), ('-', []), (',', NULL), (',', ['p','q','r']); +-- +ok +== +SELECT CONCAT_WS(sep, l) FROM lists ORDER BY rowid +-- +ok +== +select CONCAT_WS(',', NULL::VARCHAR[], ['c', 'd']) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_contains.test b/parser/testdata/corpus/sql/function/string/test_contains.test index 64fe0ac..5b4905a 100644 --- a/parser/testdata/corpus/sql/function/string/test_contains.test +++ b/parser/testdata/corpus/sql/function/string/test_contains.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CONTAINS('hello world', 'h'), diff --git a/parser/testdata/corpus/sql/function/string/test_contains_long_almost_matching_needle.test b/parser/testdata/corpus/sql/function/string/test_contains_long_almost_matching_needle.test new file mode 100644 index 0000000..c6ed700 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/test_contains_long_almost_matching_needle.test @@ -0,0 +1,25 @@ +# source: test/sql/function/string/test_contains_long_almost_matching_needle.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT contains(repeat('a', 2000000), repeat('a', 50000) || 'b'), strpos(repeat('a', 2000000) || 'b', repeat('a', 50000) || 'b'), instr(repeat('a', 2000000), repeat('a', 50000)); +-- +ok +== +SELECT length(replace(repeat('a', 1000000), repeat('a', 50000) || 'b', 'x')); +-- +ok +== +SELECT replace(repeat('ab', 20) || 'c' || repeat('ab', 20) || 'c', repeat('ab', 20) || 'c', 'x'); +-- +ok +== +SELECT strpos('aaaaaaaaabaaaaaaaaaab', 'aaaaaaaaaab'), contains('xyzxyzxyzxyzxyz', 'zxyzxyzxyzx'); +-- +ok +== +SELECT strpos(repeat('abc', 1000) || 'abd', repeat('abc', 100) || 'abd'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_contains_utf8.test b/parser/testdata/corpus/sql/function/string/test_contains_utf8.test index 2a615ff..40deef3 100644 --- a/parser/testdata/corpus/sql/function/string/test_contains_utf8.test +++ b/parser/testdata/corpus/sql/function/string/test_contains_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_contains_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO strings VALUES ('átomo') diff --git a/parser/testdata/corpus/sql/function/string/test_damerau_levenshtein.test b/parser/testdata/corpus/sql/function/string/test_damerau_levenshtein.test index d01f417..2657076 100644 --- a/parser/testdata/corpus/sql/function/string/test_damerau_levenshtein.test +++ b/parser/testdata/corpus/sql/function/string/test_damerau_levenshtein.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_damerau_levenshtein.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT damerau_levenshtein('out', 'out') diff --git a/parser/testdata/corpus/sql/function/string/test_format.test b/parser/testdata/corpus/sql/function/string/test_format.test index 1a16d37..e731fa9 100644 --- a/parser/testdata/corpus/sql/function/string/test_format.test +++ b/parser/testdata/corpus/sql/function/string/test_format.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_format.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT format('hello'), format(NULL) diff --git a/parser/testdata/corpus/sql/function/string/test_format_extensions.test b/parser/testdata/corpus/sql/function/string/test_format_extensions.test index 67f21b7..996d577 100644 --- a/parser/testdata/corpus/sql/function/string/test_format_extensions.test +++ b/parser/testdata/corpus/sql/function/string/test_format_extensions.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_format_extensions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select printf('%,d', 123456789) diff --git a/parser/testdata/corpus/sql/function/string/test_glob.test b/parser/testdata/corpus/sql/function/string/test_glob.test index 1d45224..b6ce856 100644 --- a/parser/testdata/corpus/sql/function/string/test_glob.test +++ b/parser/testdata/corpus/sql/function/string/test_glob.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_glob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'aaa' GLOB 'bbb' @@ -59,6 +59,10 @@ SELECT 'a' GLOB '[0-9]' -- ok == +SELECT 'a' GLOB '[a-]', '-' GLOB '[a-]', 'b' GLOB '[a-]' +-- +ok +== SELECT '012' GLOB '[0-9][0-9][0-9]' -- ok diff --git a/parser/testdata/corpus/sql/function/string/test_ilike.test b/parser/testdata/corpus/sql/function/string/test_ilike.test index 63de0f4..8f8e266 100644 --- a/parser/testdata/corpus/sql/function/string/test_ilike.test +++ b/parser/testdata/corpus/sql/function/string/test_ilike.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_ilike.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'aaa' ILIKE 'bbb' diff --git a/parser/testdata/corpus/sql/function/string/test_ilike_constant_pattern.test b/parser/testdata/corpus/sql/function/string/test_ilike_constant_pattern.test index 80c421a..fc6ffdb 100644 --- a/parser/testdata/corpus/sql/function/string/test_ilike_constant_pattern.test +++ b/parser/testdata/corpus/sql/function/string/test_ilike_constant_pattern.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_ilike_constant_pattern.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(id INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/string/test_ilike_embedded_null.test b/parser/testdata/corpus/sql/function/string/test_ilike_embedded_null.test index 629bc3e..6c57395 100644 --- a/parser/testdata/corpus/sql/function/string/test_ilike_embedded_null.test +++ b/parser/testdata/corpus/sql/function/string/test_ilike_embedded_null.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_ilike_embedded_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(a VARCHAR, b VARCHAR); diff --git a/parser/testdata/corpus/sql/function/string/test_ilike_escape.test b/parser/testdata/corpus/sql/function/string/test_ilike_escape.test index 7f1fd39..04fa94a 100644 --- a/parser/testdata/corpus/sql/function/string/test_ilike_escape.test +++ b/parser/testdata/corpus/sql/function/string/test_ilike_escape.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_ilike_escape.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 'a%c' ilike 'a$%C' escape '$'; diff --git a/parser/testdata/corpus/sql/function/string/test_ilike_escape_constant_pattern.test b/parser/testdata/corpus/sql/function/string/test_ilike_escape_constant_pattern.test index 1aa8732..811b771 100644 --- a/parser/testdata/corpus/sql/function/string/test_ilike_escape_constant_pattern.test +++ b/parser/testdata/corpus/sql/function/string/test_ilike_escape_constant_pattern.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_ilike_escape_constant_pattern.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t VALUES diff --git a/parser/testdata/corpus/sql/function/string/test_instr.test b/parser/testdata/corpus/sql/function/string/test_instr.test index 403e89f..fae2a1d 100644 --- a/parser/testdata/corpus/sql/function/string/test_instr.test +++ b/parser/testdata/corpus/sql/function/string/test_instr.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_instr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT instr(s,'h') FROM strings diff --git a/parser/testdata/corpus/sql/function/string/test_instr_utf8.test b/parser/testdata/corpus/sql/function/string/test_instr_utf8.test index a9dd56c..7962f4e 100644 --- a/parser/testdata/corpus/sql/function/string/test_instr_utf8.test +++ b/parser/testdata/corpus/sql/function/string/test_instr_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_instr_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT INSTR(s,'á') FROM strings diff --git a/parser/testdata/corpus/sql/function/string/test_issue_1812.test b/parser/testdata/corpus/sql/function/string/test_issue_1812.test index 972b7b2..029f738 100644 --- a/parser/testdata/corpus/sql/function/string/test_issue_1812.test +++ b/parser/testdata/corpus/sql/function/string/test_issue_1812.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_issue_1812.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (str VARCHAR); diff --git a/parser/testdata/corpus/sql/function/string/test_jaccard.test b/parser/testdata/corpus/sql/function/string/test_jaccard.test index 1147b8f..4076693 100644 --- a/parser/testdata/corpus/sql/function/string/test_jaccard.test +++ b/parser/testdata/corpus/sql/function/string/test_jaccard.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_jaccard.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT jaccard('hello', 'hello') diff --git a/parser/testdata/corpus/sql/function/string/test_jaro_winkler.test b/parser/testdata/corpus/sql/function/string/test_jaro_winkler.test index 2434c0c..2571a73 100644 --- a/parser/testdata/corpus/sql/function/string/test_jaro_winkler.test +++ b/parser/testdata/corpus/sql/function/string/test_jaro_winkler.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_jaro_winkler.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select jaro_winkler_similarity('CRATE', 'TRACE') @@ -159,3 +159,18 @@ select avg(jaro_winkler_similarity(s, '00000000')) from test; -- ok == +SELECT jaro_similarity(a, b), jaro_similarity(a, b, cutoff) +FROM (VALUES ('CRATE', 'TRACE', 0.6), ('fly', 'ant', 0.8)) strings(a, b, cutoff); +-- +ok +== +SELECT jaro_similarity('CRATE', other, cutoff) +FROM (VALUES ('TRACE', 0.6), ('TRACE', 0.8)) strings(other, cutoff); +-- +ok +== +SELECT jaro_similarity(NULL, other) +FROM (VALUES ('duck'), ('db')) strings(other); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_left.test b/parser/testdata/corpus/sql/function/string/test_left.test index 741ed56..a1c7b50 100644 --- a/parser/testdata/corpus/sql/function/string/test_left.test +++ b/parser/testdata/corpus/sql/function/string/test_left.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_left.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {FUN}('abcd', 0), {FUN}('abc', 1), {FUN}('abc', 2), {FUN}('abc', 3), {FUN}('abc', 4) diff --git a/parser/testdata/corpus/sql/function/string/test_length.test b/parser/testdata/corpus/sql/function/string/test_length.test index ee9727e..d0e77a9 100644 --- a/parser/testdata/corpus/sql/function/string/test_length.test +++ b/parser/testdata/corpus/sql/function/string/test_length.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT length(s) FROM strings ORDER BY s diff --git a/parser/testdata/corpus/sql/function/string/test_levenshtein.test b/parser/testdata/corpus/sql/function/string/test_levenshtein.test index 22ea0f7..a8e3caa 100644 --- a/parser/testdata/corpus/sql/function/string/test_levenshtein.test +++ b/parser/testdata/corpus/sql/function/string/test_levenshtein.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_levenshtein.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT levenshtein('hallo', 'hallo') diff --git a/parser/testdata/corpus/sql/function/string/test_like.test b/parser/testdata/corpus/sql/function/string/test_like.test index 8e0e726..4387afc 100644 --- a/parser/testdata/corpus/sql/function/string/test_like.test +++ b/parser/testdata/corpus/sql/function/string/test_like.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_like.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'aaa' LIKE 'bbb' diff --git a/parser/testdata/corpus/sql/function/string/test_like_escape.test b/parser/testdata/corpus/sql/function/string/test_like_escape.test index b1b0cbd..45e73bd 100644 --- a/parser/testdata/corpus/sql/function/string/test_like_escape.test +++ b/parser/testdata/corpus/sql/function/string/test_like_escape.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_like_escape.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '%++' LIKE '*%++' ESCAPE '*'; @@ -89,3 +89,27 @@ SELECT '%' LIKE (chr(0) || '%') ESCAPE chr(0), -- ok == +SELECT 'abc' LIKE 'abc%%' ESCAPE '%', 'abc%' LIKE 'abc%%' ESCAPE '%' +-- +ok +== +SELECT 'abcd' LIKE 'abc#' ESCAPE '#'; +-- +ok +== +SELECT 'abc' LIKE 'abc#' ESCAPE '#'; +-- +ok +== +SELECT 'xyz' LIKE 'abc#' ESCAPE '#' +-- +ok +== +SELECT 'ab' LIKE 'ab%' ESCAPE '%'; +-- +ok +== +SELECT '' LIKE '%' ESCAPE '%'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_like_many_wildcards.test b/parser/testdata/corpus/sql/function/string/test_like_many_wildcards.test new file mode 100644 index 0000000..665d272 --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/test_like_many_wildcards.test @@ -0,0 +1,33 @@ +# source: test/sql/function/string/test_like_many_wildcards.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT like_escape(repeat('a', 30000), repeat('%a', 30000), ''); +-- +ok +== +SELECT like_escape(repeat('a', 29999), repeat('%a', 30000), ''); +-- +ok +== +SELECT repeat('a', 30000) LIKE repeat('%a', 30000); +-- +ok +== +SELECT ilike_escape(repeat('A', 30000) || 'b', repeat('%a', 30000) || '%c', ''); +-- +ok +== +SELECT like_escape(repeat('ab', 1000), repeat('%a_', 1000) || '%', '\'); +-- +ok +== +SELECT like_escape('x%y%z', '%\%%\%%', '\'); +-- +ok +== +SELECT like_escape('x%y%z', '%\%%\%%\%%', '\'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_mismatches.test b/parser/testdata/corpus/sql/function/string/test_mismatches.test index e17b564..5be0f36 100644 --- a/parser/testdata/corpus/sql/function/string/test_mismatches.test +++ b/parser/testdata/corpus/sql/function/string/test_mismatches.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_mismatches.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT mismatches('hallo', 'hallo') diff --git a/parser/testdata/corpus/sql/function/string/test_pad.test b/parser/testdata/corpus/sql/function/string/test_pad.test index 308512c..6b7d31b 100644 --- a/parser/testdata/corpus/sql/function/string/test_pad.test +++ b/parser/testdata/corpus/sql/function/string/test_pad.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_pad.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select LPAD(NULL, 7, '-'), LPAD('Base', NULL, '-'), LPAD('Base', 7, NULL), LPAD(NULL, NULL, '-'), LPAD(NULL, 7, NULL), LPAD('Base', NULL, NULL), LPAD(NULL, NULL, NULL) @@ -83,3 +83,31 @@ select RPAD('a', 100000000000000000, 0) -- ok == +select LPAD('', 1100000000, '😀') +-- +ok +== +select RPAD('', 1100000000, '😀') +-- +ok +== +select LPAD('😀😀', 1073741824, '😀') +-- +ok +== +select RPAD('😀😀', 1073741824, '😀') +-- +ok +== +select LPAD('abc', 2147483647, 'xyz😀😀') +-- +ok +== +select LPAD('ab', 7, 'xy😀') +-- +ok +== +select RPAD('ab', 7, 'xy😀') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_prefix.test b/parser/testdata/corpus/sql/function/string/test_prefix.test index bf4a5de..7ed8fdf 100644 --- a/parser/testdata/corpus/sql/function/string/test_prefix.test +++ b/parser/testdata/corpus/sql/function/string/test_prefix.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_prefix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT prefix('abcd', 'a') diff --git a/parser/testdata/corpus/sql/function/string/test_printf.test b/parser/testdata/corpus/sql/function/string/test_printf.test index fe71339..854211e 100644 --- a/parser/testdata/corpus/sql/function/string/test_printf.test +++ b/parser/testdata/corpus/sql/function/string/test_printf.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_printf.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT printf('hello'), printf(NULL) @@ -103,6 +103,22 @@ SELECT printf('%c', 65) -- ok == +SELECT printf('%c', 255) +-- +ok +== +SELECT lower(printf('%c', 255)) +-- +ok +== +SELECT strip_accents(printf('%c', 255)) +-- +ok +== +SELECT printf('%c', i) FROM range(200, 300) t(i) +-- +ok +== SELECT printf('%*d', 5, 10) -- ok diff --git a/parser/testdata/corpus/sql/function/string/test_regex_match_positions.test b/parser/testdata/corpus/sql/function/string/test_regex_match_positions.test new file mode 100644 index 0000000..518078d --- /dev/null +++ b/parser/testdata/corpus/sql/function/string/test_regex_match_positions.test @@ -0,0 +1,37 @@ +# source: test/sql/function/string/test_regex_match_positions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT regexp_extract_all('ab', '$'), regexp_extract_all('ab', 'x*'), regexp_extract_all('axb', 'x*'), regexp_extract_all('aé中', ''); +-- +ok +== +SELECT regexp_extract_all('ab', '(?Pb?)$', ['x']); +-- +ok +== +SELECT string_split_regex('aaa', '^a'), string_split_regex('a1b2c', '[0-9]'), string_split_regex('ab cd', '\bc'), string_split_regex('abc', ''); +-- +ok +== +SELECT string_split_regex(s, p), string_split_regex(s, p, 'i') FROM (VALUES ('aaa', '^a'), ('aXbxc', 'x')) t(s, p); +-- +ok +== +SELECT string_split_regex('abc', p) FROM (VALUES ('(a')) t(p); +-- +ok +== +SELECT regexp_extract('abc', p) FROM (VALUES ('(a')) t(p); +-- +ok +== +SELECT 'aXb' ILIKE 'aXXb' ESCAPE 'X', 'a%b' ILIKE 'aX%b' ESCAPE 'X', 'axb' ILIKE 'aX%b' ESCAPE 'X', 'a%b' NOT ILIKE 'aX%b' ESCAPE 'X'; +-- +ok +== +SELECT s ILIKE p ESCAPE e FROM (VALUES ('aXb', 'aXXb', 'X'), ('a%b', 'aX%b', 'X'), ('axb', 'aX%b', 'X')) t(s, p, e); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_repeat.test b/parser/testdata/corpus/sql/function/string/test_repeat.test index 327cce1..bf234ba 100644 --- a/parser/testdata/corpus/sql/function/string/test_repeat.test +++ b/parser/testdata/corpus/sql/function/string/test_repeat.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_repeat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select REPEAT(NULL, NULL), REPEAT(NULL, 3), REPEAT('MySQL', NULL) diff --git a/parser/testdata/corpus/sql/function/string/test_replace.test b/parser/testdata/corpus/sql/function/string/test_replace.test index b1a0486..d5b4959 100644 --- a/parser/testdata/corpus/sql/function/string/test_replace.test +++ b/parser/testdata/corpus/sql/function/string/test_replace.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select REPLACE('This is the main test string', NULL, 'ALT') diff --git a/parser/testdata/corpus/sql/function/string/test_reverse.test b/parser/testdata/corpus/sql/function/string/test_reverse.test index 6fc0d4a..da997e7 100644 --- a/parser/testdata/corpus/sql/function/string/test_reverse.test +++ b/parser/testdata/corpus/sql/function/string/test_reverse.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_reverse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select REVERSE(''), REVERSE('Hello'), REVERSE('MotörHead'), REVERSE(NULL) diff --git a/parser/testdata/corpus/sql/function/string/test_right.test b/parser/testdata/corpus/sql/function/string/test_right.test index e09126c..8e569f4 100644 --- a/parser/testdata/corpus/sql/function/string/test_right.test +++ b/parser/testdata/corpus/sql/function/string/test_right.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_right.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT RIGHT_GRAPHEME('🦆🤦S̈', 0), RIGHT_GRAPHEME('🦆🤦S̈', 1), RIGHT_GRAPHEME('🦆🤦S̈', 2), RIGHT_GRAPHEME('🦆🤦S̈', 3) diff --git a/parser/testdata/corpus/sql/function/string/test_similar_to.test b/parser/testdata/corpus/sql/function/string/test_similar_to.test index 5f8c197..2d90346 100644 --- a/parser/testdata/corpus/sql/function/string/test_similar_to.test +++ b/parser/testdata/corpus/sql/function/string/test_similar_to.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_similar_to.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'aaa' SIMILAR TO 'bbb' diff --git a/parser/testdata/corpus/sql/function/string/test_split_part.test b/parser/testdata/corpus/sql/function/string/test_split_part.test index 2232e4e..ad8fe4b 100644 --- a/parser/testdata/corpus/sql/function/string/test_split_part.test +++ b/parser/testdata/corpus/sql/function/string/test_split_part.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_split_part.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select split_part('a,b,c',',',1) diff --git a/parser/testdata/corpus/sql/function/string/test_starts_with_function.test b/parser/testdata/corpus/sql/function/string/test_starts_with_function.test index 5a0b60e..59dd73d 100644 --- a/parser/testdata/corpus/sql/function/string/test_starts_with_function.test +++ b/parser/testdata/corpus/sql/function/string/test_starts_with_function.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_starts_with_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT STARTS_WITH('hello world', 'h'), diff --git a/parser/testdata/corpus/sql/function/string/test_starts_with_function_utf8.test b/parser/testdata/corpus/sql/function/string/test_starts_with_function_utf8.test index 601c42a..83ab2be 100644 --- a/parser/testdata/corpus/sql/function/string/test_starts_with_function_utf8.test +++ b/parser/testdata/corpus/sql/function/string/test_starts_with_function_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_starts_with_function_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT starts_with(s,'á') FROM strings diff --git a/parser/testdata/corpus/sql/function/string/test_starts_with_operator.test b/parser/testdata/corpus/sql/function/string/test_starts_with_operator.test index 0268ff0..576ecd3 100644 --- a/parser/testdata/corpus/sql/function/string/test_starts_with_operator.test +++ b/parser/testdata/corpus/sql/function/string/test_starts_with_operator.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_starts_with_operator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'hello world' ^@ 'h', diff --git a/parser/testdata/corpus/sql/function/string/test_starts_with_operator_utf8.test b/parser/testdata/corpus/sql/function/string/test_starts_with_operator_utf8.test index fae8ca0..46344ab 100644 --- a/parser/testdata/corpus/sql/function/string/test_starts_with_operator_utf8.test +++ b/parser/testdata/corpus/sql/function/string/test_starts_with_operator_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_starts_with_operator_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s ^@ 'á' FROM strings diff --git a/parser/testdata/corpus/sql/function/string/test_string_array_slice.test b/parser/testdata/corpus/sql/function/string/test_string_array_slice.test index 8ca299f..3a5ad7a 100644 --- a/parser/testdata/corpus/sql/function/string/test_string_array_slice.test +++ b/parser/testdata/corpus/sql/function/string/test_string_array_slice.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_string_array_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'hello'[0:2] diff --git a/parser/testdata/corpus/sql/function/string/test_string_slice.test b/parser/testdata/corpus/sql/function/string/test_string_slice.test index 8505d0c..2caee06 100644 --- a/parser/testdata/corpus/sql/function/string/test_string_slice.test +++ b/parser/testdata/corpus/sql/function/string/test_string_slice.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_string_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nulltable(n VARCHAR); diff --git a/parser/testdata/corpus/sql/function/string/test_string_split.test b/parser/testdata/corpus/sql/function/string/test_string_split.test index 4d044b7..043b589 100644 --- a/parser/testdata/corpus/sql/function/string/test_string_split.test +++ b/parser/testdata/corpus/sql/function/string/test_string_split.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_string_split.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT string_split(NULL, NULL) @@ -199,3 +199,19 @@ SELECT string_split_regex(a, '[') FROM test ORDER BY a; -- ok == +CREATE TABLE split_patterns (s VARCHAR, p VARCHAR) +-- +ok +== +INSERT INTO split_patterns VALUES ('asdf', '(') +-- +ok +== +SELECT string_split_regex(s, p) FROM split_patterns +-- +ok +== +SELECT string_split_regex(s, p, 'c') FROM split_patterns +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_subscript.test b/parser/testdata/corpus/sql/function/string/test_subscript.test index 7484683..216edf4 100644 --- a/parser/testdata/corpus/sql/function/string/test_subscript.test +++ b/parser/testdata/corpus/sql/function/string/test_subscript.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_subscript.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '🦆ab'[1], 'abc'[2] diff --git a/parser/testdata/corpus/sql/function/string/test_substring.test b/parser/testdata/corpus/sql/function/string/test_substring.test index f85fda7..7811aa5 100644 --- a/parser/testdata/corpus/sql/function/string/test_substring.test +++ b/parser/testdata/corpus/sql/function/string/test_substring.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_substring.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {FUN}('🦆ab', 1, 0), {FUN}('abc', 1, 0) @@ -159,6 +159,18 @@ SELECT {FUN}(s, 0, -4294967297) FROM strings -- error: Parser Error: syntax error at or near "}" == +SELECT {FUN}(s, -12345678, 12) FROM strings +-- +error: Parser Error: syntax error at or near "}" +== +SELECT {FUN}(s, -2147483648, 2) FROM strings +-- +error: Parser Error: syntax error at or near "}" +== +SELECT {FUN}('abc', -12345678, 12) +-- +error: Parser Error: syntax error at or near "}" +== SELECT substring(s from off) FROM strings -- ok @@ -175,3 +187,22 @@ SELECT SUBSTRING('hello' FOR 3) -- ok == +CREATE TABLE nullable_substring_bounds(v VARCHAR NOT NULL, off BIGINT, len BIGINT); +-- +ok +== +INSERT INTO nullable_substring_bounds VALUES ('abc', NULL, 1), ('abc', 1, NULL), ('abc', 1, 1); +-- +ok +== +SELECT count(*) FILTER (WHERE {FUN}(v, off, 1) IS NULL), + count(*) FILTER (WHERE {FUN}(v, 1, len) IS NULL), + count(*) FILTER (WHERE {FUN}(v, off, len) IS NULL) +FROM nullable_substring_bounds; +-- +error: Parser Error: syntax error at or near "}" +== +SET disabled_optimizers = 'statistics_propagation'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_substring_utf8.test b/parser/testdata/corpus/sql/function/string/test_substring_utf8.test index 2e97dec..11470ab 100644 --- a/parser/testdata/corpus/sql/function/string/test_substring_utf8.test +++ b/parser/testdata/corpus/sql/function/string/test_substring_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_substring_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO strings VALUES ('twoñthree₡four🦆end') @@ -43,3 +43,7 @@ SELECT {FUN}(s, 5) FROM strings -- error: Parser Error: syntax error at or near "}" == +SELECT substring_grapheme('ääääää', -10, 2), substring_grapheme('ääääää', -10, 5), substring_grapheme('ääääää', -10, 6) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/string/test_suffix.test b/parser/testdata/corpus/sql/function/string/test_suffix.test index 1fc369b..46c4939 100644 --- a/parser/testdata/corpus/sql/function/string/test_suffix.test +++ b/parser/testdata/corpus/sql/function/string/test_suffix.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_suffix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT suffix('abcd', 'd') diff --git a/parser/testdata/corpus/sql/function/string/test_to_base.test b/parser/testdata/corpus/sql/function/string/test_to_base.test index d320041..8a151a3 100644 --- a/parser/testdata/corpus/sql/function/string/test_to_base.test +++ b/parser/testdata/corpus/sql/function/string/test_to_base.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_to_base.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT to_base(-10, 2) diff --git a/parser/testdata/corpus/sql/function/string/test_translate.test b/parser/testdata/corpus/sql/function/string/test_translate.test index a40f69d..e898e6e 100644 --- a/parser/testdata/corpus/sql/function/string/test_translate.test +++ b/parser/testdata/corpus/sql/function/string/test_translate.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_translate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select TRANSLATE('This is the main test string', NULL, 'ALT') diff --git a/parser/testdata/corpus/sql/function/string/test_trim.test b/parser/testdata/corpus/sql/function/string/test_trim.test index 5e2abb4..f766bf7 100644 --- a/parser/testdata/corpus/sql/function/string/test_trim.test +++ b/parser/testdata/corpus/sql/function/string/test_trim.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_trim.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select LTRIM(''), LTRIM('Neither'), LTRIM(' Leading'), LTRIM('Trailing '), LTRIM(' Both '), LTRIM(NULL), LTRIM(' ') diff --git a/parser/testdata/corpus/sql/function/string/test_unicode.test b/parser/testdata/corpus/sql/function/string/test_unicode.test index 42af10c..01a1e5e 100644 --- a/parser/testdata/corpus/sql/function/string/test_unicode.test +++ b/parser/testdata/corpus/sql/function/string/test_unicode.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_unicode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select UNICODE(NULL), UNICODE(''), UNICODE('$'), UNICODE('¢'), UNICODE('€'), UNICODE('𐍈') diff --git a/parser/testdata/corpus/sql/function/string/test_url_encode.test b/parser/testdata/corpus/sql/function/string/test_url_encode.test index 3513f11..7285693 100644 --- a/parser/testdata/corpus/sql/function/string/test_url_encode.test +++ b/parser/testdata/corpus/sql/function/string/test_url_encode.test @@ -1,6 +1,6 @@ # source: test/sql/function/string/test_url_encode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT url_encode(''), url_decode('') diff --git a/parser/testdata/corpus/sql/function/table/multi_file_array_parameter.test b/parser/testdata/corpus/sql/function/table/multi_file_array_parameter.test new file mode 100644 index 0000000..ab4516c --- /dev/null +++ b/parser/testdata/corpus/sql/function/table/multi_file_array_parameter.test @@ -0,0 +1,29 @@ +# source: test/sql/function/table/multi_file_array_parameter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_csv(NULL::INTEGER[3]); +-- +error: Parser Error: "read_csv" cannot take NULL list as parameter +== +SELECT * FROM read_blob(NULL::VARCHAR[1]); +-- +error: Parser Error: "read_blob" cannot take NULL list as parameter +== +SELECT * FROM read_text(NULL::VARCHAR[1]); +-- +error: Parser Error: "read_text" cannot take NULL list as parameter +== +SELECT * FROM glob(NULL::VARCHAR[2]); +-- +error: Parser Error: "glob" cannot take NULL list as parameter +== +COPY (SELECT 42 AS i) TO '__TEST_DIR__/multi_file_array.csv'; +-- +ok +== +SELECT * FROM read_csv(['__TEST_DIR__/multi_file_array.csv']::VARCHAR[1]); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/table/multi_file_array_parameter.test.metadata.json b/parser/testdata/corpus/sql/function/table/multi_file_array_parameter.test.metadata.json new file mode 100644 index 0000000..ea8ce32 --- /dev/null +++ b/parser/testdata/corpus/sql/function/table/multi_file_array_parameter.test.metadata.json @@ -0,0 +1,8 @@ +{ + "todo": { + "26311e9b03fcdfd7": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "57fab823b4aba9ca": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "9ec94295269ade16": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "dbe5979c0c069139": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/function/table/read_duckdb_empty_projection.test b/parser/testdata/corpus/sql/function/table/read_duckdb_empty_projection.test new file mode 100644 index 0000000..2fe539e --- /dev/null +++ b/parser/testdata/corpus/sql/function/table/read_duckdb_empty_projection.test @@ -0,0 +1,33 @@ +# source: test/sql/function/table/read_duckdb_empty_projection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '__TEST_DIR__/rd_empty_projection.db' AS x +-- +ok +== +CREATE TABLE x.t AS SELECT i FROM range(5000) r(i) +-- +ok +== +DETACH x +-- +ok +== +SELECT count(*) FROM read_duckdb('__TEST_DIR__/rd_empty_projection.db', table_name := 't') +-- +ok +== +SELECT 42 FROM read_duckdb('__TEST_DIR__/rd_empty_projection.db', table_name := 't') LIMIT 2 +-- +ok +== +SELECT count(*) FROM read_duckdb(['__TEST_DIR__/rd_empty_projection.db', '__TEST_DIR__/rd_empty_projection.db'], table_name := 't') +-- +ok +== +SELECT count(i), count(*) FROM read_duckdb('__TEST_DIR__/rd_empty_projection.db', table_name := 't') +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/table/read_duckdb_struct_children.test b/parser/testdata/corpus/sql/function/table/read_duckdb_struct_children.test new file mode 100644 index 0000000..121b473 --- /dev/null +++ b/parser/testdata/corpus/sql/function/table/read_duckdb_struct_children.test @@ -0,0 +1,37 @@ +# source: test/sql/function/table/read_duckdb_struct_children.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '__TEST_DIR__/rd_struct.db' AS rds (STORAGE_VERSION 'v2.0.0') +-- +ok +== +CREATE TABLE rds.t AS SELECT {'a': 1, 'b': 'x'} s, {'x': {'y': 2}} n, [{'q': 3}] ls, row(4, 'z') tu, 5 i +-- +ok +== +DETACH rds +-- +ok +== +SELECT * FROM read_duckdb('__TEST_DIR__/rd_struct.db') +-- +ok +== +SELECT s.a, n.x.y, i FROM read_duckdb('__TEST_DIR__/rd_struct.db') +-- +ok +== +SELECT count(*) FROM read_duckdb('__TEST_DIR__/rd_struct.db') WHERE s.a IS NULL +-- +ok +== +SELECT * FROM read_duckdb('__TEST_DIR__/rd_struct.db', table_name := NULL) +-- +ok +== +SELECT * FROM read_duckdb('__TEST_DIR__/rd_struct.db', schema_name := NULL) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/table/system_metadata_empty.test b/parser/testdata/corpus/sql/function/table/system_metadata_empty.test new file mode 100644 index 0000000..e35efb8 --- /dev/null +++ b/parser/testdata/corpus/sql/function/table/system_metadata_empty.test @@ -0,0 +1,19 @@ +# source: test/sql/function/table/system_metadata_empty.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) >= 0 FROM duckdb_grammar_extensions(); +-- +ok +== +SELECT count(*) >= 0 FROM duckdb_coordinate_systems(); +-- +ok +== +SELECT typeof(database_oid), typeof(crs_oid), typeof(projjson) +FROM duckdb_coordinate_systems() +LIMIT 0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/test_scalar_executor.test b/parser/testdata/corpus/sql/function/test_scalar_executor.test index 186a3b0..01c0131 100644 --- a/parser/testdata/corpus/sql/function/test_scalar_executor.test +++ b/parser/testdata/corpus/sql/function/test_scalar_executor.test @@ -1,6 +1,6 @@ # source: test/sql/function/test_scalar_executor.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE executor_input(i INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/time/epoch.test b/parser/testdata/corpus/sql/function/time/epoch.test index 98ac76f..a5c4779 100644 --- a/parser/testdata/corpus/sql/function/time/epoch.test +++ b/parser/testdata/corpus/sql/function/time/epoch.test @@ -1,6 +1,6 @@ # source: test/sql/function/time/epoch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select epoch(TIME '14:21:13') diff --git a/parser/testdata/corpus/sql/function/time/test_date_part.test b/parser/testdata/corpus/sql/function/time/test_date_part.test index ffae67d..bc7ffa8 100644 --- a/parser/testdata/corpus/sql/function/time/test_date_part.test +++ b/parser/testdata/corpus/sql/function/time/test_date_part.test @@ -1,6 +1,6 @@ # source: test/sql/function/time/test_date_part.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE times(d TIME, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/time/test_extract.test b/parser/testdata/corpus/sql/function/time/test_extract.test index 754fa5e..d492765 100644 --- a/parser/testdata/corpus/sql/function/time/test_extract.test +++ b/parser/testdata/corpus/sql/function/time/test_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/time/test_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE times(i TIME) diff --git a/parser/testdata/corpus/sql/function/time/test_extract_stats.test b/parser/testdata/corpus/sql/function/time/test_extract_stats.test index 9d735aa..ac92109 100644 --- a/parser/testdata/corpus/sql/function/time/test_extract_stats.test +++ b/parser/testdata/corpus/sql/function/time/test_extract_stats.test @@ -1,6 +1,6 @@ # source: test/sql/function/time/test_extract_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE expected_result AS FROM (VALUES @@ -8,7 +8,7 @@ CREATE TABLE expected_result AS FROM (VALUES ('milliseconds', 0, 59999), ('second', 0, 59), ('minute', 0, 59), - ('hour', 0, 24), + ('hour', 0, 20), ('epoch', 0, 86400) ) t(component, min, max) -- diff --git a/parser/testdata/corpus/sql/function/time/test_time_bucket_time.test b/parser/testdata/corpus/sql/function/time/test_time_bucket_time.test index 36390fa..d577a17 100644 --- a/parser/testdata/corpus/sql/function/time/test_time_bucket_time.test +++ b/parser/testdata/corpus/sql/function/time/test_time_bucket_time.test @@ -1,6 +1,6 @@ # source: test/sql/function/time/test_time_bucket_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE times(w INTERVAL, t TIME, shift INTERVAL, origin TIME); diff --git a/parser/testdata/corpus/sql/function/timestamp/age.test b/parser/testdata/corpus/sql/function/timestamp/age.test index 5f317a6..762c558 100644 --- a/parser/testdata/corpus/sql/function/timestamp/age.test +++ b/parser/testdata/corpus/sql/function/timestamp/age.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/age.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT AGE(TIMESTAMP '1957-06-13') t @@ -115,6 +115,14 @@ select age(timestamp '1992-01-01 01:01:01.400', timestamp '1992-01-01 01:01:02.2 -- ok == +SELECT age(lhs, rhs) +FROM (VALUES + (TIMESTAMP '2020-01-01 00:01:10', TIMESTAMP '2020-01-01 00:00:50'), + (TIMESTAMP '2020-01-01 00:00:50', TIMESTAMP '2020-01-01 00:01:10') +) t(lhs, rhs) +-- +ok +== SELECT AGE('{lspecial}'::TIMESTAMP); -- ok diff --git a/parser/testdata/corpus/sql/function/timestamp/current_time.test b/parser/testdata/corpus/sql/function/timestamp/current_time.test index 78eed28..6fd8be2 100644 --- a/parser/testdata/corpus/sql/function/timestamp/current_time.test +++ b/parser/testdata/corpus/sql/function/timestamp/current_time.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/current_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='gregorian'; diff --git a/parser/testdata/corpus/sql/function/timestamp/current_timestamp.test b/parser/testdata/corpus/sql/function/timestamp/current_timestamp.test index d17e361..65feac5 100644 --- a/parser/testdata/corpus/sql/function/timestamp/current_timestamp.test +++ b/parser/testdata/corpus/sql/function/timestamp/current_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/current_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET TimeZone = 'America/Chihuahua'; diff --git a/parser/testdata/corpus/sql/function/timestamp/date_sub_diff.test b/parser/testdata/corpus/sql/function/timestamp/date_sub_diff.test new file mode 100644 index 0000000..9305c88 --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/date_sub_diff.test @@ -0,0 +1,90 @@ +# source: test/sql/function/timestamp/date_sub_diff.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH parts(part) AS ( + VALUES ('year'), ('isoyear'), ('month'), ('day'), ('decade'), ('century'), ('millennium'), + ('quarter'), ('week'), ('microseconds'), ('milliseconds'), ('second'), ('minute'), ('hour') +) +SELECT + part, + date_sub(part, DATE '2000-01-02', DATE '2010-02-03'), + date_diff(part, TIMESTAMP '2000-01-02 03:04:05.006007', TIMESTAMP '2010-02-03 05:06:07.008009') +FROM parts +ORDER BY part; +-- +ok +== +SELECT + date_sub('year', s, e), + date_sub('isoyear', s, e), + date_sub('month', s, e), + date_sub('day', s, e), + date_sub('decade', s, e), + date_sub('century', s, e), + date_sub('millennium', s, e), + date_sub('quarter', s, e), + date_sub('week', s, e), + date_sub('microseconds', s, e), + date_sub('milliseconds', s, e), + date_sub('second', s, e), + date_sub('minute', s, e), + date_sub('hour', s, e) +FROM (VALUES ( + TIMESTAMP '2000-01-02 03:04:05.006007', + TIMESTAMP '2010-02-03 05:06:07.008009' +)) dates(s, e); +-- +ok +== +SELECT + date_diff('year', s, e), + date_diff('isoyear', s, e), + date_diff('month', s, e), + date_diff('day', s, e), + date_diff('decade', s, e), + date_diff('century', s, e), + date_diff('millennium', s, e), + date_diff('quarter', s, e), + date_diff('week', s, e), + date_diff('microseconds', s, e), + date_diff('milliseconds', s, e), + date_diff('second', s, e), + date_diff('minute', s, e), + date_diff('hour', s, e) +FROM (VALUES (DATE '2000-01-02', DATE '2010-02-03')) dates(s, e); +-- +ok +== +SELECT + date_sub('microseconds', s, e), + date_sub('milliseconds', s, e), + date_sub('second', s, e), + date_sub('minute', s, e), + date_sub('hour', s, e), + date_diff('microseconds', s, e), + date_diff('milliseconds', s, e), + date_diff('second', s, e), + date_diff('minute', s, e), + date_diff('hour', s, e) +FROM (VALUES (TIME '01:02:03.004005', TIME '03:04:05.006007')) times(s, e); +-- +ok +== +SELECT + date_sub('month', TIMESTAMP '2004-01-31 12:00:00', TIMESTAMP '2004-02-29 13:00:00'), + date_sub('month', TIMESTAMP '2004-02-29 13:00:00', TIMESTAMP '2004-01-31 12:00:00'), + date_sub('day', DATE '-infinity', DATE '2000-01-01') IS NULL, + date_diff('day', DATE '2000-01-01', DATE 'infinity') IS NULL; +-- +ok +== +SELECT part, date_sub(part, s, e) IS NULL, date_diff(part, s, e) IS NULL +FROM (VALUES + ('day', DATE '-infinity', DATE '2000-01-01'), + ('month', DATE '2000-01-01', DATE '2000-02-01') +) dates(part, s, e); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/epoch.test b/parser/testdata/corpus/sql/function/timestamp/epoch.test index a40704c..5d80556 100644 --- a/parser/testdata/corpus/sql/function/timestamp/epoch.test +++ b/parser/testdata/corpus/sql/function/timestamp/epoch.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/epoch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/function/timestamp/icu_datepart_calendar_statistics.test b/parser/testdata/corpus/sql/function/timestamp/icu_datepart_calendar_statistics.test new file mode 100644 index 0000000..f39e9d4 --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/icu_datepart_calendar_statistics.test @@ -0,0 +1,45 @@ +# source: test/sql/function/timestamp/icu_datepart_calendar_statistics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET TimeZone='UTC'; +-- +ok +== +CREATE TABLE wt AS SELECT (DATE '0100-01-01 (BC)' + INTERVAL (i) DAY)::TIMESTAMPTZ x FROM range(3000) r(i); +-- +ok +== +SELECT count(*) FROM wt WHERE yearweek(x) = -9910; +-- +ok +== +SET Calendar='buddhist'; +-- +ok +== +CREATE TABLE b2 AS SELECT TIMESTAMPTZ '1900-01-01 00:00:00+00' + i * INTERVAL 1 DAY x FROM range(100000) r(i); +-- +ok +== +SELECT count(*) FROM b2 WHERE century(x) < -25; +-- +ok +== +SELECT min(century(x)), max(century(x)), min(millennium(x)), max(millennium(x)) FROM b2; +-- +ok +== +SET Calendar='japanese'; +-- +ok +== +SELECT count(*) FILTER (century(x) = 1), count(*) FILTER (century(x) >= 2) FROM b2; +-- +ok +== +SELECT count(*) FROM b2 WHERE century(x) >= 2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/icu_get_time_overflow.test b/parser/testdata/corpus/sql/function/timestamp/icu_get_time_overflow.test new file mode 100644 index 0000000..73b2d69 --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/icu_get_time_overflow.test @@ -0,0 +1,25 @@ +# source: test/sql/function/timestamp/icu_get_time_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET TimeZone='{tz}'; +-- +ok +== +SELECT date_trunc('year', to_timestamp(-9223372036854)::TIMESTAMPTZ) +-- +ok +== +SELECT date_trunc('year', TIMESTAMPTZ '290309-12-22 (BC) 00:00:00+00') +-- +ok +== +SELECT time_bucket(INTERVAL '1 year', TIMESTAMPTZ '290309-12-22 (BC) 00:00:00+00') +-- +ok +== +SELECT date_trunc('year', TIMESTAMPTZ '2024-05-05 10:00:00+00')::TIMESTAMP, date_trunc('month', TIMESTAMPTZ '2024-05-05 10:00:00+00')::TIMESTAMP +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/icu_timestamptz_ns_to_date_min.test b/parser/testdata/corpus/sql/function/timestamp/icu_timestamptz_ns_to_date_min.test new file mode 100644 index 0000000..6af580d --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/icu_timestamptz_ns_to_date_min.test @@ -0,0 +1,21 @@ +# source: test/sql/function/timestamp/icu_timestamptz_ns_to_date_min.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TIMESTAMPTZ_NS '1677-09-21 00:12:43.145225+00'::DATE; +-- +ok +== +SELECT TIMESTAMPTZ_NS '1677-09-21 00:12:43.145225+00'::DATE, TIMESTAMPTZ_NS '1677-09-21 00:12:44+00'::DATE; +-- +ok +== +SELECT TIMESTAMPTZ_NS '1969-12-31 23:59:59.999999999+00'::DATE, TIMESTAMPTZ_NS '1970-01-01 00:00:00+00'::DATE; +-- +ok +== +SELECT TIMESTAMPTZ_NS '2262-04-11 23:47:16.854775+00'::DATE; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/icu_try_cast_varchar_timestamptz_range.test b/parser/testdata/corpus/sql/function/timestamp/icu_try_cast_varchar_timestamptz_range.test new file mode 100644 index 0000000..943e6ca --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/icu_try_cast_varchar_timestamptz_range.test @@ -0,0 +1,29 @@ +# source: test/sql/function/timestamp/icu_try_cast_varchar_timestamptz_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET TimeZone='America/New_York'; +-- +ok +== +SELECT TRY_CAST('294247-01-10 04:00:54.775806' AS TIMESTAMPTZ); +-- +ok +== +SELECT TRY_CAST('294247-01-10 04:00:54.775806' AS TIMESTAMPTZ_NS); +-- +ok +== +SELECT TRY_CAST('290309-12-22 (BC) 00:00:00 Asia/Tokyo' AS TIMESTAMPTZ); +-- +ok +== +SELECT CAST('294247-01-10 04:00:54.775806' AS TIMESTAMPTZ); +-- +ok +== +SELECT TRY_CAST(s AS TIMESTAMPTZ) FROM (VALUES ('2024-01-02 03:04:05'), ('294247-01-10 04:00:54.775806'), ('2024-06-01 12:00:00 Asia/Tokyo')) t(s); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/make_date.test b/parser/testdata/corpus/sql/function/timestamp/make_date.test index 200a2c0..7f4a784 100644 --- a/parser/testdata/corpus/sql/function/timestamp/make_date.test +++ b/parser/testdata/corpus/sql/function/timestamp/make_date.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/make_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS dates (d date); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_date_diff_epoch.test b/parser/testdata/corpus/sql/function/timestamp/test_date_diff_epoch.test index f5ebe23..2ad2d68 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_date_diff_epoch.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_date_diff_epoch.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_date_diff_epoch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/function/timestamp/test_date_part.test b/parser/testdata/corpus/sql/function/timestamp/test_date_part.test index 42d0e92..23d081d 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_date_part.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_date_part.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_date_part.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO timestamps VALUES diff --git a/parser/testdata/corpus/sql/function/timestamp/test_extract.test b/parser/testdata/corpus/sql/function/timestamp/test_extract.test index 3480026..c205784 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_extract.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(i TIMESTAMP) diff --git a/parser/testdata/corpus/sql/function/timestamp/test_extract_ms.test b/parser/testdata/corpus/sql/function/timestamp/test_extract_ms.test index 5560116..af3e0fc 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_extract_ms.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_extract_ms.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_extract_ms.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(i TIMESTAMP); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_age.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_age.test index a680cbc..aea2605 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_age.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_age.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_age.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT AGE(TIMESTAMPTZ '1957-06-13') t; diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_dateadd.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_dateadd.test index d98941a..452298f 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_dateadd.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_dateadd.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_dateadd.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '2021-12-01 13:54:48Z'::TIMESTAMPTZ + INTERVAL 1 DAY; @@ -293,6 +293,10 @@ SELECT ts + (INTERVAL 612 microsecond) FROM limits WHERE label = 'tsmax'; -- ok == +SELECT TIMESTAMPTZ '2024-01-01 12:00:00+00' - INTERVAL '-4611686018427387904 microseconds -4611686018427387904 microseconds' +-- +ok +== set timezone = 'Europe/London'; -- ok diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_datediff.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_datediff.test index d7a46d5..4c17c53 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_datediff.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_datediff.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_datediff.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE datetime1 AS diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_datepart.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_datepart.test index a1d790e..60b287f 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_datepart.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_datepart.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_datepart.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_datesub.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_datesub.test index 1541da3..4bc235f 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_datesub.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_datesub.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_datesub.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select DATESUB('month', '2004-01-31 12:00:00-08'::TIMESTAMPTZ, '2004-02-29 13:00:00-08'::TIMESTAMPTZ); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_datetrunc.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_datetrunc.test index 7a1977a..fd89cdc 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_datetrunc.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_datetrunc.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_datetrunc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(d TIMESTAMPTZ, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_makedate.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_makedate.test index a8a16a8..016d6da 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_makedate.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_makedate.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_makedate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(ts TIMESTAMPTZ) diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_strftime.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_strftime.test index cacbf65..9e7186d 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_strftime.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_strftime.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_strftime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps AS SELECT ts::TIMESTAMPTZ AS ts FROM (VALUES diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_strptime.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_strptime.test index 41800d2..338d3e2 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_strptime.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_strptime.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_strptime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select strptime('2022-03-05 17:59:17.877 CST', '%Y-%m-%d %H:%M:%S.%g %Z'); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_repeated_local_time.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_repeated_local_time.test new file mode 100644 index 0000000..f9e595c --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_repeated_local_time.test @@ -0,0 +1,22 @@ +# source: test/sql/function/timestamp/test_icu_time_bucket_repeated_local_time.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT time_bucket(INTERVAL '1 month', TIMESTAMPTZ '2026-11-01 04:21:00+00', 'America/Havana') AS b, b <= TIMESTAMPTZ '2026-11-01 04:21:00+00' +-- +ok +== +SELECT time_bucket(INTERVAL '1 day', TIMESTAMPTZ '1892-07-03 12:00:00+00', 'Pacific/Apia') <= TIMESTAMPTZ '1892-07-03 12:00:00+00' +-- +ok +== +SELECT count(*) FROM ( + SELECT ts, tz, w, time_bucket(w, ts, tz) b + FROM range(TIMESTAMPTZ '2026-10-24 00:00:00+00', TIMESTAMPTZ '2026-11-10 00:00:00+00', INTERVAL '1 hour') r(ts), + (VALUES ('America/Havana'), ('Europe/Amsterdam'), ('America/New_York'), ('Australia/Lord_Howe'), ('Pacific/Apia')) z(tz), + (VALUES (INTERVAL '1 day'), (INTERVAL '1 month'), (INTERVAL '2 days')) i(w) +) WHERE b > ts OR ts - b >= w + INTERVAL '2 days' +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_timestamptz.test b/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_timestamptz.test index 692a2b5..c73e65d 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_timestamptz.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_icu_time_bucket_timestamptz.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_icu_time_bucket_timestamptz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps_tz(w INTERVAL, t TIMESTAMPTZ, shift INTERVAL, origin TIMESTAMPTZ, timezone VARCHAR); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_last_modified.test b/parser/testdata/corpus/sql/function/timestamp/test_last_modified.test index b78b1c5..c5f6847 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_last_modified.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_last_modified.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_last_modified.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 42 i) to '{TEST_DIR}/last_modified_tz.csv' diff --git a/parser/testdata/corpus/sql/function/timestamp/test_now.test b/parser/testdata/corpus/sql/function/timestamp/test_now.test index 3c067a7..67040f6 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_now.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_now.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_now.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(t TIMESTAMP) diff --git a/parser/testdata/corpus/sql/function/timestamp/test_now_prepared.test b/parser/testdata/corpus/sql/function/timestamp/test_now_prepared.test index af9fd35..afb7ec9 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_now_prepared.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_now_prepared.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_now_prepared.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(ts TIMESTAMP); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp.test b/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp.test index c0cfe2d..12366c8 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_strftime_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(d TIMESTAMP); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp_ns.test b/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp_ns.test index 728c8d1..9ba2285 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp_ns.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_strftime_timestamp_ns.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_strftime_timestamp_ns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(d TIMESTAMP_NS); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_strptime.test b/parser/testdata/corpus/sql/function/timestamp/test_strptime.test index 2e4b697..ed02ee2 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_strptime.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_strptime.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_strptime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT strptime('21 June, 2018', '%d %B, %Y') @@ -319,6 +319,10 @@ SELECT strptime('2000/10/10', '%Y-%m-%d') -- ok == +SELECT strptime('202301011200', '%Y%m%d%H%M-') +-- +ok +== SELECT strptime('2001-02-30', '%Y-%m-%d') -- ok @@ -359,6 +363,10 @@ SELECT strptime('', '%Y-%m-%d %H:%M:%S.%f') -- ok == +SELECT strptime(' ', '%d') +-- +ok +== SELECT strptime('', '%p') -- ok diff --git a/parser/testdata/corpus/sql/function/timestamp/test_strptime_edge_paths.test b/parser/testdata/corpus/sql/function/timestamp/test_strptime_edge_paths.test new file mode 100644 index 0000000..977a57f --- /dev/null +++ b/parser/testdata/corpus/sql/function/timestamp/test_strptime_edge_paths.test @@ -0,0 +1,45 @@ +# source: test/sql/function/timestamp/test_strptime_edge_paths.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT try_strptime('infinity trailing', '%Y-%m-%d') IS NULL; +-- +ok +== +SELECT try_strptime('2024 2023', '%G %G') IS NULL; +-- +ok +== +SELECT try_strptime('2024 01 02', '%G %V %V') IS NULL; +-- +ok +== +SELECT try_strptime('2024 01 1 2', '%G %V %u %u') IS NULL; +-- +ok +== +SELECT try_strptime('2024 01 002', '%G %V %j') IS NULL; +-- +ok +== +SELECT try_strptime(' ', '%Z') IS NULL; +-- +ok +== +SELECT strptime('infinity', ['%Y-%m-%d %H:%M:%S.%n', '%Y'])::VARCHAR; +-- +ok +== +SELECT strptime('-infinity', ['%Y-%m-%d %H:%M:%S.%n', '%Y'])::VARCHAR; +-- +ok +== +SELECT strptime('epoch', ['%Y-%m-%d %H:%M:%S.%n', '%Y'])::VARCHAR; +-- +ok +== +SELECT try_strptime('9999-12-31 23:59:59.123456789', '%Y-%m-%d %H:%M:%S.%n') IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timestamp/test_strptime_nonascii.test b/parser/testdata/corpus/sql/function/timestamp/test_strptime_nonascii.test index c548bba..76ba52a 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_strptime_nonascii.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_strptime_nonascii.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_strptime_nonascii.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT try_strptime('21 Jüne, 2018', '%d %B, %Y') diff --git a/parser/testdata/corpus/sql/function/timestamp/test_time_bucket_timestamp.test b/parser/testdata/corpus/sql/function/timestamp/test_time_bucket_timestamp.test index e47c71b..1fd6fd7 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_time_bucket_timestamp.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_time_bucket_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_time_bucket_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(w INTERVAL, t TIMESTAMP, shift INTERVAL, origin TIMESTAMP); diff --git a/parser/testdata/corpus/sql/function/timestamp/test_try_strptime.test b/parser/testdata/corpus/sql/function/timestamp/test_try_strptime.test index eebd35d..b0810e8 100644 --- a/parser/testdata/corpus/sql/function/timestamp/test_try_strptime.test +++ b/parser/testdata/corpus/sql/function/timestamp/test_try_strptime.test @@ -1,6 +1,6 @@ # source: test/sql/function/timestamp/test_try_strptime.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT try_strptime('21/10/2018', '%d/%m/%Y') diff --git a/parser/testdata/corpus/sql/function/timetz/icu_timezone_offset_range.test b/parser/testdata/corpus/sql/function/timetz/icu_timezone_offset_range.test new file mode 100644 index 0000000..24eea85 --- /dev/null +++ b/parser/testdata/corpus/sql/function/timetz/icu_timezone_offset_range.test @@ -0,0 +1,66 @@ +# source: test/sql/function/timetz/icu_timezone_offset_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT timezone('GMT+18:00', TIMETZ '12:00:00+00'); +-- +ok +== +SELECT timezone('GMT-23:59', TIMETZ '12:00:00+00'); +-- +ok +== +SELECT timezone('GMT+15:59', TIMETZ '12:00:00+00'); +-- +ok +== +SET TimeZone = 'GMT+18:00'; +-- +ok +== +SELECT '12:00:00'::TIMETZ; +-- +ok +== +SELECT TIME '12:00:00'::TIMETZ; +-- +ok +== +SELECT TIMESTAMPTZ '2000-01-01 00:00:00+00'::TIMETZ; +-- +ok +== +SELECT current_time; +-- +ok +== +CREATE TABLE t AS SELECT '12:00:00'::TIMETZ x; +-- +ok +== +SELECT TRY_CAST('12:00:00' AS TIMETZ), TRY_CAST(TIME '12:00:00' AS TIMETZ), + TRY_CAST(TIMESTAMPTZ '2000-01-01 00:00:00+00' AS TIMETZ); +-- +ok +== +SELECT '12:00:00+01'::TIMETZ; +-- +ok +== +SELECT TIMESTAMPTZ '2000-01-01 00:00:00+00'; +-- +ok +== +SET TimeZone = 'GMT-23:59'; +-- +ok +== +SET TimeZone = 'GMT+15:59'; +-- +ok +== +SELECT '12:00:00'::TIMETZ, TIME '12:00:00'::TIMETZ, TIMESTAMPTZ '2000-01-01 00:00:00+00'::TIMETZ; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/timetz/test_date_part.test b/parser/testdata/corpus/sql/function/timetz/test_date_part.test index ccb95c5..b7139bd 100644 --- a/parser/testdata/corpus/sql/function/timetz/test_date_part.test +++ b/parser/testdata/corpus/sql/function/timetz/test_date_part.test @@ -1,6 +1,6 @@ # source: test/sql/function/timetz/test_date_part.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timetzs(d TIMETZ, s VARCHAR); diff --git a/parser/testdata/corpus/sql/function/timetz/test_extract.test b/parser/testdata/corpus/sql/function/timetz/test_extract.test index 38af688..88fef1c 100644 --- a/parser/testdata/corpus/sql/function/timetz/test_extract.test +++ b/parser/testdata/corpus/sql/function/timetz/test_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/timetz/test_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timetzs (i TIMETZ); diff --git a/parser/testdata/corpus/sql/function/timetz/timetz_group_by.test b/parser/testdata/corpus/sql/function/timetz/timetz_group_by.test index d07d71b..b9b9b1d 100644 --- a/parser/testdata/corpus/sql/function/timetz/timetz_group_by.test +++ b/parser/testdata/corpus/sql/function/timetz/timetz_group_by.test @@ -1,6 +1,6 @@ # source: test/sql/function/timetz/timetz_group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table time_testtz as select i::timetz as t from generate_series(TIMESTAMPtz '2001-04-10', TIMESTAMPtz '2001-04-11', INTERVAL 30 MINUTE) as t(i); diff --git a/parser/testdata/corpus/sql/function/tokenize/operator_tokenize.test b/parser/testdata/corpus/sql/function/tokenize/operator_tokenize.test new file mode 100644 index 0000000..7808f9a --- /dev/null +++ b/parser/testdata/corpus/sql/function/tokenize/operator_tokenize.test @@ -0,0 +1,21 @@ +# source: test/sql/function/tokenize/operator_tokenize.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT start, token_type, word FROM sql_tokenize('<-> ->> @ @@@ >>= ^@ && <=>'); +-- +ok +== +SELECT start, token_type, word FROM sql_tokenize('1+-2 2**-3'); +-- +ok +== +SELECT start, token_type, replace(word, chr(10), '') FROM sql_tokenize('1+-- comment' || chr(10) || '2'); +-- +ok +== +SELECT start, token_type, word FROM sql_tokenize('x::INTEGER y:=1 [:-:-1]'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/tokenize/simple_tokenize.test b/parser/testdata/corpus/sql/function/tokenize/simple_tokenize.test index 94cfcc9..7f3af6a 100644 --- a/parser/testdata/corpus/sql/function/tokenize/simple_tokenize.test +++ b/parser/testdata/corpus/sql/function/tokenize/simple_tokenize.test @@ -1,6 +1,6 @@ # source: test/sql/function/tokenize/simple_tokenize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select start, token_type, word from sql_tokenize($$select a$$); diff --git a/parser/testdata/corpus/sql/function/uuid/test_uuid.test b/parser/testdata/corpus/sql/function/uuid/test_uuid.test index 5b4812d..5e13648 100644 --- a/parser/testdata/corpus/sql/function/uuid/test_uuid.test +++ b/parser/testdata/corpus/sql/function/uuid/test_uuid.test @@ -1,6 +1,6 @@ # source: test/sql/function/uuid/test_uuid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY TABLE t1 AS SELECT gen_random_uuid() a FROM range(0, 16); diff --git a/parser/testdata/corpus/sql/function/uuid/test_uuid_function.test b/parser/testdata/corpus/sql/function/uuid/test_uuid_function.test index 9858c54..54a7a22 100644 --- a/parser/testdata/corpus/sql/function/uuid/test_uuid_function.test +++ b/parser/testdata/corpus/sql/function/uuid/test_uuid_function.test @@ -1,6 +1,6 @@ # source: test/sql/function/uuid/test_uuid_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT uuid_extract_version('ac227128-7d55-7ee0-a765-5025cc52e55a'); diff --git a/parser/testdata/corpus/sql/function/variant/blob_offset_overflow.test b/parser/testdata/corpus/sql/function/variant/blob_offset_overflow.test new file mode 100644 index 0000000..bb7cc4c --- /dev/null +++ b/parser/testdata/corpus/sql/function/variant/blob_offset_overflow.test @@ -0,0 +1,35 @@ +# source: test/sql/function/variant/blob_offset_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST(ROW(repeat('a', 2), repeat('b', 2), repeat('c', 2)) AS VARIANT); +-- +ok +== +SELECT CAST(ROW('before', '[]'::JSON, '{}'::JSON, '[[],{}]'::JSON, 'after') AS VARIANT); +-- +ok +== +CREATE TABLE inputs AS +SELECT repeat('a', i) a, repeat('b', i) b, repeat('c', i) c +FROM (VALUES (0), (1), (127), (128), (16383), (16384), (70000)) t(i); +-- +ok +== +INSERT INTO inputs VALUES (NULL, '', 'z'), ('', NULL, ''), ('', '', NULL); +-- +ok +== +CREATE TABLE encoded AS SELECT a, b, c, CAST(ROW(a, b, c) AS VARIANT) v FROM inputs; +-- +ok +== +SELECT count(*), bool_and( + v[1]::VARCHAR IS NOT DISTINCT FROM a AND + v[2]::VARCHAR IS NOT DISTINCT FROM b AND + v[3]::VARCHAR IS NOT DISTINCT FROM c +) FROM encoded; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/variant/variant_array_length.test b/parser/testdata/corpus/sql/function/variant/variant_array_length.test index 1429aed..3c8f69a 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_array_length.test +++ b/parser/testdata/corpus/sql/function/variant/variant_array_length.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_array_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO struct_cast_data() AS TABLE ( diff --git a/parser/testdata/corpus/sql/function/variant/variant_array_length_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_array_length_shredded.test index a30a82a..3226bdb 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_array_length_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_array_length_shredded.test @@ -1,12 +1,8 @@ # source: test/sql/function/variant/variant_array_length_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET variant_minimum_shredding_size = 0; --- -ok -== SET force_variant_shredding = 'STRUCT(arr INTEGER[], scalar INTEGER)'; -- ok diff --git a/parser/testdata/corpus/sql/function/variant/variant_cast_roundtrip.test b/parser/testdata/corpus/sql/function/variant/variant_cast_roundtrip.test new file mode 100644 index 0000000..51c157f --- /dev/null +++ b/parser/testdata/corpus/sql/function/variant/variant_cast_roundtrip.test @@ -0,0 +1,172 @@ +# source: test/sql/function/variant/variant_cast_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT ((-7::TINYINT)::VARIANT)::TINYINT = -7; +-- +ok +== +SELECT ((250::UTINYINT)::VARIANT)::UTINYINT = 250; +-- +ok +== +SELECT ((65000::USMALLINT)::VARIANT)::USMALLINT = 65000; +-- +ok +== +SELECT ((4000000000::UINTEGER)::VARIANT)::UINTEGER = 4000000000; +-- +ok +== +SELECT ((18000000000000000000::UBIGINT)::VARIANT)::UBIGINT = 18000000000000000000; +-- +ok +== +SELECT ((300000000000000000000000000000000000000::UHUGEINT)::VARIANT)::UHUGEINT = + 300000000000000000000000000000000000000; +-- +ok +== +SELECT ((TIMESTAMP_MS '2025-01-02 03:04:05.678')::VARIANT)::TIMESTAMP_MS = + TIMESTAMP_MS '2025-01-02 03:04:05.678'; +-- +ok +== +SELECT ((TIMESTAMP_S '2025-01-02 03:04:05')::VARIANT)::TIMESTAMP_S = + TIMESTAMP_S '2025-01-02 03:04:05'; +-- +ok +== +SELECT ((TIMESTAMP_NS '2025-01-02 03:04:05.123456789')::VARIANT)::TIMESTAMP_NS = + TIMESTAMP_NS '2025-01-02 03:04:05.123456789'; +-- +ok +== +SELECT ((TIME_NS '12:34:56.123456789')::VARIANT)::TIME_NS = TIME_NS '12:34:56.123456789'; +-- +ok +== +SELECT ((TIMETZ '12:34:56+02')::VARIANT)::TIMETZ = TIMETZ '12:34:56+02'; +-- +ok +== +SELECT ((TIMESTAMPTZ '2025-01-02 03:04:05+02')::VARIANT)::TIMESTAMPTZ = + TIMESTAMPTZ '2025-01-02 03:04:05+02'; +-- +ok +== +SELECT ((TIMESTAMPTZ_NS '2025-01-02 03:04:05.123456789+02')::VARIANT)::TIMESTAMPTZ_NS = + TIMESTAMPTZ_NS '2025-01-02 03:04:05.123456789+02'; +-- +ok +== +SELECT ((INTERVAL '2 years 3 months 4 days 05:06:07')::VARIANT)::INTERVAL = + INTERVAL '2 years 3 months 4 days 05:06:07'; +-- +ok +== +SELECT ((12.3::DECIMAL(4,1))::VARIANT)::DECIMAL(4,1) = 12.3; +-- +ok +== +SELECT ((12345.67::DECIMAL(9,2))::VARIANT)::DECIMAL(9,2) = 12345.67; +-- +ok +== +SELECT ((123456789012.3456::DECIMAL(18,4))::VARIANT)::DECIMAL(18,4) = 123456789012.3456; +-- +ok +== +SELECT ((12345678901234567890.123456::DECIMAL(38,6))::VARIANT)::DECIMAL(38,6) = + 12345678901234567890.123456; +-- +ok +== +SELECT ((UUID '01234567-89ab-cdef-0123-456789abcdef')::VARIANT)::UUID = + UUID '01234567-89ab-cdef-0123-456789abcdef'; +-- +ok +== +SELECT ((B'101001')::VARIANT)::BIT = B'101001'; +-- +ok +== +SELECT ((1234567890123456789012345678901234567890::BIGNUM)::VARIANT)::BIGNUM = + 1234567890123456789012345678901234567890::BIGNUM; +-- +ok +== +SELECT ((row(7, 'duck')::TUPLE(INTEGER, VARCHAR))::VARIANT)::TUPLE(INTEGER, VARCHAR) = row(7, 'duck'); +-- +ok +== +SELECT (([1, 2, 3]::INTEGER[3])::VARIANT)::INTEGER[3] = [1, 2, 3]; +-- +ok +== +SELECT ((map(['a', 'b'], [1, 2]))::VARIANT)::MAP(VARCHAR, INTEGER) = map(['a', 'b'], [1, 2]); +-- +ok +== +SELECT try_cast(([1, 2]::VARIANT) AS TUPLE(INTEGER, INTEGER, INTEGER)); +-- +ok +== +SELECT try_cast(({'a': 1, 'b': 'bad'}::VARIANT) AS STRUCT(a INTEGER, b INTEGER)); +-- +ok +== +SELECT try_cast((42::VARIANT) AS DECIMAL(4,1)); +-- +ok +== +SELECT try_cast(({'a': 1}::VARIANT) AS INTEGER[1]); +-- +ok +== +SELECT try_cast(([1, 2]::VARIANT) AS INTEGER[3]); +-- +ok +== +SELECT try_cast((42::VARIANT) AS TUPLE(INTEGER)); +-- +ok +== +SELECT try_cast(v AS STRUCT(a INTEGER)), + try_cast(v AS TUPLE(INTEGER)), + try_cast(v AS INTEGER[1]) +FROM (VALUES (NULL::VARIANT), ({'a': 1}::VARIANT)) t(v) +ORDER BY v IS NOT NULL; +-- +ok +== +SELECT (([[1, 2], [3, 4]])::VARIANT)::TUPLE(INTEGER, INTEGER)[] = [row(1, 2), row(3, 4)]; +-- +ok +== +SELECT try_cast(([[1::VARIANT, 2::VARIANT], [3::VARIANT, 'bad'::VARIANT]])::VARIANT + AS TUPLE(INTEGER, INTEGER)[]); +-- +ok +== +SELECT geometry::VARIANT::GEOMETRY = geometry FROM test_all_types() WHERE geometry IS NOT NULL; +-- +ok +== +CREATE TABLE shredded_primitive AS SELECT i::VARIANT AS v FROM range(3) t(i); +-- +ok +== +CREATE TABLE shredded_struct AS SELECT {'i': i, 's': i::VARCHAR}::VARIANT AS v FROM range(3) t(i); +-- +ok +== +SELECT v::BIGINT FROM shredded_primitive; +-- +ok +== +SELECT (v::STRUCT(i BIGINT, s VARCHAR)).i FROM shredded_struct; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/variant/variant_contains.test b/parser/testdata/corpus/sql/function/variant/variant_contains.test index b60bf09..91acfc8 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_contains.test +++ b/parser/testdata/corpus/sql/function/variant/variant_contains.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT variant_contains(({haystack})::VARIANT, ({needle})::VARIANT); diff --git a/parser/testdata/corpus/sql/function/variant/variant_contains_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_contains_shredded.test index e02661b..80b2ee7 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_contains_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_contains_shredded.test @@ -1,12 +1,8 @@ # source: test/sql/function/variant/variant_contains_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET force_variant_shredding = 'STRUCT(b INTEGER, a INTEGER)'; --- -ok -== INSERT INTO variants VALUES (1, {'z': 9, 'a': 1, 'b': 2}::VARIANT), (2, {'a': 10, 'b': NULL}::VARIANT), diff --git a/parser/testdata/corpus/sql/function/variant/variant_exists.test b/parser/testdata/corpus/sql/function/variant/variant_exists.test index 3990327..7c7ed84 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_exists.test +++ b/parser/testdata/corpus/sql/function/variant/variant_exists.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_exists('{"a": 1, "b": {"c": 12, "d": 10}}', 'a'); diff --git a/parser/testdata/corpus/sql/function/variant/variant_exists_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_exists_shredded.test index c5397ce..70c0431 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_exists_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_exists_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_exists_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO variants VALUES diff --git a/parser/testdata/corpus/sql/function/variant/variant_extract.test b/parser/testdata/corpus/sql/function/variant/variant_extract.test index bbf4f31..b484738 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_extract.test +++ b/parser/testdata/corpus/sql/function/variant/variant_extract.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_extract({'a': 1234}::VARIANT, 'a')::VARCHAR; @@ -78,3 +78,27 @@ SELECT variant_extract((SELECT list(i) FROM range(500) t(i))::VARIANT, 300::UINT -- ok == +SELECT variant_extract( ['A','B']::variant, 1) +-- +ok +== +SELECT variant_extract( ['A','B']::variant, 1::UINTEGER) +-- +ok +== +SELECT variant_extract( ['A','B']::variant, 0) +-- +ok +== +SELECT variant_extract( ['A','B']::variant, 4294967296::UINTEGER) +-- +ok +== +SELECT variant_extract( ['A','B']::variant, 4294967296) +-- +ok +== +SELECT variant_extract( ['A','B']::variant, -1) +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/variant/variant_extract_string.test b/parser/testdata/corpus/sql/function/variant/variant_extract_string.test index d43c217..f3d8b2c 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_extract_string.test +++ b/parser/testdata/corpus/sql/function/variant/variant_extract_string.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_extract_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_extract_string('{"a": 1, "b": {"c": 12, "d": 10}}'); diff --git a/parser/testdata/corpus/sql/function/variant/variant_extract_string_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_extract_string_shredded.test index 62d7b00..4b9c4c2 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_extract_string_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_extract_string_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_extract_string_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_variant_shredding = 'STRUCT(obj STRUCT(x VARCHAR), arr INTEGER[], a INTEGER)'; diff --git a/parser/testdata/corpus/sql/function/variant/variant_extract_try_cast.test b/parser/testdata/corpus/sql/function/variant/variant_extract_try_cast.test index 87008e1..782c77a 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_extract_try_cast.test +++ b/parser/testdata/corpus/sql/function/variant/variant_extract_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_extract_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl(col VARIANT); diff --git a/parser/testdata/corpus/sql/function/variant/variant_group_array.test b/parser/testdata/corpus/sql/function/variant/variant_group_array.test index fa0b645..ffebfed 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_group_array.test +++ b/parser/testdata/corpus/sql/function/variant/variant_group_array.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_group_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_group_array(i), typeof(variant_group_array(i)) from range(4) t(i); diff --git a/parser/testdata/corpus/sql/function/variant/variant_group_array_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_group_array_shredded.test index 107de5b..44c2ba5 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_group_array_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_group_array_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_group_array_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO variants VALUES diff --git a/parser/testdata/corpus/sql/function/variant/variant_keys.test b/parser/testdata/corpus/sql/function/variant/variant_keys.test index caa03ff..2d3408b 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_keys.test +++ b/parser/testdata/corpus/sql/function/variant/variant_keys.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_keys('{"a": 1, "b": {"c": 12, "d": 10}}'); diff --git a/parser/testdata/corpus/sql/function/variant/variant_keys_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_keys_shredded.test index 68601c1..fbdaf60 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_keys_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_keys_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_keys_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_variant_shredding = 'STRUCT(b INTEGER, a INTEGER, obj STRUCT(y INTEGER, x INTEGER))'; diff --git a/parser/testdata/corpus/sql/function/variant/variant_normalize.test b/parser/testdata/corpus/sql/function/variant/variant_normalize.test new file mode 100644 index 0000000..7120123 --- /dev/null +++ b/parser/testdata/corpus/sql/function/variant/variant_normalize.test @@ -0,0 +1,14 @@ +# source: test/sql/function/variant/variant_normalize.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT + variant_normalize('12:34:56.123456789'::TIME_NS::VARIANT) = '12:34:56.123456789'::TIME_NS::VARIANT, + variant_normalize('2020-01-01 12:00:00.123456789+00'::TIMESTAMPTZ_NS::VARIANT) = + '2020-01-01 12:00:00.123456789+00'::TIMESTAMPTZ_NS::VARIANT, + variant_normalize('123456789012345678901234567890'::BIGNUM::VARIANT) = + '123456789012345678901234567890'::BIGNUM::VARIANT; +-- +ok +== diff --git a/parser/testdata/corpus/sql/function/variant/variant_shredded_extract_nested.test b/parser/testdata/corpus/sql/function/variant/variant_shredded_extract_nested.test index 426a89d..bf26e19 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_shredded_extract_nested.test +++ b/parser/testdata/corpus/sql/function/variant/variant_shredded_extract_nested.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_shredded_extract_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table list_variant as select diff --git a/parser/testdata/corpus/sql/function/variant/variant_type.test b/parser/testdata/corpus/sql/function/variant/variant_type.test index 1af2c21..5da2042 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_type.test +++ b/parser/testdata/corpus/sql/function/variant/variant_type.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_type('{"a": 1, "b": {"c": 12, "d": 10}}'); diff --git a/parser/testdata/corpus/sql/function/variant/variant_type_shredded.test b/parser/testdata/corpus/sql/function/variant/variant_type_shredded.test index d1e272e..08b5359 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_type_shredded.test +++ b/parser/testdata/corpus/sql/function/variant/variant_type_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/function/variant/variant_type_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT variant_type(v), variant_type(v, 'b') FROM variants ORDER BY id; diff --git a/parser/testdata/corpus/sql/function/variant/variant_typeof.test b/parser/testdata/corpus/sql/function/variant/variant_typeof.test index 8df708e..8243915 100644 --- a/parser/testdata/corpus/sql/function/variant/variant_typeof.test +++ b/parser/testdata/corpus/sql/function/variant/variant_typeof.test @@ -1,12 +1,16 @@ # source: test/sql/function/variant/variant_typeof.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select variant_typeof({'a': 42}::VARIANT); -- ok == +select variant_typeof({'c': [1], 'b': 2, 'a': 3}::VARIANT); +-- +ok +== select variant_typeof(({'a': 42}::VARIANT).variant_extract('a')); -- ok diff --git a/parser/testdata/corpus/sql/generated_columns/generated_column_compression.test b/parser/testdata/corpus/sql/generated_columns/generated_column_compression.test new file mode 100644 index 0000000..7c78ff9 --- /dev/null +++ b/parser/testdata/corpus/sql/generated_columns/generated_column_compression.test @@ -0,0 +1,17 @@ +# source: test/sql/generated_columns/generated_column_compression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INTEGER, h INTEGER AS (a + 1) USING COMPRESSION rle); +-- +ok +== +CREATE TABLE t(a INTEGER, h AS (a + 1) USING COMPRESSION uncompressed); +-- +ok +== +CREATE TABLE t(a INTEGER USING COMPRESSION rle, h AS (a + 1)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/generated_columns/stored/basic.test b/parser/testdata/corpus/sql/generated_columns/stored/basic.test index fa4e4bf..cb5fdf3 100644 --- a/parser/testdata/corpus/sql/generated_columns/stored/basic.test +++ b/parser/testdata/corpus/sql/generated_columns/stored/basic.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/stored/basic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/alter_table.test b/parser/testdata/corpus/sql/generated_columns/virtual/alter_table.test index f253222..48d8159 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/alter_table.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/alter_table.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/alter_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO unit VALUES (5,4) diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/ambiguity.test b/parser/testdata/corpus/sql/generated_columns/virtual/ambiguity.test index b979d9e..b7b0a2e 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/ambiguity.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/ambiguity.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/ambiguity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/cascading_delete.test b/parser/testdata/corpus/sql/generated_columns/virtual/cascading_delete.test index 3583142..aafc1e7 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/cascading_delete.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/cascading_delete.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/cascading_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/casting.test b/parser/testdata/corpus/sql/generated_columns/virtual/casting.test index 1fc0352..be4ab0b 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/casting.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/casting.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/casting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/check.test b/parser/testdata/corpus/sql/generated_columns/virtual/check.test index 2a5cf17..fe1e57c 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/check.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/check.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/check.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( @@ -42,3 +42,23 @@ INSERT INTO chk VALUES (3); -- ok == +CREATE TABLE test_24378 ( + i INTEGER, + j INTEGER CHECK (j > 0), + k INTEGER GENERATED ALWAYS AS (j + 1) +); +-- +ok +== +ALTER TABLE test_24378 DROP COLUMN j CASCADE; +-- +ok +== +INSERT INTO test_24378 VALUES (1); +-- +ok +== +SELECT * FROM test_24378; +-- +ok +== diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/circular_dependency_stresstest.test b/parser/testdata/corpus/sql/generated_columns/virtual/circular_dependency_stresstest.test index 1c8d951..8f0d3c9 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/circular_dependency_stresstest.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/circular_dependency_stresstest.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/circular_dependency_stresstest.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/collate.test b/parser/testdata/corpus/sql/generated_columns/virtual/collate.test index e541350..f4fd2f5 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/collate.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/collate.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/create_table.test b/parser/testdata/corpus/sql/generated_columns/virtual/create_table.test index fc8496c..8ec652f 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/create_table.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/create_table.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/create_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE t0(c0 AS (1)); diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/default.test b/parser/testdata/corpus/sql/generated_columns/virtual/default.test index c731484..c871db3 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/default.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/default.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO unit VALUES (4,5) diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/drop_dependency.test b/parser/testdata/corpus/sql/generated_columns/virtual/drop_dependency.test index a700de7..4a58004 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/drop_dependency.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/drop_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/drop_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key.test b/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key.test index ad1f1f8..18b3d1a 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/foreign_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key_extensive.test b/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key_extensive.test index 99d71db..c156531 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key_extensive.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/foreign_key_extensive.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/foreign_key_extensive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE album ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/from_generated_column.test b/parser/testdata/corpus/sql/generated_columns/virtual/from_generated_column.test index ab99265..552b94d 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/from_generated_column.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/from_generated_column.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/from_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT total_profit FROM unit diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/gcol_duckdb_columns.test b/parser/testdata/corpus/sql/generated_columns/virtual/gcol_duckdb_columns.test index 5527e99..9202d31 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/gcol_duckdb_columns.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/gcol_duckdb_columns.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/gcol_duckdb_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (i int, j int as (1)); diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/group_by.test b/parser/testdata/corpus/sql/generated_columns/virtual/group_by.test index 9e0d8cf..714649c 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/group_by.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/group_by.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/implicit_type.test b/parser/testdata/corpus/sql/generated_columns/virtual/implicit_type.test index ab6c6b6..bd60a62 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/implicit_type.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/implicit_type.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/implicit_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/insert.test b/parser/testdata/corpus/sql/generated_columns/virtual/insert.test index f24dde2..2ae6adb 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/insert.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/insert.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/not_referencing_columns.test b/parser/testdata/corpus/sql/generated_columns/virtual/not_referencing_columns.test index ef1bb41..a2e58a0 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/not_referencing_columns.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/not_referencing_columns.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/not_referencing_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/null.test b/parser/testdata/corpus/sql/generated_columns/virtual/null.test index 30dcb6c..3b71b7f 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/null.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/null.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/partition.test b/parser/testdata/corpus/sql/generated_columns/virtual/partition.test index 8153606..bbed863 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/partition.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/partition.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/partition.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/preserve_order.test b/parser/testdata/corpus/sql/generated_columns/virtual/preserve_order.test index 0b21ac5..0d08074 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/preserve_order.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/preserve_order.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/preserve_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/primary_key.test b/parser/testdata/corpus/sql/generated_columns/virtual/primary_key.test index c738695..6f7eb85 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/primary_key.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/primary_key.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/primary_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/referencing_gencols.test b/parser/testdata/corpus/sql/generated_columns/virtual/referencing_gencols.test index 36fd88e..3e3e631 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/referencing_gencols.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/referencing_gencols.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/referencing_gencols.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/rename.test b/parser/testdata/corpus/sql/generated_columns/virtual/rename.test index 47d2929..b1f2689 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/rename.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/rename.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/rename.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE unit RENAME COLUMN total_profit TO profit_total diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/rename_dependency.test b/parser/testdata/corpus/sql/generated_columns/virtual/rename_dependency.test index 2d0e233..73653ae 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/rename_dependency.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/rename_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/rename_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/rename_table.test b/parser/testdata/corpus/sql/generated_columns/virtual/rename_table.test index 285522b..0ce179c 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/rename_table.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/rename_table.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/rename_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/row_group_fetch.test b/parser/testdata/corpus/sql/generated_columns/virtual/row_group_fetch.test index ee6db58..cf327be 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/row_group_fetch.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/row_group_fetch.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/row_group_fetch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/rowid.test b/parser/testdata/corpus/sql/generated_columns/virtual/rowid.test index 753a5a8..bc3a17a 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/rowid.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/rowid.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/rowid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE unit ADD COLUMN total_profit BIGINT GENERATED ALWAYS AS (price * rowid) VIRTUAL; diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/select.test b/parser/testdata/corpus/sql/generated_columns/virtual/select.test index 57f6351..ee2200f 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/select.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/select.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/select_alias.test b/parser/testdata/corpus/sql/generated_columns/virtual/select_alias.test index db6c3a5..79a0117 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/select_alias.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/select_alias.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/select_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/type_resolution_bug.test b/parser/testdata/corpus/sql/generated_columns/virtual/type_resolution_bug.test index c5fa724..802e5c8 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/type_resolution_bug.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/type_resolution_bug.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/type_resolution_bug.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/typechange.test b/parser/testdata/corpus/sql/generated_columns/virtual/typechange.test index 9730bcd..7fffa1e 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/typechange.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/typechange.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/typechange.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE unit ALTER COLUMN total_profit TYPE BOOLEAN; diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/typechange_dependency.test b/parser/testdata/corpus/sql/generated_columns/virtual/typechange_dependency.test index 5ae41b8..fa7f593 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/typechange_dependency.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/typechange_dependency.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/typechange_dependency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE unit ALTER COLUMN price TYPE BOOLEAN; diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/unique.test b/parser/testdata/corpus/sql/generated_columns/virtual/unique.test index fe0f67c..85214d4 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/unique.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/unique.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/unique.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unit ( diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/update.test b/parser/testdata/corpus/sql/generated_columns/virtual/update.test index 96ac5cd..b376124 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/update.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/update.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (5, DEFAULT) @@ -15,6 +15,10 @@ UPDATE test SET bar = 5 -- ok == +UPDATE test SET foo = 1, foo = 2; +-- +ok +== UPDATE test SET foo=3; -- ok diff --git a/parser/testdata/corpus/sql/generated_columns/virtual/update_index.test b/parser/testdata/corpus/sql/generated_columns/virtual/update_index.test index 8232d54..946380f 100644 --- a/parser/testdata/corpus/sql/generated_columns/virtual/update_index.test +++ b/parser/testdata/corpus/sql/generated_columns/virtual/update_index.test @@ -1,6 +1,6 @@ # source: test/sql/generated_columns/virtual/update_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_comp ( @@ -24,3 +24,26 @@ FROM tbl_comp -- ok == +CREATE TABLE tbl_only_indexed ( + gen AS (y + 1), + y INT UNIQUE +); +-- +ok +== +INSERT INTO tbl_only_indexed (y) VALUES (10), (20); +-- +ok +== +UPDATE tbl_only_indexed SET y = 30 WHERE y = 10; +-- +ok +== +INSERT INTO tbl_only_indexed (y) VALUES (10); +-- +ok +== +SELECT * FROM tbl_only_indexed ORDER BY y; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_compound_key_changes.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_compound_key_changes.test index 6a26ba1..8ab6df6 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_compound_key_changes.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_compound_key_changes.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_compound_key_changes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET immediate_transaction_mode = true; diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_batch_insert.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_batch_insert.test index a843191..fc3dfb2 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_batch_insert.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_batch_insert.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_eager_batch_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test1 (id INT PRIMARY KEY, payload VARCHAR); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_constraint_checking.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_constraint_checking.test index b8c750b..a28e15f 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_constraint_checking.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_constraint_checking.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_eager_constraint_checking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET max_vacuum_tasks = 0; diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_with_wal.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_with_wal.test index d185166..2efd3b9 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_with_wal.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_eager_with_wal.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_eager_with_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (id INT PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_large_abort.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_large_abort.test index bd94f0b..710ad0f 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_large_abort.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_large_abort.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_large_abort.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER PRIMARY KEY, c INT); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_simple_update.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_simple_update.test index 184497b..5830d34 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_simple_update.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_simple_update.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_simple_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (i BIGINT PRIMARY KEY, l1 BIGINT[]); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_conflict_revert.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_conflict_revert.test index 9a960f7..5c42e28 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_conflict_revert.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_conflict_revert.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_conflict_revert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET immediate_transaction_mode=true; diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_delete_with_global_nested.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_delete_with_global_nested.test index a41ed09..8a71147 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_delete_with_global_nested.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_delete_with_global_nested.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_delete_with_global_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (id INT PRIMARY KEY, payload VARCHAR[]); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_list.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_list.test index 63016a4..4667797 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_list.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_list.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_deletes_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_list (id INT PRIMARY KEY, payload VARCHAR[]); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_rollback.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_rollback.test index 1ca59a1..2838bda 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_rollback.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_deletes_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_rollback (id INT PRIMARY KEY, payload VARCHAR[]); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_varchar.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_varchar.test index fc16160..24b924c 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_varchar.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_deletes_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_deletes_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (id INT PRIMARY KEY, payload VARCHAR); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_over_eager.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_over_eager.test index ee0f761..062ae39 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_over_eager.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_over_eager.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_over_eager.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INT PRIMARY KEY, v VARCHAR); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_returning.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_returning.test index 0aaeb16..3aaf56d 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_returning.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_returning.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl_list SELECT range, [range || ' payload'] FROM range(5); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_same_row_id.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_same_row_id.test index 95cf72d..c36f271 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_same_row_id.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_same_row_id.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_same_row_id.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl_list SELECT range, [range || ' payload'] FROM range(10); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_update_with_global_nested.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_update_with_global_nested.test index c1847db..31bb56d 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_update_with_global_nested.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_update_with_global_nested.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_update_with_global_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE tbl SET payload = ['con1 payload'] WHERE id = 1; diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_list.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_list.test index c4f111e..93e32a2 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_list.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_list.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_updates_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl_list VALUES (1, ['first payload']), (2, ['second payload']); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_pk_col.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_pk_col.test index 698bdbf..6967af5 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_pk_col.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_pk_col.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_updates_pk_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE tbl SET id = 3 WHERE id = 1; diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_rollback.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_rollback.test index db05786..8a00324 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_rollback.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_updates_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_updates_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE tbl_rollback SET payload = ['con1 payload'] WHERE id = 1; diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upsert_with_global_nested.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upsert_with_global_nested.test index 1c181ea..f4e9ca2 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upsert_with_global_nested.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upsert_with_global_nested.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_upsert_with_global_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT OR REPLACE INTO tbl VALUES (1, ['con1 payload']); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_list.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_list.test index 110c0a5..fc30abe 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_list.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_list.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_upserts_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT OR REPLACE INTO tbl_list VALUES (1, ['con1 payload']); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_local.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_local.test index f5ace72..0a77d33 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_local.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_local.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_upserts_local.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_local (id INT PRIMARY KEY, payload VARCHAR[]); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_rollback.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_rollback.test index 9ce6189..c46c84a 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_rollback.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_tx_upserts_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_tx_upserts_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT OR REPLACE INTO tbl_rollback VALUES (1, ['con1 payload']); diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_duplicate.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_duplicate.test index e363870..14bceb7 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_duplicate.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_duplicate.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_upsert_duplicate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hero ( diff --git a/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_other_index.test b/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_other_index.test index 5feb300..ee8116c 100644 --- a/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_other_index.test +++ b/parser/testdata/corpus/sql/index/art/constraints/test_art_upsert_other_index.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/constraints/test_art_upsert_other_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE kvp ( diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_big_compound_key.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_big_compound_key.test index 68bd7f8..4b6c4ef 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_big_compound_key.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_big_compound_key.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_big_compound_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v0 (v2 VARCHAR, v1 INT); diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_if_exists.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_if_exists.test index 466bd84..7fc08b8 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_if_exists.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_if_exists.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_create_if_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA immediate_transaction_mode = True; diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_delete.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_delete.test index bdf9b4f..c17c077 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_delete.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_delete.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_create_index_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM range(10) diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_duplicate_deletes.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_duplicate_deletes.test index 1f6e4a6..2f3e51e 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_duplicate_deletes.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_index_duplicate_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_create_index_duplicate_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM integers diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates.test index fdc0eeb..e3085a4 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_create_many_duplicates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM repeat(1, 1500) t1(i) diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates_deletes.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates_deletes.test index 39308ed..88e3cdf 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates_deletes.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_many_duplicates_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_create_many_duplicates_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM repeat(5, 1500) t1(i) diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_unique.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_unique.test index a3c8635..60426ce 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_unique.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_create_unique.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_create_unique.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX i0 ON t0(c0); diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_drop_index.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_drop_index.test index a0403e8..85e4e47 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_drop_index.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_drop_index.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_drop_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE A (A1 INTEGER,A2 VARCHAR, A3 INTEGER) diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_invalid_create_index.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_invalid_create_index.test index bbf5225..a46779b 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_invalid_create_index.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_invalid_create_index.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_invalid_create_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i integer, j integer, k BOOLEAN) diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_many_versions.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_many_versions.test index b2ba1c3..671780b 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_many_versions.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_many_versions.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_many_versions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM range(1, 20001, 1) diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_recreate_unique_index_local_identity.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_recreate_unique_index_local_identity.test new file mode 100644 index 0000000..6941fa0 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_recreate_unique_index_local_identity.test @@ -0,0 +1,25 @@ +# source: test/sql/index/art/create_drop/test_art_recreate_unique_index_local_identity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INTEGER, b INTEGER); +-- +ok +== +CREATE UNIQUE INDEX idx ON t(a); +-- +ok +== +DROP INDEX idx; +-- +ok +== +CREATE UNIQUE INDEX IF NOT EXISTS idx ON t(b); +-- +ok +== +INSERT INTO t VALUES (3, 10); +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/create_drop/test_art_single_value.test b/parser/testdata/corpus/sql/index/art/create_drop/test_art_single_value.test index 4989c87..428ffe6 100644 --- a/parser/testdata/corpus/sql/index/art/create_drop/test_art_single_value.test +++ b/parser/testdata/corpus/sql/index/art/create_drop/test_art_single_value.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/create_drop/test_art_single_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE i < 3 diff --git a/parser/testdata/corpus/sql/index/art/create_index_session_dependent.test b/parser/testdata/corpus/sql/index/art/create_index_session_dependent.test new file mode 100644 index 0000000..d9dc133 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/create_index_session_dependent.test @@ -0,0 +1,65 @@ +# source: test/sql/index/art/create_index_session_dependent.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEMP_DIR}/idx_session_dependent.db' AS w; +-- +ok +== +CREATE TABLE w.t(v BIGINT, s VARCHAR); +-- +ok +== +CREATE INDEX i1 ON w.t((v + epoch_ms(now()))); +-- +ok +== +CREATE UNIQUE INDEX i2 ON w.t((v + txid_current())); +-- +ok +== +SET VARIABLE x = 42; +-- +ok +== +CREATE INDEX i4 ON w.t((v + getvariable('x'))); +-- +ok +== +CREATE INDEX i5 ON w.t((s || current_setting('threads')::VARCHAR)); +-- +ok +== +CREATE INDEX i6 ON w.t((s || current_schema())); +-- +ok +== +CREATE INDEX i7 ON w.t((v + 1)); +-- +ok +== +CREATE INDEX i8 ON w.t((lower(s))); +-- +ok +== +INSERT INTO w.t VALUES (1, 'a'), (2, 'b'); +-- +ok +== +DETACH w; +-- +ok +== +DELETE FROM w.t WHERE v = 1; +-- +ok +== +SELECT count(*) FROM w.t; +-- +ok +== +SELECT getvariable('x') + 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/index_macro_dependency.test b/parser/testdata/corpus/sql/index/art/index_macro_dependency.test new file mode 100644 index 0000000..eddc47a --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/index_macro_dependency.test @@ -0,0 +1,37 @@ +# source: test/sql/index/art/index_macro_dependency.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO m(x) AS x + 1; +-- +ok +== +CREATE TABLE t(x INT); +-- +ok +== +CREATE UNIQUE INDEX i ON t(m(x)); +-- +ok +== +DROP MACRO m; +-- +ok +== +CREATE OR REPLACE MACRO m(x) AS x + 2; +-- +ok +== +SELECT count(*) FROM duckdb_indexes() WHERE index_name = 'i'; +-- +ok +== +DROP INDEX i; +-- +ok +== +CREATE UNIQUE INDEX j ON t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_sel_vector.test b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_sel_vector.test index c0c2447..0654475 100644 --- a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_sel_vector.test +++ b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_sel_vector.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/insert_update_delete/test_art_sel_vector.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE source(i INTEGER) diff --git a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_simple_update.test b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_simple_update.test index d1f1293..f729a14 100644 --- a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_simple_update.test +++ b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_simple_update.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/insert_update_delete/test_art_simple_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i=10 WHERE i=1 diff --git a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update.test b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update.test index ef9a003..d78f9af 100644 --- a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update.test +++ b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/insert_update_delete/test_art_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX i_index ON integers using art(j) diff --git a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_other_column.test b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_other_column.test index 086f316..3d90874 100644 --- a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_other_column.test +++ b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_other_column.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/insert_update_delete/test_art_update_other_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i BIGINT, j INTEGER, k VARCHAR) diff --git a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_same_value.test b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_same_value.test index ef4614f..b6bfcb4 100644 --- a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_same_value.test +++ b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_same_value.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/insert_update_delete/test_art_update_same_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i={i}+1 WHERE i={i}; diff --git a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_with_dict_fsst.test b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_with_dict_fsst.test index ea8025f..84272d1 100644 --- a/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_with_dict_fsst.test +++ b/parser/testdata/corpus/sql/index/art/insert_update_delete/test_art_update_with_dict_fsst.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/insert_update_delete/test_art_update_with_dict_fsst.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE bar (col1 VARCHAR, col2 VARCHAR UNIQUE) diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer.test b/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer.test index d63a662..f0dcd76 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_fuzzer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (c1 DECIMAL(4, 3)); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer_persisted.test b/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer_persisted.test index 8c46de7..0c1581c 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer_persisted.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_fuzzer_persisted.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_fuzzer_persisted.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS (SELECT 1 c1, 'a' c2); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_internal_issue_4742.test b/parser/testdata/corpus/sql/index/art/issues/test_art_internal_issue_4742.test index 85fca85..cf41db5 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_internal_issue_4742.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_internal_issue_4742.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_internal_issue_4742.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table test as select 9223372036854776 + range * 9223372036854776 i from range(100); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_21394.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_21394.test index 78016b5..2f48e7b 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_21394.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_21394.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_issue_21394.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t0(c0) VALUES (2); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_23929.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_23929.test new file mode 100644 index 0000000..b15d8e2 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_23929.test @@ -0,0 +1,37 @@ +# source: test/sql/index/art/issues/test_art_issue_23929.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE INDEX i1 ON t(x); +-- +ok +== +DROP INDEX i1; +-- +ok +== +CREATE TABLE t_rollback(a INT, b INT); +-- +ok +== +INSERT INTO t_rollback SELECT range, range FROM range(1000); +-- +ok +== +CREATE INDEX i2 ON t_rollback(a); +-- +ok +== +DROP INDEX i2; +-- +ok +== +CREATE INDEX i2 ON t_rollback(b); +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM t_rollback WHERE a = 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_24246.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_24246.test new file mode 100644 index 0000000..3d45a65 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_24246.test @@ -0,0 +1,63 @@ +# source: test/sql/index/art/issues/test_art_issue_24246.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE indexed_strings(a INTEGER, g AS (a + b), b INTEGER, c INTEGER UNIQUE) +-- +ok +== +INSERT INTO indexed_strings(a, b, c) VALUES (1, 10, 100001), (2, 42, 100002) +-- +ok +== +SELECT a FROM indexed_strings WHERE b = 10 ORDER BY a +-- +ok +== +SELECT a FROM indexed_strings WHERE b = 42 ORDER BY a +-- +ok +== +SELECT a FROM indexed_strings WHERE b >= 42 ORDER BY a +-- +ok +== +EXPLAIN ANALYZE SELECT a FROM indexed_strings WHERE c = 100002 +-- +ok +== +SELECT a FROM indexed_strings WHERE c = 100002 +-- +ok +== +CREATE TABLE up( + a INTEGER PRIMARY KEY, + g INTEGER AS (a + b), + b INTEGER DEFAULT 10, + c INTEGER UNIQUE +) +-- +ok +== +INSERT INTO up(a, c) SELECT i, i + 100000 FROM range(0, 64) r(i) +-- +ok +== +INSERT INTO up(a, b, c) VALUES (1, 42, 200001) +ON CONFLICT(a) DO UPDATE SET b = excluded.b, c = excluded.c +-- +ok +== +SELECT count(*) FROM up WHERE b = 10 +-- +ok +== +SELECT count(*) FROM up WHERE b = 42 +-- +ok +== +SELECT count(*) FROM up WHERE b >= 42 +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_25155.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_25155.test new file mode 100644 index 0000000..5490d3e --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_25155.test @@ -0,0 +1,37 @@ +# source: test/sql/index/art/issues/test_art_issue_25155.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET index_scan_percentage = 1.0; +-- +ok +== +CREATE TABLE t(a INTEGER, p INTEGER); +-- +ok +== +INSERT INTO t VALUES (1, 10), (3, 30); +-- +ok +== +CREATE INDEX t_a ON t(a); +-- +ok +== +EXPLAIN ANALYZE SELECT p FROM t WHERE a IN (1, 3) AND a IS NOT DISTINCT FROM 1; +-- +ok +== +SELECT p FROM t WHERE a IN (1, 3) AND a IS NOT DISTINCT FROM 1 ORDER BY p; +-- +ok +== +EXPLAIN ANALYZE SELECT p FROM t WHERE a IN (1, 3) AND a IS DISTINCT FROM 1; +-- +ok +== +SELECT p FROM t WHERE a IN (1, 3) AND a IS DISTINCT FROM 1 ORDER BY p; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_4976.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_4976.test index 570be2c..94613e1 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_4976.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_4976.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_issue_4976.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 DOUBLE, c1 TIMESTAMP DEFAULT(TIMESTAMP '1970-01-04 12:58:32')); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6603.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6603.test index 639d283..30831d1 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6603.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6603.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_issue_6603.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE path ( diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6799.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6799.test index f96aaea..a907148 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6799.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_6799.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_issue_6799.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE key_value_pairs (key VARCHAR PRIMARY KEY, value VARCHAR) diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7349.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7349.test index 3610789..81e7603 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7349.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7349.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_issue_7349.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE td(tz VARCHAR(30) NOT NULL); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7530.test b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7530.test index 51f6d7e..753f815 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7530.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_issue_7530.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_issue_7530.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t14(c0 BIGINT); diff --git a/parser/testdata/corpus/sql/index/art/issues/test_art_view_col_binding.test b/parser/testdata/corpus/sql/index/art/issues/test_art_view_col_binding.test index 1999a4b..4221702 100644 --- a/parser/testdata/corpus/sql/index/art/issues/test_art_view_col_binding.test +++ b/parser/testdata/corpus/sql/index/art/issues/test_art_view_col_binding.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/issues/test_art_view_col_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table test as ( @@ -48,3 +48,31 @@ drop index test_upper_x; -- ok == +CREATE TABLE t(a INTEGER, b VARCHAR); +-- +ok +== +INSERT INTO t VALUES (1, 'x'), (2, 'y'); +-- +ok +== +CREATE VIEW v AS SELECT a, b FROM t; +-- +ok +== +CREATE INDEX i ON t(b); +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM v WHERE b = 'x'; +-- +ok +== +CREATE INDEX i ON t(UPPER(b)); +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM v WHERE UPPER(b) = 'X'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_column.test b/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_column.test index 8e06043..48b6baa 100644 --- a/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_column.test +++ b/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_column.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/multi_column/test_art_multi_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i FROM integers WHERE i=10 diff --git a/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_predicate.test b/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_predicate.test index f26b2c5..3b0a41f 100644 --- a/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_predicate.test +++ b/parser/testdata/corpus/sql/index/art/multi_column/test_art_multi_predicate.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/multi_column/test_art_multi_predicate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 2), (1, 3) diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_leaf_coverage.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_leaf_coverage.test index a21d9c8..2b9597d 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_leaf_coverage.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_leaf_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_leaf_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE duplicates (id UBIGINT); diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_nested_leaf_coverage.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_nested_leaf_coverage.test index 13e80be..1a5ab19 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_nested_leaf_coverage.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_nested_leaf_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_nested_leaf_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i integer); diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_16.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_16.test index d526bba..0d135cb 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_16.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_16.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_node_16.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES ({i} + 1); diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_256.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_256.test index 4932d60..ca0e0c3 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_256.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_256.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_node_256.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sum(i) FROM integers WHERE i > 15 diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_4.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_4.test index 7300031..82c6515 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_4.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_4.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_node_4.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT sum(i) FROM integers WHERE i > 1 diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_48.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_48.test index 8165064..ca076be 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_node_48.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_node_48.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_node_48.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE n48_tbl(i varchar, k integer) diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_create.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_create.test index 0d42800..9739671 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_create.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_create.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_prefix_transform_deprecated_create.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/prefix_transform.db' AS db (STORAGE_VERSION 'v1.0.0'); diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_gated.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_gated.test index 923ee67..89a899f 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_gated.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_prefix_transform_deprecated_gated.test @@ -1,16 +1,12 @@ # source: test/sql/index/art/nodes/test_art_prefix_transform_deprecated_gated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET index_scan_max_count = 0; -- ok == -SET index_scan_percentage = 1.0; --- -ok -== ATTACH '{TEST_DIR}/prefix_transform_gated.db' AS db (STORAGE_VERSION 'v1.0.0'); -- ok @@ -45,10 +41,6 @@ CREATE INDEX idx_t_scan ON db.t(k); -- ok == -DETACH db; --- -ok -== ATTACH '{TEST_DIR}/prefix_transform_gated.db' AS db; -- ok diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_prefixes_restart.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_prefixes_restart.test index 167d999..b94ce54 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_prefixes_restart.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_prefixes_restart.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_prefixes_restart.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (id INTEGER); diff --git a/parser/testdata/corpus/sql/index/art/nodes/test_art_sparse_merge.test b/parser/testdata/corpus/sql/index/art/nodes/test_art_sparse_merge.test index 8de654f..1a6e522 100644 --- a/parser/testdata/corpus/sql/index/art/nodes/test_art_sparse_merge.test +++ b/parser/testdata/corpus/sql/index/art/nodes/test_art_sparse_merge.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/nodes/test_art_sparse_merge.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (i INT); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_adaptive_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_art_adaptive_scan.test index 974d529..0aaa3c2 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_adaptive_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_adaptive_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_adaptive_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT 42 AS i FROM range(2050); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_many_matches.test b/parser/testdata/corpus/sql/index/art/scan/test_art_many_matches.test index f70708e..ca966be 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_many_matches.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_many_matches.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_many_matches.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT i FROM RANGE(0, 1024, 1) t2(j), (VALUES (0), (1)) t1(i) ORDER BY j, i; diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_negative_range_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_art_negative_range_scan.test index 2bda4d8..8867b94 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_negative_range_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_negative_range_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_negative_range_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM range(-500, 500, 1) diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_node256_byte_edges.test b/parser/testdata/corpus/sql/index/art/scan/test_art_node256_byte_edges.test index b9d75d5..adc6ef7 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_node256_byte_edges.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_node256_byte_edges.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_node256_byte_edges.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET index_scan_max_count = 1000; diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_null_bytes.test b/parser/testdata/corpus/sql/index/art/scan/test_art_null_bytes.test index bee8d4f..a306d1a 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_null_bytes.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_null_bytes.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_null_bytes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE varchars(v VARCHAR PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_prepared_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_art_prepared_scan.test index 44094bb..db8cc52 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_prepared_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_prepared_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_prepared_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1), (2), (4); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_range_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_art_range_scan.test index 56e456d..d5618e1 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_range_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_range_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_range_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x VARCHAR PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_coverage.test b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_coverage.test index 0cbaf29..e98c19a 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_coverage.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_scan_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT) diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_duplicate_filters.test b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_duplicate_filters.test index 4ac36ed..5416cba 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_duplicate_filters.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_duplicate_filters.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_scan_duplicate_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t_1 (fIdx VARCHAR, sIdx UUID,); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_filter_column.test b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_filter_column.test new file mode 100644 index 0000000..48a3fd8 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_filter_column.test @@ -0,0 +1,25 @@ +# source: test/sql/index/art/scan/test_art_scan_filter_column.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INTEGER, b INTEGER) +-- +ok +== +INSERT INTO t VALUES (1, 10), (2, 20) +-- +ok +== +CREATE INDEX i ON t(b) +-- +ok +== +EXPLAIN ANALYZE SELECT b FROM t WHERE a = 1 +-- +ok +== +SELECT b FROM t WHERE a = 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_normal_to_nested.test b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_normal_to_nested.test index ff6038b..934e568 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_normal_to_nested.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_normal_to_nested.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_scan_normal_to_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers (i BIGINT); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_thresholds.test b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_thresholds.test index 171f195..65cb873 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_art_scan_thresholds.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_art_scan_thresholds.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_art_scan_thresholds.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET index_scan_max_count = 1; diff --git a/parser/testdata/corpus/sql/index/art/scan/test_hash_join_in_filter_index_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_hash_join_in_filter_index_scan.test index 2bce1e5..105a24f 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_hash_join_in_filter_index_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_hash_join_in_filter_index_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_hash_join_in_filter_index_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE random_orders AS ( diff --git a/parser/testdata/corpus/sql/index/art/scan/test_in_filter_index_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_in_filter_index_scan.test index 833c07e..20ebf14 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_in_filter_index_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_in_filter_index_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_in_filter_index_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT range AS i FROM range(500000); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_not_distinct_index_scan.test b/parser/testdata/corpus/sql/index/art/scan/test_not_distinct_index_scan.test index b40ca97..465b683 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_not_distinct_index_scan.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_not_distinct_index_scan.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_not_distinct_index_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX idx_i ON tbl(i); diff --git a/parser/testdata/corpus/sql/index/art/scan/test_random_uuid.test b/parser/testdata/corpus/sql/index/art/scan/test_random_uuid.test index 3dd43e0..761fd97 100644 --- a/parser/testdata/corpus/sql/index/art/scan/test_random_uuid.test +++ b/parser/testdata/corpus/sql/index/art/scan/test_random_uuid.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/scan/test_random_uuid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table t as select id: uuid(), v: i from generate_series(1, 700000) s(i); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_allocator_bitmap_checkpoint.test b/parser/testdata/corpus/sql/index/art/storage/test_art_allocator_bitmap_checkpoint.test new file mode 100644 index 0000000..aa5e3be --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_allocator_bitmap_checkpoint.test @@ -0,0 +1,53 @@ +# source: test/sql/index/art/storage/test_art_allocator_bitmap_checkpoint.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/allocator_bitmap_{version}.db' AS bitmap_db (STORAGE_VERSION '{version}', BLOCK_SIZE 16384) +-- +ok +== +CREATE TABLE bitmap_db.t AS SELECT i // 256 AS k, i AS id FROM range(21760) r(i) +-- +ok +== +CREATE INDEX bitmap_idx ON bitmap_db.t(k) +-- +ok +== +CHECKPOINT bitmap_db +-- +ok +== +DETACH bitmap_db +-- +ok +== +ATTACH '{TEST_DIR}/allocator_bitmap_{version}.db' AS bitmap_db +-- +ok +== +DELETE FROM bitmap_db.t WHERE k=0 +-- +ok +== +SELECT count(*) FROM bitmap_db.t WHERE k=0 +-- +ok +== +INSERT INTO bitmap_db.t SELECT 0, i FROM range(21760,22016) r(i) +-- +ok +== +SELECT count(*), min(id), max(id) FROM bitmap_db.t WHERE k=0 +-- +ok +== +SELECT count(*) FROM bitmap_db.t +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM bitmap_db.t WHERE k=0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_auto_checkpoint.test b/parser/testdata/corpus/sql/index/art/storage/test_art_auto_checkpoint.test index 74b02c1..1b438a9 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_auto_checkpoint.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_auto_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_auto_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA wal_autocheckpoint='400KB'; diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_chunk_edges.test b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_chunk_edges.test index b83493f..1dfd048 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_chunk_edges.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_chunk_edges.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_buffered_replays_chunk_edges.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX idx_tbl_i ON tbl(i); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interleaved.test b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interleaved.test index 056d4cb..8aea31c 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interleaved.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interleaved.test @@ -1,8 +1,12 @@ # source: test/sql/index/art/storage/test_art_buffered_replays_interleaved.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit +CREATE TABLE tbl (i INTEGER); +-- +ok +== CREATE UNIQUE INDEX idx_i ON tbl (i); -- ok diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interval_merging.test b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interval_merging.test index 064129f..bfbab53 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interval_merging.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_interval_merging.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_buffered_replays_interval_merging.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl SELECT r FROM range({i} * 10000, {i} * 10000 + 2001) t(r); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_multi_col.test b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_multi_col.test index 7958b70..4efa7fd 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_multi_col.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_buffered_replays_multi_col.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_buffered_replays_multi_col.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl( diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_checkpoint.test b/parser/testdata/corpus/sql/index/art/storage/test_art_checkpoint.test index 698cb85..c1e5673 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_checkpoint.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers (i INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_duckdb_versions.test b/parser/testdata/corpus/sql/index/art/storage/test_art_duckdb_versions.test index 057e29e..e63215d 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_duckdb_versions.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_duckdb_versions.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_duckdb_versions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT table_name, index_count FROM duckdb_tables() ORDER BY table_name; diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_if_not_exists_constraint_name.test b/parser/testdata/corpus/sql/index/art/storage/test_art_if_not_exists_constraint_name.test new file mode 100644 index 0000000..84e1ed0 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_if_not_exists_constraint_name.test @@ -0,0 +1,45 @@ +# source: test/sql/index/art/storage/test_art_if_not_exists_constraint_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE parent (id INTEGER PRIMARY KEY, val INTEGER); +-- +ok +== +CREATE TABLE child (id INTEGER REFERENCES parent(id), val INTEGER); +-- +ok +== +INSERT INTO parent SELECT range, range * 10 FROM range(3000); +-- +ok +== +INSERT INTO child SELECT range, range * 10 FROM range(3000); +-- +ok +== +CREATE INDEX IF NOT EXISTS PRIMARY_parent_0 ON parent(val); +-- +ok +== +CREATE INDEX FOREIGN_child_0 ON child(val); +-- +ok +== +DROP INDEX PRIMARY_parent_0; +-- +ok +== +DROP INDEX FOREIGN_child_0; +-- +ok +== +INSERT INTO parent VALUES (1, 1); +-- +ok +== +DELETE FROM parent WHERE id = 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_import.test b/parser/testdata/corpus/sql/index/art/storage/test_art_import.test index cd31421..0fed736 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_import.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_import.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_import.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tracking("nflId" VARCHAR , "frameId" INTEGER, "gameId" INTEGER, "playId" INTEGER); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_import_export.test b/parser/testdata/corpus/sql/index/art/storage/test_art_import_export.test index adb7463..c0dbc94 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_import_export.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_import_export.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_import_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE raw( diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_mem_limit.test b/parser/testdata/corpus/sql/index/art/storage/test_art_mem_limit.test index eace012..bc2ad17 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_mem_limit.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_mem_limit.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_mem_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET memory_limit = '10MB'; diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_names.test b/parser/testdata/corpus/sql/index/art/storage/test_art_names.test index 430ffec..c9a5837 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_names.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_names.test @@ -1,20 +1,12 @@ # source: test/sql/index/art/storage/test_art_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (i INTEGER PRIMARY KEY, j INTEGER UNIQUE); -- ok == -CREATE INDEX PRIMARY_tbl_0 ON tbl(i); --- -ok -== -CREATE INDEX UNIQUE_tbl_1 ON tbl(j); --- -ok -== INSERT INTO tbl SELECT range, range FROM range (3000); -- ok @@ -45,11 +37,3 @@ INSERT INTO fk_tbl VALUES (20, 4000); -- ok == -CREATE INDEX FOREIGN_fk_tbl_0 ON fk_tbl(i); --- -ok -== -CREATE INDEX FOREIGN_fk_tbl_1 ON fk_tbl(j); --- -ok -== diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_node256_leaf_layout.test b/parser/testdata/corpus/sql/index/art/storage/test_art_node256_leaf_layout.test new file mode 100644 index 0000000..0e02bc9 --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_node256_leaf_layout.test @@ -0,0 +1,153 @@ +# source: test/sql/index/art/storage/test_art_node256_leaf_layout.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/node256_{version}.db' AS leaf_db (STORAGE_VERSION '{version}', BLOCK_SIZE 16384) +-- +ok +== +CREATE TABLE leaf_db.t AS SELECT i // 256 AS k, i AS id FROM range(262144) r(i) +-- +ok +== +CREATE INDEX leaf_idx ON leaf_db.t(k) +-- +ok +== +CHECKPOINT leaf_db +-- +ok +== +DETACH leaf_db +-- +ok +== +ATTACH '{TEST_DIR}/node256_{version}.db' AS leaf_db +-- +ok +== +EXPLAIN ANALYZE SELECT count(*), min(id), max(id) FROM leaf_db.t WHERE k=1023; +-- +ok +== +SELECT count(*), min(id), max(id) FROM leaf_db.t WHERE k=1023 +-- +ok +== +SELECT count(*) FROM leaf_db.t WHERE k=0 AND id IN (0,63,64,127,128,191,192,255) +-- +ok +== +DELETE FROM leaf_db.t WHERE k=0 AND id>=12 +-- +ok +== +SELECT count(*) FROM leaf_db.t WHERE k=0 +-- +ok +== +INSERT INTO leaf_db.t SELECT 0,i FROM range(12,256) r(i) +-- +ok +== +INSERT INTO leaf_db.t SELECT 0,i FROM range(262144,262400) r(i) +-- +ok +== +DELETE FROM leaf_db.t WHERE k=0 +-- +ok +== +UPDATE leaf_db.t SET k=0 WHERE k=1 +-- +ok +== +SELECT count(*) FROM leaf_db.t WHERE k=1 +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM leaf_db.t WHERE k=0; +-- +ok +== +SELECT count(*) FROM leaf_db.t +-- +ok +== +ATTACH '{TEST_DIR}/node256_upgrade.db' AS upgrade_db (STORAGE_VERSION 'v1.5.0', BLOCK_SIZE 16384) +-- +ok +== +CREATE TABLE upgrade_db.old_t AS SELECT i // 256 AS k, i AS id FROM range(262144) r(i) +-- +ok +== +CREATE INDEX old_idx ON upgrade_db.old_t(k) +-- +ok +== +CHECKPOINT upgrade_db +-- +ok +== +DETACH upgrade_db +-- +ok +== +ATTACH '{TEST_DIR}/node256_upgrade.db' AS upgrade_db (STORAGE_VERSION 'v2.0.0') +-- +ok +== +SELECT count(*) FROM upgrade_db.old_t WHERE k=1023 +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM upgrade_db.old_t WHERE k=1023 +-- +ok +== +INSERT INTO upgrade_db.old_t SELECT 0, i FROM range(262144,262400) r(i) +-- +ok +== +DELETE FROM upgrade_db.old_t WHERE k=1 +-- +ok +== +DELETE FROM upgrade_db.old_t WHERE k=0 +-- +ok +== +CREATE TABLE upgrade_db.new_t AS SELECT i // 256 AS k, i AS id FROM range(1024) r(i) +-- +ok +== +CREATE INDEX new_idx ON upgrade_db.new_t(k) +-- +ok +== +SELECT count(*) FROM upgrade_db.old_t WHERE k=0 +-- +ok +== +SELECT count(*) FROM upgrade_db.new_t WHERE k=3 +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM upgrade_db.new_t WHERE k=3 +-- +ok +== +ATTACH '{TEST_DIR}/node256_upgrade.db' AS upgrade_db +-- +ok +== +SELECT count(*) FROM upgrade_db.old_t WHERE k=1 +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM upgrade_db.old_t WHERE k=0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_readonly.test b/parser/testdata/corpus/sql/index/art/storage/test_art_readonly.test index df82b92..f862223 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_readonly.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_readonly.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_readonly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE INDEX idx_drop ON tbl(i); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_storage.test b/parser/testdata/corpus/sql/index/art/storage/test_art_storage.test index 107bdea..564c586 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_storage.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_storage.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i integer,j integer) diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_storage_long_prefixes.test b/parser/testdata/corpus/sql/index/art/storage/test_art_storage_long_prefixes.test index 705178a..250dc70 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_storage_long_prefixes.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_storage_long_prefixes.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_storage_long_prefixes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET wal_autocheckpoint = '10GB'; diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_storage_multi_checkpoint.test b/parser/testdata/corpus/sql/index/art/storage/test_art_storage_multi_checkpoint.test index ca567d4..095e025 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_storage_multi_checkpoint.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_storage_multi_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_storage_multi_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO pk_integers VALUES (1) diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_checkpoint_minimal.test b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_checkpoint_minimal.test index b66c695..d9d6f1a 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_checkpoint_minimal.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_checkpoint_minimal.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_wal_checkpoint_minimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE minimal_tbl(i INTEGER); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_drop_table.test b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_drop_table.test index df65bc8..7b65858 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_drop_table.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_drop_table.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_wal_replay_drop_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT range + 42 FROM range(100); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_in_tx.test b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_in_tx.test index 0b6004c..dad4e1b 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_in_tx.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_in_tx.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_wal_replay_in_tx.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE drop_test (a INTEGER); diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer.test b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer.test index 5f22391..85becb2 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_wal_replay_with_buffer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (u_2 UNION("string" VARCHAR, "bool" BOOLEAN)) diff --git a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer_concurrent.test b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer_concurrent.test index f601282..673ac76 100644 --- a/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer_concurrent.test +++ b/parser/testdata/corpus/sql/index/art/storage/test_art_wal_replay_with_buffer_concurrent.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/storage/test_art_wal_replay_with_buffer_concurrent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX idx_1 ON tbl ((u_2.string)); diff --git a/parser/testdata/corpus/sql/index/art/test_art_empty_close_range.test b/parser/testdata/corpus/sql/index/art/test_art_empty_close_range.test index 91c75ea..4088910 100644 --- a/parser/testdata/corpus/sql/index/art/test_art_empty_close_range.test +++ b/parser/testdata/corpus/sql/index/art/test_art_empty_close_range.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/test_art_empty_close_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 DOUBLE UNIQUE); diff --git a/parser/testdata/corpus/sql/index/art/test_art_tx_update_key.test b/parser/testdata/corpus/sql/index/art/test_art_tx_update_key.test index f26a1f7..498e13a 100644 --- a/parser/testdata/corpus/sql/index/art/test_art_tx_update_key.test +++ b/parser/testdata/corpus/sql/index/art/test_art_tx_update_key.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/test_art_tx_update_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_table (id INTEGER PRIMARY KEY) diff --git a/parser/testdata/corpus/sql/index/art/test_index_key_rebind.test b/parser/testdata/corpus/sql/index/art/test_index_key_rebind.test index bfcde3c..ee1729c 100644 --- a/parser/testdata/corpus/sql/index/art/test_index_key_rebind.test +++ b/parser/testdata/corpus/sql/index/art/test_index_key_rebind.test @@ -1,12 +1,8 @@ # source: test/sql/index/art/test_index_key_rebind.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE TABLE t(a INTEGER); --- -ok -== CREATE INDEX idx ON t USING ART(a); -- ok @@ -19,15 +15,40 @@ PREPARE stmt AS SELECT index_key({'table': 't'}, 'idx', CAST(random() * 0 AS INT -- ok == -EXECUTE stmt; +EXECUTE stmt -- ok == -DROP INDEX idx; +ATTACH '{TEST_DIR}/index_key_detach.db' AS aux; -- ok == -EXECUTE stmt +CREATE TABLE aux.t(a INTEGER); +-- +ok +== +CREATE INDEX idx ON aux.t(a); +-- +ok +== +INSERT INTO aux.t VALUES (1), (2), (3); +-- +ok +== +CHECKPOINT aux; +-- +ok +== +PREPARE detached_stmt AS +SELECT index_key({'catalog': 'aux', 'table': 't'}, 'idx', CAST(random() * 0 AS INTEGER) + 42); +-- +ok +== +DETACH aux; +-- +ok +== +DEALLOCATE detached_stmt; -- ok == diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_boolean.test b/parser/testdata/corpus/sql/index/art/types/test_art_boolean.test index 3007f97..76ff6dd 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_boolean.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_boolean.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_boolean.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 BOOLEAN, c1 INT) diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_coverage_types.test b/parser/testdata/corpus/sql/index/art/types/test_art_coverage_types.test index b52b4e2..61a3e14 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_coverage_types.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_coverage_types.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_coverage_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE duplicate_id (id UINT32, id2 INT64); diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_double.test b/parser/testdata/corpus/sql/index/art/types/test_art_double.test index c267120..d97e4c2 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_double.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_double.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_double.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(i DOUBLE) diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_expression_key.test b/parser/testdata/corpus/sql/index/art/types/test_art_expression_key.test index e3c5c68..cb8cb61 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_expression_key.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_expression_key.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_expression_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i BIGINT, j INTEGER, k VARCHAR, l BIGINT) diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_integer_types.test b/parser/testdata/corpus/sql/index/art/types/test_art_integer_types.test index 2ca0883..980505d 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_integer_types.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_integer_types.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_integer_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i TINYINT, j SMALLINT, k INTEGER, l BIGINT) diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_real.test b/parser/testdata/corpus/sql/index/art/types/test_art_real.test index 05f25b0..48f82e2 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_real.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_real.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_real.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(i REAL) diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_real_pk.test b/parser/testdata/corpus/sql/index/art/types/test_art_real_pk.test index a397d0f..535e44f 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_real_pk.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_real_pk.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_real_pk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers(i REAL PRIMARY KEY, j INTEGER) diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_union.test b/parser/testdata/corpus/sql/index/art/types/test_art_union.test index 1ed34ba..6ab0be9 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_union.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_union.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/index/art/types/test_art_varchar.test b/parser/testdata/corpus/sql/index/art/types/test_art_varchar.test index 899d817..2f575c6 100644 --- a/parser/testdata/corpus/sql/index/art/types/test_art_varchar.test +++ b/parser/testdata/corpus/sql/index/art/types/test_art_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/types/test_art_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(i varchar); diff --git a/parser/testdata/corpus/sql/index/art/unique_index_unbound_after_attach.test b/parser/testdata/corpus/sql/index/art/unique_index_unbound_after_attach.test new file mode 100644 index 0000000..542b56b --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/unique_index_unbound_after_attach.test @@ -0,0 +1,61 @@ +# source: test/sql/index/art/unique_index_unbound_after_attach.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEMP_DIR}/unbound_uidx.db' AS w; +-- +ok +== +CREATE TABLE w.t(id BIGINT, k VARCHAR); +-- +ok +== +CREATE UNIQUE INDEX idi ON w.t(id); +-- +ok +== +DELETE FROM w.t WHERE id = 2; +-- +ok +== +INSERT INTO w.t VALUES (2, 'b'); +-- +ok +== +SELECT id, k FROM w.t ORDER BY id; +-- +ok +== +DELETE FROM w.t WHERE id = 1; +-- +ok +== +INSERT INTO w.t VALUES (3, 'x'); +-- +ok +== +INSERT INTO w.t VALUES (3, 'y'); +-- +ok +== +CREATE TABLE w.tl(id BIGINT, l INT[]); +-- +ok +== +CREATE UNIQUE INDEX idl ON w.tl(id); +-- +ok +== +INSERT INTO w.tl VALUES (1, [1]), (2, [2]); +-- +ok +== +UPDATE w.tl SET l = [5] WHERE id = 2; +-- +ok +== +SELECT id, l FROM w.tl ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_persisted_nested_leaf.test b/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_persisted_nested_leaf.test new file mode 100644 index 0000000..185661a --- /dev/null +++ b/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_persisted_nested_leaf.test @@ -0,0 +1,49 @@ +# source: test/sql/index/art/vacuum/test_art_vacuum_persisted_nested_leaf.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/test_art_vacuum_nested_leaf.db' AS leaf_db (BLOCK_SIZE 16384); +-- +ok +== +CREATE TABLE leaf_db.t AS SELECT i // 256 AS k, i AS id FROM range(338944) r(i); +-- +ok +== +CREATE INDEX idx_k ON leaf_db.t(k); +-- +ok +== +CHECKPOINT leaf_db; +-- +ok +== +DETACH leaf_db; +-- +ok +== +SELECT count(*) FROM leaf_db.t WHERE k = 1250; +-- +ok +== +DELETE FROM leaf_db.t WHERE k >= 824 AND k < 1224; +-- +ok +== +VACUUM leaf_db.t; +-- +ok +== +ATTACH '{TEST_DIR}/test_art_vacuum_nested_leaf.db' AS leaf_db; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM leaf_db.t WHERE k = 816; +-- +ok +== +SELECT count(*) FROM leaf_db.t WHERE k = 816; +-- +ok +== diff --git a/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_rollback.test b/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_rollback.test index acc9a46..1e927e0 100644 --- a/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_rollback.test +++ b/parser/testdata/corpus/sql/index/art/vacuum/test_art_vacuum_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/index/art/vacuum/test_art_vacuum_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t{i}(i INTEGER UNIQUE); diff --git a/parser/testdata/corpus/sql/index/create_index_options.test b/parser/testdata/corpus/sql/index/create_index_options.test index 8b9de39..717f9d6 100644 --- a/parser/testdata/corpus/sql/index/create_index_options.test +++ b/parser/testdata/corpus/sql/index/create_index_options.test @@ -1,6 +1,6 @@ # source: test/sql/index/create_index_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABlE t1 (foo INT) @@ -15,3 +15,55 @@ CREATE INDEX i3 ON t1 USING random_index_method (foo) WITH (my_option = getenv(' -- ok == +CREATE INDEX i1 ON t1(foo) WITH (deferrable); +-- +ok +== +CREATE INDEX i2 ON t1(foo) WITH (default); +-- +ok +== +CREATE INDEX i3 ON t1(foo) WITH (where); +-- +ok +== +CREATE INDEX i4 ON t1(foo) WITH ('default' = 5); +-- +ok +== +CREATE INDEX i5 ON t1(foo) WITH (default.x = 1); +-- +ok +== +CREATE INDEX i6 ON t1(foo) WITH ('default' = 5, deferrable, default.x = 1); +-- +ok +== +SELECT sql FROM duckdb_indexes() WHERE index_name IN ('i1', 'i2', 'i3', 'i4', 'i5') ORDER BY index_name +-- +ok +== +CREATE INDEX i10 ON t1(foo) WITH (default = 5, DEFAULT = 6); +-- +error: Parser Error: Duplicate option "DEFAULT" in WITH clause +== +ALTER TABLE t1 SET (default = 1); +-- +ok +== +ALTER TABLE t1 RESET (where); +-- +ok +== +CREATE SCHEMA s WITH (order = 1); +-- +ok +== +CREATE TABLE t3 (a INT) WITH (default = 1); +-- +ok +== +CREATE VIEW v WITH (default) AS SELECT 1; +-- +error: Parser Error: Only DEFER_BINDING is currently supported as option for CREATE VIEW +== diff --git a/parser/testdata/corpus/sql/insert/insert_by_name.test b/parser/testdata/corpus/sql/insert/insert_by_name.test index 5d798fe..a77e42c 100644 --- a/parser/testdata/corpus/sql/insert/insert_by_name.test +++ b/parser/testdata/corpus/sql/insert/insert_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/insert/insert_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers BY NAME SELECT 42 AS j diff --git a/parser/testdata/corpus/sql/insert/insert_from_many_grouping_sets.test b/parser/testdata/corpus/sql/insert/insert_from_many_grouping_sets.test index 76f8e9d..40b725f 100644 --- a/parser/testdata/corpus/sql/insert/insert_from_many_grouping_sets.test +++ b/parser/testdata/corpus/sql/insert/insert_from_many_grouping_sets.test @@ -1,6 +1,6 @@ # source: test/sql/insert/insert_from_many_grouping_sets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT i, i%2 as j FROM generate_series(0,999999,1) tbl(i); diff --git a/parser/testdata/corpus/sql/insert/insert_query_node.test b/parser/testdata/corpus/sql/insert/insert_query_node.test index f9dee6e..fb59e98 100644 --- a/parser/testdata/corpus/sql/insert/insert_query_node.test +++ b/parser/testdata/corpus/sql/insert/insert_query_node.test @@ -1,6 +1,6 @@ # source: test/sql/insert/insert_query_node.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t (a, b, c) VALUES (3, 'foo', 3.5); diff --git a/parser/testdata/corpus/sql/insert/insert_rollback.test b/parser/testdata/corpus/sql/insert/insert_rollback.test index e6061d5..dc1de74 100644 --- a/parser/testdata/corpus/sql/insert/insert_rollback.test +++ b/parser/testdata/corpus/sql/insert/insert_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/insert/insert_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (0), (1), (2) diff --git a/parser/testdata/corpus/sql/insert/null_values.test b/parser/testdata/corpus/sql/insert/null_values.test index c54677d..697453e 100644 --- a/parser/testdata/corpus/sql/insert/null_values.test +++ b/parser/testdata/corpus/sql/insert/null_values.test @@ -1,6 +1,6 @@ # source: test/sql/insert/null_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT i FROM range(100) tbl(i); diff --git a/parser/testdata/corpus/sql/insert/test_big_insert.test b/parser/testdata/corpus/sql/insert/test_big_insert.test index 6a9e388..bc87de2 100644 --- a/parser/testdata/corpus/sql/insert/test_big_insert.test +++ b/parser/testdata/corpus/sql/insert/test_big_insert.test @@ -1,6 +1,6 @@ # source: test/sql/insert/test_big_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9) diff --git a/parser/testdata/corpus/sql/insert/test_insert.test b/parser/testdata/corpus/sql/insert/test_insert.test index 2fb53fe..e1b8dc0 100644 --- a/parser/testdata/corpus/sql/insert/test_insert.test +++ b/parser/testdata/corpus/sql/insert/test_insert.test @@ -1,6 +1,6 @@ # source: test/sql/insert/test_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE i2 AS SELECT 1 AS i FROM integers WHERE i % 2 <> 0 diff --git a/parser/testdata/corpus/sql/insert/test_insert_ignored_syntax.test b/parser/testdata/corpus/sql/insert/test_insert_ignored_syntax.test new file mode 100644 index 0000000..56e0ba6 --- /dev/null +++ b/parser/testdata/corpus/sql/insert/test_insert_ignored_syntax.test @@ -0,0 +1,37 @@ +# source: test/sql/insert/test_insert_ignored_syntax.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE strings(i STRING) +-- +ok +== +INSERT INTO strings OVERRIDING SYSTEM VALUE VALUES (1); +-- +ok +== +select * from strings; +-- +ok +== +INSERT INTO strings OVERRIDING USER VALUE SELECT 2; +-- +ok +== +INSERT INTO strings (i) OVERRIDING SYSTEM VALUE SELECT 'three'; +-- +ok +== +INSERT INTO strings OVERRIDING VALUE SELECT 3; +-- +error: Parser Error: syntax error at or near "VALUE" +== +INSERT INTO strings OVERRIDING SYSTEM VALUE DEFAULT VALUES; +-- +error: Parser Error: OVERRIDING SYSTEM|USER VALUE can not be combined with DEFAULT VALUES, please remove one of the two +== +INSERT INTO strings OVERRIDING USER VALUE DEFAULT VALUES; +-- +error: Parser Error: OVERRIDING SYSTEM|USER VALUE can not be combined with DEFAULT VALUES, please remove one of the two +== diff --git a/parser/testdata/corpus/sql/insert/test_insert_invalid.test b/parser/testdata/corpus/sql/insert/test_insert_invalid.test index 8fd1728..ec5d643 100644 --- a/parser/testdata/corpus/sql/insert/test_insert_invalid.test +++ b/parser/testdata/corpus/sql/insert/test_insert_invalid.test @@ -1,12 +1,8 @@ # source: test/sql/insert/test_insert_invalid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE TABLE strings(i STRING) --- -ok -== INSERT INTO strings VALUES ('�(') -- ok diff --git a/parser/testdata/corpus/sql/insert/test_insert_query.test b/parser/testdata/corpus/sql/insert/test_insert_query.test index ada7d71..614ce5c 100644 --- a/parser/testdata/corpus/sql/insert/test_insert_query.test +++ b/parser/testdata/corpus/sql/insert/test_insert_query.test @@ -1,6 +1,6 @@ # source: test/sql/insert/test_insert_query.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT 42 diff --git a/parser/testdata/corpus/sql/insert/test_insert_type.test b/parser/testdata/corpus/sql/insert/test_insert_type.test index 11e8ea3..bd79f6a 100644 --- a/parser/testdata/corpus/sql/insert/test_insert_type.test +++ b/parser/testdata/corpus/sql/insert/test_insert_type.test @@ -1,6 +1,6 @@ # source: test/sql/insert/test_insert_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(a VARCHAR) diff --git a/parser/testdata/corpus/sql/insert/unaligned_interleaved_appends.test b/parser/testdata/corpus/sql/insert/unaligned_interleaved_appends.test index 643fe87..e8b596d 100644 --- a/parser/testdata/corpus/sql/insert/unaligned_interleaved_appends.test +++ b/parser/testdata/corpus/sql/insert/unaligned_interleaved_appends.test @@ -1,6 +1,6 @@ # source: test/sql/insert/unaligned_interleaved_appends.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM range(0, 5) diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_arbitrary_condition_optimizer_disabled.test b/parser/testdata/corpus/sql/join/asof/test_asof_arbitrary_condition_optimizer_disabled.test new file mode 100644 index 0000000..1ad2f2a --- /dev/null +++ b/parser/testdata/corpus/sql/join/asof/test_asof_arbitrary_condition_optimizer_disabled.test @@ -0,0 +1,33 @@ +# source: test/sql/join/asof/test_asof_arbitrary_condition_optimizer_disabled.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_disable_optimizer=true; +-- +ok +== +CREATE TABLE a_t AS SELECT (range % 3)::INTEGER AS k, ['sad', 'ok', 'happy'][1 + range % 3] AS m, range::INTEGER AS t FROM range(12); +-- +ok +== +CREATE TABLE b_t AS SELECT (range % 3)::INTEGER AS k, range::INTEGER AS t FROM range(12); +-- +ok +== +EXPLAIN SELECT count(*) FROM a_t ASOF JOIN b_t ON a_t.k = b_t.k AND a_t.t >= b_t.t AND a_t.m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM a_t ASOF JOIN b_t ON a_t.k = b_t.k AND a_t.t >= b_t.t AND a_t.m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM a_t ASOF LEFT JOIN b_t ON a_t.k = b_t.k AND a_t.t >= b_t.t AND a_t.m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM a_t ASOF JOIN b_t ON a_t.k = b_t.k AND a_t.t >= b_t.t AND a_t.m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_empty_right.test b/parser/testdata/corpus/sql/join/asof/test_asof_empty_right.test index 74c1ea9..c03ce25 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_empty_right.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_empty_right.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_empty_right.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select lefttable.x, righttable.y diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join.test b/parser/testdata/corpus/sql/join/asof/test_asof_join.test index 7b47a6b..6c6403c 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events0 (begin DOUBLE, value INTEGER); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_doubles.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_doubles.test index e62b3ed..9d06695 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_doubles.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_doubles.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_doubles.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA asof_loop_join_threshold=0; diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_filter_pushdown.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_filter_pushdown.test index 1e52593..1e00ac7 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_filter_pushdown.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE left_table (id INTEGER, ts TIMESTAMP, symbol VARCHAR, price DECIMAL); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_inequalities.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_inequalities.test index a21d195..57d2dd0 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_inequalities.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_inequalities.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_inequalities.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events0 AS diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_integers.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_integers.test index c744aa7..36f6164 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_integers.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_integers.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_integers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events0 (begin INTEGER, value INTEGER); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_key_types.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_key_types.test new file mode 100644 index 0000000..7595707 --- /dev/null +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_key_types.test @@ -0,0 +1,65 @@ +# source: test/sql/join/asof/test_asof_join_key_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE l AS SELECT i AS g, i - 1 AS ts FROM range(2000) r(i); +-- +ok +== +CREATE TABLE r AS SELECT i AS g, i AS ts FROM range(2000) r(i); +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON l.g = r.g AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON row(l.g, 1) = row(r.g, 1) AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON union_value(k := l.g) = union_value(k := r.g) AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON MAP {repeat('a', 20) || l.g: 1} = MAP {repeat('a', 20) || r.g: 1} AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON l.g::VARIANT = r.g::VARIANT AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON ('\x00' || l.g::VARCHAR)::BLOB = ('\x00' || r.g::VARCHAR)::BLOB AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON ('POINT(' || l.g || ' 0)')::GEOMETRY = ('POINT(' || r.g || ' 0)')::GEOMETRY AND l.ts >= r.ts; +-- +ok +== +SELECT count(*) FROM l ASOF JOIN r ON l.g::BIT = r.g::BIT AND l.ts >= r.ts; +-- +ok +== +CREATE TABLE l2 AS SELECT i AS g, i + 1 AS ts FROM range(2000) r(i); +-- +ok +== +SELECT count(*), count(*) FILTER (l2.g <> r.g) FROM l2 ASOF JOIN r ON row(l2.g, 1) = row(r.g, 1) AND l2.ts >= r.ts; +-- +ok +== +SELECT count(*), count(*) FILTER (l2.g <> r.g) FROM l2 ASOF JOIN r ON union_value(k := l2.g) = union_value(k := r.g) AND l2.ts >= r.ts; +-- +ok +== +SELECT count(*), count(*) FILTER (l2.g <> r.g) FROM l2 ASOF JOIN r ON ('\x00' || l2.g::VARCHAR)::BLOB = ('\x00' || r.g::VARCHAR)::BLOB AND l2.ts >= r.ts; +-- +ok +== +SELECT count(*), count(*) FILTER (l2.g <> r.g) FROM l2 ASOF JOIN r ON l2.g::VARIANT = r.g::VARIANT AND l2.ts >= r.ts; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_not_distinct_predicate.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_not_distinct_predicate.test new file mode 100644 index 0000000..1176658 --- /dev/null +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_not_distinct_predicate.test @@ -0,0 +1,47 @@ +# source: test/sql/join/asof/test_asof_join_not_distinct_predicate.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(id INTEGER, k INTEGER); +-- +ok +== +INSERT INTO t VALUES (1, 1), (2, 1), (3, NULL), (4, NULL); +-- +ok +== +SELECT * FROM t l ASOF JOIN t r ON l.k IS NOT DISTINCT FROM r.k AND l.id >= r.id AND l.id <> r.id ORDER BY ALL; +-- +ok +== +SELECT * FROM t l ASOF JOIN t r ON l.k IS NOT DISTINCT FROM r.k AND l.id >= r.id AND FALSE; +-- +ok +== +SELECT * FROM t l ASOF LEFT JOIN t r ON l.k IS NOT DISTINCT FROM r.k AND l.id >= r.id AND l.id <> r.id ORDER BY ALL; +-- +ok +== +SELECT * FROM t l JOIN LATERAL ( + SELECT * FROM t r WHERE l.k IS NOT DISTINCT FROM r.k AND l.id >= r.id AND l.id <> r.id + ORDER BY r.id DESC LIMIT 1) q ON TRUE ORDER BY ALL; +-- +ok +== +CREATE TABLE s(id INTEGER, k STRUCT(a INTEGER)); +-- +ok +== +INSERT INTO s VALUES (1, {'a': 1}), (2, {'a': 1}); +-- +ok +== +SELECT * FROM s l ASOF JOIN s r ON l.k = r.k AND l.id >= r.id AND l.id <> r.id; +-- +ok +== +SELECT l.id, l.k.a, r.id, r.k.a FROM s l ASOF JOIN s r ON l.k = r.k AND l.id >= r.id ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_nulls.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_nulls.test index 476e6a1..872fbaa 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_nulls.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA asof_loop_join_threshold = 0; diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_predicates.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_predicates.test index 68c90b4..941922a 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_predicates.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_predicates.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_predicates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tt1 (i INTEGER, j VARCHAR); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_prefix.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_prefix.test index 6b8914a..32daced 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_prefix.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_prefix.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_prefix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA debug_asof_iejoin=False diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_pushdown.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_pushdown.test index 5ecf7cc..1c48920 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_pushdown.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE right_pushdown(time INTEGER, value FLOAT); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_setops.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_setops.test index 4d91227..0c14fb3 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_setops.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_setops.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_setops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(d INTEGER); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_subquery.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_subquery.test index 9d6c36b..e44b595 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_subquery.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events (begin DOUBLE, value INTEGER); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_timestamps.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_timestamps.test index 67cb0a7..e9ff161 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_timestamps.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_timestamps.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_timestamps.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO events0 VALUES diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_types.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_types.test index 079dd34..c9576da 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_types.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_types.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO left_table VALUES diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_join_varchar.test b/parser/testdata/corpus/sql/join/asof/test_asof_join_varchar.test index 162b3f0..22a79b1 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_join_varchar.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_join_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_join_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events0 (begin VARCHAR, value INTEGER); diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_limit.test b/parser/testdata/corpus/sql/join/asof/test_asof_limit.test index 8f70756..24ab62b 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_limit.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_limit.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH trades AS ( diff --git a/parser/testdata/corpus/sql/join/asof/test_asof_semi_anti_mark.test b/parser/testdata/corpus/sql/join/asof/test_asof_semi_anti_mark.test index 8042989..2a3ff67 100644 --- a/parser/testdata/corpus/sql/join/asof/test_asof_semi_anti_mark.test +++ b/parser/testdata/corpus/sql/join/asof/test_asof_semi_anti_mark.test @@ -1,6 +1,6 @@ # source: test/sql/join/asof/test_asof_semi_anti_mark.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO left_table VALUES diff --git a/parser/testdata/corpus/sql/join/comparison_operand_extraction.test b/parser/testdata/corpus/sql/join/comparison_operand_extraction.test new file mode 100644 index 0000000..60cd7f1 --- /dev/null +++ b/parser/testdata/corpus/sql/join/comparison_operand_extraction.test @@ -0,0 +1,25 @@ +# source: test/sql/join/comparison_operand_extraction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET explain_output='optimized_only'; +-- +ok +== +SET profiling_renderer_settings=MAP {'operator_casing': 'upper'}; +-- +ok +== +EXPLAIN SELECT * FROM (VALUES (1)) l(a) FULL JOIN (VALUES (2)) r(b) ON {condition}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT * FROM (VALUES (1)) l(a) FULL JOIN (VALUES (2)) r(b) ON {condition}; +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN SELECT * FROM (VALUES (1)) l(a) FULL JOIN (VALUES (2)) r(b) ON a=b; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/cross_product/test_cross_product.test b/parser/testdata/corpus/sql/join/cross_product/test_cross_product.test index 826cf80..8018642 100644 --- a/parser/testdata/corpus/sql/join/cross_product/test_cross_product.test +++ b/parser/testdata/corpus/sql/join/cross_product/test_cross_product.test @@ -1,6 +1,6 @@ # source: test/sql/join/cross_product/test_cross_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 1), (12, 2); diff --git a/parser/testdata/corpus/sql/join/delim_join_reuse.test b/parser/testdata/corpus/sql/join/delim_join_reuse.test new file mode 100644 index 0000000..f2e196d --- /dev/null +++ b/parser/testdata/corpus/sql/join/delim_join_reuse.test @@ -0,0 +1,32 @@ +# source: test/sql/join/delim_join_reuse.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET delim_join_as_cte = false +-- +ok +== +SELECT * +FROM generate_series(1, 3) AS input(n), +LATERAL ( + WITH RECURSIVE subquery(x) AS ( + (SELECT n, true AS exists) + UNION ALL + SELECT x - 1, y + FROM subquery AS current(x), + LATERAL ( + SELECT NOT EXISTS ( + SELECT 1 + FROM subquery AS previous(a) + WHERE a > current.x + ) + ) AS next(y) + WHERE x > 0 + ) + TABLE subquery +) +ORDER BY n, x +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/empty_joins.test b/parser/testdata/corpus/sql/join/empty_joins.test index 3b58992..4ea9272 100644 --- a/parser/testdata/corpus/sql/join/empty_joins.test +++ b/parser/testdata/corpus/sql/join/empty_joins.test @@ -1,6 +1,6 @@ # source: test/sql/join/empty_joins.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT i FROM range(10) tbl(i) diff --git a/parser/testdata/corpus/sql/join/external/external_join_repartition_probe_side.test b/parser/testdata/corpus/sql/join/external/external_join_repartition_probe_side.test new file mode 100644 index 0000000..52d6f95 --- /dev/null +++ b/parser/testdata/corpus/sql/join/external/external_join_repartition_probe_side.test @@ -0,0 +1,9 @@ +# source: test/sql/join/external/external_join_repartition_probe_side.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM range(300000) a(k) JOIN range(300000) b(k) USING (k); +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/external/external_join_runtime_filter.test b/parser/testdata/corpus/sql/join/external/external_join_runtime_filter.test new file mode 100644 index 0000000..6a824b0 --- /dev/null +++ b/parser/testdata/corpus/sql/join/external/external_join_runtime_filter.test @@ -0,0 +1,44 @@ +# source: test/sql/join/external/external_join_runtime_filter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE b AS SELECT range % 2000 AS k FROM range(1000000) +-- +ok +== +CREATE TABLE p AS SELECT range % 4000 AS k FROM range(2000000) +-- +ok +== +SELECT count(*) FROM p WHERE k IN (SELECT k FROM b) +-- +ok +== +CREATE TABLE u1 AS SELECT range AS k, range::VARCHAR AS s FROM range(200000) +-- +ok +== +CREATE TABLE u2 AS SELECT range AS k, range::VARCHAR AS s FROM range(200000) +-- +ok +== +CREATE TABLE u3 AS SELECT range % 200000 AS k FROM range(400000) +-- +ok +== +SELECT count(*) FROM u3 JOIN ( + SELECT x.k FROM (SELECT k, s FROM u1 WHERE s LIKE '%1%' OR s NOT LIKE '%1%') x + JOIN (SELECT k, s FROM u2 WHERE s LIKE '%2%' OR s NOT LIKE '%2%') y USING (k) +) d USING (k) +-- +ok +== +CREATE TABLE fold_probe AS SELECT (range % 1000) * 2000 AS k FROM range(1000000) +-- +ok +== +SELECT count(*) FROM fold_probe WHERE k IN (SELECT range FROM range(2000000) WHERE range % 2000 = 0) +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/full_outer/full_outer_join_cache.test b/parser/testdata/corpus/sql/join/full_outer/full_outer_join_cache.test index e078348..2f33dd7 100644 --- a/parser/testdata/corpus/sql/join/full_outer/full_outer_join_cache.test +++ b/parser/testdata/corpus/sql/join/full_outer/full_outer_join_cache.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/full_outer_join_cache.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE smalltable AS SELECT 1::INTEGER a; diff --git a/parser/testdata/corpus/sql/join/full_outer/full_outer_join_union.test b/parser/testdata/corpus/sql/join/full_outer/full_outer_join_union.test index c56fb17..46cd3b5 100644 --- a/parser/testdata/corpus/sql/join/full_outer/full_outer_join_union.test +++ b/parser/testdata/corpus/sql/join/full_outer/full_outer_join_union.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/full_outer_join_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 1), (3, 3); diff --git a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join.test b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join.test index 388cb9e..87c9964 100644 --- a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join.test +++ b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/test_full_outer_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 1), (3, 3) diff --git a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_complex.test b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_complex.test index c07ac42..e9bc822 100644 --- a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_complex.test +++ b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_complex.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/test_full_outer_join_complex.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 1) diff --git a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_inequality.test b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_inequality.test index b339fe5..a7bcaa0 100644 --- a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_inequality.test +++ b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_inequality.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/test_full_outer_join_inequality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, j, k, l FROM integers FULL OUTER JOIN integers2 ON integers.i<>integers2.k ORDER BY 1, 2, 3, 4 diff --git a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_issue_4252.test b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_issue_4252.test index 81b116e..9c8c221 100644 --- a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_issue_4252.test +++ b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_issue_4252.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/test_full_outer_join_issue_4252.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x INT, y INT); diff --git a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_range.test b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_range.test index da0bb18..20d44d0 100644 --- a/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_range.test +++ b/parser/testdata/corpus/sql/join/full_outer/test_full_outer_join_range.test @@ -1,6 +1,6 @@ # source: test/sql/join/full_outer/test_full_outer_join_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, j, k, l FROM integers FULL OUTER JOIN integers2 ON integers.i r.i AND (l.i + r.i) % 7 = 1; +-- +ok +== +SELECT count(r.u), count(*) FROM l LEFT JOIN r ON l.i < r.i AND l.i + 2 > r.i AND (l.i + r.i) % 7 = 1; +-- +ok +== +SELECT count(l.t), count(*) FROM l RIGHT JOIN r ON l.i < r.i AND l.i + 2 > r.i AND (l.i + r.i) % 7 = 1; +-- +ok +== +SELECT count(l.t), count(r.s), count(*) FROM l FULL JOIN r ON l.i < r.i AND l.i + 2 > r.i AND (l.i + r.i) % 7 = 1; +-- +ok +== +SET nested_loop_join_threshold=100000000 +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/iejoin/iejoin_semi_anti_residual_payload.test b/parser/testdata/corpus/sql/join/iejoin/iejoin_semi_anti_residual_payload.test new file mode 100644 index 0000000..f1abf84 --- /dev/null +++ b/parser/testdata/corpus/sql/join/iejoin/iejoin_semi_anti_residual_payload.test @@ -0,0 +1,56 @@ +# source: test/sql/join/iejoin/iejoin_semi_anti_residual_payload.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) +FROM (VALUES (0, 10, 1.5), (1, 11, 1.5), (2, 12, 1.5), (3, 13, 1.5), + (4, 14, 1.5), (5, 15, 1.5), (6, 16, 1.5), (7, 17, 1.5)) l(start, stop, price) +ANTI JOIN (SELECT i AS start, i + 1 AS stop, 150.0 + i AS bid FROM range(100) t(i)) r + ON l.start < r.stop AND r.start < l.stop AND l.price + r.bid < 400; +-- +ok +== +SELECT count(*) +FROM (VALUES (0, 10, 1.5), (1, 11, 1.5), (2, 12, 1.5), (3, 13, 1.5), + (4, 14, 1.5), (5, 15, 1.5), (6, 16, 1.5), (7, 17, 1.5)) l(start, stop, price) +SEMI JOIN (SELECT i AS start, i + 1 AS stop, 150.0 + i AS bid FROM range(100) t(i)) r + ON l.start < r.stop AND r.start < l.stop AND l.price + r.bid < 400; +-- +ok +== +SELECT l.start +FROM (VALUES (0, 10, 1.5), (1, 11, 1.5), (2, 12, 1.5), (3, 13, 1.5), + (4, 14, 1.5), (5, 15, 1.5), (6, 16, 1.5), (7, 17, 1.5)) l(start, stop, price) +ANTI JOIN (SELECT i AS start, i + 1 AS stop, 150.0 + i AS bid FROM range(100) t(i)) r + ON l.start < r.stop AND r.start < l.stop AND l.price + r.bid < 155 +ORDER BY 1; +-- +ok +== +SELECT l.start +FROM (VALUES (0, 10, 1.5), (1, 11, 1.5), (2, 12, 1.5), (3, 13, 1.5), + (4, 14, 1.5), (5, 15, 1.5), (6, 16, 1.5), (7, 17, 1.5)) l(start, stop, price) +SEMI JOIN (SELECT i AS start, i + 1 AS stop, 150.0 + i AS bid FROM range(100) t(i)) r + ON l.start < r.stop AND r.start < l.stop AND l.price + r.bid < 155 +ORDER BY 1; +-- +ok +== +SELECT count(*) +FROM (VALUES (1::BIGINT, TIMESTAMP '2026-01-01 00:00:00', TIMESTAMP '2026-01-01 00:24:22', 149.5::DOUBLE), + (2, TIMESTAMP '2026-01-01 00:24:22', TIMESTAMP '2026-01-01 00:48:45', 164.1), + (3, TIMESTAMP '2026-01-01 00:48:45', TIMESTAMP '2026-01-01 01:13:08', 178.8), + (4, TIMESTAMP '2026-01-01 01:13:08', TIMESTAMP '2026-01-01 01:37:31', 193.4), + (5, TIMESTAMP '2026-01-01 01:37:31', TIMESTAMP '2026-01-01 02:01:54', 208.0), + (6, TIMESTAMP '2026-01-01 02:01:54', TIMESTAMP '2026-01-01 02:26:17', 222.6), + (7, NULL, TIMESTAMP '2026-01-01 02:50:40', 237.3), + (8, TIMESTAMP '2026-01-01 02:50:40', NULL, 251.9)) l(id, start, stop, price) +ANTI JOIN (SELECT TIMESTAMP '2026-01-01' + INTERVAL (i + 15 * 2048 // 7) SECOND AS start, + TIMESTAMP '2026-01-01' + INTERVAL (i + 15 * 2048 // 7 + 1) SECOND AS stop, + 150.0 + i / 100.0 AS bid + FROM range(10240) t(i)) r + ON l.start < r.stop AND r.start < l.stop AND l.price + r.bid < 400; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/iejoin/merge_join_switch.test b/parser/testdata/corpus/sql/join/iejoin/merge_join_switch.test index 1cf4f72..05128bf 100644 --- a/parser/testdata/corpus/sql/join/iejoin/merge_join_switch.test +++ b/parser/testdata/corpus/sql/join/iejoin/merge_join_switch.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/merge_join_switch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigtbl AS FROM range(1000) t(i); diff --git a/parser/testdata/corpus/sql/join/iejoin/predicate_expressions.test b/parser/testdata/corpus/sql/join/iejoin/predicate_expressions.test index c861bfb..bc9d007 100644 --- a/parser/testdata/corpus/sql/join/iejoin/predicate_expressions.test +++ b/parser/testdata/corpus/sql/join/iejoin/predicate_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/predicate_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table calendar as SELECT * diff --git a/parser/testdata/corpus/sql/join/iejoin/test_countzeros.test b/parser/testdata/corpus/sql/join/iejoin/test_countzeros.test index 2710931..6d17d6d 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_countzeros.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_countzeros.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_countzeros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set merge_join_threshold=0; diff --git a/parser/testdata/corpus/sql/join/iejoin/test_ieantijoin.test b/parser/testdata/corpus/sql/join/iejoin/test_ieantijoin.test index 85c8354..16427a4 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_ieantijoin.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_ieantijoin.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_ieantijoin.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE left_small( diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iejoin.test b/parser/testdata/corpus/sql/join/iejoin/test_iejoin.test index 7f26786..7df3ef8 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iejoin.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iejoin.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iejoin.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH test AS ( diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_east_west.test b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_east_west.test index da1a5e2..a5eb28b 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_east_west.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_east_west.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iejoin_east_west.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE east AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_events.test b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_events.test index 277645f..abd35e8 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_events.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_events.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iejoin_events.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events AS ( diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_null_keys.test b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_null_keys.test index 0b5e510..dea56ec 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_null_keys.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_null_keys.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iejoin_null_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET nested_loop_join_threshold=0 diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_overlaps.test b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_overlaps.test index 120fc49..cfaf8da 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_overlaps.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_overlaps.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iejoin_overlaps.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_predicate.test b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_predicate.test index 010884a..a391c18 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iejoin_predicate.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iejoin_predicate.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iejoin_predicate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tleft as diff --git a/parser/testdata/corpus/sql/join/iejoin/test_iesemijoin.test b/parser/testdata/corpus/sql/join/iejoin/test_iesemijoin.test index 3a6fe34..240eed7 100644 --- a/parser/testdata/corpus/sql/join/iejoin/test_iesemijoin.test +++ b/parser/testdata/corpus/sql/join/iejoin/test_iesemijoin.test @@ -1,6 +1,6 @@ # source: test/sql/join/iejoin/test_iesemijoin.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO left_small VALUES diff --git a/parser/testdata/corpus/sql/join/inner/empty_tinyint_column.test b/parser/testdata/corpus/sql/join/inner/empty_tinyint_column.test index 8c9b8e6..d4dbefc 100644 --- a/parser/testdata/corpus/sql/join/inner/empty_tinyint_column.test +++ b/parser/testdata/corpus/sql/join/inner/empty_tinyint_column.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/empty_tinyint_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT4, c1 VARCHAR); diff --git a/parser/testdata/corpus/sql/join/inner/equality_join_limits.test b/parser/testdata/corpus/sql/join/inner/equality_join_limits.test index 66a2359..9ce6bb5 100644 --- a/parser/testdata/corpus/sql/join/inner/equality_join_limits.test +++ b/parser/testdata/corpus/sql/join/inner/equality_join_limits.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/equality_join_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE u(u_k0 TINYINT); diff --git a/parser/testdata/corpus/sql/join/inner/join_cache.test b/parser/testdata/corpus/sql/join/inner/join_cache.test index 04ecbb3..d5516d3 100644 --- a/parser/testdata/corpus/sql/join/inner/join_cache.test +++ b/parser/testdata/corpus/sql/join/inner/join_cache.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/join_cache.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigtable AS SELECT a::INTEGER a FROM generate_series(0, 10000, 1) tbl(a), generate_series(0, 9, 1) tbl2(b); diff --git a/parser/testdata/corpus/sql/join/inner/join_cross_product.test b/parser/testdata/corpus/sql/join/inner/join_cross_product.test index 7f726fc..151b022 100644 --- a/parser/testdata/corpus/sql/join/inner/join_cross_product.test +++ b/parser/testdata/corpus/sql/join/inner/join_cross_product.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/join_cross_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(i integer); diff --git a/parser/testdata/corpus/sql/join/inner/list_join.test b/parser/testdata/corpus/sql/join/inner/list_join.test index 915e275..dfce0be 100644 --- a/parser/testdata/corpus/sql/join/inner/list_join.test +++ b/parser/testdata/corpus/sql/join/inner/list_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/list_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id INTEGER, l VARCHAR[]); diff --git a/parser/testdata/corpus/sql/join/inner/not_between_is_null.test b/parser/testdata/corpus/sql/join/inner/not_between_is_null.test index 1fa99c4..7f2ac61 100644 --- a/parser/testdata/corpus/sql/join/inner/not_between_is_null.test +++ b/parser/testdata/corpus/sql/join/inner/not_between_is_null.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/not_between_is_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT); diff --git a/parser/testdata/corpus/sql/join/inner/right_semi_dict_emission_dead_end.test b/parser/testdata/corpus/sql/join/inner/right_semi_dict_emission_dead_end.test index ad69fd2..071164b 100644 --- a/parser/testdata/corpus/sql/join/inner/right_semi_dict_emission_dead_end.test +++ b/parser/testdata/corpus/sql/join/inner/right_semi_dict_emission_dead_end.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/right_semi_dict_emission_dead_end.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE big (f BOOLEAN, s VARCHAR); diff --git a/parser/testdata/corpus/sql/join/inner/test_dense_prefix_range_filter.test b/parser/testdata/corpus/sql/join/inner/test_dense_prefix_range_filter.test new file mode 100644 index 0000000..b8a76b1 --- /dev/null +++ b/parser/testdata/corpus/sql/join/inner/test_dense_prefix_range_filter.test @@ -0,0 +1,178 @@ +# source: test/sql/join/inner/test_dense_prefix_range_filter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET dynamic_or_filter_threshold=0; +-- +ok +== +SET disabled_optimizers='join_order,build_side_probe_side,compressed_materialization'; +-- +ok +== +CREATE OR REPLACE TABLE probe AS +SELECT i, CASE WHEN i%19<>0 THEN (i%221-100)::{type} END AS k, (i%7)::INTEGER AS g +FROM range(10003) t(i); +-- +error: Parser Error: syntax error at or near "{" +== +CREATE OR REPLACE TABLE build AS +SELECT (i%{width}-40)::{type} AS k FROM range(2*{width}) t(i); +-- +error: Parser Error: syntax error at or near "}" +== +WITH actual AS ( + SELECT p.i, p.k FROM probe p JOIN build b ON p.k=b.k WHERE p.g<3 +), expected AS ( + SELECT i, k FROM probe, range(2) WHERE g<3 AND k BETWEEN -40 AND {width}-41 +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +DELETE FROM build WHERE k=-39; +-- +ok +== +WITH actual AS ( + SELECT p.i, p.k FROM probe p JOIN build b ON p.k=b.k WHERE p.g>=3 +), expected AS ( + SELECT i, k FROM probe, range(2) + WHERE g>=3 AND k BETWEEN -40 AND {width}-41 AND k<>-39 +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE probe AS +SELECT i, CASE WHEN i%19<>0 THEN (18446744073709551615::UBIGINT-i%256)::UBIGINT END AS k +FROM range(10003) t(i); +-- +ok +== +CREATE OR REPLACE TABLE build AS +SELECT (18446744073709551615::UBIGINT-i)::UBIGINT AS k FROM range(129) t(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM probe p JOIN build b ON p.k=b.k; +-- +ok +== +SELECT count(*) FROM probe p JOIN build b ON p.k=b.k; +-- +ok +== +PREPARE prf_query AS SELECT count(*) FROM probe p JOIN build b ON p.k=b.k; +-- +ok +== +DELETE FROM build WHERE k%2=0; +-- +ok +== +EXECUTE prf_query; +-- +ok +== +DELETE FROM build; +-- +ok +== +CREATE OR REPLACE TABLE probe AS SELECT i-1 AS k FROM range(1100003) t(i); +-- +ok +== +CREATE OR REPLACE TABLE build AS SELECT i AS k FROM range(1100003) t(i); +-- +ok +== +SET perfect_ht_threshold=0; +-- +ok +== +SET debug_force_external={external}; +-- +error: Parser Error: syntax error at or near "}" +== +RESET debug_force_external; +-- +ok +== +CREATE TABLE rle_probe(k BIGINT USING COMPRESSION RLE, g INTEGER); +-- +ok +== +INSERT INTO rle_probe +SELECT CASE WHEN i%61<>0 THEN (i//32)%2000-1000 END, i%17 FROM range(300007) t(i); +-- +ok +== +CREATE TABLE rle_build AS SELECT i-1000 AS k FROM range(500,620) t(i); +-- +ok +== +WITH actual AS ( + SELECT p.k, p.g FROM rle_probe p JOIN rle_build b ON p.k=b.k WHERE p.g<3 +), expected AS ( + SELECT k, g FROM rle_probe WHERE g<3 AND k BETWEEN -500 AND -381 +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +ok +== +CREATE OR REPLACE TABLE probe AS +SELECT i, CASE WHEN i%17<>0 THEN 'abc'||chr(65+(i%26)::INTEGER)||i::VARCHAR END AS k +FROM range(10003) t(i); +-- +ok +== +CREATE OR REPLACE TABLE build AS SELECT k FROM probe WHERE i BETWEEN 100 AND 1100; +-- +ok +== +CREATE OR REPLACE TABLE probe AS +SELECT i, CASE WHEN i%13=0 THEN 40000 ELSE i%257-100 END AS k +FROM range(10003) t(i); +-- +ok +== +CREATE OR REPLACE TABLE build AS SELECT i::SMALLINT AS k FROM range(-32,97) t(i); +-- +ok +== +SET debug_verify_vector='dictionary_expression'; +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) FROM probe p JOIN build b ON TRY_CAST(p.k AS SMALLINT)=b.k; +-- +ok +== +WITH actual AS ( + SELECT p.i FROM probe p JOIN build b ON TRY_CAST(p.k AS SMALLINT)=b.k +), expected AS ( + SELECT i FROM probe WHERE i%13<>0 AND i%257-100 BETWEEN -32 AND 96 +) +SELECT count(*) FROM ( + (TABLE actual EXCEPT ALL TABLE expected) + UNION ALL + (TABLE expected EXCEPT ALL TABLE actual) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/inner/test_eq_ineq_join.test b/parser/testdata/corpus/sql/join/inner/test_eq_ineq_join.test index 142d5e2..d4fdbf4 100644 --- a/parser/testdata/corpus/sql/join/inner/test_eq_ineq_join.test +++ b/parser/testdata/corpus/sql/join/inner/test_eq_ineq_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_eq_ineq_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test2 (a INTEGER, c INTEGER); diff --git a/parser/testdata/corpus/sql/join/inner/test_inner_join_filter_pushdown.test b/parser/testdata/corpus/sql/join/inner/test_inner_join_filter_pushdown.test index 57ea467..3e5c43c 100644 --- a/parser/testdata/corpus/sql/join/inner/test_inner_join_filter_pushdown.test +++ b/parser/testdata/corpus/sql/join/inner/test_inner_join_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_inner_join_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE left_table (id INTEGER, val INTEGER, amount INTEGER); diff --git a/parser/testdata/corpus/sql/join/inner/test_join.test b/parser/testdata/corpus/sql/join/inner/test_join.test index bab94aa..ea1f9fb 100644 --- a/parser/testdata/corpus/sql/join/inner/test_join.test +++ b/parser/testdata/corpus/sql/join/inner/test_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test2 (b INTEGER, c INTEGER); diff --git a/parser/testdata/corpus/sql/join/inner/test_join_duplicates.test b/parser/testdata/corpus/sql/join/inner/test_join_duplicates.test index fa001d1..2b10328 100644 --- a/parser/testdata/corpus/sql/join/inner/test_join_duplicates.test +++ b/parser/testdata/corpus/sql/join/inner/test_join_duplicates.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_join_duplicates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test2 AS SELECT * FROM repeat(1, 10*1024) t1(b), (SELECT 10) t2(c); diff --git a/parser/testdata/corpus/sql/join/inner/test_join_filter_precedence.test b/parser/testdata/corpus/sql/join/inner/test_join_filter_precedence.test index 6bd17af..65104c3 100644 --- a/parser/testdata/corpus/sql/join/inner/test_join_filter_precedence.test +++ b/parser/testdata/corpus/sql/join/inner/test_join_filter_precedence.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_join_filter_precedence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET disabled_optimizers = 'join_order,build_side_probe_side,compressed_materialization'; @@ -76,10 +76,6 @@ JOIN in_filter_build b -- ok == -SET dynamic_or_filter_threshold=0; --- -ok -== CREATE TABLE bloom_probe AS SELECT (-1000000000000 + i * 20000000)::BIGINT AS k, (i % 7)::INTEGER AS g FROM range(100000) t(i); @@ -166,7 +162,3 @@ JOIN multi_build b -- ok == -SET disabled_optimizers = ''; --- -ok -== diff --git a/parser/testdata/corpus/sql/join/inner/test_join_is_distinct.test b/parser/testdata/corpus/sql/join/inner/test_join_is_distinct.test index 6556e9e..0e50c84 100644 --- a/parser/testdata/corpus/sql/join/inner/test_join_is_distinct.test +++ b/parser/testdata/corpus/sql/join/inner/test_join_is_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_join_is_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (col0 INTEGER, col1 INTEGER); diff --git a/parser/testdata/corpus/sql/join/inner/test_join_is_not_distinct.test b/parser/testdata/corpus/sql/join/inner/test_join_is_not_distinct.test index 5cf3c83..8921c78 100644 --- a/parser/testdata/corpus/sql/join/inner/test_join_is_not_distinct.test +++ b/parser/testdata/corpus/sql/join/inner/test_join_is_not_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_join_is_not_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT x.col1, y.col1 FROM tbl x JOIN tbl y diff --git a/parser/testdata/corpus/sql/join/inner/test_lt_join.test b/parser/testdata/corpus/sql/join/inner/test_lt_join.test index b91da33..10fbfd1 100644 --- a/parser/testdata/corpus/sql/join/inner/test_lt_join.test +++ b/parser/testdata/corpus/sql/join/inner/test_lt_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_lt_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a AS SELECT i FROM range(1, 2001, 1) t1(i) diff --git a/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_non_utf8.test b/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_non_utf8.test index 5295e34..4af7969 100644 --- a/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_non_utf8.test +++ b/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_non_utf8.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_prefix_range_filter_non_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET disabled_optimizers = 'join_order,build_side_probe_side'; diff --git a/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown.test b/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown.test index 5b7ef6c..3b42262 100644 --- a/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown.test +++ b/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_prefix_range_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE probe AS diff --git a/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown_strinline.test b/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown_strinline.test index b4ae73d..8d4ea74 100644 --- a/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown_strinline.test +++ b/parser/testdata/corpus/sql/join/inner/test_prefix_range_filter_pushdown_strinline.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_prefix_range_filter_pushdown_strinline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE probe_varchar AS @@ -123,8 +123,8 @@ ok == CREATE OR REPLACE TABLE prf_probe_string_long_same_prefix AS SELECT * FROM (VALUES - ('aaaa_probe_suffix_0001', 0, 1), - ('aaaa_probe_suffix_0002', 1, 2), + ('aaaa_shared_probe_suffix_0001', 0, 1), + ('aaaa_shared_probe_suffix_0002', 1, 2), ('zzzz_probe_suffix_9999', 0, 3), (NULL, 0, 4) ) AS t(k, g, id); @@ -133,9 +133,9 @@ ok == CREATE OR REPLACE TABLE prf_build_string_long_same_prefix AS SELECT * FROM (VALUES - ('aaaa_build_suffix_1001', 0, 300), - ('aaaa_build_suffix_2002', 0, 301), - ('aaaa_build_suffix_3003', 1, 302), + ('aaaa_shared_build_suffix_1001', 0, 300), + ('aaaa_shared_build_suffix_2002', 0, 301), + ('aaaa_shared_build_suffix_3003', 1, 302), (NULL, 0, 303) ) AS t(k, g, payload); -- diff --git a/parser/testdata/corpus/sql/join/inner/test_range_join.test b/parser/testdata/corpus/sql/join/inner/test_range_join.test index cca3894..9471c35 100644 --- a/parser/testdata/corpus/sql/join/inner/test_range_join.test +++ b/parser/testdata/corpus/sql/join/inner/test_range_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_range_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT test.b, test2.b FROM test, test2 WHERE test.b test2.b ORDER BY test.b, test2.b diff --git a/parser/testdata/corpus/sql/join/inner/test_unequal_join_duplicates.test b/parser/testdata/corpus/sql/join/inner/test_unequal_join_duplicates.test index 3a867b8..782b486 100644 --- a/parser/testdata/corpus/sql/join/inner/test_unequal_join_duplicates.test +++ b/parser/testdata/corpus/sql/join/inner/test_unequal_join_duplicates.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_unequal_join_duplicates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (b INTEGER); diff --git a/parser/testdata/corpus/sql/join/inner/test_using_chain.test b/parser/testdata/corpus/sql/join/inner/test_using_chain.test index 50504b7..bc2cdc1 100644 --- a/parser/testdata/corpus/sql/join/inner/test_using_chain.test +++ b/parser/testdata/corpus/sql/join/inner/test_using_chain.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_using_chain.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (a INTEGER, b INTEGER) diff --git a/parser/testdata/corpus/sql/join/inner/test_using_join.test b/parser/testdata/corpus/sql/join/inner/test_using_join.test index fdef5e6..d2bdfde 100644 --- a/parser/testdata/corpus/sql/join/inner/test_using_join.test +++ b/parser/testdata/corpus/sql/join/inner/test_using_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_using_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (a INTEGER, b INTEGER, c INTEGER); diff --git a/parser/testdata/corpus/sql/join/inner/test_varchar_join.test b/parser/testdata/corpus/sql/join/inner/test_varchar_join.test index f4ed6b2..8ece047 100644 --- a/parser/testdata/corpus/sql/join/inner/test_varchar_join.test +++ b/parser/testdata/corpus/sql/join/inner/test_varchar_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/inner/test_varchar_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from (select NULL::varchar as b) sq1, (select 'asdf' as b) sq2 where sq1.b = sq2.b; diff --git a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_1172.test b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_1172.test index 59effd7..b228f57 100644 --- a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_1172.test +++ b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_1172.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/left_join_issue_1172.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit drop table if exists t1; diff --git a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_15316.test b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_15316.test index fcce8c5..2cd1477 100644 --- a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_15316.test +++ b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_15316.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/left_join_issue_15316.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE big_table AS diff --git a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_23805.test b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_23805.test index 71d31b0..0b10e84 100644 --- a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_23805.test +++ b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_23805.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/left_join_issue_23805.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id VARCHAR, c2 INTEGER); diff --git a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_24540.test b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_24540.test new file mode 100644 index 0000000..38b6b0a --- /dev/null +++ b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_24540.test @@ -0,0 +1,14 @@ +# source: test/sql/join/left_outer/left_join_issue_24540.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM (VALUES (1),(2),(NULL)) AS a(x) +LEFT JOIN (SELECT p.y AS y, q.z AS z + FROM (VALUES (2),(3),(NULL)) AS p(y) + LEFT JOIN (VALUES (1),(3),(NULL)) AS q(z) ON p.y <> q.z) AS s +ON a.x <> s.y +WHERE s.z IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_6341.test b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_6341.test index 97776d9..f761e92 100644 --- a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_6341.test +++ b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_6341.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/left_join_issue_6341.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE foo (ts TIMESTAMP); diff --git a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_7905.test b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_7905.test index 33e3f09..a4a549b 100644 --- a/parser/testdata/corpus/sql/join/left_outer/left_join_issue_7905.test +++ b/parser/testdata/corpus/sql/join/left_outer/left_join_issue_7905.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/left_join_issue_7905.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(a1 VARCHAR); diff --git a/parser/testdata/corpus/sql/join/left_outer/non_foldable_left_join.test b/parser/testdata/corpus/sql/join/left_outer/non_foldable_left_join.test index 97b5347..e460482 100644 --- a/parser/testdata/corpus/sql/join/left_outer/non_foldable_left_join.test +++ b/parser/testdata/corpus/sql/join/left_outer/non_foldable_left_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/non_foldable_left_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from range(1) tbl(i) left join range(2) tbl2(j) on (i=j) where j+random()<0; diff --git a/parser/testdata/corpus/sql/join/left_outer/test_left_join_filter_pushdown.test b/parser/testdata/corpus/sql/join/left_outer/test_left_join_filter_pushdown.test index cc3881a..9aa73e8 100644 --- a/parser/testdata/corpus/sql/join/left_outer/test_left_join_filter_pushdown.test +++ b/parser/testdata/corpus/sql/join/left_outer/test_left_join_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/test_left_join_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO left_table VALUES (1, 1, 50), (2, 1, 75), (3, 2, 60), (4, 2, 90), (5, 99, 100); diff --git a/parser/testdata/corpus/sql/join/left_outer/test_left_join_on_true.test b/parser/testdata/corpus/sql/join/left_outer/test_left_join_on_true.test index 5353301..94b786c 100644 --- a/parser/testdata/corpus/sql/join/left_outer/test_left_join_on_true.test +++ b/parser/testdata/corpus/sql/join/left_outer/test_left_join_on_true.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/test_left_join_on_true.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t AS ( diff --git a/parser/testdata/corpus/sql/join/left_outer/test_left_outer.test b/parser/testdata/corpus/sql/join/left_outer/test_left_outer.test index 42d5ebb..c9b3cfa 100644 --- a/parser/testdata/corpus/sql/join/left_outer/test_left_outer.test +++ b/parser/testdata/corpus/sql/join/left_outer/test_left_outer.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/test_left_outer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers LEFT OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i diff --git a/parser/testdata/corpus/sql/join/left_outer/unique_left_join.test b/parser/testdata/corpus/sql/join/left_outer/unique_left_join.test index 7398a87..4a64c06 100644 --- a/parser/testdata/corpus/sql/join/left_outer/unique_left_join.test +++ b/parser/testdata/corpus/sql/join/left_outer/unique_left_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/left_outer/unique_left_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dim(id INTEGER PRIMARY KEY, label TEXT) diff --git a/parser/testdata/corpus/sql/join/mark/conjunction_vector_reuse.test b/parser/testdata/corpus/sql/join/mark/conjunction_vector_reuse.test new file mode 100644 index 0000000..f8994be --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/conjunction_vector_reuse.test @@ -0,0 +1,25 @@ +# source: test/sql/join/mark/conjunction_vector_reuse.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET nested_loop_join_threshold=1000000; +-- +ok +== +CREATE OR REPLACE TABLE reuse_probe AS SELECT i id, (CASE WHEN i%4=0 THEN NULL WHEN i%4=1 THEN [1,NULL] WHEN i%4=2 THEN [2,0] ELSE [0,1] END)::{type} v FROM range(2050) t(i); +-- +error: Parser Error: syntax error at or near "{" +== +CREATE OR REPLACE TABLE reuse_build AS SELECT (CASE WHEN i%3=0 THEN NULL WHEN i%3=1 THEN [1,NULL] ELSE [0,1] END)::{type} v FROM range(5) t(i); +-- +error: Parser Error: syntax error at or near "{" +== +WITH actual AS (SELECT p.id FROM reuse_probe p JOIN BY(TYPE {join}) reuse_build b ON p.vb.v), expected AS (SELECT p.id FROM reuse_probe p WHERE EXISTS(SELECT 1 FROM reuse_build b WHERE p.vb.v) = ('{join}'='SEMI')) SELECT count(*) FROM ((SELECT * FROM actual EXCEPT ALL SELECT * FROM expected) UNION ALL (SELECT * FROM expected EXCEPT ALL SELECT * FROM actual)); +-- +error: Parser Error: syntax error at or near "{" +== +RESET nested_loop_join_threshold; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/constant_mark_join.test b/parser/testdata/corpus/sql/join/mark/constant_mark_join.test new file mode 100644 index 0000000..82b7c76 --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/constant_mark_join.test @@ -0,0 +1,107 @@ +# source: test/sql/join/mark/constant_mark_join.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE probe(i INTEGER); +-- +ok +== +INSERT INTO probe VALUES (1),(2),(2),(NULL); +-- +ok +== +CREATE TABLE build(i INTEGER); +-- +ok +== +INSERT INTO build VALUES (1),(3),(NULL); +-- +ok +== +SELECT p.i,__mark_join_marker FROM probe p JOIN BY (TYPE MARK) build b ON p.i=1; +-- +ok +== +SELECT p.i,__mark_join_marker FROM probe p JOIN BY (TYPE MARK) build b ON 1=p.i; +-- +ok +== +SELECT p.i,__mark_join_marker FROM probe p JOIN BY (TYPE MARK) build b ON 2=b.i; +-- +ok +== +SELECT p.i,__mark_join_marker FROM probe p JOIN BY (TYPE MARK) build b ON b.i=1; +-- +ok +== +SELECT p.i,__mark_join_marker FROM probe p JOIN BY (TYPE MARK) build b ON 10 THEN error('scalar operand') ELSE 0 END=b.i; +-- +ok +== +SELECT 1 = ANY(SELECT 1); +-- +ok +== +SELECT __mark_join_marker FROM (SELECT NULL::INTEGER AS dummy) l JOIN BY(TYPE MARK) (SELECT 1 AS i) r ON 1=r.i; +-- +ok +== +SELECT NULL::INTERVAL IN(SELECT INTERVAL 1 DAY); +-- +ok +== +SELECT __mark_join_marker FROM (SELECT NULL::INTEGER AS dummy) l JOIN BY(TYPE MARK) (SELECT INTERVAL 1 DAY AS i) r ON NULL::INTERVAL=r.i; +-- +ok +== +SELECT 'ABC' COLLATE nocase IN(SELECT 'aBc'); +-- +ok +== +SELECT __mark_join_marker FROM (SELECT NULL::INTEGER AS dummy) l JOIN BY(TYPE MARK) (SELECT 'aBc' AS s) r ON 'ABC' COLLATE nocase=r.s; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/distinct_comparison.test b/parser/testdata/corpus/sql/join/mark/distinct_comparison.test new file mode 100644 index 0000000..ece4850 --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/distinct_comparison.test @@ -0,0 +1,77 @@ +# source: test/sql/join/mark/distinct_comparison.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_disable_optimizer={disable}; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE distinct_probe(a INTEGER); +-- +ok +== +INSERT INTO distinct_probe VALUES (NULL),(1),(2),(2); +-- +ok +== +CREATE OR REPLACE TABLE distinct_build(b INTEGER); +-- +ok +== +INSERT INTO distinct_build VALUES (NULL),(2),(2); +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a IS DISTINCT FROM 2; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON 2 IS DISTINCT FROM a; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a IS DISTINCT FROM b; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON 2 IS DISTINCT FROM b; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a IS DISTINCT FROM NULL::INTEGER; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a IS NOT DISTINCT FROM NULL::INTEGER; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a<>2; +-- +ok +== +DELETE FROM distinct_build WHERE b IS NOT NULL; +-- +ok +== +SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a<>b; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (NULL::INTEGER[])) l(a) JOIN BY (TYPE MARK) (VALUES ([2])) r(b) ON a IS DISTINCT FROM b; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (NULL::INTEGER[])) l(a) JOIN BY (TYPE MARK) (VALUES (NULL::INTEGER[])) r(b) ON a IS DISTINCT FROM b; +-- +ok +== +DELETE FROM distinct_build; +-- +ok +== +SET debug_disable_optimizer=false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/explicit_conditions.test b/parser/testdata/corpus/sql/join/mark/explicit_conditions.test new file mode 100644 index 0000000..2a6ef20 --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/explicit_conditions.test @@ -0,0 +1,69 @@ +# source: test/sql/join/mark/explicit_conditions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b AND c>d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON ad; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON ad AND a<>b; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b AND a+b>0; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a+b=3; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b AND NULL::BOOLEAN; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b AND c IS NOT DISTINCT FROM d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a<2 AND a>2; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a IS DISTINCT FROM b AND c IS DISTINCT FROM d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b-1 AND a=a+1; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b-1 AND 1=a+b; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON TRUE; +-- +ok +== +SELECT a,__mark_join_marker FROM (VALUES (1,NULL::INT),(2,3)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,NULL::INT)) b(b,d) ON a IS NOT DISTINCT FROM b AND c IS NOT DISTINCT FROM d ORDER BY a; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,2)) b(b,d) ON a=b AND c=d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1)) p(a) JOIN BY(TYPE MARK) (VALUES (1)) b(b) ON a=(SELECT b); +-- +ok +== +WITH probes(id,g,h) AS (VALUES (0,1,NULL::INT),(1,2,3),(2,NULL,4),(3,1,NULL::INT)), candidates(g,h) AS (VALUES (1,NULL::INT),(NULL,4),(NULL,4)), actual AS (SELECT id,__mark_join_marker m FROM probes p JOIN BY(TYPE MARK) candidates c ON p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h), expected AS (SELECT id,EXISTS(SELECT 1 FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM probes p) SELECT count(*) FROM actual a JOIN expected e USING(id) WHERE a.m IS DISTINCT FROM e.m; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/group_reconstruction_limits.test b/parser/testdata/corpus/sql/join/mark/group_reconstruction_limits.test new file mode 100644 index 0000000..eaaab17 --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/group_reconstruction_limits.test @@ -0,0 +1,33 @@ +# source: test/sql/join/mark/group_reconstruction_limits.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE union_probes(g INTEGER, u UNION(i INTEGER,s VARCHAR)); +-- +ok +== +INSERT INTO union_probes VALUES (0,union_value(i:=1)),(1,union_value(i:=2)),(2,NULL),(3,union_value(i:=3)); +-- +ok +== +CREATE TABLE union_candidates(g INTEGER, u UNION(i INTEGER,s VARCHAR)); +-- +ok +== +INSERT INTO union_candidates VALUES (0,union_value(i:=1)),(1,union_value(i:=NULL)),(3,NULL); +-- +ok +== +SELECT g,u=ANY(SELECT b.u FROM union_candidates b WHERE b.g=p.g) FROM union_probes p ORDER BY g; +-- +ok +== +SELECT __mark_join_marker FROM union_probes p JOIN BY(TYPE MARK) union_candidates b ON p.g IS NOT DISTINCT FROM b.g AND p.u=b.u; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (0,1::INTEGER)) p(g,v) JOIN BY(TYPE MARK) (VALUES (0,1::BIGINT)) b(g,v) ON p.g IS NOT DISTINCT FROM b.g AND p.v=b.v; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/hash_nested_operator_semantics.test b/parser/testdata/corpus/sql/join/mark/hash_nested_operator_semantics.test new file mode 100644 index 0000000..4d2e583 --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/hash_nested_operator_semantics.test @@ -0,0 +1,13 @@ +# source: test/sql/join/mark/hash_nested_operator_semantics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT __mark_join_marker FROM (VALUES (1,row(1,2))) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,row(1,NULL::INT))) b(b,d) ON a=b AND c = d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (2,row(1,2))) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,row(1,NULL::INT))) b(b,d) ON a=b AND c = d; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/inferred_groups.test b/parser/testdata/corpus/sql/join/mark/inferred_groups.test new file mode 100644 index 0000000..c45680b --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/inferred_groups.test @@ -0,0 +1,97 @@ +# source: test/sql/join/mark/inferred_groups.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE probes(id INTEGER, g INTEGER, v INTEGER); +-- +ok +== +INSERT INTO probes VALUES (0,0,NULL),(1,1,7),(2,2,5),(3,3,4),(4,4,7),(5,NULL,9),(6,5,NULL); +-- +ok +== +CREATE TABLE candidates(g INTEGER, v INTEGER); +-- +ok +== +INSERT INTO candidates VALUES (1,NULL),(2,5),(2,5),(3,NULL),(3,6),(4,8),(NULL,9); +-- +ok +== +SELECT id, p.v = ANY(SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g) FROM probes p ORDER BY id; +-- +ok +== +SELECT id,__mark_join_marker FROM probes p JOIN BY (TYPE MARK) candidates c ON p.g IS NOT DISTINCT FROM c.g AND p.v=c.v ORDER BY id; +-- +ok +== +SELECT id,__mark_join_marker FROM probes p JOIN BY (TYPE MARK) candidates c ON p.v=c.v AND p.g IS NOT DISTINCT FROM c.g ORDER BY id; +-- +ok +== +EXPLAIN SELECT __mark_join_marker FROM probes p JOIN BY (TYPE MARK) candidates c ON p.g IS NOT DISTINCT FROM c.g AND p.v=c.v; +-- +ok +== +DELETE FROM candidates; +-- +ok +== +SELECT count(*) FROM (SELECT __mark_join_marker AS marker FROM probes p JOIN BY (TYPE MARK) candidates c ON p.g IS NOT DISTINCT FROM c.g AND p.v=c.v) q WHERE marker IS NOT FALSE; +-- +ok +== +CREATE TABLE multi_probes(id INTEGER, g INTEGER, h INTEGER, v INTEGER); +-- +ok +== +INSERT INTO multi_probes VALUES (0,0,0,NULL),(1,1,1,NULL),(2,1,2,2),(3,2,1,2),(4,NULL,1,1),(5,NULL,2,2),(6,2,NULL,2); +-- +ok +== +CREATE TABLE multi_candidates(g INTEGER, h INTEGER, v INTEGER); +-- +ok +== +INSERT INTO multi_candidates VALUES (1,1,NULL),(1,2,1),(1,2,3),(NULL,1,1),(NULL,2,NULL),(2,NULL,3),(2,NULL,3); +-- +ok +== +WITH actual AS (SELECT id,__mark_join_marker m FROM multi_probes p JOIN BY(TYPE MARK) multi_candidates c ON p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h AND p.v {comparison} c.v), expected AS (SELECT id, (SELECT CASE WHEN bool_or(p.v {comparison} c.v) THEN true WHEN bool_or((p.v {comparison} c.v) IS NULL) THEN NULL ELSE false END FROM multi_candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM multi_probes p) SELECT count(*) FROM actual a JOIN expected e USING(id) WHERE a.m IS DISTINCT FROM e.m; +-- +error: Parser Error: syntax error at or near "{" +== +RESET debug_disable_optimizer; +-- +ok +== +CREATE TABLE typed_probes(id INTEGER, g VARCHAR COLLATE nocase, h INTEGER[], v INTEGER); +-- +ok +== +INSERT INTO typed_probes VALUES (0,'A',[1,NULL],NULL),(1,'a',[1,NULL],2),(2,'b',NULL,4),(3,NULL,[2],3),(4,'missing',[1],NULL); +-- +ok +== +CREATE TABLE typed_candidates(g VARCHAR COLLATE nocase, h INTEGER[], v INTEGER); +-- +ok +== +INSERT INTO typed_candidates VALUES ('a',[1,NULL],2),('a',[1,NULL],NULL),('B',NULL,4),(NULL,[2],3),(NULL,[2],3); +-- +ok +== +PREPARE typed_groups AS WITH actual AS (SELECT id,__mark_join_marker m FROM typed_probes p JOIN BY(TYPE MARK) typed_candidates c ON p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h AND p.v=c.v), expected AS (SELECT id,p.v=ANY(SELECT c.v FROM typed_candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM typed_probes p) SELECT count(*) FROM actual a JOIN expected e USING(id) WHERE a.m IS DISTINCT FROM e.m; +-- +ok +== +EXECUTE typed_groups; +-- +ok +== +DELETE FROM typed_candidates; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/nested_operator_semantics.test b/parser/testdata/corpus/sql/join/mark/nested_operator_semantics.test new file mode 100644 index 0000000..df8e36e --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/nested_operator_semantics.test @@ -0,0 +1,69 @@ +# source: test/sql/join/mark/nested_operator_semantics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c = d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c <> d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c < d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c <= d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c > d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c >= d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c IS DISTINCT FROM d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,2))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,NULL::INT))) b(d) ON c IS NOT DISTINCT FROM d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c = d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c <> d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c < d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c <= d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c > d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c >= d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c IS DISTINCT FROM d; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c IS NOT DISTINCT FROM d; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/mark/residual_predicate.test b/parser/testdata/corpus/sql/join/mark/residual_predicate.test new file mode 100644 index 0000000..234006a --- /dev/null +++ b/parser/testdata/corpus/sql/join/mark/residual_predicate.test @@ -0,0 +1,45 @@ +# source: test/sql/join/mark/residual_predicate.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET nested_loop_join_threshold=10000; +-- +ok +== +CREATE OR REPLACE TABLE residual_probe(a INTEGER); +-- +ok +== +INSERT INTO residual_probe VALUES (NULL),(0),(1),(3); +-- +ok +== +CREATE OR REPLACE TABLE residual_build(b INTEGER); +-- +ok +== +INSERT INTO residual_build VALUES (2),(NULL),(2); +-- +ok +== +SELECT a FROM residual_probe JOIN BY (TYPE SEMI) residual_build ON a ANY (SELECT row(1,2)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/natural/natural_join.test b/parser/testdata/corpus/sql/join/natural/natural_join.test index 4ad918d..1dcb141 100644 --- a/parser/testdata/corpus/sql/join/natural/natural_join.test +++ b/parser/testdata/corpus/sql/join/natural/natural_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/natural/natural_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 (a INTEGER, c INTEGER) @@ -82,6 +82,10 @@ select * from (values (1)) tbl(a) natural join (values (1), (2)) tbl2(b) order b -- ok == +SELECT * FROM (VALUES (1, 2)) l(a, b) NATURAL JOIN (VALUES (3, 4)) r(c, d) +-- +ok +== select * from (values (1)) tbl(a) natural join (values (1)) tbl2(a) natural join (values (1)) tbl3(a) natural join (values (1)) tbl4(a) natural join (values (1)) tbl5(a) -- diff --git a/parser/testdata/corpus/sql/join/nearest/nearest_basic.test b/parser/testdata/corpus/sql/join/nearest/nearest_basic.test index ce1d33b..1dcbe12 100644 --- a/parser/testdata/corpus/sql/join/nearest/nearest_basic.test +++ b/parser/testdata/corpus/sql/join/nearest/nearest_basic.test @@ -1,6 +1,6 @@ # source: test/sql/join/nearest/nearest_basic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE users(user_id INT, name VARCHAR, embedding FLOAT[3]); diff --git a/parser/testdata/corpus/sql/join/nearest/nearest_errors.test b/parser/testdata/corpus/sql/join/nearest/nearest_errors.test index 6f3eeff..9557b2a 100644 --- a/parser/testdata/corpus/sql/join/nearest/nearest_errors.test +++ b/parser/testdata/corpus/sql/join/nearest/nearest_errors.test @@ -1,6 +1,6 @@ # source: test/sql/join/nearest/nearest_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE u(e FLOAT[3]); diff --git a/parser/testdata/corpus/sql/join/nearest/nearest_parser.test b/parser/testdata/corpus/sql/join/nearest/nearest_parser.test index c8a8377..9c9c65e 100644 --- a/parser/testdata/corpus/sql/join/nearest/nearest_parser.test +++ b/parser/testdata/corpus/sql/join/nearest/nearest_parser.test @@ -1,6 +1,6 @@ # source: test/sql/join/nearest/nearest_parser.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nearest(approx INT, exact INT, distance INT, similarity INT); diff --git a/parser/testdata/corpus/sql/join/nearest/nearest_storage.test b/parser/testdata/corpus/sql/join/nearest/nearest_storage.test index 0b7adbc..fc80b97 100644 --- a/parser/testdata/corpus/sql/join/nearest/nearest_storage.test +++ b/parser/testdata/corpus/sql/join/nearest/nearest_storage.test @@ -1,6 +1,6 @@ # source: test/sql/join/nearest/nearest_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/nearest_latest.db' AS latest_db (STORAGE_VERSION 'latest'); diff --git a/parser/testdata/corpus/sql/join/non_inner_decorrelation_regressions.test b/parser/testdata/corpus/sql/join/non_inner_decorrelation_regressions.test index 6eaa68c..48be410 100644 --- a/parser/testdata/corpus/sql/join/non_inner_decorrelation_regressions.test +++ b/parser/testdata/corpus/sql/join/non_inner_decorrelation_regressions.test @@ -1,6 +1,6 @@ # source: test/sql/join/non_inner_decorrelation_regressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT l.a, r.b, (SELECT l.a + r.b) AS z @@ -331,7 +331,3 @@ ORDER BY ALL; -- ok == -PRAGMA disable_optimizer; --- -ok -== diff --git a/parser/testdata/corpus/sql/join/non_inner_join_subquery.test b/parser/testdata/corpus/sql/join/non_inner_join_subquery.test index f2b0d3d..d1a77dc 100644 --- a/parser/testdata/corpus/sql/join/non_inner_join_subquery.test +++ b/parser/testdata/corpus/sql/join/non_inner_join_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/join/non_inner_join_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE non_inner_l(i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/join/non_inner_join_subquery_binding.test b/parser/testdata/corpus/sql/join/non_inner_join_subquery_binding.test index 46522cc..1d8cfd7 100644 --- a/parser/testdata/corpus/sql/join/non_inner_join_subquery_binding.test +++ b/parser/testdata/corpus/sql/join/non_inner_join_subquery_binding.test @@ -1,6 +1,6 @@ # source: test/sql/join/non_inner_join_subquery_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * diff --git a/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery.test b/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery.test index 171f7a6..aa0c0b6 100644 --- a/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery.test +++ b/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/join/pair_dependent_full_outer_join_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pair_l(a INTEGER, x INTEGER); @@ -484,10 +484,6 @@ ORDER BY ALL; -- ok == -PRAGMA enable_optimizer; --- -ok -== CREATE TABLE pair_l_order(a INTEGER, x INTEGER); -- ok diff --git a/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_bindings.test b/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_bindings.test index c80081b..9c27179 100644 --- a/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_bindings.test +++ b/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_bindings.test @@ -1,6 +1,6 @@ # source: test/sql/join/pair_dependent_full_outer_join_subquery_bindings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pair_multi_l(a INTEGER); diff --git a/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_cte.test b/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_cte.test index 1ed9cbd..f2f8ba6 100644 --- a/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_cte.test +++ b/parser/testdata/corpus/sql/join/pair_dependent_full_outer_join_subquery_cte.test @@ -1,6 +1,6 @@ # source: test/sql/join/pair_dependent_full_outer_join_subquery_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE pair_prepared_full AS diff --git a/parser/testdata/corpus/sql/join/pair_dependent_join_subquery.test b/parser/testdata/corpus/sql/join/pair_dependent_join_subquery.test index 7d1ba78..d2f06d0 100644 --- a/parser/testdata/corpus/sql/join/pair_dependent_join_subquery.test +++ b/parser/testdata/corpus/sql/join/pair_dependent_join_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/join/pair_dependent_join_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT l.a, l.x, r.b diff --git a/parser/testdata/corpus/sql/join/pair_dependent_outer_reference_subquery.test b/parser/testdata/corpus/sql/join/pair_dependent_outer_reference_subquery.test index 77603fc..c372aa0 100644 --- a/parser/testdata/corpus/sql/join/pair_dependent_outer_reference_subquery.test +++ b/parser/testdata/corpus/sql/join/pair_dependent_outer_reference_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/join/pair_dependent_outer_reference_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT outer_l.x, q.a, q.b diff --git a/parser/testdata/corpus/sql/join/pair_dependent_right_semi_anti.test b/parser/testdata/corpus/sql/join/pair_dependent_right_semi_anti.test new file mode 100644 index 0000000..86c8de4 --- /dev/null +++ b/parser/testdata/corpus/sql/join/pair_dependent_right_semi_anti.test @@ -0,0 +1,21 @@ +# source: test/sql/join/pair_dependent_right_semi_anti.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT r.b +FROM (VALUES (1), (2)) l(a) +JOIN BY (TYPE RIGHT_SEMI) (VALUES (1), (3)) r(b) +ON EXISTS (SELECT 1 WHERE l.a = r.b) +ORDER BY r.b; +-- +ok +== +SELECT r.b +FROM (VALUES (1), (2)) l(a) +JOIN BY (TYPE RIGHT_ANTI) (VALUES (1), (3)) r(b) +ON EXISTS (SELECT 1 WHERE l.a = r.b) +ORDER BY r.b; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/pair_dependent_volatile_subquery.test b/parser/testdata/corpus/sql/join/pair_dependent_volatile_subquery.test index f79d975..00a74e8 100644 --- a/parser/testdata/corpus/sql/join/pair_dependent_volatile_subquery.test +++ b/parser/testdata/corpus/sql/join/pair_dependent_volatile_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/join/pair_dependent_volatile_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET disabled_optimizers='filter_pullup'; diff --git a/parser/testdata/corpus/sql/join/positional/issue20086.test b/parser/testdata/corpus/sql/join/positional/issue20086.test index 1c805b1..40a7444 100644 --- a/parser/testdata/corpus/sql/join/positional/issue20086.test +++ b/parser/testdata/corpus/sql/join/positional/issue20086.test @@ -1,6 +1,6 @@ # source: test/sql/join/positional/issue20086.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE UNIQUE INDEX t0i0 ON t0(c0, c1); diff --git a/parser/testdata/corpus/sql/join/positional/test_positional_join.test b/parser/testdata/corpus/sql/join/positional/test_positional_join.test index d0574b2..913921c 100644 --- a/parser/testdata/corpus/sql/join/positional/test_positional_join.test +++ b/parser/testdata/corpus/sql/join/positional/test_positional_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/positional/test_positional_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE two (a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/join/pushdown/pushdown_generated_columns.test b/parser/testdata/corpus/sql/join/pushdown/pushdown_generated_columns.test index c96ad12..09970f4 100644 --- a/parser/testdata/corpus/sql/join/pushdown/pushdown_generated_columns.test +++ b/parser/testdata/corpus/sql/join/pushdown/pushdown_generated_columns.test @@ -1,6 +1,6 @@ # source: test/sql/join/pushdown/pushdown_generated_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO unit2 SELECT i, 20 FROM range(1000) t(i); diff --git a/parser/testdata/corpus/sql/join/pushdown/pushdown_join_types.test b/parser/testdata/corpus/sql/join/pushdown/pushdown_join_types.test index 420ccea..e29e5bd 100644 --- a/parser/testdata/corpus/sql/join/pushdown/pushdown_join_types.test +++ b/parser/testdata/corpus/sql/join/pushdown/pushdown_join_types.test @@ -1,6 +1,6 @@ # source: test/sql/join/pushdown/pushdown_join_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT CASE WHEN i%2=0 THEN NULL ELSE i END i FROM range(1000) t(i) diff --git a/parser/testdata/corpus/sql/join/pushdown/pushdown_many_joins.test b/parser/testdata/corpus/sql/join/pushdown/pushdown_many_joins.test index e14f014..46af8a2 100644 --- a/parser/testdata/corpus/sql/join/pushdown/pushdown_many_joins.test +++ b/parser/testdata/corpus/sql/join/pushdown/pushdown_many_joins.test @@ -1,6 +1,6 @@ # source: test/sql/join/pushdown/pushdown_many_joins.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigtbl AS SELECT i%2 AS small_key, i%10 AS medium_key, i AS val FROM range(10000) t(i) ORDER BY small_key, medium_key diff --git a/parser/testdata/corpus/sql/join/right_outer/right_join_complex_null.test b/parser/testdata/corpus/sql/join/right_outer/right_join_complex_null.test index 10d69c9..bd84331 100644 --- a/parser/testdata/corpus/sql/join/right_outer/right_join_complex_null.test +++ b/parser/testdata/corpus/sql/join/right_outer/right_join_complex_null.test @@ -1,6 +1,6 @@ # source: test/sql/join/right_outer/right_join_complex_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c0 DATE, PRIMARY KEY(c0)); diff --git a/parser/testdata/corpus/sql/join/right_outer/test_right_join_filter_pushdown.test b/parser/testdata/corpus/sql/join/right_outer/test_right_join_filter_pushdown.test index 2f93db7..03b9cf4 100644 --- a/parser/testdata/corpus/sql/join/right_outer/test_right_join_filter_pushdown.test +++ b/parser/testdata/corpus/sql/join/right_outer/test_right_join_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/right_outer/test_right_join_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE left_table (id INTEGER, val INTEGER); diff --git a/parser/testdata/corpus/sql/join/right_outer/test_right_outer.test b/parser/testdata/corpus/sql/join/right_outer/test_right_outer.test index 3580592..287c0f9 100644 --- a/parser/testdata/corpus/sql/join/right_outer/test_right_outer.test +++ b/parser/testdata/corpus/sql/join/right_outer/test_right_outer.test @@ -1,6 +1,6 @@ # source: test/sql/join/right_outer/test_right_outer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT integers.*, integers2.* FROM integers2 RIGHT OUTER JOIN integers ON integers.i=integers2.k ORDER BY i diff --git a/parser/testdata/corpus/sql/join/semianti/10406-anti-on-ints-strings.test b/parser/testdata/corpus/sql/join/semianti/10406-anti-on-ints-strings.test index e25441e..0986e64 100644 --- a/parser/testdata/corpus/sql/join/semianti/10406-anti-on-ints-strings.test +++ b/parser/testdata/corpus/sql/join/semianti/10406-anti-on-ints-strings.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/10406-anti-on-ints-strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test_str(k varchar); diff --git a/parser/testdata/corpus/sql/join/semianti/antijoin.test b/parser/testdata/corpus/sql/join/semianti/antijoin.test index 36da911..67ce44a 100644 --- a/parser/testdata/corpus/sql/join/semianti/antijoin.test +++ b/parser/testdata/corpus/sql/join/semianti/antijoin.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/antijoin.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE left_table (a INTEGER, b INTEGER, c INTEGER); diff --git a/parser/testdata/corpus/sql/join/semianti/constant_comparison_join.test b/parser/testdata/corpus/sql/join/semianti/constant_comparison_join.test new file mode 100644 index 0000000..ac2b431 --- /dev/null +++ b/parser/testdata/corpus/sql/join/semianti/constant_comparison_join.test @@ -0,0 +1,61 @@ +# source: test/sql/join/semianti/constant_comparison_join.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE OR REPLACE TABLE left_input(i INTEGER); +-- +ok +== +INSERT INTO left_input VALUES (1),(2),(2),(NULL); +-- +ok +== +CREATE OR REPLACE TABLE right_input(i INTEGER); +-- +ok +== +INSERT INTO right_input VALUES (1),(3),(3),(NULL); +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_SEMI) right_input r ON l.i=1; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_ANTI) right_input r ON l.i=1; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_SEMI) right_input r ON 1=r.i; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_ANTI) right_input r ON r.i=1; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_SEMI) right_input r ON NULL::INTEGER=l.i; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_ANTI) right_input r ON NULL::INTEGER=l.i; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_SEMI) right_input r ON r.i IS NOT DISTINCT FROM NULL; +-- +ok +== +SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_ANTI) right_input r ON r.i IS NOT DISTINCT FROM NULL; +-- +ok +== +DELETE FROM left_input; +-- +ok +== +DELETE FROM right_input; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/semianti/mix_equality_inequality.test b/parser/testdata/corpus/sql/join/semianti/mix_equality_inequality.test index 839638f..fa70f82 100644 --- a/parser/testdata/corpus/sql/join/semianti/mix_equality_inequality.test +++ b/parser/testdata/corpus/sql/join/semianti/mix_equality_inequality.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/mix_equality_inequality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte1 AS MATERIALIZED ( diff --git a/parser/testdata/corpus/sql/join/semianti/plan_blockwise_NL_join_with_mutliple_conditions.test b/parser/testdata/corpus/sql/join/semianti/plan_blockwise_NL_join_with_mutliple_conditions.test index 967f694..fd495b8 100644 --- a/parser/testdata/corpus/sql/join/semianti/plan_blockwise_NL_join_with_mutliple_conditions.test +++ b/parser/testdata/corpus/sql/join/semianti/plan_blockwise_NL_join_with_mutliple_conditions.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/plan_blockwise_NL_join_with_mutliple_conditions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select * from values (1, 2), (2, 4), (3, 8), (6, 25), (1, 25) t(a, b); diff --git a/parser/testdata/corpus/sql/join/semianti/right_anti.test b/parser/testdata/corpus/sql/join/semianti/right_anti.test index 9d015a9..27a4ca6 100644 --- a/parser/testdata/corpus/sql/join/semianti/right_anti.test +++ b/parser/testdata/corpus/sql/join/semianti/right_anti.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/right_anti.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET profiling_renderer_settings = MAP {'expand_all': 'true'}; diff --git a/parser/testdata/corpus/sql/join/semianti/right_semi.test b/parser/testdata/corpus/sql/join/semianti/right_semi.test index 4c83358..67025d1 100644 --- a/parser/testdata/corpus/sql/join/semianti/right_semi.test +++ b/parser/testdata/corpus/sql/join/semianti/right_semi.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/right_semi.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO left_table VALUES (41, 1, 1), (42, 1, 1), (42, 1, 1), (43, 1, 1), (45, 2, 2), (46, 7, 7); diff --git a/parser/testdata/corpus/sql/join/semianti/semijoin.test b/parser/testdata/corpus/sql/join/semianti/semijoin.test index 004bebb..d23956f 100644 --- a/parser/testdata/corpus/sql/join/semianti/semijoin.test +++ b/parser/testdata/corpus/sql/join/semianti/semijoin.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/semijoin.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM left_table SEMI JOIN right_table ON left_table.a = right_table.a; diff --git a/parser/testdata/corpus/sql/join/semianti/test_semianti_join_filter_pushdown.test b/parser/testdata/corpus/sql/join/semianti/test_semianti_join_filter_pushdown.test index 09db8f6..9d63ca9 100644 --- a/parser/testdata/corpus/sql/join/semianti/test_semianti_join_filter_pushdown.test +++ b/parser/testdata/corpus/sql/join/semianti/test_semianti_join_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/test_semianti_join_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE empty_table (id INTEGER, category INTEGER); diff --git a/parser/testdata/corpus/sql/join/semianti/test_simple_anti_join.test b/parser/testdata/corpus/sql/join/semianti/test_simple_anti_join.test index ce5408d..3db4190 100644 --- a/parser/testdata/corpus/sql/join/semianti/test_simple_anti_join.test +++ b/parser/testdata/corpus/sql/join/semianti/test_simple_anti_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/semianti/test_simple_anti_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c1 VARCHAR); diff --git a/parser/testdata/corpus/sql/join/set_operators/test_set_operator_reordering_with_delim_joins.test b/parser/testdata/corpus/sql/join/set_operators/test_set_operator_reordering_with_delim_joins.test index 9e8ecf6..5490d6f 100644 --- a/parser/testdata/corpus/sql/join/set_operators/test_set_operator_reordering_with_delim_joins.test +++ b/parser/testdata/corpus/sql/join/set_operators/test_set_operator_reordering_with_delim_joins.test @@ -1,6 +1,6 @@ # source: test/sql/join/set_operators/test_set_operator_reordering_with_delim_joins.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table xx as select w from (values ('a'),('b'),('c'),('d'),('e')) t(w); diff --git a/parser/testdata/corpus/sql/join/test_between_null_bound_join.test b/parser/testdata/corpus/sql/join/test_between_null_bound_join.test new file mode 100644 index 0000000..042824e --- /dev/null +++ b/parser/testdata/corpus/sql/join/test_between_null_bound_join.test @@ -0,0 +1,84 @@ +# source: test/sql/join/test_between_null_bound_join.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t0(c0 BOOLEAN, c1 INT, c2 INT); +-- +ok +== +INSERT INTO t0 SELECT false, r, NULL FROM range(1, 23) t(r); +-- +ok +== +INSERT INTO t0 VALUES (false, 23, -1); +-- +ok +== +SELECT count(*) FROM t0 RIGHT JOIN (SELECT 1 FROM range(100)) s + ON ((EXISTS (SELECT 1 FROM t0 WHERE t0.c2 < 0)) NOT BETWEEN (t0.c2 = t0.c1) AND t0.c0); +-- +ok +== +SELECT count(*) FROM t0 RIGHT JOIN (SELECT 1 FROM range(10)) s + ON ((EXISTS (SELECT 1 FROM t0 WHERE t0.c2 < 0)) NOT BETWEEN (t0.c2 = t0.c1) AND t0.c0); +-- +ok +== +SELECT ((EXISTS (SELECT 1)) BETWEEN NULL::BOOLEAN AND false) AS b, ((EXISTS (SELECT 1)) BETWEEN NULL::BOOLEAN AND false) IS NULL; +-- +ok +== +SELECT ((EXISTS (SELECT 1)) NOT BETWEEN NULL::BOOLEAN AND false); +-- +ok +== +CREATE TABLE tt(x INT, l INT, u INT); +-- +ok +== +INSERT INTO tt VALUES (10, NULL, 5), (10, 20, 50), (NULL, 20, 50), (10, NULL, 50); +-- +ok +== +SELECT x, l, u, (CASE WHEN random() < 2 THEN x ELSE x END) BETWEEN l AND u FROM tt ORDER BY ALL; +-- +ok +== +CREATE TABLE t1(c0 BOOLEAN, c1 INT, c2 INT, PRIMARY KEY(c1)); +-- +ok +== +CREATE UNIQUE INDEX i0 ON t1 (c1); +-- +ok +== +CREATE UNIQUE INDEX i1 ON t1 (c1); +-- +ok +== +INSERT INTO t1(c1, c0) VALUES ({i} * 2 + 1, false), ({i} * 2 + 2, false); +-- +error: Parser Error: syntax error at or near "}" +== +INSERT INTO t1(c1, c0, c2) VALUES (23, false, -1); +-- +ok +== +SELECT count(*) FROM ( + SELECT 1 FROM t1 RIGHT JOIN (SELECT 1 AS col0 FROM t1) AS sub0 + ON ((EXISTS (SELECT 1 FROM t1 WHERE t1.c2 < 0)) NOT BETWEEN (t1.c2 = t1.c1) AND t1.c0) +) x; +-- +ok +== +SELECT count(*) FROM ( + SELECT 1 FROM t1 RIGHT JOIN (SELECT 1 AS col0 FROM t1) AS sub0 + ON ((EXISTS (SELECT 1 FROM t1 WHERE t1.c2 < 0)) NOT BETWEEN (t1.c2 = t1.c1) AND t1.c0) + UNION ALL + SELECT 1 FROM t1 RIGHT JOIN (SELECT 1 AS col0 FROM t1) AS sub0 + ON ((EXISTS (SELECT 1 FROM t1 WHERE t1.c2 < 0)) NOT BETWEEN (t1.c2 = t1.c1) AND t1.c0) +) x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/test_complex_join_expr.test b/parser/testdata/corpus/sql/join/test_complex_join_expr.test index e17b6d1..8c564f1 100644 --- a/parser/testdata/corpus/sql/join/test_complex_join_expr.test +++ b/parser/testdata/corpus/sql/join/test_complex_join_expr.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_complex_join_expr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (4, 1), (2, 2) diff --git a/parser/testdata/corpus/sql/join/test_complex_range_join.test b/parser/testdata/corpus/sql/join/test_complex_range_join.test index 1b8d341..8a7ed39 100644 --- a/parser/testdata/corpus/sql/join/test_complex_range_join.test +++ b/parser/testdata/corpus/sql/join/test_complex_range_join.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_complex_range_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH lhs(i, j, k) AS (VALUES diff --git a/parser/testdata/corpus/sql/join/test_join_always_true_conditions.test b/parser/testdata/corpus/sql/join/test_join_always_true_conditions.test index e2a1a91..180eed6 100644 --- a/parser/testdata/corpus/sql/join/test_join_always_true_conditions.test +++ b/parser/testdata/corpus/sql/join/test_join_always_true_conditions.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_join_always_true_conditions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO left_table VALUES (1, 10), (2, 20); diff --git a/parser/testdata/corpus/sql/join/test_join_by.test b/parser/testdata/corpus/sql/join/test_join_by.test index 0e6d4cf..1d6f6a2 100644 --- a/parser/testdata/corpus/sql/join/test_join_by.test +++ b/parser/testdata/corpus/sql/join/test_join_by.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_join_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(a INTEGER); diff --git a/parser/testdata/corpus/sql/join/test_join_on_aggregates.test b/parser/testdata/corpus/sql/join/test_join_on_aggregates.test index b87f5cf..27beea1 100644 --- a/parser/testdata/corpus/sql/join/test_join_on_aggregates.test +++ b/parser/testdata/corpus/sql/join/test_join_on_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_join_on_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (SELECT SUM(i) AS x FROM integers) a, (SELECT SUM(i) AS x FROM integers) b WHERE a.x=b.x; diff --git a/parser/testdata/corpus/sql/join/test_merge_join_predicate.test b/parser/testdata/corpus/sql/join/test_merge_join_predicate.test index 8637045..2026569 100644 --- a/parser/testdata/corpus/sql/join/test_merge_join_predicate.test +++ b/parser/testdata/corpus/sql/join/test_merge_join_predicate.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_merge_join_predicate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit explain @@ -69,3 +69,55 @@ order by all -- ok == +create or replace table tleft(c0 INTEGER, c2 BOOLEAN); +-- +ok +== +create table tright(c0 INTEGER, c1 BOOLEAN); +-- +ok +== +insert into tleft values (1, false), (0, true); +-- +ok +== +insert into tright values (-1, false), (-1, false), (2, false); +-- +ok +== +set disabled_optimizers = 'build_side_probe_side'; +-- +ok +== +set nested_loop_join_threshold = 0; +-- +ok +== +explain +select l.c2 +from tleft l +left join tright r +on l.c0 >= r.c0 +and l.c2 != r.c1 +and l.c2 +-- +ok +== +select l.c2 +from tleft l +left join tright r +on l.c0 >= r.c0 +and l.c2 != r.c1 +and l.c2 +order by 1 +-- +ok +== +reset disabled_optimizers; +-- +ok +== +reset nested_loop_join_threshold; +-- +ok +== diff --git a/parser/testdata/corpus/sql/join/test_nested_inequality.test b/parser/testdata/corpus/sql/join/test_nested_inequality.test index 19c51eb..101709f 100644 --- a/parser/testdata/corpus/sql/join/test_nested_inequality.test +++ b/parser/testdata/corpus/sql/join/test_nested_inequality.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_nested_inequality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW list_int AS diff --git a/parser/testdata/corpus/sql/join/test_predicate_binding.test b/parser/testdata/corpus/sql/join/test_predicate_binding.test index 9a0191a..29035de 100644 --- a/parser/testdata/corpus/sql/join/test_predicate_binding.test +++ b/parser/testdata/corpus/sql/join/test_predicate_binding.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_predicate_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE b (id BIGINT, name VARCHAR, created_at VARCHAR); diff --git a/parser/testdata/corpus/sql/join/test_string_payload.test b/parser/testdata/corpus/sql/join/test_string_payload.test index 4c82080..374381a 100644 --- a/parser/testdata/corpus/sql/join/test_string_payload.test +++ b/parser/testdata/corpus/sql/join/test_string_payload.test @@ -1,6 +1,6 @@ # source: test/sql/join/test_string_payload.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test1 (i INT, s1 VARCHAR, s2 VARCHAR) diff --git a/parser/testdata/corpus/sql/json/copy_geojson.test b/parser/testdata/corpus/sql/json/copy_geojson.test index 75d9a34..0b1425d 100644 --- a/parser/testdata/corpus/sql/json/copy_geojson.test +++ b/parser/testdata/corpus/sql/json/copy_geojson.test @@ -1,6 +1,6 @@ # source: test/sql/json/copy_geojson.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE places (id INTEGER, name VARCHAR, geom GEOMETRY); diff --git a/parser/testdata/corpus/sql/json/copy_json_null_options.test b/parser/testdata/corpus/sql/json/copy_json_null_options.test index 42ec32e..966b464 100644 --- a/parser/testdata/corpus/sql/json/copy_json_null_options.test +++ b/parser/testdata/corpus/sql/json/copy_json_null_options.test @@ -1,6 +1,6 @@ # source: test/sql/json/copy_json_null_options.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT 1 AS a) TO '{TEST_DIR}/test_null_use_tmp_file.csv' (FORMAT CSV, use_tmp_file NULL); diff --git a/parser/testdata/corpus/sql/json/copy_json_partition_by.test b/parser/testdata/corpus/sql/json/copy_json_partition_by.test index 4395bb9..74e7c24 100644 --- a/parser/testdata/corpus/sql/json/copy_json_partition_by.test +++ b/parser/testdata/corpus/sql/json/copy_json_partition_by.test @@ -1,6 +1,6 @@ # source: test/sql/json/copy_json_partition_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i AS part, 'v' || i AS val FROM range(2) t(i)) diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue1035.test b/parser/testdata/corpus/sql/json/issues/internal_issue1035.test new file mode 100644 index 0000000..f9bf896 --- /dev/null +++ b/parser/testdata/corpus/sql/json/issues/internal_issue1035.test @@ -0,0 +1,33 @@ +# source: test/sql/json/issues/internal_issue1035.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json(json_deep_merge(x, x)) = json(x) +FROM (SELECT repeat('{"a":', 20000) || '1' || repeat('}', 20000) AS x) +-- +ok +== +SELECT json_merge_patch_diff( + (repeat('{"a":', 200000) || '1' || repeat('}', 200000))::JSON, + (repeat('{"a":', 200000) || '1' || repeat('}', 200000))::JSON +) +-- +ok +== +SELECT length( + json_normalize( + (repeat('{"a":', 200000) || '1' || repeat('}', 200000))::JSON + ) +) +-- +ok +== +SELECT length( + json_strip_nulls( + (repeat('{"a":', 200000) || '1' || repeat('}', 200000))::JSON + ) +) +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue2732.test b/parser/testdata/corpus/sql/json/issues/internal_issue2732.test index b5a63b6..2bdabc9 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue2732.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue2732.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue2732.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_json('{DATA_DIR}/json/internal_2732.json', map_inference_threshold=0); diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue3146.test b/parser/testdata/corpus/sql/json/issues/internal_issue3146.test index 5dbcde3..6cfe357 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue3146.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue3146.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue3146.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT '{}') TO '{TEST_DIR}/empty_object.json' (FORMAT CSV, HEADER FALSE) diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue3197.test b/parser/testdata/corpus/sql/json/issues/internal_issue3197.test index 3fd823e..d9223d6 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue3197.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue3197.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue3197.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from '{DATA_DIR}/json/internal_3197.json' diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue391.test b/parser/testdata/corpus/sql/json/issues/internal_issue391.test index b06fb57..dd937b2 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue391.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue391.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue391.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select {i: range}::JSON j from range(10) diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue4014.test b/parser/testdata/corpus/sql/json/issues/internal_issue4014.test index 2c914df..bbe06d9 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue4014.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue4014.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue4014.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_json('{DATA_DIR}/json/internal_4014.json', map_inference_threshold=0); diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue4389.test b/parser/testdata/corpus/sql/json/issues/internal_issue4389.test index 69fd017..df7c797 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue4389.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue4389.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue4389.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE todos (userId UBIGINT, id UBIGINT, title VARCHAR, completed BOOLEAN); diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue4403.test b/parser/testdata/corpus/sql/json/issues/internal_issue4403.test index baeaeec..12a3fd2 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue4403.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue4403.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue4403.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_json('{DATA_DIR}/json/example_n.ndjson', columns={id: NULL::VARCHAR, name: NULL::VARCHAR}) diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue4794.test b/parser/testdata/corpus/sql/json/issues/internal_issue4794.test index 912af3b..cf939fb 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue4794.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue4794.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue4794.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM read_json('{DATA_DIR}/json/format_string_key.json'); diff --git a/parser/testdata/corpus/sql/json/issues/internal_issue5288.test b/parser/testdata/corpus/sql/json/issues/internal_issue5288.test index 648f1be..376c7d0 100644 --- a/parser/testdata/corpus/sql/json/issues/internal_issue5288.test +++ b/parser/testdata/corpus/sql/json/issues/internal_issue5288.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/internal_issue5288.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table foo2 (bar JSON using compression 'zstd'); diff --git a/parser/testdata/corpus/sql/json/issues/issue10751and11152.test b/parser/testdata/corpus/sql/json/issues/issue10751and11152.test index 2ad6bb9..08a78be 100644 --- a/parser/testdata/corpus/sql/json/issues/issue10751and11152.test +++ b/parser/testdata/corpus/sql/json/issues/issue10751and11152.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue10751and11152.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table json_test as select * from read_json_auto('{DATA_DIR}/json/10751.json', format = 'newline_delimited'); diff --git a/parser/testdata/corpus/sql/json/issues/issue10784.test b/parser/testdata/corpus/sql/json/issues/issue10784.test index 2bd946f..6d400ce 100644 --- a/parser/testdata/corpus/sql/json/issues/issue10784.test +++ b/parser/testdata/corpus/sql/json/issues/issue10784.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue10784.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_json_auto('{DATA_DIR}/json/arr.json', columns={'v':'VARCHAR','k':'VARCHAR'}); diff --git a/parser/testdata/corpus/sql/json/issues/issue10866.test b/parser/testdata/corpus/sql/json/issues/issue10866.test index c08827a..d9ed516 100644 --- a/parser/testdata/corpus/sql/json/issues/issue10866.test +++ b/parser/testdata/corpus/sql/json/issues/issue10866.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue10866.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select '{"col": 277447099861456945273576150847928801582}') to '{TEST_DIR}/10866.json' (format csv, quote '', header 0) diff --git a/parser/testdata/corpus/sql/json/issues/issue11804.test b/parser/testdata/corpus/sql/json/issues/issue11804.test index efaba65..83bce1e 100644 --- a/parser/testdata/corpus/sql/json/issues/issue11804.test +++ b/parser/testdata/corpus/sql/json/issues/issue11804.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue11804.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_type(JSON 'null') = 'NULL'; diff --git a/parser/testdata/corpus/sql/json/issues/issue12188.test b/parser/testdata/corpus/sql/json/issues/issue12188.test index c2375ca..a5308f1 100644 --- a/parser/testdata/corpus/sql/json/issues/issue12188.test +++ b/parser/testdata/corpus/sql/json/issues/issue12188.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue12188.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(field1), typeof(field2) FROM '{DATA_DIR}/parquet-testing/parquet_with_json.parquet' LIMIT 1 diff --git a/parser/testdata/corpus/sql/json/issues/issue12861.test b/parser/testdata/corpus/sql/json/issues/issue12861.test index 5047c3d..a5ec523 100644 --- a/parser/testdata/corpus/sql/json/issues/issue12861.test +++ b/parser/testdata/corpus/sql/json/issues/issue12861.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue12861.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (test struct(one bigint, two varchar)); diff --git a/parser/testdata/corpus/sql/json/issues/issue13212.test b/parser/testdata/corpus/sql/json/issues/issue13212.test index 261bd71..2dae39c 100644 --- a/parser/testdata/corpus/sql/json/issues/issue13212.test +++ b/parser/testdata/corpus/sql/json/issues/issue13212.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue13212.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select range::int64 as id, range::varchar as name from range(0)) to '{TEST_DIR}/t1.json.gz' (format json, compression gzip) diff --git a/parser/testdata/corpus/sql/json/issues/issue13725.test b/parser/testdata/corpus/sql/json/issues/issue13725.test index 6786896..c19dacb 100644 --- a/parser/testdata/corpus/sql/json/issues/issue13725.test +++ b/parser/testdata/corpus/sql/json/issues/issue13725.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue13725.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * diff --git a/parser/testdata/corpus/sql/json/issues/issue13948.test b/parser/testdata/corpus/sql/json/issues/issue13948.test index 9babb22..ab3dc62 100644 --- a/parser/testdata/corpus/sql/json/issues/issue13948.test +++ b/parser/testdata/corpus/sql/json/issues/issue13948.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue13948.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{"Status / SubStatus": "test"}' -> 'Status / SubStatus'; diff --git a/parser/testdata/corpus/sql/json/issues/issue14167.test b/parser/testdata/corpus/sql/json/issues/issue14167.test index f7d4bb1..aa9e20f 100644 --- a/parser/testdata/corpus/sql/json/issues/issue14167.test +++ b/parser/testdata/corpus/sql/json/issues/issue14167.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue14167.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select columns.v4_c6 from read_ndjson_auto('{DATA_DIR}/json/14167.json'); diff --git a/parser/testdata/corpus/sql/json/issues/issue14245.test b/parser/testdata/corpus/sql/json/issues/issue14245.test index 2353c56..e04aef6 100644 --- a/parser/testdata/corpus/sql/json/issues/issue14245.test +++ b/parser/testdata/corpus/sql/json/issues/issue14245.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue14245.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{ "foo": ["bar", "baz"], "": 0 }' -> '/' diff --git a/parser/testdata/corpus/sql/json/issues/issue14259.test b/parser/testdata/corpus/sql/json/issues/issue14259.test index 438adc1..c59f068 100644 --- a/parser/testdata/corpus/sql/json/issues/issue14259.test +++ b/parser/testdata/corpus/sql/json/issues/issue14259.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue14259.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from '{DATA_DIR}/json/issue14259.json' diff --git a/parser/testdata/corpus/sql/json/issues/issue15038.test b/parser/testdata/corpus/sql/json/issues/issue15038.test index 764b417..5a0a4b3 100644 --- a/parser/testdata/corpus/sql/json/issues/issue15038.test +++ b/parser/testdata/corpus/sql/json/issues/issue15038.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue15038.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT to_json(1::HUGEINT << 100) diff --git a/parser/testdata/corpus/sql/json/issues/issue15601.test b/parser/testdata/corpus/sql/json/issues/issue15601.test index 92ce5b8..ee91b92 100644 --- a/parser/testdata/corpus/sql/json/issues/issue15601.test +++ b/parser/testdata/corpus/sql/json/issues/issue15601.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue15601.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/json/15601/fragment*.json' diff --git a/parser/testdata/corpus/sql/json/issues/issue16568.test b/parser/testdata/corpus/sql/json/issues/issue16568.test index 455066a..2391de4 100644 --- a/parser/testdata/corpus/sql/json/issues/issue16568.test +++ b/parser/testdata/corpus/sql/json/issues/issue16568.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue16568.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from '{DATA_DIR}/json/sample_utf8_bom.json' diff --git a/parser/testdata/corpus/sql/json/issues/issue16570.test b/parser/testdata/corpus/sql/json/issues/issue16570.test index b2f4f88..3a072ee 100644 --- a/parser/testdata/corpus/sql/json/issues/issue16570.test +++ b/parser/testdata/corpus/sql/json/issues/issue16570.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue16570.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with cte as ( diff --git a/parser/testdata/corpus/sql/json/issues/issue16684.test b/parser/testdata/corpus/sql/json/issues/issue16684.test index 03b7454..ffe59e1 100644 --- a/parser/testdata/corpus/sql/json/issues/issue16684.test +++ b/parser/testdata/corpus/sql/json/issues/issue16684.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue16684.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select '00000000000000000000000000000000' md5) to '{TEST_DIR}/issue16684.json' diff --git a/parser/testdata/corpus/sql/json/issues/issue16968.test b/parser/testdata/corpus/sql/json/issues/issue16968.test index 07423b1..53583a2 100644 --- a/parser/testdata/corpus/sql/json/issues/issue16968.test +++ b/parser/testdata/corpus/sql/json/issues/issue16968.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue16968.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select from_hex('aa')::json; diff --git a/parser/testdata/corpus/sql/json/issues/issue17135.test b/parser/testdata/corpus/sql/json/issues/issue17135.test index 0d1c9be..6163e48 100644 --- a/parser/testdata/corpus/sql/json/issues/issue17135.test +++ b/parser/testdata/corpus/sql/json/issues/issue17135.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue17135.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select * from (values ('{"id":9223372036854775808}'))) to '{TEST_DIR}/ubigint.json' (format csv, quote '', header 0) diff --git a/parser/testdata/corpus/sql/json/issues/issue18301.test b/parser/testdata/corpus/sql/json/issues/issue18301.test index fb8dc4f..2406532 100644 --- a/parser/testdata/corpus/sql/json/issues/issue18301.test +++ b/parser/testdata/corpus/sql/json/issues/issue18301.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue18301.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads = 2; diff --git a/parser/testdata/corpus/sql/json/issues/issue19357.test b/parser/testdata/corpus/sql/json/issues/issue19357.test index fefacbb..de6cd43 100644 --- a/parser/testdata/corpus/sql/json/issues/issue19357.test +++ b/parser/testdata/corpus/sql/json/issues/issue19357.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue19357.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TO_JSON({'key_1': 'one'}) AS WITHOUT_KEEP_NULL diff --git a/parser/testdata/corpus/sql/json/issues/issue19366.test b/parser/testdata/corpus/sql/json/issues/issue19366.test index 6a49d0b..8bbc965 100644 --- a/parser/testdata/corpus/sql/json/issues/issue19366.test +++ b/parser/testdata/corpus/sql/json/issues/issue19366.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue19366.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy ( diff --git a/parser/testdata/corpus/sql/json/issues/issue22764.test b/parser/testdata/corpus/sql/json/issues/issue22764.test index c7c4878..fba369d 100644 --- a/parser/testdata/corpus/sql/json/issues/issue22764.test +++ b/parser/testdata/corpus/sql/json/issues/issue22764.test @@ -1,11 +1,11 @@ # source: test/sql/json/issues/issue22764.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_deserialize_sql($json$ {"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[null,{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} $json$); -- -error: Parser Error: Error parsing json: null expression found in json +ok == diff --git a/parser/testdata/corpus/sql/json/issues/issue23114.test b/parser/testdata/corpus/sql/json/issues/issue23114.test index dd34d09..2717c44 100644 --- a/parser/testdata/corpus/sql/json/issues/issue23114.test +++ b/parser/testdata/corpus/sql/json/issues/issue23114.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue23114.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_object(CAST(NULL AS VARCHAR), 'two'); diff --git a/parser/testdata/corpus/sql/json/issues/issue25415.test b/parser/testdata/corpus/sql/json/issues/issue25415.test new file mode 100644 index 0000000..56a24fc --- /dev/null +++ b/parser/testdata/corpus/sql/json/issues/issue25415.test @@ -0,0 +1,70 @@ +# source: test/sql/json/issues/issue25415.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA disable_object_cache; +-- +ok +== +CREATE TABLE base AS +SELECT range::BIGINT AS id, + 'svc-' || (range % 97)::VARCHAR AS svc, + 'host-' || (range % 29)::VARCHAR AS host, + [{'k': 'n', 'v': (range % 500)::VARCHAR}, + {'k': 'ok', 'v': ((range % 2) = 0)::VARCHAR}] AS attrs, + {'code': (range % 3)::INT, 'msg': 'msg-' || (range % 13)::VARCHAR} AS status +FROM range(400000); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 0) TO '{TEST_DIR}/shard_0.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 1) TO '{TEST_DIR}/shard_1.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 2) TO '{TEST_DIR}/shard_2.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 3) TO '{TEST_DIR}/shard_3.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 4) TO '{TEST_DIR}/shard_4.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 5) TO '{TEST_DIR}/shard_5.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 6) TO '{TEST_DIR}/shard_6.ndjson' (FORMAT JSON); +-- +ok +== +COPY (SELECT * FROM base WHERE id % 8 = 7) TO '{TEST_DIR}/shard_7.ndjson' (FORMAT JSON); +-- +ok +== +CREATE TABLE out(j JSON); +-- +ok +== +INSERT INTO out +SELECT {'id': id, 'svc': svc, 'host': host, 'attrs': attrs, 'status': status}::JSON +FROM read_json('{TEST_DIR}/shard_*.ndjson', format='newline_delimited'); +-- +ok +== +SELECT count(*) FROM out; +-- +ok +== +SELECT count(*) FROM out WHERE json_valid(j); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/issues/issue27414.test b/parser/testdata/corpus/sql/json/issues/issue27414.test new file mode 100644 index 0000000..6661210 --- /dev/null +++ b/parser/testdata/corpus/sql/json/issues/issue27414.test @@ -0,0 +1,17 @@ +# source: test/sql/json/issues/issue27414.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT '2026-01-02 03:04:05' AS date, 'log text' AS log) TO '{TEST_DIR}/issue27414.json' (FORMAT json); +-- +ok +== +SELECT * FROM read_ndjson('{TEST_DIR}/issue27414.json', ignore_errors=true); +-- +ok +== +SELECT * FROM read_json('{TEST_DIR}/issue27414.json'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/issues/issue6722.test b/parser/testdata/corpus/sql/json/issues/issue6722.test index 9feacb6..0010fc6 100644 --- a/parser/testdata/corpus/sql/json/issues/issue6722.test +++ b/parser/testdata/corpus/sql/json/issues/issue6722.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue6722.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM '{DATA_DIR}/json/duplicate_column_names.json' diff --git a/parser/testdata/corpus/sql/json/issues/issue8695.test b/parser/testdata/corpus/sql/json/issues/issue8695.test index f3865c6..a907f81 100644 --- a/parser/testdata/corpus/sql/json/issues/issue8695.test +++ b/parser/testdata/corpus/sql/json/issues/issue8695.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/issue8695.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAX(JSON_ARRAY_LENGTH(filter_keystage))::int - 1 FROM read_json_auto('{DATA_DIR}/json/filter_keystage.ndjson'); diff --git a/parser/testdata/corpus/sql/json/issues/large_quoted_string_constant.test b/parser/testdata/corpus/sql/json/issues/large_quoted_string_constant.test index 42d467c..9a9c573 100644 --- a/parser/testdata/corpus/sql/json/issues/large_quoted_string_constant.test +++ b/parser/testdata/corpus/sql/json/issues/large_quoted_string_constant.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/large_quoted_string_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE j2 (id INT, json VARCHAR, src VARCHAR); diff --git a/parser/testdata/corpus/sql/json/issues/map_inference_threshold_internal_exception.test b/parser/testdata/corpus/sql/json/issues/map_inference_threshold_internal_exception.test index f29e321..ab9d3af 100644 --- a/parser/testdata/corpus/sql/json/issues/map_inference_threshold_internal_exception.test +++ b/parser/testdata/corpus/sql/json/issues/map_inference_threshold_internal_exception.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/map_inference_threshold_internal_exception.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_json('{DATA_DIR}/json/internal_3813.json', map_inference_threshold=10); diff --git a/parser/testdata/corpus/sql/json/issues/read_json_memory_usage.test b/parser/testdata/corpus/sql/json/issues/read_json_memory_usage.test index ed9d24e..76db451 100644 --- a/parser/testdata/corpus/sql/json/issues/read_json_memory_usage.test +++ b/parser/testdata/corpus/sql/json/issues/read_json_memory_usage.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/read_json_memory_usage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET memory_limit='200MiB'; diff --git a/parser/testdata/corpus/sql/json/issues/test_json_temp_8062.test b/parser/testdata/corpus/sql/json/issues/test_json_temp_8062.test index c0855ba..6ee5cb9 100644 --- a/parser/testdata/corpus/sql/json/issues/test_json_temp_8062.test +++ b/parser/testdata/corpus/sql/json/issues/test_json_temp_8062.test @@ -1,6 +1,6 @@ # source: test/sql/json/issues/test_json_temp_8062.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE j1(x json); diff --git a/parser/testdata/corpus/sql/json/scalar/json_nested_casts.test b/parser/testdata/corpus/sql/json/scalar/json_nested_casts.test index a5d7bc6..7901445 100644 --- a/parser/testdata/corpus/sql/json/scalar/json_nested_casts.test +++ b/parser/testdata/corpus/sql/json/scalar/json_nested_casts.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/json_nested_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t2(blobs json[]) diff --git a/parser/testdata/corpus/sql/json/scalar/json_to_map_invalid_keys.test b/parser/testdata/corpus/sql/json/scalar/json_to_map_invalid_keys.test new file mode 100644 index 0000000..bc8ca12 --- /dev/null +++ b/parser/testdata/corpus/sql/json/scalar/json_to_map_invalid_keys.test @@ -0,0 +1,37 @@ +# source: test/sql/json/scalar/json_to_map_invalid_keys.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT '{"a":1,"a":2}'::JSON::MAP(VARCHAR, INT); +-- +ok +== +SELECT TRY_CAST('{"a":1,"a":2}'::JSON AS MAP(VARCHAR, INT)); +-- +ok +== +SELECT TRY_CAST(j::JSON AS MAP(VARCHAR, INT)) FROM (VALUES ('{"a":1,"b":2}'), ('{"a":1,"a":2}'), ('{"c":3}')) t(j); +-- +ok +== +SELECT from_json('{"x":2}', '"MAP(INT,INT)"'); +-- +ok +== +SELECT from_json(j, '"MAP(INT,INT)"') FROM (VALUES ('{"1":2}'), ('{"x":2}'), ('{"3":4,"3":5}')) t(j); +-- +ok +== +SELECT from_json('{"x":2}', '"MAP(INT,INT)"')::MAP(BIGINT, INT); +-- +ok +== +SELECT json_transform_strict('{"x":2}', '"MAP(INT,INT)"'); +-- +ok +== +SELECT '{"a":1,"b":2}'::JSON::MAP(VARCHAR, INT); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/scalar/json_transform_case_insensitive_keys.test b/parser/testdata/corpus/sql/json/scalar/json_transform_case_insensitive_keys.test new file mode 100644 index 0000000..a639070 --- /dev/null +++ b/parser/testdata/corpus/sql/json/scalar/json_transform_case_insensitive_keys.test @@ -0,0 +1,21 @@ +# source: test/sql/json/scalar/json_transform_case_insensitive_keys.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_transform('{"a":1,"A":"x"}', '{"a":"UBIGINT","A":"VARCHAR"}'); +-- +ok +== +CREATE TABLE dt AS SELECT json_transform('{"a":1,"A":"x"}', '{"a":"UBIGINT","A":"VARCHAR"}') s; +-- +ok +== +SELECT from_json('{"x":{"b":1}}', '{"x":{"b":"INT","B":"INT"}}'); +-- +ok +== +SELECT json_transform('{"a":1,"b":"x"}', '{"a":"UBIGINT","b":"VARCHAR"}'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/scalar/test_geojson_cast.test b/parser/testdata/corpus/sql/json/scalar/test_geojson_cast.test index 1637b73..b09c06e 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_geojson_cast.test +++ b/parser/testdata/corpus/sql/json/scalar/test_geojson_cast.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_geojson_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ST_AsText('{"type":"Point","coordinates":[1,2]}'::JSON::GEOMETRY); diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_array_length.test b/parser/testdata/corpus/sql/json/scalar/test_json_array_length.test index 47efef9..6aa8716 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_array_length.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_array_length.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_array_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test (j varchar) @@ -43,3 +43,7 @@ SELECT json_array_length('{"one":[1,2,3]}', '$.two'); -- ok == +SELECT json_array_length('{"a":[1,2],"b":[],"c":42}', ['$.a', '$.b', '$.c', '$.missing']); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_arrow_expr.test b/parser/testdata/corpus/sql/json/scalar/test_json_arrow_expr.test index 51121af..f95c3ad 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_arrow_expr.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_arrow_expr.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_arrow_expr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE testjson AS SELECT JSON '{ "key" : "value" }' AS example; diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_contains.test b/parser/testdata/corpus/sql/json/scalar/test_json_contains.test index c5d9ee3..0e1caa4 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_contains.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_contains.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT JSON_CONTAINS('{"a": 1, "b": 2, "c": {"d": 3}}', '{"c": {"d": 3}}') AS Result; @@ -27,6 +27,10 @@ select json_contains('[1, 2, 3]', '[1, 2]'); -- ok == +select json_contains('[1, 2]', '[1, 3]'); +-- +ok +== select json_contains('[1, 2]', '[2, 1]'); -- ok diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_create.test b/parser/testdata/corpus/sql/json/scalar/test_json_create.test index 27d33cc..3b0b5c6 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_create.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_create.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_create.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRY_CAST('{{P{P{{{{ASD{AS{D{' AS JSON); @@ -15,6 +15,15 @@ select to_json({n: 42}) -- ok == +SELECT + to_json(TIMESTAMP '2026-01-02 03:04:05.123456'), + to_json(TIMESTAMP_MS '2026-01-02 03:04:05.123'), + to_json(TIMESTAMP_S '2026-01-02 03:04:05'), + to_json(TIMESTAMPTZ '2026-01-02 03:04:05+00'), + to_json(TIMESTAMPTZ_NS '2026-01-02 03:04:05.123456789+00') +-- +ok +== select to_json(42::VARIANT) -- ok diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_deep_merge.test b/parser/testdata/corpus/sql/json/scalar/test_json_deep_merge.test index 06a65f6..2fc6a2c 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_deep_merge.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_deep_merge.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_deep_merge.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_deep_merge('{"a": 1}', '{"a": 2}') @@ -221,3 +221,7 @@ SELECT json_deep_merge( -- ok == +SELECT json_deep_merge('{"a":1,"b":2}', '{"a":null}') +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_dot_syntax.test b/parser/testdata/corpus/sql/json/scalar/test_json_dot_syntax.test index 61cc924..7135f01 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_dot_syntax.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_dot_syntax.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_dot_syntax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_structure(json('{"duck":"goose"}').duck); diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_exists.test b/parser/testdata/corpus/sql/json/scalar/test_json_exists.test index 0698e70..9153625 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_exists.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_exists.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_exists('{"duck": null}', '$.duck') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_extract.test b/parser/testdata/corpus/sql/json/scalar/test_json_extract.test index 3edd7dc..8fd1390 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_extract.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_extract.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_structure('{"duck":"goose"}'->'duck'); @@ -106,6 +106,11 @@ SELECT json_extract('{"a":2,"c":[4,5],"f":7}', ['$.c','$.a']); -- ok == +SELECT json_extract_string('{"s":"duck","n":42,"z":null,"a":[1,2]}', + ['$.s', '$.n', '$.z', '$.a', '$.missing']); +-- +ok +== SELECT json_extract('{"a":2,"c":[4,5,{"f":7}]}', ['$.x', '$.a']); -- ok diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_extract_input_types.test b/parser/testdata/corpus/sql/json/scalar/test_json_extract_input_types.test index ff881c4..d502f04 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_extract_input_types.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_extract_input_types.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_extract_input_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma enable_verification @@ -36,6 +36,14 @@ INSERT INTO tricky VALUES -- ok == +SELECT count(*) FROM tricky WHERE json_extract(v, '{path}') IS DISTINCT FROM json_extract(v::JSON, '{path}') +-- +ok +== +SELECT count(*) FROM tricky WHERE json_extract_string(v, '{path}') IS DISTINCT FROM json_extract_string(v::JSON, '{path}') +-- +ok +== SELECT count(*) FROM tricky WHERE json_extract(v, ['$.a', '$.b.c', '$[0]']) IS DISTINCT FROM json_extract(v::JSON, ['$.a', '$.b.c', '$[0]']) -- ok diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_icu.test b/parser/testdata/corpus/sql/json/scalar/test_json_icu.test index ea27dfa..58f9000 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_icu.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_icu.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_icu.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set calendar = 'gregorian'; diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_insert.test b/parser/testdata/corpus/sql/json/scalar/test_json_insert.test index ab49b74..62b3799 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_insert.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_insert.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_insert('{"a":1}', '$.b', '2') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_keys.test b/parser/testdata/corpus/sql/json/scalar/test_json_keys.test index 9303e9b..29a75e3 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_keys.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_keys.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_keys('{"duck": 42}'); diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_merge_deep_nesting.test b/parser/testdata/corpus/sql/json/scalar/test_json_merge_deep_nesting.test new file mode 100644 index 0000000..4e058e0 --- /dev/null +++ b/parser/testdata/corpus/sql/json/scalar/test_json_merge_deep_nesting.test @@ -0,0 +1,29 @@ +# source: test/sql/json/scalar/test_json_merge_deep_nesting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT length(json_merge_patch('{"a":1}', '{"a":' || repeat('[', 200000) || repeat(']', 200000) || '}')); +-- +ok +== +SELECT length(json_merge_patch('{"a":' || repeat('[', 200000) || repeat(']', 200000) || '}', '{"b":1}')); +-- +ok +== +SELECT length(json_merge_patch(repeat('{"a":', 200000) || '1' || repeat('}', 200000), '{}')); +-- +ok +== +SELECT length(json_deep_merge('{"a":1}', '{"a":' || repeat('[', 200000) || repeat(']', 200000) || '}')); +-- +ok +== +SELECT length(json_deep_merge('{"a":' || repeat('[', 200000) || repeat(']', 200000) || '}', '{"b":1}')); +-- +ok +== +SELECT json_merge_patch('{"a":{"b":[1,{"c":2}],"d":"x"},"e":3}', '{"a":{"d":null,"f":[4]},"e":{"g":true}}'), json_deep_merge('{"a":[1,2],"b":{"c":1}}', '{"b":{"d":[3,{"e":4}]}}') +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch.test b/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch.test index c1808cb..07f9ee5 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_merge_patch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_merge_patch('{"a": 1}', '{"a": 2}') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch_diff.test b/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch_diff.test index 1c10825..ddc397b 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch_diff.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_merge_patch_diff.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_merge_patch_diff.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_merge_patch_diff('{"a":1}', '{"a":2}') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_normalize.test b/parser/testdata/corpus/sql/json/scalar/test_json_normalize.test index d4ff968..09907ab 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_normalize.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_normalize.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_normalize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_normalize('{"z":1,"a":2,"m":3}') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_path.test b/parser/testdata/corpus/sql/json/scalar/test_json_path.test index 3f07691..648bf7d 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_path.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_path.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_extract('{"my_field": "duck"}', '') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_path_prepared.test b/parser/testdata/corpus/sql/json/scalar/test_json_path_prepared.test index 87f8f32..6c6d56b 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_path_prepared.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_path_prepared.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_path_prepared.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE extract_stmt AS SELECT json_extract('{"a":1,"b":{"c":2}}', $1); diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_pretty.test b/parser/testdata/corpus/sql/json/scalar/test_json_pretty.test index ce08686..e53b491 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_pretty.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_pretty.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_pretty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_pretty('[1,2,{"a":43, "g":[true, true]}]') = '[ diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_remove.test b/parser/testdata/corpus/sql/json/scalar/test_json_remove.test index af33982..1251257 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_remove.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_remove.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_remove.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_remove('{"a":1,"b":2}', '$.a') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_replace.test b/parser/testdata/corpus/sql/json/scalar/test_json_replace.test index 7836870..208da91 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_replace.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_replace.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_replace('{"a":1}', '$.a', '99') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_set.test b/parser/testdata/corpus/sql/json/scalar/test_json_set.test index d2399e8..fc0e5f7 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_set.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_set.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_set.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_set('{"a":1}', '$.b', '2') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_strip_nulls.test b/parser/testdata/corpus/sql/json/scalar/test_json_strip_nulls.test index dba2469..f63219a 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_strip_nulls.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_strip_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_strip_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_strip_nulls('{"a":1,"b":null}') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_structure.test b/parser/testdata/corpus/sql/json/scalar/test_json_structure.test index 084a428..b5ab038 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_structure.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_structure.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_structure.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_structure('42') @@ -140,3 +140,11 @@ select json_structure('{"a": 1, "A": 1}'); -- ok == +select json_structure(repeat('[', 200) || repeat(']', 200)); +-- +ok +== +select json_structure(repeat('{"a":', 200) || '1' || repeat('}', 200)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_transform.test b/parser/testdata/corpus/sql/json/scalar/test_json_transform.test index e76653a..b5f2023 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_transform.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_transform.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_transform.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select from_json('42', '"UBIGINT"') @@ -95,6 +95,36 @@ select json_transform('[{"a": 42}, {"a": null}, {"a": 7}]', '[{"a": "UBIGINT"}]' -- ok == +SELECT from_json(j, '"DOUBLE"') +FROM (VALUES ('1'::JSON), ('2.5'::JSON), ('"3"'::JSON), ('null'::JSON)) values_(j); +-- +ok +== +SELECT from_json(j, '"INTEGER[2]"') +FROM (VALUES ('[1,2]'::JSON), ('[3,4]'::JSON), ('null'::JSON)) values_(j); +-- +ok +== +SELECT from_json(j, '{"a":"INTEGER"}') +FROM (VALUES ('{"a":1}'::JSON), ('[]'::JSON), ('null'::JSON)) values_(j); +-- +ok +== +SELECT from_json_strict(j, '"INTEGER[2]"') +FROM (VALUES ('[1]'::JSON), ('[2,3]'::JSON)) values_(j); +-- +ok +== +SELECT from_json_strict(j, '["INTEGER"]') +FROM (VALUES ('{}'::JSON), ('[1]'::JSON)) values_(j); +-- +ok +== +SELECT from_json_strict(j, '{"a":"INTEGER"}') +FROM (VALUES ('[]'::JSON), ('{"a":1}'::JSON)) values_(j); +-- +ok +== select json_transform('[{"a": 42}, {"a": null, "b": 33}, {"b": 7}]', '[{"a": "UBIGINT", "b": "UBIGINT"}]') -- ok diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_type.test b/parser/testdata/corpus/sql/json/scalar/test_json_type.test index c233d8f..4b9fc19 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_type.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_type.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_type('{"str": 42}') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_valid.test b/parser/testdata/corpus/sql/json/scalar/test_json_valid.test index cf2b6b6..46260d8 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_valid.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_valid.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_valid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_valid('{"bla": inf}') diff --git a/parser/testdata/corpus/sql/json/scalar/test_json_value.test b/parser/testdata/corpus/sql/json/scalar/test_json_value.test index f13ffe3..f598756 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_json_value.test +++ b/parser/testdata/corpus/sql/json/scalar/test_json_value.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_json_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_value('{"foo": null}', '$.foo') diff --git a/parser/testdata/corpus/sql/json/scalar/test_st_asgeojson.test b/parser/testdata/corpus/sql/json/scalar/test_st_asgeojson.test index 2aca355..b53d368 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_st_asgeojson.test +++ b/parser/testdata/corpus/sql/json/scalar/test_st_asgeojson.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_st_asgeojson.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE types (geom GEOMETRY); diff --git a/parser/testdata/corpus/sql/json/scalar/test_st_geomfromgeojson.test b/parser/testdata/corpus/sql/json/scalar/test_st_geomfromgeojson.test index c65205e..67bd372 100644 --- a/parser/testdata/corpus/sql/json/scalar/test_st_geomfromgeojson.test +++ b/parser/testdata/corpus/sql/json/scalar/test_st_geomfromgeojson.test @@ -1,6 +1,6 @@ # source: test/sql/json/scalar/test_st_geomfromgeojson.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ST_AsText(ST_GeomFromGeoJSON(ST_AsGeoJSON(geom))) FROM types; diff --git a/parser/testdata/corpus/sql/json/table/auto_glob_directory.test b/parser/testdata/corpus/sql/json/table/auto_glob_directory.test index 08b1e55..166203b 100644 --- a/parser/testdata/corpus/sql/json/table/auto_glob_directory.test +++ b/parser/testdata/corpus/sql/json/table/auto_glob_directory.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/auto_glob_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT i%2 AS grp, i FROM range(1000) t(i)) TO '{TEST_DIR}/glob_dir_json' (FORMAT json, PER_THREAD_OUTPUT); diff --git a/parser/testdata/corpus/sql/json/table/json_empty_array.test b/parser/testdata/corpus/sql/json/table/json_empty_array.test index 9293464..0fc6f17 100644 --- a/parser/testdata/corpus/sql/json/table/json_empty_array.test +++ b/parser/testdata/corpus/sql/json/table/json_empty_array.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/json_empty_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from '{DATA_DIR}/json/empty.ndjson' diff --git a/parser/testdata/corpus/sql/json/table/json_multi_file_reader.test b/parser/testdata/corpus/sql/json/table/json_multi_file_reader.test index bb4839b..7b1ffcf 100644 --- a/parser/testdata/corpus/sql/json/table/json_multi_file_reader.test +++ b/parser/testdata/corpus/sql/json/table/json_multi_file_reader.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/json_multi_file_reader.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as SELECT i as i, to_json([i%4]) as j FROM range(0,20) as tbl(i) diff --git a/parser/testdata/corpus/sql/json/table/json_table_in_out_fullkey_quoting.test b/parser/testdata/corpus/sql/json/table/json_table_in_out_fullkey_quoting.test index 334d989..058487a 100644 --- a/parser/testdata/corpus/sql/json/table/json_table_in_out_fullkey_quoting.test +++ b/parser/testdata/corpus/sql/json/table/json_table_in_out_fullkey_quoting.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/json_table_in_out_fullkey_quoting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT fullkey, value FROM json_each('{"a.b": 1}') diff --git a/parser/testdata/corpus/sql/json/table/multi_file_hang.test b/parser/testdata/corpus/sql/json/table/multi_file_hang.test index 3e0ef66..7244a99 100644 --- a/parser/testdata/corpus/sql/json/table/multi_file_hang.test +++ b/parser/testdata/corpus/sql/json/table/multi_file_hang.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/multi_file_hang.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set threads=8 diff --git a/parser/testdata/corpus/sql/json/table/read_geojson_errors.test b/parser/testdata/corpus/sql/json/table/read_geojson_errors.test index c30d675..e05940d 100644 --- a/parser/testdata/corpus/sql/json/table/read_geojson_errors.test +++ b/parser/testdata/corpus/sql/json/table/read_geojson_errors.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_geojson_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ST_AsText(geometry) FROM read_json('data/json/geojson/malformed.geojsonl'); diff --git a/parser/testdata/corpus/sql/json/table/read_geojson_featurecollection.test b/parser/testdata/corpus/sql/json/table/read_geojson_featurecollection.test index 6fdc002..6ff559c 100644 --- a/parser/testdata/corpus/sql/json/table/read_geojson_featurecollection.test +++ b/parser/testdata/corpus/sql/json/table/read_geojson_featurecollection.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_geojson_featurecollection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ST_AsText(geometry), name, pop, area diff --git a/parser/testdata/corpus/sql/json/table/read_geojson_ndjson.test b/parser/testdata/corpus/sql/json/table/read_geojson_ndjson.test index eb1c578..d1e5aff 100644 --- a/parser/testdata/corpus/sql/json/table/read_geojson_ndjson.test +++ b/parser/testdata/corpus/sql/json/table/read_geojson_ndjson.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_geojson_ndjson.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT id, ST_AsText(geometry), name FROM read_json('data/json/geojson/features.geojsonl') ORDER BY id; diff --git a/parser/testdata/corpus/sql/json/table/read_geojson_nested.test b/parser/testdata/corpus/sql/json/table/read_geojson_nested.test index efba43c..a6debf0 100644 --- a/parser/testdata/corpus/sql/json/table/read_geojson_nested.test +++ b/parser/testdata/corpus/sql/json/table/read_geojson_nested.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_geojson_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT column_name, column_type diff --git a/parser/testdata/corpus/sql/json/table/read_geojson_pseudo_columns.test b/parser/testdata/corpus/sql/json/table/read_geojson_pseudo_columns.test index 8a19a1f..72ff197 100644 --- a/parser/testdata/corpus/sql/json/table/read_geojson_pseudo_columns.test +++ b/parser/testdata/corpus/sql/json/table/read_geojson_pseudo_columns.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_geojson_pseudo_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT column_name, column_type diff --git a/parser/testdata/corpus/sql/json/table/read_json.test b/parser/testdata/corpus/sql/json/table/read_json.test index fe2f600..a59f704 100644 --- a/parser/testdata/corpus/sql/json/table/read_json.test +++ b/parser/testdata/corpus/sql/json/table/read_json.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_json('{DATA_DIR}/json/example_n.ndjson', auto_detect=false) diff --git a/parser/testdata/corpus/sql/json/table/read_json_dates.test b/parser/testdata/corpus/sql/json/table/read_json_dates.test index 399294d..288e920 100644 --- a/parser/testdata/corpus/sql/json/table/read_json_dates.test +++ b/parser/testdata/corpus/sql/json/table/read_json_dates.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_json_dates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_json_auto('{DATA_DIR}/json/simple_timestamp.json', columns={"ts": "TIMESTAMP[]"}); @@ -107,6 +107,14 @@ select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_frac_z.json') -- ok == +copy (select * from (values ('{"ts":"2023-02-07T19:12:28.123z"}'))) to '{TEMP_DIR}/iso8601_frac_lower_z.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_frac_lower_z.json') +-- +ok +== copy (select * from (values ('{"ts":"2023-02-07T19:12:28+00:00"}'))) to '{TEMP_DIR}/iso8601_tz.json' (format csv, quote '', header 0) -- ok @@ -139,6 +147,26 @@ select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_neg_offset.json') -- ok == +copy (select * from (values + ('{"ts":"2023-02-07T14:12:28+05:30"}'), + ('{"ts":"2023-02-07T14:12:28+0530"}'), + ('{"ts":"2023-02-07T11:12:28-08:00"}') +)) to '{TEMP_DIR}/iso8601_offset_spellings.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_offset_spellings.json') order by ts +-- +ok +== +copy (select * from (values ('{"ts":"2023-02-07T19:12:28"}'))) to '{TEMP_DIR}/iso8601_plain.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_plain.json') +-- +ok +== copy (select * from (values ('{"ts1":"2026-04-01T06:01:00.010000+00:00", "ts2":"2026-04-02T06:03:00+00:01", "ts3":"2026-04-03T06:03:00Z", "ts4":"2026-04-04T06:04:00"}'))) to '{TEMP_DIR}/issue_22103.json' (format csv, quote '', header 0) -- ok @@ -148,6 +176,89 @@ FROM read_json_auto('{TEMP_DIR}/issue_22103.json') -- ok == +copy (select * from (values + ('{"ts":"2024-01-01T00:00:00Z"}'), + ('{"ts":null}'), + ('{"ts":"2024-01-01T00:00:00"}') +)) to '{TEMP_DIR}/iso8601_mixed_same_field.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_mixed_same_field.json') order by ts nulls first +-- +ok +== +copy (select * from (values ('{"ts":null}'), ('{"ts":null}'))) to '{TEMP_DIR}/iso8601_all_null.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts), ts from read_json_auto('{TEMP_DIR}/iso8601_all_null.json') +-- +ok +== +copy (select * from (values + ('{"ts":"2024-01-01T00:00:00"}'), + ('{"ts":"infinity"}'), + ('{"ts":"-infinity"}') +)) to '{TEMP_DIR}/iso8601_plain_infinity.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_plain_infinity.json') limit 1 +-- +ok +== +select ts from read_json_auto('{TEMP_DIR}/iso8601_plain_infinity.json') +where ts = TIMESTAMP '2024-01-01 00:00:00' +-- +ok +== +copy (select * from (values + ('{"ts":"2024-01-01T00:00:00Z"}'), + ('{"ts":"infinity"}'), + ('{"ts":"-infinity"}') +)) to '{TEMP_DIR}/iso8601_offset_infinity.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_offset_infinity.json') limit 1 +-- +ok +== +copy (select * from (values + ('{"ts":"2024-01-01T00:00:00Z"}'), + ('{"ts":"2024-01-01T00:00:00"}'), + ('{"ts":"infinity"}') +)) to '{TEMP_DIR}/iso8601_mixed_infinity.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_mixed_infinity.json') limit 1 +-- +ok +== +copy (select * from (values + ('{"ts":"epoch"}'), + ('{"ts":"2024-01-01T00:00:00"}') +)) to '{TEMP_DIR}/iso8601_epoch_plain.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_epoch_plain.json') limit 1 +-- +ok +== +copy (select * from (values + ('{"ts":"epoch"}'), + ('{"ts":"2024-01-01T00:00:00Z"}') +)) to '{TEMP_DIR}/iso8601_epoch_offset.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_epoch_offset.json') limit 1 +-- +ok +== copy (select * from (values ('{"ts": "2026-04-04T06:04:00", "ts_tz": "2026-04-04T06:04:00Z"}'))) to '{TEMP_DIR}/ts_explicit_fmt.json' (format csv, quote '', header 0) -- ok diff --git a/parser/testdata/corpus/sql/json/table/read_json_dates_vector_boundary.test b/parser/testdata/corpus/sql/json/table/read_json_dates_vector_boundary.test new file mode 100644 index 0000000..b3f5a83 --- /dev/null +++ b/parser/testdata/corpus/sql/json/table/read_json_dates_vector_boundary.test @@ -0,0 +1,49 @@ +# source: test/sql/json/table/read_json_dates_vector_boundary.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +copy ( + select json_object('ts', CASE WHEN i <= 2048 THEN '2024-01-01T00:00:00Z' ELSE '2024-01-01T00:00:00' END) + from generate_series(1, 2049) t(i) +) to '{TEMP_DIR}/iso8601_vector_boundary.json' (format csv, quote '', header 0); +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_vector_boundary.json') limit 1 +-- +ok +== +copy ( + select json_object('ts', '2024-01-01T00:00:00Z') + from generate_series(1, 2049) t(i) +) to '{TEMP_DIR}/iso8601_vector_boundary_all_tz.json' (format csv, quote '', header 0); +-- +ok +== +select typeof(ts), count(*) from read_json_auto('{TEMP_DIR}/iso8601_vector_boundary_all_tz.json') group by 1 +-- +ok +== +copy ( + select CASE WHEN i <= 2048 THEN json_object('ts', '2024-01-01T00:00:00Z') ELSE json_object('ts', NULL) END + from generate_series(1, 2049) t(i) +) to '{TEMP_DIR}/iso8601_vector_boundary_tz_then_null.json' (format csv, quote '', header 0); +-- +ok +== +select typeof(ts), count(*) filter (where ts is not null) from read_json_auto('{TEMP_DIR}/iso8601_vector_boundary_tz_then_null.json') group by 1 +-- +ok +== +copy ( + select json_object('ts', CASE WHEN i <= 2048 THEN 'infinity' ELSE '2024-01-01T00:00:00' END) + from generate_series(1, 2049) t(i) +) to '{TEMP_DIR}/iso8601_vector_boundary_infinity_then_plain.json' (format csv, quote '', header 0); +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/iso8601_vector_boundary_infinity_then_plain.json') limit 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/table/read_json_ignore_errors_spanning.test b/parser/testdata/corpus/sql/json/table/read_json_ignore_errors_spanning.test new file mode 100644 index 0000000..37bbbfc --- /dev/null +++ b/parser/testdata/corpus/sql/json/table/read_json_ignore_errors_spanning.test @@ -0,0 +1,17 @@ +# source: test/sql/json/table/read_json_ignore_errors_spanning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_json('data/json/ignore_errors_spanning_record.ndjson', format = 'newline_delimited', ignore_errors = true, columns = {'a': 'VARCHAR'}); +-- +ok +== +SELECT * FROM read_json('data/json/ignore_errors_spanning_record.ndjson', format = 'newline_delimited', ignore_errors = true, columns = {'a': 'VARCHAR'}, maximum_object_size = 64); +-- +ok +== +SELECT * FROM read_json('data/json/ignore_errors_spanning_record.ndjson', format = 'newline_delimited', columns = {'a': 'VARCHAR'}); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/table/read_json_objects.test b/parser/testdata/corpus/sql/json/table/read_json_objects.test index 4aec261..3a6387a 100644 --- a/parser/testdata/corpus/sql/json/table/read_json_objects.test +++ b/parser/testdata/corpus/sql/json/table/read_json_objects.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_json_objects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from read_json_objects('{DATA_DIR}/json/unterminated_quotes.ndjson') diff --git a/parser/testdata/corpus/sql/json/table/read_json_records_param_types.test b/parser/testdata/corpus/sql/json/table/read_json_records_param_types.test new file mode 100644 index 0000000..6e41393 --- /dev/null +++ b/parser/testdata/corpus/sql/json/table/read_json_records_param_types.test @@ -0,0 +1,53 @@ +# source: test/sql/json/table/read_json_records_param_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 i) TO '__TEST_DIR__/r.json' +-- +ok +== +SELECT * FROM read_json('__TEST_DIR__/r.json', records := 1) +-- +ok +== +SELECT * FROM read_json('__TEST_DIR__/r.json', records := [1]) +-- +ok +== +SELECT * FROM read_ndjson('__TEST_DIR__/r.json', records := {'a': 1}) +-- +ok +== +SELECT i FROM read_json('__TEST_DIR__/r.json', records := true) +-- +ok +== +SELECT i FROM read_json('__TEST_DIR__/r.json', records := 'auto') +-- +ok +== +COPY (SELECT 1 i) TO '__TEST_DIR__/r.csv' +-- +ok +== +SELECT * FROM read_csv('__TEST_DIR__/r.csv', buffer_size := -1) +-- +ok +== +SELECT * FROM sniff_csv('__TEST_DIR__/r.csv', buffer_size := -1) +-- +ok +== +SELECT * FROM read_csv('__TEST_DIR__/r.csv', hive_types := {}) +-- +ok +== +COPY (SELECT 1 i) TO '__TEST_DIR__/r.parquet' +-- +ok +== +SELECT * FROM read_parquet('__TEST_DIR__/r.parquet', hive_types := {}) +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/table/read_json_root_bignum.test b/parser/testdata/corpus/sql/json/table/read_json_root_bignum.test new file mode 100644 index 0000000..0c33035 --- /dev/null +++ b/parser/testdata/corpus/sql/json/table/read_json_root_bignum.test @@ -0,0 +1,37 @@ +# source: test/sql/json/table/read_json_root_bignum.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT '18446744073709551621' AS j) TO '{TEMP_DIR}/bn.json' (FORMAT CSV, HEADER false); +-- +ok +== +SELECT * FROM read_json('{TEMP_DIR}/bn.json'); +-- +ok +== +COPY (SELECT * FROM (VALUES ('18446744073709551621'), ('5'), ('-18446744073709551621')) t(j)) TO '{TEMP_DIR}/bn_lines.json' (FORMAT CSV, HEADER false); +-- +ok +== +SELECT * FROM read_json('{TEMP_DIR}/bn_lines.json'); +-- +ok +== +COPY (SELECT '[18446744073709551621, 7]' AS j) TO '{TEMP_DIR}/bn_array.json' (FORMAT CSV, HEADER false, QUOTE ''); +-- +ok +== +SELECT * FROM read_json('{TEMP_DIR}/bn_array.json'); +-- +ok +== +COPY (SELECT * FROM (VALUES ('{"x": 18446744073709551621}'), ('{"x": 5}')) t(j)) TO '{TEMP_DIR}/bn_objects.json' (FORMAT CSV, HEADER false, QUOTE ''); +-- +ok +== +SELECT x FROM read_json('{TEMP_DIR}/bn_objects.json'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/table/read_json_timestamp_specials.test b/parser/testdata/corpus/sql/json/table/read_json_timestamp_specials.test new file mode 100644 index 0000000..2b91f93 --- /dev/null +++ b/parser/testdata/corpus/sql/json/table/read_json_timestamp_specials.test @@ -0,0 +1,66 @@ +# source: test/sql/json/table/read_json_timestamp_specials.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +copy (select * from (values + ('{"plain_ts":"2024-01-01T00:00:00","offset_ts":"2024-01-01T00:00:00Z"}'), + ('{"plain_ts":"infinity","offset_ts":"infinity"}'), + ('{"plain_ts":"-infinity","offset_ts":"-infinity"}') +)) to '{TEMP_DIR}/timestamp_specials.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(plain_ts), typeof(offset_ts) +from read_json_auto('{TEMP_DIR}/timestamp_specials.json') +limit 1 +-- +ok +== +copy (select * from (values + ('{"ts":"2024-01-01T00:00:00"}'), + ('{"ts":"infinity"}'), + ('{"ts":"-infinity"}') +)) to '{TEMP_DIR}/timestamp_specials_plain.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts), ts from read_json_auto('{TEMP_DIR}/timestamp_specials_plain.json') +where ts = TIMESTAMP '2024-01-01 00:00:00' +-- +ok +== +copy (select * from (values + ('{"ts":"2024-01-01T00:00:00Z"}'), + ('{"ts":"2024-01-01T00:00:00"}'), + ('{"ts":"infinity"}') +)) to '{TEMP_DIR}/timestamp_specials_mixed.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/timestamp_specials_mixed.json') limit 1 +-- +ok +== +copy (select * from (values + ('{"ts":"epoch"}'), + ('{"ts":"2024-01-01T00:00:00"}') +)) to '{TEMP_DIR}/timestamp_specials_epoch_plain.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/timestamp_specials_epoch_plain.json') limit 1 +-- +ok +== +copy (select * from (values + ('{"ts":"epoch"}'), + ('{"ts":"2024-01-01T00:00:00Z"}') +)) to '{TEMP_DIR}/timestamp_specials_epoch_offset.json' (format csv, quote '', header 0) +-- +ok +== +select typeof(ts) from read_json_auto('{TEMP_DIR}/timestamp_specials_epoch_offset.json') limit 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/table/read_json_union.test b/parser/testdata/corpus/sql/json/table/read_json_union.test index a6d5ad4..1ff9c21 100644 --- a/parser/testdata/corpus/sql/json/table/read_json_union.test +++ b/parser/testdata/corpus/sql/json/table/read_json_union.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_json_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT data FROM read_ndjson('{DATA_DIR}/json/union.ndjson', columns={data: 'UNION(name VARCHAR, age INT, veteran BOOL)'}) diff --git a/parser/testdata/corpus/sql/json/table/read_json_unnest_heterogeneous_struct.test b/parser/testdata/corpus/sql/json/table/read_json_unnest_heterogeneous_struct.test index 511be43..20f23f5 100644 --- a/parser/testdata/corpus/sql/json/table/read_json_unnest_heterogeneous_struct.test +++ b/parser/testdata/corpus/sql/json/table/read_json_unnest_heterogeneous_struct.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/read_json_unnest_heterogeneous_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/json/table/read_single_json_file.test b/parser/testdata/corpus/sql/json/table/read_single_json_file.test new file mode 100644 index 0000000..f8330d7 --- /dev/null +++ b/parser/testdata/corpus/sql/json/table/read_single_json_file.test @@ -0,0 +1,369 @@ +# source: test/sql/json/table/read_single_json_file.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM read_single_json_file('data/json/example_n.ndjson') +-- +ok +== +SELECT * FROM read_single_json_file('data/json/example_*.ndjson') +-- +ok +== +SELECT * FROM read_single_json_file(['data/json/example_n.ndjson']) +-- +ok +== +SELECT name FROM read_single_json_file('data/json/example_n.ndjson') WHERE id > 3 ORDER BY id +-- +ok +== +SELECT * FROM read_single_json_file('data/json/example_n.ndjson', columns={id: 'INTEGER', name: 'VARCHAR'}) ORDER BY id +-- +ok +== +SELECT typeof(json) FROM read_single_json_file('data/json/example_r.ndjson', records=false) LIMIT 1 +-- +ok +== +SELECT * FROM read_single_json_file('data/json/unterminated_quotes.ndjson', ignore_errors=true) LIMIT 3 +-- +ok +== +SELECT * FROM read_single_json_file('data/json/unterminated_quotes.ndjson') +-- +ok +== +SELECT * FROM read_single_json_file('data/json/example_n.ndjson', auto_detect=false) +-- +ok +== +SELECT geometry FROM read_single_json_file('data/json/geojson/geometries.geojsonl') +-- +ok +== +SELECT * FROM read_json('data/json/example_n.ndjson') +-- +ok +== +SELECT count(*), count(DISTINCT filename) FROM read_json('data/json/example_*.ndjson', filename=true) +-- +ok +== +SELECT count(*) FROM read_json(['data/json/example_n.ndjson', 'data/json/example_r.ndjson']) +-- +ok +== +SELECT * FROM read_json('data/json/example_n.ndjson', columns={id: 'INTEGER', name: 'VARCHAR'}) ORDER BY id +-- +ok +== +SELECT count(*) FROM read_json('data/json/unterminated_quotes.ndjson', ignore_errors=true) +-- +ok +== +SELECT * FROM read_json('data/json/example_n.ndjson', unknown_option=true) +-- +ok +== +SELECT * FROM read_json(['data/json/example_n.ndjson', 'data/json/different_schemas.ndjson'], union_by_name=true) ORDER BY ALL +-- +ok +== +COPY (SELECT 1 AS id, 'a' AS part UNION ALL SELECT 2, 'b') TO '{TEST_DIR}/json_hive' (FORMAT json, PARTITION_BY part) +-- +ok +== +SELECT part, id FROM read_json('{TEST_DIR}/json_hive/*/*.json', hive_partitioning=true) ORDER BY part +-- +ok +== +SELECT part, id FROM read_json('{TEST_DIR}/json_hive/*/*.json', hive_partitioning=true) WHERE part='b' +-- +ok +== +SELECT count(*) FROM read_json('{TEST_DIR}/json_hive/part=a') +-- +ok +== +SELECT count(*) FROM read_json('data/json/empty.ndjson') +-- +ok +== +SELECT * FROM read_json('data/json/this_file_does_not_exist.json') +-- +ok +== +SELECT count(*) FROM read_json('data/json/this_file_does_not_exist.json', allow_empty=true) +-- +ok +== +COPY (SELECT i AS id, 'string_' || i AS name FROM range(200000) t(i)) TO '{TEST_DIR}/big.ndjson' (FORMAT json) +-- +ok +== +SELECT count(*), sum(id) FROM read_json('{TEST_DIR}/big.ndjson') +-- +ok +== +COPY (SELECT 1 AS a) TO '{TEST_DIR}/sample_schema_f1.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT 2 AS b) TO '{TEST_DIR}/sample_schema_f2.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT 3 AS c) TO '{TEST_DIR}/sample_schema_f3.ndjson' (FORMAT json) +-- +ok +== +SELECT a, b, c FROM read_json('{TEST_DIR}/sample_schema_*.ndjson') ORDER BY ALL +-- +ok +== +SELECT b FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=1) +-- +ok +== +SELECT a FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=1) ORDER BY ALL +-- +ok +== +SELECT a, b FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=2) ORDER BY ALL +-- +ok +== +SELECT c FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=2) +-- +ok +== +SELECT a, b, c FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=-1) ORDER BY ALL +-- +ok +== +SELECT * FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=0) +-- +ok +== +SELECT * FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=NULL) +-- +ok +== +COPY (SELECT 1 AS v) TO '{TEST_DIR}/sample_types_f1.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT 2.5 AS v) TO '{TEST_DIR}/sample_types_f2.ndjson' (FORMAT json) +-- +ok +== +SELECT v FROM read_json('{TEST_DIR}/sample_types_*.ndjson') ORDER BY ALL +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/sample_types_*.ndjson')) +-- +ok +== +COPY (SELECT {'x': 1} AS s) TO '{TEST_DIR}/sample_nested_f1.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'y': 2} AS s) TO '{TEST_DIR}/sample_nested_f2.ndjson' (FORMAT json) +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/sample_nested_*.ndjson')) +-- +ok +== +COPY (SELECT 1 AS v) TO '{TEST_DIR}/combine_mixed_f1.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT 'hello' AS v) TO '{TEST_DIR}/combine_mixed_f2.ndjson' (FORMAT json) +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/combine_mixed_*.ndjson')) +-- +ok +== +SELECT v::VARCHAR FROM read_json('{TEST_DIR}/combine_mixed_*.ndjson') ORDER BY ALL +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/combine_mixed_*.ndjson', union_by_name=true)) +-- +ok +== +COPY (SELECT [1] AS l) TO '{TEST_DIR}/combine_list_f1.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT ['x'] AS l) TO '{TEST_DIR}/combine_list_f2.ndjson' (FORMAT json) +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/combine_list_*.ndjson')) +-- +ok +== +COPY (SELECT {'k1': 1} AS o) TO '{TEST_DIR}/combine_map_f01.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k2': 2} AS o) TO '{TEST_DIR}/combine_map_f02.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k3': 3} AS o) TO '{TEST_DIR}/combine_map_f03.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k4': 4} AS o) TO '{TEST_DIR}/combine_map_f04.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k5': 5} AS o) TO '{TEST_DIR}/combine_map_f05.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k6': 6} AS o) TO '{TEST_DIR}/combine_map_f06.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k7': 7} AS o) TO '{TEST_DIR}/combine_map_f07.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k8': 8} AS o) TO '{TEST_DIR}/combine_map_f08.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k9': 9} AS o) TO '{TEST_DIR}/combine_map_f09.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k10': 10} AS o) TO '{TEST_DIR}/combine_map_f10.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT {'k11': 11} AS o) TO '{TEST_DIR}/combine_map_f11.ndjson' (FORMAT json) +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/combine_map_*.ndjson')) +-- +ok +== +SELECT count(*) FROM read_json('{TEST_DIR}/combine_map_*.ndjson') WHERE cardinality(o) = 1 +-- +ok +== +SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/combine_mixed_*.ndjson', columns={v: 'VARCHAR'})) +-- +ok +== +COPY (SELECT 1 AS a, 2 AS id, 3 AS "Id") TO '{TEST_DIR}/combine_dup_f1.ndjson' (FORMAT json) +-- +ok +== +COPY (SELECT 2 AS a) TO '{TEST_DIR}/combine_dup_f2.ndjson' (FORMAT json) +-- +ok +== +SELECT a, id, Id_1 FROM read_json('{TEST_DIR}/combine_dup_*.ndjson') ORDER BY ALL +-- +ok +== +CREATE TABLE copy_target(id BIGINT, name VARCHAR) +-- +ok +== +COPY copy_target FROM 'data/json/example_n.ndjson' (FORMAT json) +-- +ok +== +SELECT * FROM copy_target ORDER BY id +-- +ok +== +DELETE FROM copy_target +-- +ok +== +COPY copy_target FROM 'data/json/example_*.ndjson' (FORMAT json) +-- +ok +== +SELECT count(*) FROM copy_target +-- +ok +== +CREATE TABLE copy_one(id BIGINT) +-- +ok +== +COPY copy_one FROM 'data/json/example_n.ndjson' (FORMAT json) +-- +ok +== +SELECT sum(id) FROM copy_one +-- +ok +== +CREATE TABLE copy_errors(id BIGINT, name VARCHAR) +-- +ok +== +COPY copy_errors FROM 'data/json/unterminated_quotes.ndjson' (FORMAT json, ignore_errors true) +-- +ok +== +SELECT count(*) FROM copy_errors +-- +ok +== +DELETE FROM copy_errors +-- +ok +== +COPY copy_errors FROM 'data/json/unterminated_quotes.ndjson' (FORMAT json, ignore_errors) +-- +ok +== +COPY copy_errors FROM 'data/json/example_n.ndjson' (FORMAT json, not_an_option true) +-- +ok +== +COPY copy_errors FROM 'data/json/example_n.ndjson' (FORMAT json, dateformat ('a', 'b')) +-- +ok +== +CREATE TABLE copy_geo(geometry GEOMETRY, name VARCHAR) +-- +ok +== +COPY copy_geo FROM 'data/json/geojson/features.geojson' (FORMAT json, geojson true) +-- +ok +== +SELECT geometry, name FROM copy_geo ORDER BY name +-- +ok +== +COPY (SELECT 1 AS id, 'x' AS name) TO '{TEST_DIR}/copy_roundtrip.json' (FORMAT json) +-- +ok +== +CREATE TABLE copy_rt(id BIGINT, name VARCHAR) +-- +ok +== +COPY copy_rt FROM '{TEST_DIR}/copy_roundtrip.json' (FORMAT json) +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/table/test_json_copy_zstd.test b/parser/testdata/corpus/sql/json/table/test_json_copy_zstd.test index 372567e..374ab67 100644 --- a/parser/testdata/corpus/sql/json/table/test_json_copy_zstd.test +++ b/parser/testdata/corpus/sql/json/table/test_json_copy_zstd.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/test_json_copy_zstd.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table my_range as select range as i from range(10) diff --git a/parser/testdata/corpus/sql/json/table/test_json_nested_struct_projection_pushdown.test b/parser/testdata/corpus/sql/json/table/test_json_nested_struct_projection_pushdown.test index 747e958..a68bdc1 100644 --- a/parser/testdata/corpus/sql/json/table/test_json_nested_struct_projection_pushdown.test +++ b/parser/testdata/corpus/sql/json/table/test_json_nested_struct_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/json/table/test_json_nested_struct_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT {goose: 42, pigeon: 4.2, nested_duck: {nested_nested_duck: {goose: 42, pigeon: 4.2, nested_nested_nested_duck: {goose: 42, pigeon: 4.2}}, goose: 42, pigeon: 4.2}} AS duck) TO '{TEST_DIR}/nested.json' diff --git a/parser/testdata/corpus/sql/json/test_json_bool.test b/parser/testdata/corpus/sql/json/test_json_bool.test index 858a0d5..aba8222 100644 --- a/parser/testdata/corpus/sql/json/test_json_bool.test +++ b/parser/testdata/corpus/sql/json/test_json_bool.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_extract('{"key": true}', '$.key')::BOOLEAN diff --git a/parser/testdata/corpus/sql/json/test_json_cast.test b/parser/testdata/corpus/sql/json/test_json_cast.test index b656d32..8c21c61 100644 --- a/parser/testdata/corpus/sql/json/test_json_cast.test +++ b/parser/testdata/corpus/sql/json/test_json_cast.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '1010'::BIT(4)::JSON::BIT(4) @@ -31,6 +31,14 @@ SELECT 1::BIGINT::JSON::BIGINT -- ok == +SELECT ((1::HUGEINT << 100)::JSON)::HUGEINT +-- +ok +== +SELECT ((1::UHUGEINT << 100)::JSON)::UHUGEINT +-- +ok +== SELECT date '2024-01-01'::DATE::JSON::DATE -- ok @@ -59,6 +67,34 @@ SELECT 1::DECIMAL(10, 2)::JSON::DECIMAL(10, 2) -- ok == +SELECT '883406386745030.3'::DECIMAL(16, 1)::JSON::DECIMAL(16, 1) +-- +ok +== +SELECT {'a' : '883406386745030.3'}::JSON::STRUCT(a DECIMAL(16, 1))::JSON::STRUCT(a DECIMAL(16, 1)) +-- +ok +== +SELECT '883406386745030.3'::JSON::DECIMAL(16, 1) +-- +ok +== +SELECT '9007199254740993.0'::JSON::DECIMAL(17, 1) +-- +ok +== +SELECT (1::HUGEINT << 100)::DECIMAL(38, 0)::JSON::DECIMAL(38, 0) +-- +ok +== +SELECT (-(1::HUGEINT << 100))::DECIMAL(38, 0)::JSON::DECIMAL(38, 0) +-- +ok +== +SELECT (1::UHUGEINT << 100)::DECIMAL(38, 0)::JSON::DECIMAL(38, 0) +-- +ok +== SELECT 1::FLOAT::JSON::FLOAT -- ok @@ -159,3 +195,21 @@ SELECT 'foo'::VARIANT::JSON::VARIANT -- ok == +SELECT v::VARCHAR +FROM (VALUES (1, NULL::JSON[]), (2, [JSON '1', NULL, JSON '{"a":2}'])) t(id, v) +ORDER BY id +-- +ok +== +SELECT TRY_CAST(v AS JSON[]) FROM (VALUES ('not json')) t(v) +-- +ok +== +SELECT TRY_CAST(v AS JSON[]) FROM (VALUES ('{}')) t(v) +-- +ok +== +SELECT TRY_CAST(v AS JSON[]) FROM (VALUES ('[1,null,{"a":2}]')) t(v) +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_copy_dateformat_error.test b/parser/testdata/corpus/sql/json/test_json_copy_dateformat_error.test new file mode 100644 index 0000000..74cf367 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_copy_dateformat_error.test @@ -0,0 +1,17 @@ +# source: test/sql/json/test_json_copy_dateformat_error.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT '5877642-06-25 (BC)'::DATE d) TO '{TEMP_DIR}/json_dateformat_error.json' (DATEFORMAT '%G'); +-- +ok +== +COPY (SELECT DATE '2024-01-02' d) TO '{TEMP_DIR}/json_dateformat_ok.json' (DATEFORMAT '%G'); +-- +ok +== +SELECT d FROM read_json('{TEMP_DIR}/json_dateformat_ok.json', columns := {d: 'VARCHAR'}); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_copy_serialize_plan.test b/parser/testdata/corpus/sql/json/test_json_copy_serialize_plan.test index bddd73e..3bb8390 100644 --- a/parser/testdata/corpus/sql/json/test_json_copy_serialize_plan.test +++ b/parser/testdata/corpus/sql/json/test_json_copy_serialize_plan.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_copy_serialize_plan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_extract_string( diff --git a/parser/testdata/corpus/sql/json/test_json_deserialize_grouping_sets.test b/parser/testdata/corpus/sql/json/test_json_deserialize_grouping_sets.test new file mode 100644 index 0000000..ef88668 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_deserialize_grouping_sets.test @@ -0,0 +1,25 @@ +# source: test/sql/json/test_json_deserialize_grouping_sets.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]}],"group_sets":[[5]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]}],"group_sets":[[5]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]}],"group_sets":[[18446744073709551615]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql(json_serialize_sql('SELECT a FROM (SELECT 1 a) GROUP BY GROUPING SETS ((a), ())')); +-- +ok +== +SELECT * FROM json_execute_serialized_sql(json_serialize_sql('SELECT a FROM (SELECT 1 a) GROUP BY ROLLUP (a) ORDER BY a NULLS FIRST')); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_statements.test b/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_statements.test new file mode 100644 index 0000000..a6da074 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_statements.test @@ -0,0 +1,121 @@ +# source: test/sql/json/test_json_deserialize_invalid_statements.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":9,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":9,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA_REF","type":"LAMBDA_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"],"lambda_idx":0,"column_name":"x"}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA_REF","type":"LAMBDA_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"],"lambda_idx":0,"column_name":"x"}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":null}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":null}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":35,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":35,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":35,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":35,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":17,"subquery_type":"EXISTS","subquery":null,"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":17,"subquery_type":"EXISTS","subquery":null,"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":12,"subquery":null,"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":12,"subquery":null,"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":8,"function":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"literal":{"kind":"INTEGER","text":"1"}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":8,"function":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"literal":{"kind":"INTEGER","text":"1"}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":27,"function_name":"sum","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":31,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":43,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["a"]}],"group_sets":[[],[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":93,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_types.test b/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_types.test new file mode 100644 index 0000000..bcf6c97 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_types.test @@ -0,0 +1,65 @@ +# source: test/sql/json/test_json_deserialize_invalid_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"ENUM","type_info":{"type":"ENUM_TYPE_INFO","alias":"","values_count":3,"values":["a"]}},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"STRUCT","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","width":4,"scale":1}},"is_null":false,"value":{"children":[]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"DECIMAL","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","child_types":[]}},"is_null":false,"value":10}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"ENUM","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","width":4,"scale":1}},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"INTEGER","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","child_types":[]}},"is_null":false,"value":10}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","width":1,"scale":255}},"is_null":false,"value":10}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","width":60,"scale":0}},"is_null":false,"value":10}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT json_deserialize_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"LIST","type_info":null},"is_null":false,"value":{"children":[]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT * FROM json_execute_serialized_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","width":4,"scale":1}},"is_null":false,"value":15}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== +SELECT * FROM json_execute_serialized_sql($json$ +{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"value":{"type":{"id":"VARCHAR","type_info":{"type":"GENERIC_TYPE_INFO","alias":"JSON"}},"is_null":false,"value":"[42]"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]} +$json$); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_values.test b/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_values.test new file mode 100644 index 0000000..af4e6c4 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_deserialize_invalid_values.test @@ -0,0 +1,101 @@ +# source: test/sql/json/test_json_deserialize_invalid_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"ENUM","type_info":{"type":"ENUM_TYPE_INFO","alias":"","extension_info":null,"values_count":2,"values":["a","b"]}},"is_null":false,"value":200}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"ENUM","type_info":{"type":"ENUM_TYPE_INFO","alias":"","extension_info":null,"values_count":2,"values":["a","b"]}},"is_null":false,"value":200}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME","type_info":null},"is_null":false,"value":999999999999999}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME","type_info":null},"is_null":false,"value":999999999999999}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME","type_info":null},"is_null":false,"value":-1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME","type_info":null},"is_null":false,"value":-1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME_NS","type_info":null},"is_null":false,"value":9223372036854775806}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME_NS","type_info":null},"is_null":false,"value":9223372036854775806}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME WITH TIME ZONE","type_info":null},"is_null":false,"value":18446744073709551615}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME WITH TIME ZONE","type_info":null},"is_null":false,"value":18446744073709551615}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":2}},"is_null":false,"value":12345}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":2}},"is_null":false,"value":12345}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"ENUM","type_info":{"type":"ENUM_TYPE_INFO","alias":"","extension_info":null,"values_count":2,"values":["a","b"]}},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"TIME","type_info":null},"is_null":false,"value":86400000000}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":2}},"is_null":false,"value":-9999}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"UNION","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","extension_info":null,"child_types":[{"first":"","second":{"id":"UTINYINT","type_info":null}},{"first":"a","second":{"id":"INTEGER","type_info":null}}]}},"is_null":false,"value":{"children":[{"type":{"id":"UTINYINT","type_info":null},"is_null":false,"value":5},{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"UNION","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","extension_info":null,"child_types":[{"first":"","second":{"id":"UTINYINT","type_info":null}},{"first":"a","second":{"id":"INTEGER","type_info":null}}]}},"is_null":false,"value":{"children":[{"type":{"id":"UTINYINT","type_info":null},"is_null":false,"value":0},{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"BIT","type_info":null},"is_null":false,"value":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"BIT","type_info":null},"is_null":false,"value":"\u0009a"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"BIT","type_info":null},"is_null":false,"value":"\u0001\u0040"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"MAP","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"STRUCT","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","extension_info":null,"child_types":[{"first":"key","second":{"id":"INTEGER","type_info":null}},{"first":"value","second":{"id":"INTEGER","type_info":null}}]}}}},"is_null":false,"value":{"children":[{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"STRUCT","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","extension_info":null,"child_types":[{"first":"key","second":{"id":"INTEGER","type_info":null}}]}},"is_null":false,"value":{"children":[{"is_null":false,"value":1},{"is_null":false,"value":2}]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"STRUCT","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","extension_info":null,"child_types":[{"first":"key","second":{"id":"INTEGER","type_info":null}}]}},"is_null":false,"value":{"children":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":0,"query_location_length":0,"value":{"type":{"id":"MAP","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"STRUCT","type_info":{"type":"STRUCT_TYPE_INFO","alias":"","extension_info":null,"child_types":[{"first":"key","second":{"id":"INTEGER","type_info":null}},{"first":"value","second":{"id":"INTEGER","type_info":null}}]}}}},"is_null":false,"value":{"children":[{"is_null":false,"value":{"children":[{"is_null":false,"value":1},{"is_null":false,"value":2}]}}]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}') +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_deserialize_missing_refs.test b/parser/testdata/corpus/sql/json/test_json_deserialize_missing_refs.test new file mode 100644 index 0000000..a1e23d1 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_deserialize_missing_refs.test @@ -0,0 +1,21 @@ +# source: test/sql/json/test_json_deserialize_missing_refs.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","literal":{"kind":"INTEGER","text":"1"}}],"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","literal":{"kind":"INTEGER","text":"1"}}],"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT json_deserialize_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null}],"from_table":{"type":"COLUMN_DATA","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null}],"from_table":{"type":"COLUMN_DATA","alias":"","sample":null,"query_location":0,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_empty_object.test b/parser/testdata/corpus/sql/json/test_json_empty_object.test index 40701a7..8f027af 100644 --- a/parser/testdata/corpus/sql/json/test_json_empty_object.test +++ b/parser/testdata/corpus/sql/json/test_json_empty_object.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_empty_object.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select json_structure('{}') diff --git a/parser/testdata/corpus/sql/json/test_json_execute_serialized_types.test b/parser/testdata/corpus/sql/json/test_json_execute_serialized_types.test new file mode 100644 index 0000000..64f7d3f --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_execute_serialized_types.test @@ -0,0 +1,61 @@ +# source: test/sql/json/test_json_execute_serialized_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "STRUCT", "type_info": {"type": "DECIMAL_TYPE_INFO", "alias": "", "width": 5, "scale": 2}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "LIST", "type_info": {"type": "STRUCT_TYPE_INFO", "alias": "", "child_types": []}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "DECIMAL", "type_info": {"type": "STRUCT_TYPE_INFO", "alias": "", "child_types": []}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "ENUM", "type_info": {"type": "DECIMAL_TYPE_INFO", "alias": "", "width": 5, "scale": 2}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "INTEGER", "type_info": {"type": "DECIMAL_TYPE_INFO", "alias": "", "width": 5, "scale": 2}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "DECIMAL", "type_info": {"type": "DECIMAL_TYPE_INFO", "alias": "", "width": 50, "scale": 2}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "DECIMAL", "type_info": {"type": "DECIMAL_TYPE_INFO", "alias": "", "width": 3, "scale": 9}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "LIST"}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "DECIMAL"}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "INTEGER"}, {"id": "INTEGER"}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": ["a", "b"], "expected_types": [], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}], [{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}, {"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "DECIMAL", "type_info": {"type": "DECIMAL_TYPE_INFO", "alias": "", "width": 5, "scale": 2}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== +SELECT * FROM json_execute_serialized_sql('{"error": false, "statements": [{"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 7, "query_location_length": 1, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "SUBQUERY", "alias": "t", "sample": null, "query_location": 14, "query_location_length": 12, "subquery": {"node": {"type": "SELECT_NODE", "modifiers": [], "cte_map": {"map": []}, "select_list": [{"class": "STAR", "type": "STAR", "alias": "", "query_location": 18446744073709551615, "query_location_length": 0, "relation_name": "", "exclude_list": [], "replace_list": [], "columns": false, "expr": null, "qualified_exclude_list": [], "rename_list": []}], "from_table": {"type": "EXPRESSION_LIST", "alias": "valueslist", "sample": null, "query_location": 18446744073709551615, "query_location_length": 0, "expected_names": [], "expected_types": [{"id": "INTEGER", "type_info": {"type": "GENERIC_TYPE_INFO", "alias": "myint"}}], "values": [[{"class": "CONSTANT", "type": "VALUE_CONSTANT", "alias": "", "query_location": 23, "query_location_length": 1, "literal": {"kind": "INTEGER", "text": "1"}}]]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}, "column_name_alias": ["a"]}, "where_clause": null, "group_expressions": [], "group_sets": [], "aggregate_handling": "STANDARD_HANDLING", "having": null, "sample": null, "qualify": null}, "named_param_map": []}]}'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_export.test b/parser/testdata/corpus/sql/json/test_json_export.test index 1a92250..7f43271 100644 --- a/parser/testdata/corpus/sql/json/test_json_export.test +++ b/parser/testdata/corpus/sql/json/test_json_export.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_export.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table text(i varchar); diff --git a/parser/testdata/corpus/sql/json/test_json_geometry_format.test b/parser/testdata/corpus/sql/json/test_json_geometry_format.test index dca89af..8f7bb88 100644 --- a/parser/testdata/corpus/sql/json/test_json_geometry_format.test +++ b/parser/testdata/corpus/sql/json/test_json_geometry_format.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_geometry_format.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('json_geometry_format'); diff --git a/parser/testdata/corpus/sql/json/test_json_group_window_macro.test b/parser/testdata/corpus/sql/json/test_json_group_window_macro.test index 38b53cf..487d13f 100644 --- a/parser/testdata/corpus/sql/json/test_json_group_window_macro.test +++ b/parser/testdata/corpus/sql/json/test_json_group_window_macro.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_group_window_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(g INT, k VARCHAR, v INT); diff --git a/parser/testdata/corpus/sql/json/test_json_macros.test b/parser/testdata/corpus/sql/json/test_json_macros.test index 806524a..91b43c0 100644 --- a/parser/testdata/corpus/sql/json/test_json_macros.test +++ b/parser/testdata/corpus/sql/json/test_json_macros.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_macros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select range + 10 n, range v from range(10) diff --git a/parser/testdata/corpus/sql/json/test_json_path_long_index.test b/parser/testdata/corpus/sql/json/test_json_path_long_index.test new file mode 100644 index 0000000..d88be71 --- /dev/null +++ b/parser/testdata/corpus/sql/json/test_json_path_long_index.test @@ -0,0 +1,21 @@ +# source: test/sql/json/test_json_path_long_index.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT json_extract('[1,2]', '$[1234567890123456789') +-- +ok +== +SELECT json_extract('[1,2]', '$[12345678901234567890]') +-- +ok +== +SELECT json_extract('[1,2]', '$[#-1234567890123456789') +-- +ok +== +SELECT json_extract('[1,2]', '$[1234567890123456789]'), json_extract('[1,2]', '$[1]'), json_extract('[1,2]', '$[#-1]'), json_extract('[[1,2]]', '$[0][1]') +-- +ok +== diff --git a/parser/testdata/corpus/sql/json/test_json_persistence.test b/parser/testdata/corpus/sql/json/test_json_persistence.test index b3e19ae..3eba9f4 100644 --- a/parser/testdata/corpus/sql/json/test_json_persistence.test +++ b/parser/testdata/corpus/sql/json/test_json_persistence.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_persistence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test (j json) diff --git a/parser/testdata/corpus/sql/json/test_json_serialize_plan.test b/parser/testdata/corpus/sql/json/test_json_serialize_plan.test index b048e42..b8d8cdc 100644 --- a/parser/testdata/corpus/sql/json/test_json_serialize_plan.test +++ b/parser/testdata/corpus/sql/json/test_json_serialize_plan.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_serialize_plan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT json_copy_to_json({'d': DATE '2026-01-02'}, '%d/%m/%Y', NULL); @@ -51,6 +51,19 @@ FROM ( -- ok == +SELECT json_extract( + json_serialize_plan( + 'SELECT 1::TINYINT, 2::UTINYINT, 3::SMALLINT, 4::USMALLINT, ' + '170141183460469231731687303715884105727::HUGEINT, ' + '340282366920938463463374607431768211455::UHUGEINT, ' + '1.25::FLOAT, 2.5::DOUBLE, ''NaN''::DOUBLE', + optimize := true + ), + '$.plans[0].expressions[*].value.type.id' +); +-- +ok +== SELECT json_serialize_plan('SELECT AND LAUNCH ROCKETS WHERE 1 = 1'); -- ok diff --git a/parser/testdata/corpus/sql/json/test_json_serialize_sql.test b/parser/testdata/corpus/sql/json/test_json_serialize_sql.test index 37bfe75..79c0962 100644 --- a/parser/testdata/corpus/sql/json/test_json_serialize_sql.test +++ b/parser/testdata/corpus/sql/json/test_json_serialize_sql.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_serialize_sql.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version='v1.0.0' @@ -43,6 +43,30 @@ SELECT json_deserialize_sql(json_serialize_sql('SELECT * FROM t1 JOIN t2 USING(" -- ok == +WITH base AS ( + SELECT json_serialize_sql('SELECT 1')::VARCHAR AS serialized +), typed(ord, type_name, value_json) AS (VALUES + (1, 'TINYINT', '1}'), + (2, 'UTINYINT', '1}'), + (3, 'SMALLINT', '1}'), + (4, 'USMALLINT', '1}'), + (5, 'BIGINT', '1}'), + (6, 'HUGEINT', '{"upper":0,"lower":1}}'), + (7, 'UHUGEINT', '{"upper":0,"lower":1}}'), + (8, 'FLOAT', '1.25}'), + (9, 'DOUBLE', '1.25}') +) +SELECT json_deserialize_sql( + replace( + replace(serialized, '"INTEGER"', format('"{}"', type_name)), + '"value":1}', '"value":' || value_json + ) +) +FROM base, typed +ORDER BY ord; +-- +ok +== SELECT json_deserialize_sql(json_serialize_sql('SELECT AND LAUNCH ROCKETS WHERE 1 = 1')); -- error: Parser Error: Error parsing json: parser: syntax error at or near "AND" @@ -93,6 +117,26 @@ SELECT * FROM json_execute_serialized_sql('{ "statements": [ {"expression_class" -- error: Parser Error: Error parsing json: no select node found in json == +SELECT json_deserialize_sql('{"statements":[{"node":{}}]}'); +-- +error: Parser Error: Expected but did not find property 'type' in json object: '{}' +== +SELECT json_deserialize_sql('{"statements":[{"node":{"type":42}}]}'); +-- +error: Parser Error: property 'type' expected type 'string', but got type: 'uint' +== +SELECT json_deserialize_sql('{"statements":[{"node":42}]}'); +-- +error: Parser Error: property 'node' expected type 'object', but got type: 'uint' +== +SELECT json_deserialize_sql('{"statements":[{"node":{"type":"SELECT_NODE","modifiers":{}}}]}'); +-- +error: Parser Error: property 'modifiers' expected type 'array', but got type: 'object' +== +SELECT json_deserialize_sql('{"statements":[{"node":{"type":"SELECT_NODE","modifiers":[42]}}]}'); +-- +error: Parser Error: Sequence expect child of type 'object', but got type: uint +== CREATE TEMP TABLE json_deserialize_filter_pushdown(j JSON); -- ok diff --git a/parser/testdata/corpus/sql/json/test_json_serialize_sql.test.metadata.json b/parser/testdata/corpus/sql/json/test_json_serialize_sql.test.metadata.json index 98a13c4..059aec5 100644 --- a/parser/testdata/corpus/sql/json/test_json_serialize_sql.test.metadata.json +++ b/parser/testdata/corpus/sql/json/test_json_serialize_sql.test.metadata.json @@ -1,10 +1,15 @@ { - "skip": { - "7b368bad1df6ae67": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", - "c8a31233b8e3f7f6": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it" - }, "todo": { + "002ac6ed59f31791": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "0beceefbc70a3a8d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "38e14895144540b3": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "8788120292a50ed5": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "d19d0dfbeef80955": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "e85c28ba8901330d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", "ebbdaa4a4b55e8d2": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + }, + "skip": { + "7b368bad1df6ae67": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", + "c8a31233b8e3f7f6": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it" } } diff --git a/parser/testdata/corpus/sql/json/test_json_sqlite.test b/parser/testdata/corpus/sql/json/test_json_sqlite.test index 900479d..4bb1504 100644 --- a/parser/testdata/corpus/sql/json/test_json_sqlite.test +++ b/parser/testdata/corpus/sql/json/test_json_sqlite.test @@ -1,6 +1,6 @@ # source: test/sql/json/test_json_sqlite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO j1(x) diff --git a/parser/testdata/corpus/sql/keywords/escaped_quotes_expressions.test b/parser/testdata/corpus/sql/keywords/escaped_quotes_expressions.test index 3cad395..f85483f 100644 --- a/parser/testdata/corpus/sql/keywords/escaped_quotes_expressions.test +++ b/parser/testdata/corpus/sql/keywords/escaped_quotes_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/keywords/escaped_quotes_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA "SCH""EMA"; diff --git a/parser/testdata/corpus/sql/keywords/keywords_in_expressions.test b/parser/testdata/corpus/sql/keywords/keywords_in_expressions.test index 4d53f1a..57bb501 100644 --- a/parser/testdata/corpus/sql/keywords/keywords_in_expressions.test +++ b/parser/testdata/corpus/sql/keywords/keywords_in_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/keywords/keywords_in_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE "ENUM" AS ENUM('ALL'); diff --git a/parser/testdata/corpus/sql/limit/limit_exceeds_child_cardinality.test b/parser/testdata/corpus/sql/limit/limit_exceeds_child_cardinality.test new file mode 100644 index 0000000..b1283cb --- /dev/null +++ b/parser/testdata/corpus/sql/limit/limit_exceeds_child_cardinality.test @@ -0,0 +1,29 @@ +# source: test/sql/limit/limit_exceeds_child_cardinality.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT i FROM range(10) t(i) ORDER BY i LIMIT 2147483647 +-- +ok +== +SELECT i FROM range(10) t(i) ORDER BY i DESC LIMIT 11 +-- +ok +== +SELECT i FROM range(10) t(i) GROUP BY i ORDER BY i LIMIT 2147483647 +-- +ok +== +CREATE TABLE tbl AS SELECT range AS i FROM range(5) +-- +ok +== +SELECT i FROM tbl ORDER BY i LIMIT 9223372036854775807 +-- +ok +== +SELECT count(*) FROM (SELECT i FROM tbl ORDER BY i LIMIT 100) +-- +ok +== diff --git a/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush.test b/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush.test index dceba13..5fcf3eb 100644 --- a/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush.test +++ b/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush.test @@ -1,6 +1,6 @@ # source: test/sql/limit/streaming_limit_pipeline_flush.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT o.o_orderkey diff --git a/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush2.test b/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush2.test new file mode 100644 index 0000000..4920ed5 --- /dev/null +++ b/parser/testdata/corpus/sql/limit/streaming_limit_pipeline_flush2.test @@ -0,0 +1,17 @@ +# source: test/sql/limit/streaming_limit_pipeline_flush2.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*), sum(x) + FROM ( + SELECT unnest(range(200000)) AS u, x + FROM ( + SELECT lead(i, 1, 7) OVER () AS x + FROM range(1) t(i) + ) + LIMIT 200001 + ); +-- +ok +== diff --git a/parser/testdata/corpus/sql/limit/test_batch_limit_filters.test b/parser/testdata/corpus/sql/limit/test_batch_limit_filters.test index f80df78..6454638 100644 --- a/parser/testdata/corpus/sql/limit/test_batch_limit_filters.test +++ b/parser/testdata/corpus/sql/limit/test_batch_limit_filters.test @@ -1,6 +1,6 @@ # source: test/sql/limit/test_batch_limit_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT concat('thisisastring', i) s FROM range(1_000_000) t(i) diff --git a/parser/testdata/corpus/sql/limit/test_limit0.test b/parser/testdata/corpus/sql/limit/test_limit0.test index 5ecdb78..d014f86 100644 --- a/parser/testdata/corpus/sql/limit/test_limit0.test +++ b/parser/testdata/corpus/sql/limit/test_limit0.test @@ -1,6 +1,6 @@ # source: test/sql/limit/test_limit0.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (SELECT SUM(i) FROM range(100000000000) tbl(i)) LIMIT 0; diff --git a/parser/testdata/corpus/sql/limit/test_preserve_insertion_order.test b/parser/testdata/corpus/sql/limit/test_preserve_insertion_order.test index fe58b32..aaac4ef 100644 --- a/parser/testdata/corpus/sql/limit/test_preserve_insertion_order.test +++ b/parser/testdata/corpus/sql/limit/test_preserve_insertion_order.test @@ -1,6 +1,6 @@ # source: test/sql/limit/test_preserve_insertion_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT 1 AS i FROM range(1000000) t(i) diff --git a/parser/testdata/corpus/sql/logging/enable_logging_file_no_path.test b/parser/testdata/corpus/sql/logging/enable_logging_file_no_path.test index 96e58ca..2764e83 100644 --- a/parser/testdata/corpus/sql/logging/enable_logging_file_no_path.test +++ b/parser/testdata/corpus/sql/logging/enable_logging_file_no_path.test @@ -1,6 +1,6 @@ # source: test/sql/logging/enable_logging_file_no_path.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging(storage='memory') diff --git a/parser/testdata/corpus/sql/logging/file_system_logging_attach.test b/parser/testdata/corpus/sql/logging/file_system_logging_attach.test index 79bdc36..7668ab7 100644 --- a/parser/testdata/corpus/sql/logging/file_system_logging_attach.test +++ b/parser/testdata/corpus/sql/logging/file_system_logging_attach.test @@ -1,6 +1,6 @@ # source: test/sql/logging/file_system_logging_attach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET enable_logging=true; diff --git a/parser/testdata/corpus/sql/logging/file_system_logging_attach_deadlock.test b/parser/testdata/corpus/sql/logging/file_system_logging_attach_deadlock.test index 8f6d11f..ea0f190 100644 --- a/parser/testdata/corpus/sql/logging/file_system_logging_attach_deadlock.test +++ b/parser/testdata/corpus/sql/logging/file_system_logging_attach_deadlock.test @@ -1,6 +1,6 @@ # source: test/sql/logging/file_system_logging_attach_deadlock.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET memory_limit='1000kb'; diff --git a/parser/testdata/corpus/sql/logging/http_log_timing.test b/parser/testdata/corpus/sql/logging/http_log_timing.test index 2cd292e..ef75e48 100644 --- a/parser/testdata/corpus/sql/logging/http_log_timing.test +++ b/parser/testdata/corpus/sql/logging/http_log_timing.test @@ -1,12 +1,8 @@ # source: test/sql/logging/http_log_timing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CALL enable_logging('HTTP') --- -ok -== SET http_retries=2 -- ok diff --git a/parser/testdata/corpus/sql/logging/http_request_log_redaction.test b/parser/testdata/corpus/sql/logging/http_request_log_redaction.test new file mode 100644 index 0000000..768b17f --- /dev/null +++ b/parser/testdata/corpus/sql/logging/http_request_log_redaction.test @@ -0,0 +1,61 @@ +# source: test/sql/logging/http_request_log_redaction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL enable_logging('HTTP', storage = 'memory'); +-- +ok +== +SET enable_external_file_cache = false; +-- +ok +== +SET enable_http_metadata_cache = false; +-- +ok +== +CREATE SECRET http_log_headers ( + TYPE HTTP, + SCOPE 'https://raw.githubusercontent.com/duckdb/duckdb/v2.0-cyanoptera/data/csv/header.csv', + EXTRA_HTTP_HEADERS MAP { + 'aUtHoRiZaTiOn': 'dummy-authorization', + 'Cookie': 'dummy-cookie', + 'x-amz-security-token': 'dummy-token', + 'X-Custom': 'dummy-custom', + 'ETag': 'dummy-etag', + 'AcCePt': 'text/csv', + 'AcCePt-EnCoDiNg': 'identity' + } +); +-- +ok +== +FROM 'https://raw.githubusercontent.com/duckdb/duckdb/v2.0-cyanoptera/data/csv/header.csv'; +-- +ok +== +SELECT DISTINCT entry.key, entry.value +FROM duckdb_logs_parsed('HTTP'), UNNEST(map_entries(request.headers)) AS headers(entry) +WHERE lower(entry.key) IN ('authorization', 'cookie', 'x-amz-security-token', 'x-custom', 'etag', 'accept', 'accept-encoding'); +-- +ok +== +SET redact_http_logs = false; +-- +ok +== +RESET redact_http_logs; +-- +ok +== +SELECT current_setting('redact_http_logs'); +-- +ok +== +SELECT count(*) > 0 AND bool_and(entry.value = 'redacted') +FROM duckdb_logs_parsed('HTTP'), UNNEST(map_entries(request.headers)) AS headers(entry) +WHERE lower(entry.key) = 'authorization'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/logging/http_response_log_redaction.test b/parser/testdata/corpus/sql/logging/http_response_log_redaction.test new file mode 100644 index 0000000..a7ea78c --- /dev/null +++ b/parser/testdata/corpus/sql/logging/http_response_log_redaction.test @@ -0,0 +1,43 @@ +# source: test/sql/logging/http_response_log_redaction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET extension_directory = '{TEST_DIR}/http_response_log_redaction'; +-- +ok +== +SET autoload_known_extensions = false; +-- +ok +== +SET autoinstall_known_extensions = false; +-- +ok +== +INSTALL 'http://github.com/duckdb/duckdb'; +-- +ok +== +SELECT lower(entry.key), bool_and(CASE lower(entry.key) + WHEN 'location' THEN entry.value = 'redacted' + WHEN 'content-length' THEN TRY_CAST(entry.value AS BIGINT) >= 0 +END) +FROM duckdb_logs_parsed('HTTP'), UNNEST(map_entries(response.headers)) AS headers(entry) +WHERE lower(entry.key) IN ('location', 'content-length') +GROUP BY lower(entry.key); +-- +ok +== +SELECT count(*) > 0 AND bool_and(entry.value = 'https://github.com/duckdb/duckdb') +FROM duckdb_logs_parsed('HTTP'), UNNEST(map_entries(response.headers)) AS headers(entry) +WHERE lower(entry.key) = 'location'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(entry.value = 'redacted') +FROM duckdb_logs_parsed('HTTP'), UNNEST(map_entries(response.headers)) AS headers(entry) +WHERE lower(entry.key) = 'location'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/logging/http_url_log_redaction.test b/parser/testdata/corpus/sql/logging/http_url_log_redaction.test new file mode 100644 index 0000000..13beb49 --- /dev/null +++ b/parser/testdata/corpus/sql/logging/http_url_log_redaction.test @@ -0,0 +1,96 @@ +# source: test/sql/logging/http_url_log_redaction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET extension_directory = '{TEST_DIR}/http_url_log_redaction'; +-- +ok +== +SET redact_http_logs = {redact}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) > 0 AND bool_and(request.url = 'http://github.com/duckdb/duckdb') +FROM duckdb_logs_parsed('HTTP'); +-- +ok +== +INSTALL 'http://github.com/duckdb/duckdb?custom_token=dummy-token&email=dummy@example.com'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = CASE WHEN {redact} + THEN 'http://github.com/duckdb/duckdb?redacted' + ELSE 'http://github.com/duckdb/duckdb?custom_token=dummy-token&email=dummy@example.com' +END) +FROM duckdb_logs_parsed('HTTP'); +-- +error: Parser Error: syntax error at or near "}" +== +INSTALL 'http://github.com/duckdb/duckdb#dummy-token'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = CASE WHEN {redact} + THEN 'http://github.com/duckdb/duckdb#redacted' + ELSE 'http://github.com/duckdb/duckdb#dummy-token' +END) +FROM duckdb_logs_parsed('HTTP'); +-- +error: Parser Error: syntax error at or near "}" +== +INSTALL 'http://github.com/duckdb/duckdb?token=dummy-token#dummy-fragment'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = CASE WHEN {redact} + THEN 'http://github.com/duckdb/duckdb?redacted' + ELSE 'http://github.com/duckdb/duckdb?token=dummy-token#dummy-fragment' +END) +FROM duckdb_logs_parsed('HTTP'); +-- +error: Parser Error: syntax error at or near "}" +== +INSTALL 'http://github.com/duckdb/duckdb#dummy-fragment?token=dummy-token'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = CASE WHEN {redact} + THEN 'http://github.com/duckdb/duckdb#redacted' + ELSE 'http://github.com/duckdb/duckdb#dummy-fragment?token=dummy-token' +END) +FROM duckdb_logs_parsed('HTTP'); +-- +error: Parser Error: syntax error at or near "}" +== +INSTALL 'http://github.com/duckdb/duckdb@dummy'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = 'http://github.com/duckdb/duckdb@dummy') +FROM duckdb_logs_parsed('HTTP'); +-- +ok +== +INSTALL 'http://github.com/duckdb/duckdb%3Fdummy%23dummy%40dummy'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = 'http://github.com/duckdb/duckdb%3Fdummy%23dummy%40dummy') +FROM duckdb_logs_parsed('HTTP'); +-- +ok +== +INSTALL 'http://github.com/duckdb/duckdb?'; +-- +ok +== +SELECT count(*) > 0 AND bool_and(request.url = CASE WHEN {redact} + THEN 'http://github.com/duckdb/duckdb?redacted' + ELSE 'http://github.com/duckdb/duckdb?' +END) +FROM duckdb_logs_parsed('HTTP'); +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/logging/logging.test b/parser/testdata/corpus/sql/logging/logging.test index 3883e4e..1d8ac41 100644 --- a/parser/testdata/corpus/sql/logging/logging.test +++ b/parser/testdata/corpus/sql/logging/logging.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM duckdb_logs diff --git a/parser/testdata/corpus/sql/logging/logging_branch_coverage.test b/parser/testdata/corpus/sql/logging/logging_branch_coverage.test new file mode 100644 index 0000000..d370ed1 --- /dev/null +++ b/parser/testdata/corpus/sql/logging/logging_branch_coverage.test @@ -0,0 +1,62 @@ +# source: test/sql/logging/logging_branch_coverage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL enable_logging(level = 'trace', storage = 'memory') +-- +ok +== +SET disabled_log_types = 'QueryLog' +-- +ok +== +SET logging_mode = 'DISABLE_SELECTED' +-- +ok +== +SELECT write_log('hidden database log', log_type := 'QueryLog', scope := 'database') +-- +ok +== +SELECT count(*) FROM duckdb_logs +WHERE type = 'QueryLog' AND message IN ('SELECT 42', 'hidden database log') +-- +ok +== +SET disabled_log_types = 'FileSystem' +-- +ok +== +SELECT 43 +-- +ok +== +SELECT write_log('visible database log', log_type := 'QueryLog', scope := 'database') +-- +ok +== +SELECT count(*) FROM duckdb_logs WHERE type = 'QueryLog' AND message = 'SELECT 43' +-- +ok +== +SELECT count(*) FROM duckdb_logs WHERE type = 'QueryLog' AND message = 'visible database log' +-- +ok +== +RESET logging_mode +-- +ok +== +RESET disabled_log_types +-- +ok +== +SET disabled_filesystems = 'LocalFileSystem' +-- +ok +== +CALL enable_logging('QueryLog', storage = 'file', storage_path = '{TEST_DIR}/disabled_filesystem.csv') +-- +ok +== diff --git a/parser/testdata/corpus/sql/logging/logging_buffer_size.test b/parser/testdata/corpus/sql/logging/logging_buffer_size.test index 0a5c722..55486c6 100644 --- a/parser/testdata/corpus/sql/logging/logging_buffer_size.test +++ b/parser/testdata/corpus/sql/logging/logging_buffer_size.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_buffer_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging('QueryLog', storage_config={'buffer_size': 10, 'only_flush_on_full_buffer': true}); diff --git a/parser/testdata/corpus/sql/logging/logging_call_functions.test b/parser/testdata/corpus/sql/logging/logging_call_functions.test index f5c0644..5c364ba 100644 --- a/parser/testdata/corpus/sql/logging/logging_call_functions.test +++ b/parser/testdata/corpus/sql/logging/logging_call_functions.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_call_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW log_settings AS select name, value from duckdb_settings() where name in ['logging_level', 'logging_mode', 'logging_storage', 'enable_logging', 'enabled_log_types', 'disabled_log_types'] ORDER BY name diff --git a/parser/testdata/corpus/sql/logging/logging_context_ids.test b/parser/testdata/corpus/sql/logging/logging_context_ids.test index 8fbe10d..d7255da 100644 --- a/parser/testdata/corpus/sql/logging/logging_context_ids.test +++ b/parser/testdata/corpus/sql/logging/logging_context_ids.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_context_ids.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging(); diff --git a/parser/testdata/corpus/sql/logging/logging_csv.test b/parser/testdata/corpus/sql/logging/logging_csv.test index c69c3ff..5249b92 100644 --- a/parser/testdata/corpus/sql/logging/logging_csv.test +++ b/parser/testdata/corpus/sql/logging/logging_csv.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging(['FileSystem'], storage='file', storage_config={'path': '{TEMP_DIR}/logging_csv_log.csv', 'normalize': false}); diff --git a/parser/testdata/corpus/sql/logging/logging_file_bind_replace.test b/parser/testdata/corpus/sql/logging/logging_file_bind_replace.test index 793af3f..4adc631 100644 --- a/parser/testdata/corpus/sql/logging/logging_file_bind_replace.test +++ b/parser/testdata/corpus/sql/logging/logging_file_bind_replace.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_file_bind_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging(['QueryLog'], storage_path='{TEST_DIR}/logging_file_bind_replace_log.csv'); diff --git a/parser/testdata/corpus/sql/logging/logging_file_persistence.test b/parser/testdata/corpus/sql/logging/logging_file_persistence.test index f764108..3602598 100644 --- a/parser/testdata/corpus/sql/logging/logging_file_persistence.test +++ b/parser/testdata/corpus/sql/logging/logging_file_persistence.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_file_persistence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging('FileSystem', storage='file', storage_config={'path': '{TEMP_DIR}/logging_file_persistence.csv'}); diff --git a/parser/testdata/corpus/sql/logging/logging_file_truncate_rewrite.test b/parser/testdata/corpus/sql/logging/logging_file_truncate_rewrite.test index d959331..f104e6b 100644 --- a/parser/testdata/corpus/sql/logging/logging_file_truncate_rewrite.test +++ b/parser/testdata/corpus/sql/logging/logging_file_truncate_rewrite.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_file_truncate_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging(['FileSystem'], storage='file', storage_config={'path': '{TEMP_DIR}/logging_truncate_rewrite.csv', 'normalize': false}); diff --git a/parser/testdata/corpus/sql/logging/logging_memory_after_truncate.test b/parser/testdata/corpus/sql/logging/logging_memory_after_truncate.test index dc1df6e..39098ad 100644 --- a/parser/testdata/corpus/sql/logging/logging_memory_after_truncate.test +++ b/parser/testdata/corpus/sql/logging/logging_memory_after_truncate.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_memory_after_truncate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET GLOBAL logging_level = 'INFO'; diff --git a/parser/testdata/corpus/sql/logging/logging_non_queryable_storage.test b/parser/testdata/corpus/sql/logging/logging_non_queryable_storage.test new file mode 100644 index 0000000..335761f --- /dev/null +++ b/parser/testdata/corpus/sql/logging/logging_non_queryable_storage.test @@ -0,0 +1,41 @@ +# source: test/sql/logging/logging_non_queryable_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET logging_storage = 'stdout'; +-- +ok +== +SELECT * FROM duckdb_logs(); +-- +ok +== +SELECT * FROM duckdb_log_contexts(); +-- +ok +== +SELECT * FROM duckdb_logs(denormalized_table = true); +-- +ok +== +SET logging_storage = 'memory'; +-- +ok +== +SELECT count(*) FROM duckdb_logs(); +-- +ok +== +SELECT count(*) FROM duckdb_log_contexts(); +-- +ok +== +SELECT count(*) FROM duckdb_logs() WHERE message = 'SELECT 42;'; +-- +ok +== +SELECT count(*) FROM duckdb_logs(denormalized_table = true) WHERE message = 'SELECT 42;'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/logging/logging_types.test b/parser/testdata/corpus/sql/logging/logging_types.test index 788684b..2ee3f93 100644 --- a/parser/testdata/corpus/sql/logging/logging_types.test +++ b/parser/testdata/corpus/sql/logging/logging_types.test @@ -1,6 +1,6 @@ # source: test/sql/logging/logging_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging('FileSystem'); @@ -15,7 +15,17 @@ FROM '{TEST_DIR}/par.csv' -- ok == -SELECT type, log_level, scope, fs, parse_filename(path), op, bytes, pos FROM duckdb_logs_parsed('FileSystem') ORDER BY timestamp +SELECT type, log_level, scope, fs, parse_filename(path), op, bytes, pos +FROM duckdb_logs_parsed('FileSystem') +WHERE op != 'WRITE' +ORDER BY timestamp +-- +ok +== +SELECT type, log_level, scope, fs, parse_filename(path), op, sum(bytes), min(pos), max(pos + bytes) +FROM duckdb_logs_parsed('FileSystem') +WHERE op = 'WRITE' +GROUP BY ALL -- ok == diff --git a/parser/testdata/corpus/sql/logging/test_enable_logging_unknown_type_file_storage.test b/parser/testdata/corpus/sql/logging/test_enable_logging_unknown_type_file_storage.test new file mode 100644 index 0000000..dfec43e --- /dev/null +++ b/parser/testdata/corpus/sql/logging/test_enable_logging_unknown_type_file_storage.test @@ -0,0 +1,21 @@ +# source: test/sql/logging/test_enable_logging_unknown_type_file_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL enable_logging(level := 'warning', storage := 'memory'); +-- +ok +== +CALL enable_logging('nope', storage := 'file', storage_path := '{TEST_DIR}/enable_logging_unknown.csv'); +-- +ok +== +SELECT * FROM enable_logging('a', storage_path := '{TEST_DIR}/enable_logging_unknown_2.csv'); +-- +ok +== +SELECT current_setting('logging_storage'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/logging/test_logging_function.test b/parser/testdata/corpus/sql/logging/test_logging_function.test index 9b836f7..76ad2cb 100644 --- a/parser/testdata/corpus/sql/logging/test_logging_function.test +++ b/parser/testdata/corpus/sql/logging/test_logging_function.test @@ -1,6 +1,6 @@ # source: test/sql/logging/test_logging_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit from duckdb_logs @@ -44,3 +44,7 @@ FROM duckdb_logs where starts_with(message, 'hello from the') order by query_id -- ok == +SELECT write_log('hello', scope := 'thread'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/merge/merge_into.test b/parser/testdata/corpus/sql/merge/merge_into.test index 89b5ca0..9ac31e7 100644 --- a/parser/testdata/corpus/sql/merge/merge_into.test +++ b/parser/testdata/corpus/sql/merge/merge_into.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Stock(item_id int, balance int); diff --git a/parser/testdata/corpus/sql/merge/merge_into_bind_matching_columns.test b/parser/testdata/corpus/sql/merge/merge_into_bind_matching_columns.test index e13654e..7cfaf54 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_bind_matching_columns.test +++ b/parser/testdata/corpus/sql/merge/merge_into_bind_matching_columns.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_bind_matching_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dest (id INTEGER, val INTEGER); diff --git a/parser/testdata/corpus/sql/merge/merge_into_by_source.test b/parser/testdata/corpus/sql/merge/merge_into_by_source.test index 7c056a2..9746e31 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_by_source.test +++ b/parser/testdata/corpus/sql/merge/merge_into_by_source.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_by_source.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO Stock VALUES (5, 10), (10, 20), (20, 30); diff --git a/parser/testdata/corpus/sql/merge/merge_into_constraint.test b/parser/testdata/corpus/sql/merge/merge_into_constraint.test index 7e4a4dd..406b7eb 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_constraint.test +++ b/parser/testdata/corpus/sql/merge/merge_into_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Stock(item_id int NOT NULL, balance int, CHECK (balance>0)); diff --git a/parser/testdata/corpus/sql/merge/merge_into_default.test b/parser/testdata/corpus/sql/merge/merge_into_default.test index 46382c2..e973c20 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_default.test +++ b/parser/testdata/corpus/sql/merge/merge_into_default.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Stock(item_id int, balance int DEFAULT 0); diff --git a/parser/testdata/corpus/sql/merge/merge_into_error.test b/parser/testdata/corpus/sql/merge/merge_into_error.test index ec877f4..9bb3835 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_error.test +++ b/parser/testdata/corpus/sql/merge/merge_into_error.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Buys(item_id int, volume int); @@ -11,6 +11,10 @@ INSERT INTO Buys VALUES (42, 100); -- ok == +MERGE INTO Stock AS USING Buys ON true WHEN MATCHED THEN DELETE; +-- +error: Parser Error: syntax error at or near "USING" +== MERGE INTO Stock USING Buys USING (item_id) WHEN NOT MATCHED AND true THEN INSERT WHEN NOT MATCHED AND error('this should not be executed') THEN INSERT diff --git a/parser/testdata/corpus/sql/merge/merge_into_explain_analyze.test b/parser/testdata/corpus/sql/merge/merge_into_explain_analyze.test new file mode 100644 index 0000000..869a8a0 --- /dev/null +++ b/parser/testdata/corpus/sql/merge/merge_into_explain_analyze.test @@ -0,0 +1,25 @@ +# source: test/sql/merge/merge_into_explain_analyze.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE target(i INTEGER); +-- +ok +== +CREATE TABLE source AS SELECT i::INTEGER AS i FROM range(200000) t(i); +-- +ok +== +EXPLAIN ANALYZE MERGE INTO target USING (SELECT 1 i) s ON target.i = s.i WHEN NOT MATCHED THEN INSERT VALUES (s.i); +-- +ok +== +EXPLAIN ANALYZE MERGE INTO target USING source AS s ON target.i = s.i WHEN NOT MATCHED THEN INSERT VALUES (s.i); +-- +ok +== +SELECT count(*) FROM target +-- +ok +== diff --git a/parser/testdata/corpus/sql/merge/merge_into_index.test b/parser/testdata/corpus/sql/merge/merge_into_index.test index 70629af..0cac944 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_index.test +++ b/parser/testdata/corpus/sql/merge/merge_into_index.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Accounts(id INTEGER, username VARCHAR PRIMARY KEY, favorite_numbers INT[]); diff --git a/parser/testdata/corpus/sql/merge/merge_into_insert_star.test b/parser/testdata/corpus/sql/merge/merge_into_insert_star.test index 2bb0028..e6c2c4b 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_insert_star.test +++ b/parser/testdata/corpus/sql/merge/merge_into_insert_star.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_insert_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit MERGE INTO Stock USING (VALUES (5, 10)) new_accounts(item_id, balance) USING (item_id) diff --git a/parser/testdata/corpus/sql/merge/merge_into_invalid_action.test b/parser/testdata/corpus/sql/merge/merge_into_invalid_action.test index 33a0165..b63040b 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_invalid_action.test +++ b/parser/testdata/corpus/sql/merge/merge_into_invalid_action.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_invalid_action.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT range a FROM generate_series(0,9) t(range); diff --git a/parser/testdata/corpus/sql/merge/merge_into_invalid_column.test b/parser/testdata/corpus/sql/merge/merge_into_invalid_column.test index 9527172..5cda357 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_invalid_column.test +++ b/parser/testdata/corpus/sql/merge/merge_into_invalid_column.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_invalid_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v0 (v1 INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/merge/merge_into_invalid_column_reference.test b/parser/testdata/corpus/sql/merge/merge_into_invalid_column_reference.test index 7b22c16..132a99e 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_invalid_column_reference.test +++ b/parser/testdata/corpus/sql/merge/merge_into_invalid_column_reference.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_invalid_column_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE target(id INT PRIMARY KEY, val INT); diff --git a/parser/testdata/corpus/sql/merge/merge_into_join_as_filter.test b/parser/testdata/corpus/sql/merge/merge_into_join_as_filter.test index 01dc8d5..454a1be 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_join_as_filter.test +++ b/parser/testdata/corpus/sql/merge/merge_into_join_as_filter.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_join_as_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table foo (bar integer); diff --git a/parser/testdata/corpus/sql/merge/merge_into_multiple_updates.test b/parser/testdata/corpus/sql/merge/merge_into_multiple_updates.test index 734159d..54e0a3d 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_multiple_updates.test +++ b/parser/testdata/corpus/sql/merge/merge_into_multiple_updates.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_multiple_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Entry(type varchar, number int, text varchar, country VARCHAR, date DATE); diff --git a/parser/testdata/corpus/sql/merge/merge_into_parenthesis_bug.test b/parser/testdata/corpus/sql/merge/merge_into_parenthesis_bug.test index b15b140..6b2855c 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_parenthesis_bug.test +++ b/parser/testdata/corpus/sql/merge/merge_into_parenthesis_bug.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_parenthesis_bug.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE my_timeseries (ts TIMESTAMP, x DOUBLE PRECISION, y DOUBLE PRECISION); diff --git a/parser/testdata/corpus/sql/merge/merge_into_pipelines.test b/parser/testdata/corpus/sql/merge/merge_into_pipelines.test new file mode 100644 index 0000000..903234b --- /dev/null +++ b/parser/testdata/corpus/sql/merge/merge_into_pipelines.test @@ -0,0 +1,67 @@ +# source: test/sql/merge/merge_into_pipelines.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE stock(item_id INTEGER, balance INTEGER); +-- +ok +== +INSERT INTO stock VALUES (10, 2200), (20, 1900); +-- +ok +== +CREATE TABLE buy(item_id INTEGER, volume INTEGER); +-- +ok +== +INSERT INTO buy VALUES (10, 1000), (30, 300); +-- +ok +== +EXPLAIN MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN UPDATE SET balance = balance + buy.volume +WHEN NOT MATCHED THEN INSERT VALUES (buy.item_id, buy.volume) +-- +ok +== +EXPLAIN ANALYZE MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN UPDATE SET balance = balance + buy.volume +WHEN NOT MATCHED THEN INSERT VALUES (buy.item_id, buy.volume) +-- +ok +== +SELECT * FROM stock +-- +ok +== +EXPLAIN MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN DO NOTHING +-- +ok +== +MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN DO NOTHING +-- +ok +== +EXPLAIN MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN UPDATE SET balance = balance + buy.volume +WHEN NOT MATCHED THEN INSERT VALUES (buy.item_id, buy.volume) +RETURNING merge_action, * +-- +ok +== +MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN UPDATE SET balance = balance + buy.volume +WHEN NOT MATCHED THEN INSERT VALUES (buy.item_id, buy.volume) +RETURNING merge_action, * +-- +ok +== +MERGE INTO stock USING buy ON stock.item_id = buy.item_id +WHEN MATCHED THEN DO NOTHING +RETURNING * +-- +ok +== diff --git a/parser/testdata/corpus/sql/merge/merge_into_returning.test b/parser/testdata/corpus/sql/merge/merge_into_returning.test index 187f58f..4627448 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_returning.test +++ b/parser/testdata/corpus/sql/merge/merge_into_returning.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH initial_stocks(item_id, balance) AS (VALUES (10, 2200), (20, 1900)) diff --git a/parser/testdata/corpus/sql/merge/merge_into_returning_explain_no_optimizer.test b/parser/testdata/corpus/sql/merge/merge_into_returning_explain_no_optimizer.test new file mode 100644 index 0000000..1a9d3f3 --- /dev/null +++ b/parser/testdata/corpus/sql/merge/merge_into_returning_explain_no_optimizer.test @@ -0,0 +1,41 @@ +# source: test/sql/merge/merge_into_returning_explain_no_optimizer.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE u(i INTEGER); +-- +ok +== +EXPLAIN MERGE INTO t USING (SELECT 1 AS i) AS s ON t.i=s.i WHEN MATCHED THEN DELETE RETURNING i; +-- +ok +== +EXPLAIN MERGE INTO t USING (SELECT 1 AS i) AS s ON t.i=s.i WHEN MATCHED THEN UPDATE SET i=2 RETURNING i; +-- +ok +== +EXPLAIN MERGE INTO t USING (SELECT 1 AS i) AS s ON t.i=s.i WHEN NOT MATCHED THEN INSERT VALUES (s.i) RETURNING i; +-- +ok +== +EXPLAIN MERGE INTO t USING (SELECT 1 AS i) AS s ON t.i=s.i WHEN MATCHED THEN DO NOTHING RETURNING i; +-- +ok +== +EXPLAIN MERGE INTO t USING u ON t.i=u.i WHEN MATCHED THEN DELETE RETURNING *; +-- +ok +== +EXPLAIN ANALYZE MERGE INTO t USING (SELECT 1 AS i) AS s ON t.i=s.i WHEN MATCHED THEN DELETE RETURNING i; +-- +ok +== +INSERT INTO t VALUES (1), (2); +-- +ok +== +MERGE INTO t USING (SELECT 1 AS i) AS s ON t.i=s.i WHEN MATCHED THEN DELETE RETURNING i, merge_action; +-- +ok +== diff --git a/parser/testdata/corpus/sql/merge/merge_into_subquery.test b/parser/testdata/corpus/sql/merge/merge_into_subquery.test index 52646f4..05fa0d3 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_subquery.test +++ b/parser/testdata/corpus/sql/merge/merge_into_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Totals(item_id int, balance int); diff --git a/parser/testdata/corpus/sql/merge/merge_into_subquery_action.test b/parser/testdata/corpus/sql/merge/merge_into_subquery_action.test index 78003f4..9d3fd2c 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_subquery_action.test +++ b/parser/testdata/corpus/sql/merge/merge_into_subquery_action.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_subquery_action.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Totals(item_id int, balance int, biggest_item BOOL); diff --git a/parser/testdata/corpus/sql/merge/merge_into_subquery_condition.test b/parser/testdata/corpus/sql/merge/merge_into_subquery_condition.test index 825e68f..c0a0d26 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_subquery_condition.test +++ b/parser/testdata/corpus/sql/merge/merge_into_subquery_condition.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_subquery_condition.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO target VALUES (1, 10), (2, 20); diff --git a/parser/testdata/corpus/sql/merge/merge_into_subquery_condition_delete.test b/parser/testdata/corpus/sql/merge/merge_into_subquery_condition_delete.test new file mode 100644 index 0000000..e8c6e5e --- /dev/null +++ b/parser/testdata/corpus/sql/merge/merge_into_subquery_condition_delete.test @@ -0,0 +1,81 @@ +# source: test/sql/merge/merge_into_subquery_condition_delete.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t2(k INTEGER, w INTEGER, v VARCHAR); +-- +ok +== +INSERT INTO t2 VALUES (5, 7, 'a'), (6, 8, 'b'); +-- +ok +== +CREATE TABLE t3(id INTEGER); +-- +ok +== +INSERT INTO t3 VALUES (7); +-- +ok +== +MERGE INTO t2 USING (SELECT 5 AS k) sq ON t2.k = sq.k AND t2.w = (SELECT max(id) FROM t3) WHEN MATCHED THEN DELETE RETURNING *; +-- +ok +== +MERGE INTO t2 USING (SELECT 6 AS k) sq ON t2.k = sq.k AND t2.w IN (SELECT 8) WHEN MATCHED THEN DELETE WHEN NOT MATCHED BY SOURCE THEN DELETE RETURNING *; +-- +ok +== +MERGE INTO t2 USING (SELECT 5 AS k) sq ON t2.k = sq.k AND t2.w = (SELECT max(id) FROM t3) WHEN MATCHED THEN DELETE WHEN NOT MATCHED BY TARGET THEN INSERT VALUES (sq.k, 0, 'c') RETURNING *; +-- +ok +== +SELECT * FROM t2 ORDER BY ALL +-- +ok +== +CREATE TABLE p(k INTEGER PRIMARY KEY, w INTEGER); +-- +ok +== +INSERT INTO p VALUES (1, 5), (2, 6); +-- +ok +== +CREATE TABLE s(id INTEGER); +-- +ok +== +INSERT INTO s VALUES (5); +-- +ok +== +MERGE INTO p USING (SELECT 1 AS k) sq ON p.k = sq.k AND p.w = (SELECT max(id) FROM s) WHEN MATCHED THEN DELETE; +-- +ok +== +INSERT INTO p VALUES (1, 9); +-- +ok +== +SELECT * FROM p ORDER BY k +-- +ok +== +CREATE TABLE q(k INTEGER UNIQUE, w INTEGER); +-- +ok +== +INSERT INTO q VALUES (1, 1); +-- +ok +== +MERGE INTO q USING (SELECT 1 AS k) sq ON q.k = sq.k AND q.k IN (SELECT 1) WHEN MATCHED THEN DELETE; +-- +ok +== +SELECT count(*) FROM q +-- +ok +== diff --git a/parser/testdata/corpus/sql/merge/merge_into_too_few_columns.test b/parser/testdata/corpus/sql/merge/merge_into_too_few_columns.test index e5e24d9..fe1c0de 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_too_few_columns.test +++ b/parser/testdata/corpus/sql/merge/merge_into_too_few_columns.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_too_few_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE people (id INTEGER, name VARCHAR, salary FLOAT); diff --git a/parser/testdata/corpus/sql/merge/merge_into_update_star.test b/parser/testdata/corpus/sql/merge/merge_into_update_star.test index c799102..86f4f9e 100644 --- a/parser/testdata/corpus/sql/merge/merge_into_update_star.test +++ b/parser/testdata/corpus/sql/merge/merge_into_update_star.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_into_update_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO Stock (item_id) VALUES (5), (10), (20); diff --git a/parser/testdata/corpus/sql/merge/merge_multi_match_error.test b/parser/testdata/corpus/sql/merge/merge_multi_match_error.test index f261138..da12b89 100644 --- a/parser/testdata/corpus/sql/merge/merge_multi_match_error.test +++ b/parser/testdata/corpus/sql/merge/merge_multi_match_error.test @@ -1,6 +1,6 @@ # source: test/sql/merge/merge_multi_match_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE target (k INTEGER, v INTEGER); diff --git a/parser/testdata/corpus/sql/merge/merge_not_matched_by_source_join_order.test b/parser/testdata/corpus/sql/merge/merge_not_matched_by_source_join_order.test new file mode 100644 index 0000000..82105bd --- /dev/null +++ b/parser/testdata/corpus/sql/merge/merge_not_matched_by_source_join_order.test @@ -0,0 +1,45 @@ +# source: test/sql/merge/merge_not_matched_by_source_join_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET disabled_optimizers='{disabled_opt}'; +-- +error: Parser Error: Optimizer type "{disabled_opt}" not recognized +== +CREATE OR REPLACE TABLE Stock(item_id int, balance int); +-- +ok +== +INSERT INTO Stock VALUES (5, 10), (10, 20), (15, 30); +-- +ok +== +MERGE INTO Stock USING (VALUES (5)) new_accounts(item_id) USING (item_id) +WHEN NOT MATCHED BY SOURCE AND balance = 30 THEN UPDATE SET balance = 0 +RETURNING merge_action, item_id; +-- +ok +== +FROM Stock ORDER BY ALL; +-- +ok +== +MERGE INTO Stock USING (VALUES (5, 1)) new_accounts(item_id, delta) USING (item_id) +WHEN MATCHED THEN UPDATE SET balance = balance + delta +WHEN NOT MATCHED BY SOURCE AND item_id = 10 THEN DELETE +RETURNING merge_action, item_id; +-- +ok +== +MERGE INTO Stock USING (VALUES (5)) new_accounts(item_id) +ON (Stock.item_id = new_accounts.item_id AND Stock.balance IN (SELECT 11)) +WHEN NOT MATCHED BY SOURCE THEN UPDATE SET balance = balance + 100; +-- +ok +== +MERGE INTO Stock USING (VALUES (5)) new_accounts(item_id) USING (item_id) +WHEN NOT MATCHED BY SOURCE THEN DELETE; +-- +ok +== diff --git a/parser/testdata/corpus/sql/merge/merge_not_matched_by_source_join_order.test.metadata.json b/parser/testdata/corpus/sql/merge/merge_not_matched_by_source_join_order.test.metadata.json new file mode 100644 index 0000000..1123a7f --- /dev/null +++ b/parser/testdata/corpus/sql/merge/merge_not_matched_by_source_join_order.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "4d6170b3f3389a26": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/merge/trigger_merge_into.test b/parser/testdata/corpus/sql/merge/trigger_merge_into.test index 8d87d95..35f998b 100644 --- a/parser/testdata/corpus/sql/merge/trigger_merge_into.test +++ b/parser/testdata/corpus/sql/merge/trigger_merge_into.test @@ -1,6 +1,6 @@ # source: test/sql/merge/trigger_merge_into.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER insert_after AFTER INSERT ON people FOR EACH STATEMENT diff --git a/parser/testdata/corpus/sql/multi_file/multi_file_file_row_number.test b/parser/testdata/corpus/sql/multi_file/multi_file_file_row_number.test new file mode 100644 index 0000000..dfc9f66 --- /dev/null +++ b/parser/testdata/corpus/sql/multi_file/multi_file_file_row_number.test @@ -0,0 +1,67 @@ +# source: test/sql/multi_file/multi_file_file_row_number.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i * 10 AS v FROM range(3) t(i)) TO '{TEMP_DIR}/frn_1.parquet' +-- +ok +== +COPY (SELECT i * 100 AS v FROM range(2) t(i)) TO '{TEMP_DIR}/frn_2.parquet' +-- +ok +== +SELECT * FROM read_parquet('{TEMP_DIR}/frn_*.parquet', file_row_number=true, filename=true) ORDER BY filename, v +-- +ok +== +SELECT column_name, column_type FROM (DESCRIBE SELECT * FROM read_parquet('{TEMP_DIR}/frn_*.parquet', file_row_number=true)) +-- +ok +== +SELECT v FROM read_parquet('{TEMP_DIR}/frn_*.parquet', file_row_number=true) WHERE file_row_number = 2 +-- +ok +== +SELECT v, file_row_number FROM read_parquet('{TEMP_DIR}/frn_*.parquet', file_row_number=true, union_by_name=true) +ORDER BY v +-- +ok +== +COPY (SELECT i AS v, i % 2 AS part FROM range(4) t(i)) TO '{TEMP_DIR}/frn_hive' (FORMAT parquet, PARTITION_BY part) +-- +ok +== +SELECT * FROM read_parquet('{TEMP_DIR}/frn_hive/*/*.parquet', file_row_number=true, hive_partitioning=true) +ORDER BY v +-- +ok +== +COPY (SELECT 1 AS file_row_number) TO '{TEMP_DIR}/frn_clash.parquet' +-- +ok +== +SELECT * FROM read_parquet('{TEMP_DIR}/frn_clash.parquet', file_row_number=true) +-- +ok +== +CREATE TABLE t(v BIGINT, file_row_number BIGINT) +-- +ok +== +COPY t FROM '{TEMP_DIR}/frn_1.parquet' (FORMAT parquet, file_row_number) +-- +ok +== +SELECT * FROM t ORDER BY v +-- +ok +== +COPY (SELECT 1 AS v) TO '{TEMP_DIR}/frn.csv' +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/frn.csv', file_row_number=true) +-- +ok +== diff --git a/parser/testdata/corpus/sql/multi_file/multi_file_open_options.test b/parser/testdata/corpus/sql/multi_file/multi_file_open_options.test new file mode 100644 index 0000000..f6fdd79 --- /dev/null +++ b/parser/testdata/corpus/sql/multi_file/multi_file_open_options.test @@ -0,0 +1,211 @@ +# source: test/sql/multi_file/multi_file_open_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 42 a, 'hello' b) TO '{TEST_DIR}/open_options_1.parquet' +-- +ok +== +COPY (SELECT 43 a, 'world' b) TO '{TEST_DIR}/open_options_2.parquet' +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet'}]) +-- +ok +== +SELECT * FROM read_parquet([ + {'filename': '{TEST_DIR}/open_options_1.parquet'}, + {'filename': '{TEST_DIR}/open_options_2.parquet'}]) ORDER BY a +-- +ok +== +SELECT * FROM read_parquet([{ + 'filename': '{TEST_DIR}/open_options_1.parquet', + 'validate_external_file_cache': false, + 'etag': 'my_etag'}]) +-- +ok +== +SELECT * FROM read_parquet([{ + 'filename': '{TEST_DIR}/open_options_1.parquet', + 'validate_external_file_cache': NULL::BOOLEAN}]) +-- +ok +== +COPY (SELECT 42 a, 'hello' b) TO '{TEST_DIR}/open_options.csv' +-- +ok +== +SELECT * FROM read_csv([{'filename': '{TEST_DIR}/open_options.csv'}]) +-- +ok +== +SELECT * FROM glob([{'filename': '{TEST_DIR}/open_options.csv'}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_*.parquet'}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'etag': 'my_etag'}], filename=true) +-- +ok +== +SELECT * FROM read_parquet([{'etag': 'my_etag'}]) +-- +error: Parser Error: "read_parquet" reader requires a file struct to have a "filename" field holding the path of the file +== +SELECT * FROM read_parquet([{'filename': NULL}]) +-- +error: Parser Error: "read_parquet" reader requires the "filename" field of a file struct to be a non-NULL VARCHAR +== +SELECT * FROM read_parquet([{'filename': 42}]) +-- +error: Parser Error: "read_parquet" reader requires the "filename" field of a file struct to be a non-NULL VARCHAR +== +SELECT * FROM read_parquet([42]) +-- +error: Parser Error: "read_parquet" reader can only take a list of strings, structs or variants as a parameter +== +SELECT * FROM read_parquet([NULL]) +-- +error: Parser Error: "read_parquet" reader cannot take NULL input as parameter +== +SELECT * FROM read_parquet([ + {'filename': '{TEST_DIR}/open_options_1.parquet'}, + {'filename': '{TEST_DIR}/open_options_2.parquet', 'etag': 'my_etag'}]) ORDER BY a +-- +ok +== +SELECT * FROM read_parquet([ + {'filename': '{TEST_DIR}/open_options_1.parquet'}::VARIANT, + {'filename': '{TEST_DIR}/open_options_2.parquet', 'etag': 'my_etag'}::VARIANT]) ORDER BY a +-- +ok +== +SELECT * FROM read_parquet({'filename': '{TEST_DIR}/open_options_1.parquet', 'etag': 'my_etag'}::VARIANT) +-- +ok +== +SELECT * FROM read_parquet({'etag': 'my_etag'}::VARIANT) +-- +error: Parser Error: "read_parquet" reader requires a file struct to have a "filename" field holding the path of the file +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 'notanumber'}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': -1}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'validate_external_file_cache': 'notabool'}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'etag': 42}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 'notanumber'}::VARIANT]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'file_size': 631}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'validate_external_file_cache': 'true'}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'File_Size': 631::UBIGINT}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'force_full_download': false}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'force_full_download': true}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'some_extension_option': 42}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'file_size': 99999999::UBIGINT}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'file_size': 1::UBIGINT}]) +-- +ok +== +SET enable_external_file_cache=true +-- +ok +== +SELECT * FROM read_parquet([{ + 'filename': '{TEST_DIR}/open_options_1.parquet', + 'validate_external_file_cache': false, + 'file_size': 631::UBIGINT, + 'etag': 'my_etag', + 'last_modified': '2024-01-01 00:00:00'::TIMESTAMP}]) +-- +ok +== +SELECT * FROM read_parquet([{ + 'filename': '{TEST_DIR}/open_options_1.parquet', + 'validate_external_file_cache': true}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'has_deletes': 'notabool'}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 999999::UBIGINT}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 1::UBIGINT}]) +-- +ok +== +SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'encryption_key': '0123456789112345'}]) +-- +ok +== +SELECT * FROM read_single_parquet_file('{TEST_DIR}/open_options_1.parquet') +-- +ok +== +SELECT * FROM read_single_parquet_file({'filename': '{TEST_DIR}/open_options_1.parquet', 'etag': 'my_etag'}) +-- +ok +== +SELECT * FROM read_single_parquet_file({'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 999999::UBIGINT}) +-- +ok +== +SELECT * FROM read_single_parquet_file({'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 'notanumber'}) +-- +ok +== +SELECT * FROM read_single_parquet_file({'footer_size': 1::UBIGINT}) +-- +error: Parser Error: "read_single_parquet_file" reader requires a file struct to have a "filename" field holding the path of the file +== +SELECT * FROM read_single_parquet_file(42) +-- +ok +== +SELECT * FROM read_single_csv_file({'filename': '{TEST_DIR}/open_options.csv', 'etag': 'my_etag'}) +-- +ok +== diff --git a/parser/testdata/corpus/sql/multi_file/multi_file_open_options.test.metadata.json b/parser/testdata/corpus/sql/multi_file/multi_file_open_options.test.metadata.json new file mode 100644 index 0000000..a6b0f48 --- /dev/null +++ b/parser/testdata/corpus/sql/multi_file/multi_file_open_options.test.metadata.json @@ -0,0 +1,11 @@ +{ + "todo": { + "18c0d69902e3b0c3": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "47494e6a333e8a6c": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "89f877531bd62a57": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "972714fb967fe4fa": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "b0e0efc69f7c1576": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "d3953e46300510c8": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "f457823f7898e6e1": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/multi_file/multi_file_schema.test b/parser/testdata/corpus/sql/multi_file/multi_file_schema.test new file mode 100644 index 0000000..4eaa50f --- /dev/null +++ b/parser/testdata/corpus/sql/multi_file/multi_file_schema.test @@ -0,0 +1,71 @@ +# source: test/sql/multi_file/multi_file_schema.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 1 AS a, 'x' AS b, 10 AS c) TO '{TEMP_DIR}/schema_1.csv' +-- +ok +== +COPY (SELECT 'y' AS b, 2 AS a) TO '{TEMP_DIR}/schema_2.csv' +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/schema_*.csv', schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: NULL}, + 'b': {name: 'label', type: 'VARCHAR', default_value: NULL}, + 'c': {name: 'extra', type: 'INTEGER', default_value: 42} +}) ORDER BY id +-- +ok +== +SELECT column_name, column_type FROM (DESCRIBE SELECT * FROM read_csv('{TEMP_DIR}/schema_*.csv', schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: NULL}, + 'b': {name: 'label', type: 'VARCHAR', default_value: NULL} +})) +-- +ok +== +SELECT sum(id) FROM read_csv('{TEMP_DIR}/schema_*.csv', schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: NULL} +}) +-- +ok +== +COPY (SELECT 1 AS a, 'x' AS b) TO '{TEMP_DIR}/schema_1.json' +-- +ok +== +COPY (SELECT 'y' AS b) TO '{TEMP_DIR}/schema_2.json' +-- +ok +== +SELECT * FROM read_json('{TEMP_DIR}/schema_*.json', schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: -1}, + 'b': {name: 'label', type: 'VARCHAR', default_value: NULL} +}) ORDER BY label +-- +ok +== +SELECT id, parse_filename(filename) FROM read_csv('{TEMP_DIR}/schema_*.csv', schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: NULL} +}, filename=true) ORDER BY id +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/schema_*.csv', union_by_name=true, schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: NULL} +}) +-- +ok +== +SELECT * FROM read_csv('{TEMP_DIR}/schema_*.csv', schema=42) +-- +ok +== +SELECT * FROM read_json('{TEMP_DIR}/schema_*.json', schema=map { + 'a': {name: 'id', type: 'BIGINT', default_value: 'not a number'} +}) +-- +ok +== diff --git a/parser/testdata/corpus/sql/multi_file/multi_file_schema_filter_casts.test b/parser/testdata/corpus/sql/multi_file/multi_file_schema_filter_casts.test new file mode 100644 index 0000000..f85dc03 --- /dev/null +++ b/parser/testdata/corpus/sql/multi_file/multi_file_schema_filter_casts.test @@ -0,0 +1,51 @@ +# source: test/sql/multi_file/multi_file_schema_filter_casts.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i::INTEGER AS c FROM range(4096) r(i)) +TO '{TEST_DIR}/schema_filter_narrow.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE VIEW narrow_file AS +SELECT * +FROM read_parquet('{TEST_DIR}/schema_filter_narrow.parquet', schema=map { + 'c': {name: 'c', type: 'BIGINT', default_value: NULL} +}) +-- +ok +== +SELECT count(*) FROM narrow_file WHERE c IN (1, 3, 5) +-- +ok +== +EXPLAIN ANALYZE SELECT c FROM narrow_file ORDER BY c DESC LIMIT 3 +-- +ok +== +SELECT c FROM narrow_file ORDER BY c DESC LIMIT 3 +-- +ok +== +COPY (SELECT i::BIGINT AS c FROM range(4096) r(i)) +TO '{TEST_DIR}/schema_filter_wide.parquet' (FORMAT PARQUET, ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE VIEW wide_file AS +SELECT * +FROM read_parquet('{TEST_DIR}/schema_filter_wide.parquet', schema=map { + 'c': {name: 'c', type: 'INTEGER', default_value: NULL} +}) +-- +ok +== +SELECT count(*) FROM wide_file WHERE c IN (1, 3, 5) +-- +ok +== +SELECT count(*) FROM wide_file WHERE c > 100 AND c < 105 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/aggregate_stats_propagation.test b/parser/testdata/corpus/sql/optimizer/aggregate_stats_propagation.test new file mode 100644 index 0000000..cd6d998 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/aggregate_stats_propagation.test @@ -0,0 +1,105 @@ +# source: test/sql/optimizer/aggregate_stats_propagation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/aggregate_stats_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +USE db; +-- +ok +== +CREATE TABLE t AS SELECT range::INTEGER AS x, (range % 16)::INTEGER AS g FROM range(10240); +-- +ok +== +EXPLAIN SELECT g, min(x) AS m FROM t GROUP BY g HAVING m > 20000; +-- +ok +== +EXPLAIN SELECT g, min(x) AS m FROM t GROUP BY g HAVING m >= 0; +-- +ok +== +SELECT count(*) FROM (SELECT g, min(x) AS m FROM t GROUP BY g HAVING m > 20000) sub; +-- +ok +== +SELECT count(*) FROM (SELECT g, min(x) AS m FROM t GROUP BY g HAVING m >= 0) sub; +-- +ok +== +EXPLAIN SELECT g, max(x) AS m FROM t GROUP BY g HAVING m < 0; +-- +ok +== +SELECT count(*) FROM (SELECT g, max(x) AS m FROM t GROUP BY g HAVING m < 0) sub; +-- +ok +== +EXPLAIN SELECT g, first(x) AS m FROM t GROUP BY g HAVING m > 20000; +-- +ok +== +EXPLAIN SELECT g, last(x) AS m FROM t GROUP BY g HAVING m < 0; +-- +ok +== +EXPLAIN SELECT g, any_value(x) AS m FROM t GROUP BY g HAVING m > 20000; +-- +ok +== +EXPLAIN SELECT g, arg_min(x, g) AS m FROM t GROUP BY g HAVING m > 20000; +-- +ok +== +EXPLAIN SELECT g, arg_max(x, g) AS m FROM t GROUP BY g HAVING m < 0; +-- +ok +== +EXPLAIN SELECT g, mode(x) AS m FROM t GROUP BY g HAVING m > 20000; +-- +ok +== +EXPLAIN SELECT g, median(x) AS m FROM t GROUP BY g HAVING m > 20000; +-- +ok +== +EXPLAIN SELECT g, quantile_cont(x, 0.75) AS q FROM t GROUP BY g HAVING q > 20000; +-- +ok +== +EXPLAIN SELECT g, quantile_disc(x, 0.75) AS q FROM t GROUP BY g HAVING q < 0; +-- +ok +== +EXPLAIN SELECT * FROM (SELECT g, min(x) AS m FROM t GROUP BY g) sub WHERE m > 20000; +-- +ok +== +CREATE TABLE tn AS +SELECT CASE WHEN range % 7 = 0 THEN NULL ELSE range END::INTEGER AS x, (range % 16)::INTEGER AS g +FROM range(10240); +-- +ok +== +SELECT count(*) FROM (SELECT g, min(x) AS m FROM tn GROUP BY g HAVING m > 20000) sub; +-- +ok +== +SELECT count(*) FROM (SELECT g, min(x) AS m FROM tn GROUP BY g HAVING m <= 20000) sub; +-- +ok +== +CREATE TABLE tg AS +SELECT CASE WHEN range % 16 = 3 THEN NULL ELSE range END::INTEGER AS x, (range % 16)::INTEGER AS g +FROM range(10240); +-- +ok +== +SELECT count(*) FROM (SELECT g, min(x) AS m FROM tg GROUP BY g HAVING m IS NULL) sub; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/anti_join_empty_rhs_projection_map.test b/parser/testdata/corpus/sql/optimizer/anti_join_empty_rhs_projection_map.test new file mode 100644 index 0000000..74f5b8b --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/anti_join_empty_rhs_projection_map.test @@ -0,0 +1,68 @@ +# source: test/sql/optimizer/anti_join_empty_rhs_projection_map.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t_del(i BIGINT, i32 INTEGER, tsz TIMESTAMPTZ); +-- +ok +== +INSERT INTO t_del VALUES (0, -50000, '2020-01-01 00:00:00+00'), (1, -42081, '2020-01-01 00:00:01+00'), (2, -34162, '2020-01-01 00:00:02+00'), (5, NULL, '2020-01-01 00:00:05+00'), (6, -2486, '2020-01-01 00:00:06+00'), (7, 5433, '2020-01-01 00:00:07+00'), (8, 13352, '2020-01-01 00:00:08+00'), (9, 21271, '2020-01-01 00:00:09+00'), (10, 29190, '2020-01-01 00:00:10+00'), (11, 37109, '2020-01-01 00:00:11+00'), (12, 45028, '2020-01-01 00:00:12+00'), (15, -31218, '2020-01-01 00:00:15+00'), (16, NULL, '2020-01-01 00:00:16+00'), (17, -15380, '2020-01-01 00:00:17+00'), (18, -7461, '2020-01-01 00:00:18+00'), (19, 458, '2020-01-01 00:00:19+00'), (20, 8377, '2020-01-01 00:00:20+00'), (21, 16296, '2020-01-01 00:00:21+00'), (23, 32134, '2020-01-01 00:00:23+00'), (24, 40053, '2020-01-01 00:00:24+00'), (26, -44112, '2020-01-01 00:00:26+00'), (27, NULL, '2020-01-01 00:00:27+00'), (28, -28274, '2020-01-01 00:00:28+00'), (29, -20355, '2020-01-01 00:00:29+00'), (30, -12436, '2020-01-01 00:00:30+00'), (32, 3402, '2020-01-01 00:00:32+00'), (33, 11321, '2020-01-01 00:00:33+00'), (34, 19240, '2020-01-01 00:00:34+00'), (35, 27159, NULL), (37, 42997, '2020-01-01 00:00:37+00'), (38, NULL, '2020-01-01 00:00:38+00'), (39, -41168, '2020-01-01 00:00:39+00'), (41, -25330, '2020-01-01 00:00:41+00'), (42, -17411, '2020-01-01 00:00:42+00'), (43, -9492, '2020-01-01 00:00:43+00'), (44, -1573, '2020-01-01 00:00:44+00'), (45, 6346, '2020-01-01 00:00:45+00'), (46, 14265, '2020-01-01 00:00:46+00'), (48, 30103, '2020-01-01 00:00:48+00'), (50, 45941, '2020-01-01 00:00:50+00'), (51, -46143, '2020-01-01 00:00:51+00'), (52, -38224, '2020-01-01 00:00:52+00'), (53, -30305, '2020-01-01 00:00:53+00'), (54, -22386, '2020-01-01 00:00:54+00'), (55, -14467, '2020-01-01 00:00:55+00'), (56, -6548, '2020-01-01 00:00:56+00'), (57, 1371, '2020-01-01 00:00:57+00'), (59, 17209, '2020-01-01 00:00:59+00'), (60, NULL, '2020-01-01 00:01:00+00'), (61, 33047, '2020-01-01 00:01:01+00'); +-- +ok +== +CREATE TABLE t_big(i BIGINT, dec DECIMAL(18,3), g BIGINT); +-- +ok +== +INSERT INTO t_big VALUES (4, -614.508, 4), (5, -614.385, 5), (6, -614.262, 6), (7, -614.139, 0), (8, -614.016, 1), (9, -613.893, 2), (12, -613.524, 5), (13, -613.401, 6), (14, -613.278, 0), (15, -613.155, 1), (16, -613.032, 2), (17, -612.909, 3), (18, -612.786, 4), (19, -612.663, 5), (20, NULL, 6), (21, -612.417, 0), (22, -612.294, 1), (23, -612.171, 2), (24, -612.048, 3), (25, -611.925, 4), (26, -611.802, 5), (27, -611.679, 6), (28, -611.556, 0), (29, -611.433, 1), (30, -611.310, 2), (31, -611.187, 3), (32, -611.064, 4), (33, -610.941, 5), (34, -610.818, 6), (35, -610.695, 0), (36, -610.572, 1), (37, -610.449, 2), (38, -610.326, 3), (39, -610.203, 4), (40, -610.080, 5), (41, -609.957, 6), (42, -609.834, 0), (43, -609.711, 1), (44, -609.588, 2), (45, -609.465, 3), (46, -609.342, 4), (47, -609.219, 5), (48, -609.096, 6), (49, -608.973, 0), (50, -608.850, 1), (51, -608.727, 2), (52, -608.604, 3), (53, -608.481, NULL), (54, -608.358, 5), (55, -608.235, 6), (56, -608.112, 0); +-- +ok +== +CREATE TABLE t_mid(dec DECIMAL(18,3), k BIGINT); +-- +ok +== +INSERT INTO t_mid VALUES (-615.000, 1); +-- +ok +== +CREATE TABLE t_small(i BIGINT, g BIGINT); +-- +ok +== +INSERT INTO t_small VALUES (0, 0); +-- +ok +== +SELECT t1.i32 +FROM t_del t1 +JOIN t_big t2 ON t1.i = t2.i +ANTI JOIN t_mid t3 ON t2.dec = t3.dec AND t3.k = 1000 +WHERE t1.tsz IS NULL + AND t2.i IN (SELECT i FROM t_small WHERE g = t2.g); +-- +ok +== +SELECT t1.i32 +FROM t_del t1 +JOIN t_big t2 ON t1.i = t2.i +ANTI JOIN t_mid t3 ON t2.dec = t3.dec AND t3.k = 1000 +WHERE t1.tsz IS NULL + AND EXISTS (SELECT 1 FROM t_small s WHERE s.g = t2.g AND s.i = t2.i); +-- +ok +== +INSERT INTO t_small VALUES (35, 0); +-- +ok +== +SELECT t1.i32, t2.g +FROM t_del t1 +JOIN t_big t2 ON t1.i = t2.i +ANTI JOIN t_mid t3 ON t2.dec = t3.dec AND t3.k = 1000 +WHERE t1.tsz IS NULL + AND t2.i IN (SELECT i FROM t_small WHERE g = t2.g); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/any_extremum_rewrite.test b/parser/testdata/corpus/sql/optimizer/any_extremum_rewrite.test index 1297aca..b4d0211 100644 --- a/parser/testdata/corpus/sql/optimizer/any_extremum_rewrite.test +++ b/parser/testdata/corpus/sql/optimizer/any_extremum_rewrite.test @@ -1,12 +1,8 @@ # source: test/sql/optimizer/any_extremum_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -PRAGMA enable_verification --- -ok -== CREATE TABLE t1(id INTEGER, x INTEGER); -- ok diff --git a/parser/testdata/corpus/sql/optimizer/array_extract_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/array_extract_row_group_pruning.test index c9e10f6..42bf4f2 100644 --- a/parser/testdata/corpus/sql/optimizer/array_extract_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/array_extract_row_group_pruning.test @@ -1,16 +1,12 @@ # source: test/sql/optimizer/array_extract_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/array_extract_row_group_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); -- ok == -USE db; --- -ok -== CREATE TABLE arrays AS SELECT [i::INTEGER, (i + 1)::INTEGER, (i + 2)::INTEGER]::INTEGER[3] AS a FROM range(6144) tbl(i); @@ -57,3 +53,23 @@ SELECT count(*) FROM nullable_arrays WHERE a[4] IS NULL; -- ok == +CREATE TABLE nullable_list_extract AS +SELECT CASE WHEN i < 2048 THEN NULL ELSE [i] END AS nullable_l +FROM range(6144) tbl(i) +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM nullable_list_extract WHERE list_extract(nullable_l, 1) IS NOT NULL; +-- +ok +== +CREATE TABLE all_null_list_index AS +SELECT [i] AS l, NULL::BIGINT AS idx +FROM range(6144) tbl(i) +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM all_null_list_index WHERE list_extract(l, idx) IS NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/barrier_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/barrier_row_group_pruning.test new file mode 100644 index 0000000..3a3cec4 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/barrier_row_group_pruning.test @@ -0,0 +1,65 @@ +# source: test/sql/optimizer/barrier_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/barrier_row_group_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE t AS SELECT range::INTEGER AS i FROM range(6144); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE i = 42; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier(i = 42); +-- +ok +== +SELECT count(*) FROM t WHERE __internal_barrier(i = 42); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier(i BETWEEN 100 AND 200); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier(i + 1000 = 1042); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier(i > 5000 AND i < 5010); +-- +ok +== +SELECT count(*) FROM t WHERE __internal_barrier(i > 5000 AND i < 5010); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier(i = 1000000); +-- +ok +== +SELECT count(*) FROM t WHERE __internal_barrier(i = 1000000); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier(i % 2048 = 42); +-- +ok +== +SELECT count(*) FROM t WHERE __internal_barrier(i % 2048 = 42); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE __internal_barrier((100 // (i + 1)) = 1 AND i > 5000); +-- +ok +== +SELECT count(*) FROM t WHERE __internal_barrier((100 // (i + 1)) = 1 AND i > 5000); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/bool_ref_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/bool_ref_row_group_pruning.test new file mode 100644 index 0000000..6ab5cde --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/bool_ref_row_group_pruning.test @@ -0,0 +1,121 @@ +# source: test/sql/optimizer/bool_ref_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/bool_ref_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE tb AS SELECT + CASE WHEN range // 2048 = 0 THEN TRUE + WHEN range // 2048 = 1 THEN FALSE + ELSE (range % 2 = 0) END AS b, + range::INTEGER AS x +FROM range(6144); +-- +ok +== +SELECT count(*) FILTER (WHERE b), + count(*) FILTER (WHERE NOT b), + count(*) +FROM tb; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM tb WHERE b = TRUE; +-- +ok +== +SELECT sum(x) FROM tb WHERE b = TRUE; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM tb WHERE b = FALSE; +-- +ok +== +SELECT sum(x) FROM tb WHERE b = FALSE; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM tb WHERE b IS TRUE; +-- +ok +== +SELECT sum(x) FROM tb WHERE b IS TRUE; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM tb WHERE b IS FALSE; +-- +ok +== +SELECT sum(x) FROM tb WHERE b IS FALSE; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM tb WHERE b; +-- +ok +== +SELECT sum(x) FROM tb WHERE b; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM tb WHERE NOT b; +-- +ok +== +SELECT sum(x) FROM tb WHERE NOT b; +-- +ok +== +CREATE TABLE nullable_tb AS SELECT + CASE WHEN range // 2048 = 0 THEN CASE WHEN range % 2 = 0 THEN TRUE ELSE NULL END + WHEN range // 2048 = 1 THEN CASE WHEN range % 2 = 0 THEN FALSE ELSE NULL END + WHEN range // 2048 = 2 THEN (range % 2 = 0) + ELSE NULL END AS b +FROM range(8192); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM nullable_tb WHERE b; +-- +ok +== +SELECT count(*) FROM nullable_tb WHERE b; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM nullable_tb WHERE NOT b; +-- +ok +== +SELECT count(*) FROM nullable_tb WHERE NOT b; +-- +ok +== +CREATE TABLE isnan_tb AS SELECT + CASE WHEN range // 2048 = 2 THEN 'NaN'::DOUBLE + WHEN range % 2 = 0 THEN range::DOUBLE + ELSE NULL END AS d, + CASE WHEN range // 2048 = 2 THEN 'NaN'::FLOAT + WHEN range % 2 = 0 THEN range::FLOAT + ELSE NULL END AS f +FROM range(6144); +-- +ok +== +SELECT count(*) FILTER (WHERE isnan(d)), count(*) FILTER (WHERE isnan(f)) FROM isnan_tb; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM isnan_tb WHERE isnan(d); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM isnan_tb WHERE isnan(f); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/boolean_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/boolean_row_group_pruning.test index e02f6d7..d90591c 100644 --- a/parser/testdata/corpus/sql/optimizer/boolean_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/boolean_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/boolean_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/bool_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/optimizer/boolean_wrapper_pushdown.test b/parser/testdata/corpus/sql/optimizer/boolean_wrapper_pushdown.test index e3a1f58..ea903d9 100644 --- a/parser/testdata/corpus/sql/optimizer/boolean_wrapper_pushdown.test +++ b/parser/testdata/corpus/sql/optimizer/boolean_wrapper_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/boolean_wrapper_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/boolean_wrapper_pushdown.duckdb' AS db (ROW_GROUP_SIZE 2048); @@ -15,6 +15,18 @@ EXPLAIN ANALYZE SELECT sum(rowid) FROM integers WHERE (x > 3000) = true; -- ok == +SELECT count(*) FROM integers WHERE (x < 3000) {wrapper} FALSE; +-- +error: Parser Error: syntax error at or near "{" +== +EXPLAIN ANALYZE SELECT sum(rowid) FROM integers WHERE (x < 3000) {wrapper} FALSE; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM integers WHERE FALSE = (x < 3000); +-- +ok +== EXPLAIN ANALYZE SELECT sum(rowid) FROM integers WHERE (x > 3000) IS TRUE; -- ok @@ -31,10 +43,14 @@ SELECT p, p = true, p IS TRUE FROM booleans ORDER BY p NULLS LAST; -- ok == -SELECT count(*) FROM booleans WHERE NOT (p IS TRUE); +SELECT FALSE = (p = true), (p = true) = FALSE, (p = true) IS FALSE FROM booleans ORDER BY p NULLS LAST; -- ok == +SELECT count(*) FROM booleans WHERE NOT ((p = true) IS {value}); +-- +error: Parser Error: syntax error at or near "{" +== CREATE SEQUENCE s; -- ok diff --git a/parser/testdata/corpus/sql/optimizer/case_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/case_zonemap_pruning.test new file mode 100644 index 0000000..acccdb0 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/case_zonemap_pruning.test @@ -0,0 +1,52 @@ +# source: test/sql/optimizer/case_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/case_zonemap_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE case_pruning AS +SELECT i::INTEGER AS x +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM case_pruning WHERE x > 5000; +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) FROM case_pruning +WHERE (CASE WHEN x % 2 = 0 THEN x ELSE x END) > 5000; +-- +ok +== +SELECT count(*) FROM case_pruning +WHERE (CASE WHEN x % 2 = 0 THEN x ELSE x END) > 5000; +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) FROM case_pruning +WHERE (CASE WHEN x % 2 = 0 THEN x ELSE 0 END) > 5000; +-- +ok +== +SELECT count(*) FROM case_pruning +WHERE (CASE WHEN x % 2 = 0 THEN x ELSE 0 END) > 5000; +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) FROM case_pruning +WHERE (CASE WHEN x % 2 = 0 THEN x ELSE 0 END) > 1000000; +-- +ok +== +SELECT count(*) FROM case_pruning +WHERE (CASE WHEN x % 2 = 0 THEN x ELSE 0 END) > 1000000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/coalesce_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/coalesce_zonemap_pruning.test new file mode 100644 index 0000000..36207c3 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/coalesce_zonemap_pruning.test @@ -0,0 +1,49 @@ +# source: test/sql/optimizer/coalesce_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/coalesce_zonemap_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE coalesce_pruning AS +SELECT i::INTEGER AS i, + CASE WHEN i % 100 = 0 THEN NULL ELSE i END::INTEGER AS x, + i::INTEGER AS y +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM coalesce_pruning WHERE coalesce(x, 0) > 5000; +-- +ok +== +SELECT count(*) FROM coalesce_pruning WHERE coalesce(x, 0) > 5000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM coalesce_pruning WHERE coalesce(x, 0) BETWEEN 100 AND 200; +-- +ok +== +SELECT count(*) FROM coalesce_pruning WHERE coalesce(x, 0) BETWEEN 100 AND 200; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM coalesce_pruning WHERE coalesce(x, 0) = 0; +-- +ok +== +SELECT count(*) FROM coalesce_pruning WHERE coalesce(x, 0) = 0; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM coalesce_pruning WHERE coalesce(y, 0) = 0; +-- +ok +== +SELECT count(*) FROM coalesce_pruning WHERE coalesce(y, 0) = 0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/constant_function_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/constant_function_zonemap_pruning.test new file mode 100644 index 0000000..aad9d17 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/constant_function_zonemap_pruning.test @@ -0,0 +1,111 @@ +# source: test/sql/optimizer/constant_function_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/constant_function_pruning.duckdb' AS const_db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE const_db.constant_inputs AS +SELECT CASE WHEN i < 2048 THEN 17 WHEN i < 4096 THEN 42 + WHEN i < 6144 THEN CASE WHEN i % 2 = 0 THEN 17 END ELSE i % 64 END AS x +FROM range(8192) t(i); +-- +ok +== +SELECT count(*) FROM const_db.constant_inputs WHERE {predicate}; +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN ANALYZE SELECT x FROM const_db.constant_inputs WHERE {predicate}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM const_db.constant_inputs WHERE hash(x) = hash(NULL::BIGINT); +-- +ok +== +CREATE TEMP TABLE signed_zeros AS SELECT x FROM (VALUES ('0'::DOUBLE), ('-0'::DOUBLE)) t(x); +-- +ok +== +SELECT count(*) FILTER (WHERE atan2(x, -1) < 0), count(*) FILTER (WHERE atan2(x, -1) > 0) FROM signed_zeros; +-- +ok +== +DROP TABLE signed_zeros; +-- +ok +== +CREATE TABLE const_db.constant_doubles AS +SELECT CASE WHEN i < 2048 THEN -1::DOUBLE WHEN i < 4096 THEN 1::DOUBLE + WHEN i < 6144 THEN 0::DOUBLE ELSE (i % 2)::DOUBLE END AS x +FROM range(8192) t(i); +-- +ok +== +SELECT count(*) FROM const_db.constant_doubles WHERE atan2(x, -1) < 0; +-- +ok +== +EXPLAIN ANALYZE SELECT x FROM const_db.constant_doubles WHERE atan2(x, -1) < 0; +-- +ok +== +CREATE TABLE const_db.constant_strings AS +SELECT CASE WHEN i < 2048 THEN NULL WHEN i < 4096 THEN 'alpha' + WHEN i < 6144 THEN 'beta' ELSE 'abcdefghijkl' || (i % 2)::VARCHAR END AS s +FROM range(8192) t(i); +-- +ok +== +SELECT count(*) FROM const_db.constant_strings WHERE {predicate}; +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN ANALYZE SELECT s FROM const_db.constant_strings WHERE {predicate}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM const_db.constant_strings WHERE hash(s) = hash(NULL::VARCHAR); +-- +ok +== +EXPLAIN ANALYZE SELECT s FROM const_db.constant_strings WHERE hash(s) = hash(NULL::VARCHAR); +-- +ok +== +SELECT count(*) FROM const_db.constant_strings WHERE length_grapheme(s) = 4; +-- +ok +== +EXPLAIN ANALYZE SELECT s FROM const_db.constant_strings WHERE length_grapheme(s) = 4; +-- +ok +== +SELECT count(*) FROM const_db.constant_strings WHERE in_search_path('const_db', s); +-- +ok +== +EXPLAIN ANALYZE SELECT s FROM const_db.constant_strings WHERE in_search_path('const_db', s); +-- +ok +== +SELECT count(*) FROM const_db.constant_strings WHERE reverse(s) = '0lkjihgfedcba'; +-- +ok +== +EXPLAIN ANALYZE SELECT s FROM const_db.constant_strings WHERE reverse(s) = '0lkjihgfedcba'; +-- +ok +== +CREATE TABLE equal_intervals AS SELECT x FROM (VALUES (INTERVAL '1 month'), (INTERVAL '30 days')) t(x); +-- +ok +== +SELECT count(*) FILTER (WHERE x::VARCHAR = '1 month'), + count(*) FILTER (WHERE x::VARCHAR = '30 days') FROM equal_intervals; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/contains_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/contains_row_group_pruning.test new file mode 100644 index 0000000..fe1aa1f --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/contains_row_group_pruning.test @@ -0,0 +1,92 @@ +# source: test/sql/optimizer/contains_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/contains_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE t AS + SELECT CASE + WHEN range < 2048 THEN 'apple_' || range::VARCHAR + WHEN range < 4096 THEN 'duckdb' + ELSE 'zebra_' || range::VARCHAR END AS s + FROM range(6144); +-- +ok +== +SELECT count(*) FROM t WHERE contains(s, 'python'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE contains(s, 'python'); +-- +ok +== +SELECT count(*) FROM t WHERE contains(s, 'ckd'); +-- +ok +== +SELECT count(*) FROM t WHERE contains(s, ''); +-- +ok +== +CREATE TABLE with_nulls AS + SELECT CASE WHEN range % 4 = 0 THEN NULL ELSE 'duckdb' END AS s + FROM range(6144); +-- +ok +== +SELECT count(*) FROM with_nulls WHERE contains(s, 'ckd'); +-- +ok +== +SELECT count(*) FROM with_nulls WHERE contains(s, 'python'); +-- +ok +== +CREATE TABLE negated_nullable_contains AS +SELECT CASE + WHEN range < 2048 THEN CASE WHEN range % 2 = 0 THEN 'abc' ELSE NULL END + WHEN range < 4096 THEN 'zzz' + ELSE 'abc' + END::VARCHAR AS s +FROM range(6144) +-- +ok +== +SELECT count(*) FROM negated_nullable_contains WHERE NOT contains(s, 'a') +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM negated_nullable_contains WHERE NOT contains(s, 'a') +-- +ok +== +CREATE TABLE long_strings AS SELECT 'duckduckgo_search' AS s FROM range(6144); +-- +ok +== +SELECT count(*) FROM long_strings WHERE contains(s, 'go_search'); +-- +ok +== +SELECT count(*) FROM long_strings WHERE contains(s, 'python'); +-- +ok +== +CREATE TABLE requests AS +SELECT CASE WHEN i = 0 THEN NULL WHEN i < 4096 THEN '/api/health/' ELSE '/api/orders/' END || i::VARCHAR AS path +FROM range(6144) t(i); +-- +ok +== +SELECT count(*) FROM requests WHERE path NOT LIKE '%health%'; +-- +ok +== +EXPLAIN ANALYZE SELECT path FROM requests WHERE path NOT LIKE '%health%'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/cross_column_expression_stats_pruning.test b/parser/testdata/corpus/sql/optimizer/cross_column_expression_stats_pruning.test new file mode 100644 index 0000000..aed503d --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/cross_column_expression_stats_pruning.test @@ -0,0 +1,182 @@ +# source: test/sql/optimizer/cross_column_expression_stats_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/cross_column_or_stats_pruning.duckdb' AS rg (ROW_GROUP_SIZE 2048); +-- +ok +== +USE rg; +-- +ok +== +CREATE TABLE t AS +SELECT range::BIGINT AS x, lpad(range::VARCHAR, 8, '0') AS s, range::INTEGER AS y +FROM range(8192); +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM t WHERE x < 100 OR s > '00008000'; +-- +ok +== +SELECT count(*), sum(x) FROM t WHERE x < 100 OR s > '00008000'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM t WHERE 100 > x OR '00008000' < s; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM t WHERE x < 100 OR s > '00008000' OR y = 3000; +-- +ok +== +SELECT count(*), sum(x) FROM t WHERE x < 100 OR s > '00008000' OR y = 3000; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(x) FROM t WHERE x < 100 OR x = 3000 OR s > '00008000'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE x < 100 OR x > 8000; +-- +ok +== +CREATE TABLE nullable_t AS +SELECT CASE WHEN range % 2 = 0 THEN NULL ELSE range END::BIGINT AS a, + CASE WHEN range % 3 = 0 THEN NULL ELSE range + 10000 END::BIGINT AS b +FROM range(8192); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM nullable_t WHERE a < 0 OR b < 0; +-- +ok +== +SELECT count(*) FROM nullable_t WHERE a < 0 OR b < 0; +-- +ok +== +EXPLAIN ANALYZE +SELECT sum(t.x) +FROM t +JOIN (VALUES (50::BIGINT), (3000::BIGINT), (5000::BIGINT), (8050::BIGINT)) keys(x) USING (x) +WHERE t.x < 100 OR t.s > '00008000'; +-- +ok +== +SELECT count(*), sum(t.x) +FROM t +JOIN (VALUES (50::BIGINT), (3000::BIGINT), (5000::BIGINT), (8050::BIGINT)) keys(x) USING (x) +WHERE t.x < 100 OR t.s > '00008000'; +-- +ok +== +CREATE TABLE expression_t AS +SELECT range::INTEGER AS a, + (range + 10000)::INTEGER AS b, + 5000::BIGINT AS c, + range::VARCHAR AS s, + (range + 10000)::VARCHAR AS s2, + CASE WHEN range < 4096 THEN range ELSE NULL END::INTEGER AS nullable_a, + CASE WHEN range % 2 = 0 THEN NULL ELSE range END::INTEGER AS mixed_nullable +FROM range(6144); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE greatest(a, b) > 15000; +-- +ok +== +SELECT count(*) FROM expression_t WHERE greatest(a, b) > 15000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE least(a, b) > 5000; +-- +ok +== +SELECT count(*) FROM expression_t WHERE least(a, b) > 5000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE greatest(a, 0) > 5000; +-- +ok +== +SELECT count(*) FROM expression_t WHERE greatest(a, 0) > 5000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE CAST(a AS BIGINT) > c; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE a > b OR a > c; +-- +ok +== +SELECT count(*) FROM expression_t WHERE a > b OR a > c; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE a > TRY_CAST(c AS INTEGER); +-- +ok +== +EXPLAIN ANALYZE +SELECT count(*) FROM expression_t +WHERE (greatest(a, b) > 15000 AND a < 6000) OR CAST(a AS BIGINT) > c; +-- +ok +== +SELECT count(*) FROM expression_t +WHERE (greatest(a, b) > 15000 AND a < 6000) OR CAST(a AS BIGINT) > c; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE greatest(nullable_a, b) > 15000; +-- +ok +== +SELECT count(*) FROM expression_t WHERE greatest(nullable_a, b) > 15000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE least(nullable_a, b) > 5000; +-- +ok +== +SELECT count(*) FROM expression_t WHERE least(nullable_a, b) > 5000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE greatest(s, s) > s2; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE mixed_nullable < b OR a < 0; +-- +ok +== +SELECT count(*) FROM expression_t WHERE mixed_nullable < b OR a < 0; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE CAST(c AS INTEGER) < a; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM expression_t WHERE random() + a > c; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE x < 100 OR s > '00008000' +UNION ALL +SELECT count(*) FROM t WHERE x < 100 OR s > '00008000'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/date_part_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/date_part_row_group_pruning.test new file mode 100644 index 0000000..08080da --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/date_part_row_group_pruning.test @@ -0,0 +1,306 @@ +# source: test/sql/optimizer/date_part_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/date_part_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE months AS + SELECT make_date(2024, + 1 + (range // 2048)::INT * 4 + ((range % 2048) // 1024)::INT, + 1 + ((range % 1024) * 27 // 1024)::INT) AS d + FROM range(6144); +-- +ok +== +SELECT count(*) FROM months WHERE month(d) = 5; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM months WHERE month(d) = 5; +-- +ok +== +SELECT count(*) FROM months WHERE month(d) BETWEEN 6 AND 9; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM months WHERE month(d) BETWEEN 6 AND 9; +-- +ok +== +SELECT count(*) FROM months WHERE month(d) >= 10; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM months WHERE month(d) >= 10; +-- +ok +== +SELECT count(*) FROM months WHERE quarter(d) = 4; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM months WHERE quarter(d) = 4; +-- +ok +== +SELECT count(*) FROM months WHERE dayofyear(d) = 130; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM months WHERE dayofyear(d) = 130; +-- +ok +== +SELECT count(*) FROM months WHERE week(d) = 20; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM months WHERE week(d) = 20; +-- +ok +== +CREATE TABLE month_ts AS SELECT d::TIMESTAMP AS ts FROM months; +-- +ok +== +SELECT count(*) FROM month_ts WHERE month(ts) = 5; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM month_ts WHERE month(ts) = 5; +-- +ok +== +CREATE TABLE days AS + SELECT make_date(2024, 6, 1 + (range // 2048)::INT * 10 + ((range % 2048) * 9 // 2048)::INT) AS d + FROM range(6144); +-- +ok +== +SELECT count(*) FROM days WHERE day(d) = 15; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM days WHERE day(d) = 15; +-- +ok +== +CREATE TABLE cross_year AS + SELECT make_date(2023 + (range % 2)::INT, 12 - (range % 2)::INT * 11, 1 + (range // 236)::INT) AS d + FROM range(6144); +-- +ok +== +SELECT count(*) FROM cross_year WHERE month(d) = 12; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_year WHERE month(d) = 12; +-- +ok +== +SELECT count(*) FROM cross_year WHERE quarter(d) = 4; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_year WHERE quarter(d) = 4; +-- +ok +== +SELECT count(*) FROM cross_year WHERE dayofyear(d) = 339; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_year WHERE dayofyear(d) = 339; +-- +ok +== +SELECT count(*) FROM cross_year WHERE week(d) = 52; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_year WHERE week(d) = 52; +-- +ok +== +CREATE TABLE cross_year_ts AS SELECT d::TIMESTAMP AS ts FROM cross_year; +-- +ok +== +SELECT count(*) FROM cross_year_ts WHERE month(ts) = 12; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_year_ts WHERE month(ts) = 12; +-- +ok +== +CREATE TABLE cross_month AS + SELECT (DATE '2024-06-30' + (range % 2)::INT) AS d FROM range(6144); +-- +ok +== +SELECT count(*) FROM cross_month WHERE day(d) = 30; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_month WHERE day(d) = 30; +-- +ok +== +CREATE TABLE hours_ts AS + SELECT TIMESTAMP '2024-06-01 09:00:00' + + INTERVAL ((range // 2048) * 3 + (range % 2048) // 1024) HOUR + + INTERVAL ((range % 1024) * 59 // 1024) MINUTE AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM hours_ts WHERE hour(ts) = 12; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM hours_ts WHERE hour(ts) = 12; +-- +ok +== +CREATE TABLE times AS SELECT ts::TIME AS t FROM hours_ts; +-- +ok +== +SELECT count(*) FROM times WHERE hour(t) = 12; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM times WHERE hour(t) = 12; +-- +ok +== +CREATE TABLE minutes_ts AS + SELECT TIMESTAMP '2024-06-01 12:00:00' + + INTERVAL ((range // 2048) * 20) MINUTE + + INTERVAL ((range % 2048) * 9 // 2048) MINUTE AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM minutes_ts WHERE minute(ts) = 25; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM minutes_ts WHERE minute(ts) = 25; +-- +ok +== +CREATE TABLE seconds_ts AS + SELECT TIMESTAMP '2024-06-01 12:30:00' + + INTERVAL ((range // 2048) * 20) SECOND + + INTERVAL ((range % 2048) * 9 // 2048) SECOND AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM seconds_ts WHERE second(ts) = 25; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM seconds_ts WHERE second(ts) = 25; +-- +ok +== +SELECT count(*) FROM seconds_ts WHERE millisecond(ts) = 25000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM seconds_ts WHERE millisecond(ts) = 25000; +-- +ok +== +SELECT count(*) FROM seconds_ts WHERE microsecond(ts) = 25000000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM seconds_ts WHERE microsecond(ts) = 25000000; +-- +ok +== +SELECT count(*) FROM seconds_ts WHERE nanosecond(ts) = 25000000000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM seconds_ts WHERE nanosecond(ts) = 25000000000; +-- +ok +== +CREATE TABLE cross_midnight AS + SELECT TIMESTAMP '2024-06-01 23:30:00' + + INTERVAL ((range % 2) * 60) MINUTE + + INTERVAL (range // 236) SECOND AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM cross_midnight WHERE hour(ts) = 23; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_midnight WHERE hour(ts) = 23; +-- +ok +== +CREATE TABLE cross_hour AS + SELECT TIMESTAMP '2024-06-01 12:59:30' + INTERVAL ((range % 2) * 60) SECOND AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM cross_hour WHERE minute(ts) = 59; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_hour WHERE minute(ts) = 59; +-- +ok +== +CREATE TABLE cross_minute AS + SELECT TIMESTAMP '2024-06-01 12:30:59' + INTERVAL (range % 2) SECOND AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM cross_minute WHERE second(ts) = 59; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_minute WHERE second(ts) = 59; +-- +ok +== +SELECT count(*) FROM cross_minute WHERE millisecond(ts) = 59000; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM cross_minute WHERE millisecond(ts) = 59000; +-- +ok +== +CREATE TABLE pre_epoch AS + SELECT TIMESTAMP '1965-06-01 09:00:00' + + INTERVAL ((range // 2048) * 3 + (range % 2048) // 1024) HOUR + + INTERVAL ((range % 1024) * 59 // 1024) MINUTE AS ts + FROM range(6144); +-- +ok +== +SELECT count(*) FROM pre_epoch WHERE hour(ts) = 12; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM pre_epoch WHERE hour(ts) = 12; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/distinct_sibling_column_pruning.test b/parser/testdata/corpus/sql/optimizer/distinct_sibling_column_pruning.test new file mode 100644 index 0000000..b2dc694 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/distinct_sibling_column_pruning.test @@ -0,0 +1,72 @@ +# source: test/sql/optimizer/distinct_sibling_column_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE person(id INTEGER PRIMARY KEY, name VARCHAR, age INTEGER); +-- +ok +== +INSERT INTO person VALUES (1, 'alice', 10), (2, 'bob', 20), (3, 'carol', 30); +-- +ok +== +CREATE TABLE knows(src_id INTEGER, dst_id INTEGER); +-- +ok +== +INSERT INTO knows VALUES (1, 2), (1, 3), (2, 3); +-- +ok +== +EXPLAIN SELECT f.name FROM person p LEFT JOIN ( + SELECT k.src_id, n.name FROM knows k + JOIN (SELECT *, struct_pack(age := age) AS unused_payload FROM person) n ON n.id = k.dst_id + JOIN (SELECT DISTINCT id FROM person) s ON s.id = k.src_id +) f ON p.id = f.src_id; +-- +ok +== +SELECT f.name FROM person p LEFT JOIN ( + SELECT k.src_id, n.name FROM knows k + JOIN (SELECT *, struct_pack(age := age) AS unused_payload FROM person) n ON n.id = k.dst_id + JOIN (SELECT DISTINCT id FROM person) s ON s.id = k.src_id +) f ON p.id = f.src_id; +-- +ok +== +CREATE TABLE keys(id INTEGER, tag VARCHAR); +-- +ok +== +INSERT INTO keys VALUES (1, 'a'), (1, 'b'), (1, 'a'), (2, NULL), (2, NULL); +-- +ok +== +SELECT id FROM (SELECT DISTINCT id, tag FROM keys); +-- +ok +== +SELECT id FROM (SELECT DISTINCT * FROM (SELECT DISTINCT id, tag FROM keys)); +-- +ok +== +SELECT s.id, p.name FROM (SELECT DISTINCT id, tag FROM keys) s +JOIN person p ON s.id = p.id; +-- +ok +== +SELECT s.id, p.name FROM person p +JOIN (SELECT DISTINCT id, tag FROM keys) s ON s.id = p.id; +-- +ok +== +SELECT DISTINCT ON (id) id, tag FROM keys ORDER BY id, tag DESC NULLS LAST; +-- +ok +== +WITH s AS MATERIALIZED (SELECT DISTINCT id, tag FROM keys) +SELECT s.id, p.name FROM s JOIN person p ON s.id = p.id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/divide_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/divide_zonemap_pruning.test new file mode 100644 index 0000000..5da1198 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/divide_zonemap_pruning.test @@ -0,0 +1,95 @@ +# source: test/sql/optimizer/divide_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/divide_zonemap_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE divide_pruning AS +SELECT i::INTEGER AS i +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_pruning WHERE i // 1000 = 5; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE i // 1000 = 5; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_pruning WHERE i / 100.0 < 5; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE i / 100.0 < 5; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_pruning WHERE i / -100.0 > -5; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE i / -100.0 > -5; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_pruning WHERE 6144.0 / (i - 3000) = 123456; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE 6144.0 / (i - 3000) = 123456; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE i / 0.0 = 123; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_pruning WHERE i // -1000 = -5; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE i // -1000 = -5; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE 6144 // (i - 3000) = 123456; +-- +ok +== +SELECT count(*) FROM divide_pruning WHERE i // 0 = 5; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_pruning WHERE 6144 // (i - 3000) = 123456; +-- +ok +== +CREATE TABLE divide_overflow AS +SELECT CASE WHEN i = 0 THEN -2147483648 ELSE i END::INTEGER AS i +FROM range(6144) r(i); +-- +ok +== +SELECT count(*) FROM divide_overflow WHERE i // -1 = 42; +-- +ok +== +CREATE TABLE divide_float AS +SELECT CASE WHEN i = 5000 THEN 'infinity'::DOUBLE ELSE i::DOUBLE END AS d +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM divide_float WHERE d / 2.0 > 1e308; +-- +ok +== +SELECT count(*) FROM divide_float WHERE d / 2.0 > 1e308; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/empty_string_concat_pruning.test b/parser/testdata/corpus/sql/optimizer/empty_string_concat_pruning.test index 2b50609..94d38a2 100644 --- a/parser/testdata/corpus/sql/optimizer/empty_string_concat_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/empty_string_concat_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/empty_string_concat_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE empty_concat_pruning AS diff --git a/parser/testdata/corpus/sql/optimizer/expression/date_trunc_non_interval_parts.test b/parser/testdata/corpus/sql/optimizer/expression/date_trunc_non_interval_parts.test new file mode 100644 index 0000000..499b869 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/date_trunc_non_interval_parts.test @@ -0,0 +1,17 @@ +# source: test/sql/optimizer/expression/date_trunc_non_interval_parts.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO dates VALUES (DATE '2020-06-14'), (DATE '2020-06-15'), (DATE '2020-06-16'), (NULL) +-- +ok +== +SELECT count(*) FROM dates WHERE date_trunc('dow', d) = DATE '2020-06-15' +-- +ok +== +SELECT count(*) FROM dates WHERE date_trunc('dow', d) <= DATE '2020-06-15' +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/enum_compare_null.test b/parser/testdata/corpus/sql/optimizer/expression/enum_compare_null.test new file mode 100644 index 0000000..a6c4f35 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/enum_compare_null.test @@ -0,0 +1,25 @@ +# source: test/sql/optimizer/expression/enum_compare_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE mood AS ENUM ('sad', 'ok') +-- +ok +== +CREATE TABLE moods(m mood) +-- +ok +== +INSERT INTO moods VALUES ('sad'), ('ok'), (NULL) +-- +ok +== +SELECT count(*) FROM moods WHERE m::VARCHAR IS NOT DISTINCT FROM NULL::VARCHAR +-- +ok +== +SELECT count(*) FROM moods WHERE NULL::VARCHAR IS DISTINCT FROM m::VARCHAR +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/enum_full_domain_behavior.test b/parser/testdata/corpus/sql/optimizer/expression/enum_full_domain_behavior.test new file mode 100644 index 0000000..21ec852 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/enum_full_domain_behavior.test @@ -0,0 +1,132 @@ +# source: test/sql/optimizer/expression/enum_full_domain_behavior.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE mood AS ENUM('sad', 'ok', 'happy'); +-- +ok +== +CREATE TABLE covered AS SELECT ['sad', 'ok', 'happy'][1 + (range % 3)]::mood AS m FROM range(6144); +-- +ok +== +CREATE TABLE nullables(m mood); +-- +ok +== +INSERT INTO nullables SELECT ['sad', 'ok', 'happy'][1 + (range % 3)]::mood FROM range(6144); +-- +ok +== +INSERT INTO nullables VALUES (NULL); +-- +ok +== +explain +SELECT count(*) FROM covered WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM covered WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +explain +SELECT count(*) FROM nullables WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM nullables WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +explain +SELECT random() FROM covered WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +explain +SELECT random() FROM nullables WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +explain +DELETE FROM covered WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +DELETE FROM covered WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM covered; +-- +ok +== +explain +SELECT count(*) FROM covered WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM covered WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== +explain +SELECT count(*) FROM covered WHERE m NOT IN ('sad'::mood, 'ok'::mood, 'happy'::mood); +-- +ok +== +SELECT count(*) FROM covered WHERE m NOT IN ('sad'::mood, 'ok'::mood, 'happy'::mood); +-- +ok +== +explain +SELECT count(*) FROM covered WHERE m IN ('sad'::mood, 'ok'::mood, 'happy'::mood); +-- +ok +== +SELECT count(*) FROM covered WHERE m IN ('sad'::mood, 'ok'::mood, 'happy'::mood); +-- +ok +== +SELECT + m IS NULL, + m NOT IN ('sad'::mood, 'ok'::mood, 'happy'::mood), + NOT (m IN ('sad'::mood, 'ok'::mood, 'happy'::mood)) +FROM (VALUES ('sad'::mood), (NULL::mood)) v(m) +ORDER BY m IS NULL +-- +ok +== +explain +SELECT count(*) FROM (VALUES ('sad'::mood), ('ok'::mood), ('happy'::mood)) v(m) WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM (VALUES ('sad'::mood), ('ok'::mood), ('happy'::mood)) v(m) WHERE m NOT IN ('sad', 'ok', 'happy'); +-- +ok +== +CREATE TABLE guard_check(m mood); +-- +ok +== +INSERT INTO guard_check VALUES ('sad'), ('ok'), ('happy'); +-- +ok +== +explain +WITH ins AS (INSERT INTO guard_check VALUES (NULL) RETURNING *) SELECT count(*) FROM guard_check WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== +WITH ins AS (INSERT INTO guard_check VALUES (NULL) RETURNING *) SELECT count(*) FROM guard_check WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM guard_check WHERE m IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/enum_full_domain_fold_guard.test b/parser/testdata/corpus/sql/optimizer/expression/enum_full_domain_fold_guard.test new file mode 100644 index 0000000..519741a --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/enum_full_domain_fold_guard.test @@ -0,0 +1,119 @@ +# source: test/sql/optimizer/expression/enum_full_domain_fold_guard.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t_enum(m mood); +-- +ok +== +INSERT INTO t_enum VALUES ('sad'), ('ok'), ('happy'); +-- +ok +== +WITH ins AS (INSERT INTO t_enum VALUES (NULL) RETURNING *) SELECT count(*) FROM t_enum WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM t_enum WHERE m IS NULL; +-- +ok +== +CREATE TABLE t_int(i INTEGER); +-- +ok +== +INSERT INTO t_int VALUES (1), (2), (3); +-- +ok +== +WITH ins AS (INSERT INTO t_int VALUES (NULL) RETURNING *) SELECT count(*) FROM t_int WHERE i * 2 <> 5; +-- +ok +== +SELECT count(*) FROM t_int WHERE i IS NULL; +-- +ok +== +CREATE TABLE t_upd(m mood, x INTEGER); +-- +ok +== +INSERT INTO t_upd VALUES ('sad', 0), ('ok', 0), ('happy', 0); +-- +ok +== +WITH ins AS (INSERT INTO t_upd VALUES (NULL, 0) RETURNING *) UPDATE t_upd SET x = 1 WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== +SELECT count(*) FROM t_upd WHERE x = 1; +-- +ok +== +SELECT count(*) FROM t_upd; +-- +ok +== +CREATE TABLE t_a(i INTEGER); +-- +ok +== +CREATE TABLE t_b(i INTEGER); +-- +ok +== +INSERT INTO t_b VALUES (1), (2), (3); +-- +ok +== +WITH ins AS (INSERT INTO t_a VALUES (NULL) RETURNING *) SELECT count(*) FROM t_b WHERE i * 2 <> 5; +-- +ok +== +SELECT count(*) FROM t_int WHERE i * 2 <> 5; +-- +ok +== +CREATE TABLE t_prep(i INTEGER); +-- +ok +== +INSERT INTO t_prep VALUES (1), (2), (3); +-- +ok +== +PREPARE p AS SELECT count(*) FROM t_prep WHERE i * 2 <> 5; +-- +ok +== +EXECUTE p; +-- +ok +== +INSERT INTO t_prep VALUES (NULL); +-- +ok +== +CREATE TABLE t_vol(m mood); +-- +ok +== +INSERT INTO t_vol SELECT ['sad', 'ok', 'happy'][1 + (range % 3)]::mood FROM range(1024); +-- +ok +== +explain +SELECT count(*) FROM t_vol WHERE m IN ('sad', 'ok', 'happy') AND random() > 0.5; +-- +ok +== +explain +SELECT count(*) FROM (SELECT m, random() AS r FROM t_vol) t WHERE m IN ('sad', 'ok', 'happy') AND r > 0.5; +-- +ok +== +SELECT count(*) FROM t_vol WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_casts.test b/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_casts.test new file mode 100644 index 0000000..18bf129 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_casts.test @@ -0,0 +1,85 @@ +# source: test/sql/optimizer/expression/list_comprehension_casts.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA {optimizer}_optimizer; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := true, result := x)), lambda s: s.filter), + lambda s: s.result::BOOLEAN::INTEGER +) FROM (VALUES ([2])) t(l); +-- +ok +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := true, result := x)), lambda s: s.filter), + lambda s: s.result::VARCHAR +) FROM (VALUES ([2])) t(l); +-- +ok +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := x, result := x)), + lambda s: s.filter::DECIMAL(1,0)::BOOLEAN), + lambda s: s.result +) FROM (VALUES ([0.1,0.9])) t(l); +-- +ok +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := x, result := x)), + lambda s: TRY_CAST(s.filter AS BOOLEAN)), + lambda s: s.result +) FROM (VALUES (['true','bad'])) t(l); +-- +ok +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := true, result := x) + ::STRUCT(filter BOOLEAN,result BOOLEAN)::STRUCT(filter BOOLEAN,result INTEGER)), lambda s: s.filter), + lambda s: s.result +) FROM (VALUES ([2])) t(l); +-- +ok +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := true, result := x)), lambda s: s.filter), + lambda s: (s::STRUCT(filter BOOLEAN,result BOOLEAN)::STRUCT(filter BOOLEAN,result INTEGER)).result +) FROM (VALUES ([2])) t(l); +-- +ok +== +SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := true, result := x)), lambda s: s.filter), + lambda s: s.result::BOOLEAN::INTEGER +) FROM (VALUES (1, [0,2,NULL,-3]), (2, []), (3, NULL)) t(id,l) ORDER BY id; +-- +ok +== +SELECT count(*) FROM ( + SELECT list_transform( + list_filter(list_transform([i + 2], lambda x: struct_pack(filter := true, result := x)), lambda s: s.filter), + lambda s: s.result::BOOLEAN::BIGINT + ) AS l FROM range(6145) t(i) +) t WHERE l = [1]; +-- +ok +== +PREPARE list_cast AS SELECT list_transform( + list_filter(list_transform(l, lambda x: struct_pack(filter := true, result := x)), lambda s: s.filter), + lambda s: s.result::BOOLEAN::INTEGER +) FROM (VALUES ($1)) t(l); +-- +ok +== +EXECUTE list_cast([2]); +-- +ok +== +DEALLOCATE list_cast; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_rewrite.test b/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_rewrite.test index e519359..2c29e7e 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_rewrite.test +++ b/parser/testdata/corpus/sql/optimizer/expression/list_comprehension_rewrite.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/list_comprehension_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(l INTEGER[]); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_casting_negative_integer_to_bit.test b/parser/testdata/corpus/sql/optimizer/expression/test_casting_negative_integer_to_bit.test index 3f79ab1..61e3958 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_casting_negative_integer_to_bit.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_casting_negative_integer_to_bit.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_casting_negative_integer_to_bit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 as select -1 c1 from range(1); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_common_aggregate.test b/parser/testdata/corpus/sql/optimizer/expression/test_common_aggregate.test index 2d7fc21..1d6874a 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_common_aggregate.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_common_aggregate.test @@ -1,12 +1,8 @@ # source: test/sql/optimizer/expression/test_common_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -PRAGMA explain_output = 'OPTIMIZED_ONLY'; --- -ok -== EXPLAIN SELECT COUNT(*), COUNT(), COUNT(i) FROM integers; -- ok diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_comparison_simplification.test b/parser/testdata/corpus/sql/optimizer/expression/test_comparison_simplification.test index e3de114..6559bfa 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_comparison_simplification.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_comparison_simplification.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_comparison_simplification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH results AS ( diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_conjunction_optimization.test b/parser/testdata/corpus/sql/optimizer/expression/test_conjunction_optimization.test index ecd3cc1..924a56c 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_conjunction_optimization.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_conjunction_optimization.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_conjunction_optimization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i FROM integers WHERE (i=1 AND i>0) OR (i=1 AND i<3) ORDER BY i diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_cse.test b/parser/testdata/corpus/sql/optimizer/expression/test_cse.test index cc9fa10..fd19d44 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_cse.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_cse.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_cse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test(a integer); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_date_subtract_filter.test b/parser/testdata/corpus/sql/optimizer/expression/test_date_subtract_filter.test index 8ae797d..f77048b 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_date_subtract_filter.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_date_subtract_filter.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_date_subtract_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dates(lo_commitdate DATE); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_enum_in_simplification.test b/parser/testdata/corpus/sql/optimizer/expression/test_enum_in_simplification.test index 407b173..972bbab 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_enum_in_simplification.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_enum_in_simplification.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_enum_in_simplification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE sym_enum AS ENUM ( @@ -126,6 +126,118 @@ ORDER BY sym; -- ok == +explain +SELECT count(*) +FROM quote +WHERE sym IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +) +-- +ok +== +explain +SELECT count(*) +FROM quote +WHERE sym NOT IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +) +-- +ok +== +explain +SELECT count(*) +FROM quote +WHERE NOT (sym IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +)) +-- +ok +== +SELECT + sym NOT IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + ), + NOT (sym IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + )) +FROM (VALUES ('0'::sym_enum), ('1'::sym_enum)) tbl(sym) +ORDER BY sym +-- +ok +== +CREATE TABLE dml_quote(sym sym_enum); +-- +ok +== +INSERT INTO dml_quote VALUES ('0'), ('1'); +-- +ok +== +WITH ins AS ( + INSERT INTO dml_quote VALUES (NULL) RETURNING * +) +SELECT count(*) +FROM dml_quote +WHERE sym IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +) +-- +ok +== INSERT INTO quote VALUES (NULL, NULL, NULL, NULL, NULL); -- ok @@ -168,6 +280,143 @@ FROM ( -- ok == +SELECT count(*) +FROM quote +WHERE (NOT constant_or_null(true, sym)) IS NULL +-- +ok +== +SELECT count(*) +FROM quote +WHERE sym IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +) +-- +ok +== +SELECT count(*) +FROM quote +WHERE sym NOT IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' +) +-- +ok +== +SELECT + sym IS NULL, + sym NOT IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + ), + NOT (sym IN ( + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + )) +FROM (VALUES ('0'::sym_enum), (NULL::sym_enum)) tbl(sym) +ORDER BY sym IS NULL +-- +ok +== +SELECT + sym IS NULL, + sym IN ( + NULL, + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + ), + sym NOT IN ( + NULL, + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + ) +FROM (VALUES ('0'::sym_enum), (NULL::sym_enum)) tbl(sym) +ORDER BY sym IS NULL +-- +ok +== +SELECT + sym IS NULL, + sym NOT IN ( + NULL, + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + ), + NOT (sym IN ( + NULL, + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9' + )) +FROM (VALUES ('0'::sym_enum), (NULL::sym_enum)) tbl(sym) +ORDER BY sym IS NULL +-- +ok +== EXPLAIN FROM quote WHERE sym = '0'; @@ -176,6 +425,12 @@ ok == EXPLAIN FROM quote +WHERE '0' = sym::VARCHAR; +-- +ok +== +EXPLAIN +FROM quote WHERE sym = '100'; -- ok diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_equal_or_null_optimization.test b/parser/testdata/corpus/sql/optimizer/expression/test_equal_or_null_optimization.test index e0548f1..022f7a4 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_equal_or_null_optimization.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_equal_or_null_optimization.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_equal_or_null_optimization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA explain_output = 'PHYSICAL_ONLY' diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_float_identity.test b/parser/testdata/corpus/sql/optimizer/expression/test_float_identity.test new file mode 100644 index 0000000..277a94a --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/test_float_identity.test @@ -0,0 +1,113 @@ +# source: test/sql/optimizer/expression/test_float_identity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE OR REPLACE TABLE floats(x {type}); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO floats VALUES (NULL), ('NaN'), ('Infinity'), ('-Infinity'), ('-0.0'), (0), (2), (1e-30); +-- +ok +== +EXPLAIN SELECT x FROM floats; +-- +ok +== +EXPLAIN SELECT x / 1 FROM floats; +-- +ok +== +SET ieee_floating_point_ops={ieee}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT bool_and((x / 1) IS NOT DISTINCT FROM x), bool_and(signbit(x / 1) = signbit(x)) FILTER (WHERE x = 0) FROM floats; +-- +ok +== +SELECT isnan(x * 0), isnan(0 / x) FROM floats WHERE isnan(x); +-- +ok +== +SELECT 1 / x FROM floats WHERE x = 2; +-- +ok +== +INSERT INTO integers VALUES (NULL), (0), (1), (2); +-- +ok +== +EXPLAIN SELECT i FROM integers WHERE i = 1; +-- +ok +== +EXPLAIN SELECT i FROM integers WHERE i / 1 = 1; +-- +ok +== +EXPLAIN SELECT i FROM integers WHERE 1::DOUBLE = i::DOUBLE; +-- +ok +== +SELECT i::DOUBLE = 1, i::DOUBLE < 1.5, i::DOUBLE IS DISTINCT FROM NULL, i::DOUBLE IS NOT DISTINCT FROM 1 +FROM integers +ORDER BY i NULLS FIRST; +-- +ok +== +SELECT + count(*) FILTER (WHERE i::DOUBLE = 1.5), + count(*) FILTER (WHERE i::DOUBLE = 1e30), + count(*) FILTER (WHERE i::DOUBLE = 'NaN'::DOUBLE), + count(*) FILTER (WHERE i::DOUBLE = 'Infinity'::DOUBLE) +FROM integers; +-- +ok +== +CREATE OR REPLACE TABLE small_integers(i {type}); +-- +error: Parser Error: syntax error at or near "{" +== +EXPLAIN SELECT i FROM small_integers WHERE i = 1; +-- +ok +== +EXPLAIN SELECT i FROM small_integers WHERE i::FLOAT / 1 = 1::FLOAT; +-- +ok +== +CREATE TABLE wide_integers AS SELECT * FROM (VALUES (9007199254740992::BIGINT), (9007199254740993::BIGINT)) t(i); +-- +ok +== +SELECT count(*) FROM wide_integers WHERE i / 1 = 9007199254740992::DOUBLE; +-- +ok +== +CREATE TABLE rounded_integers AS SELECT * FROM (VALUES (16777216::INTEGER), (16777217::INTEGER)) t(i); +-- +ok +== +SELECT count(*) FROM rounded_integers WHERE i::FLOAT / 1 = 16777216::FLOAT; +-- +ok +== +SELECT typeof(i / 1) FROM rounded_integers LIMIT 1; +-- +ok +== +CREATE OR REPLACE TABLE boundaries AS +SELECT * FROM (VALUES (CAST({min} AS {type})), (CAST({max} AS {type})), (NULL::{type})) t(i); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT + count(*) FILTER (WHERE i::DOUBLE = {min}::DOUBLE), + count(*) FILTER (WHERE {max}::DOUBLE = TRY_CAST(i AS DOUBLE)), + count(*) FILTER (WHERE i::DOUBLE IS NOT DISTINCT FROM NULL) +FROM boundaries; +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_in_clause_simplification.test b/parser/testdata/corpus/sql/optimizer/expression/test_in_clause_simplification.test index e017930..99c992e 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_in_clause_simplification.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_in_clause_simplification.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_in_clause_simplification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE issue13380(c0 TIMESTAMP); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_indistinct_aggregates.test b/parser/testdata/corpus/sql/optimizer/expression/test_indistinct_aggregates.test index 0c07260..2d15b1b 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_indistinct_aggregates.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_indistinct_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_indistinct_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT max(distinct x) from range(10) tbl(x); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_move_constants.test b/parser/testdata/corpus/sql/optimizer/expression/test_move_constants.test index 40a9e95..c7c0dee 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_move_constants.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_move_constants.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_move_constants.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE vals(v {type}); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_move_constants_overflow.test b/parser/testdata/corpus/sql/optimizer/expression/test_move_constants_overflow.test new file mode 100644 index 0000000..1fed3df --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/test_move_constants_overflow.test @@ -0,0 +1,169 @@ +# source: test/sql/optimizer/expression/test_move_constants_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT x * -1 <> CAST(-2147483648 AS INTEGER) FROM (VALUES (CAST(0 AS INTEGER))) t(x); +-- +ok +== +INSERT INTO vals VALUES (0), (2), (-2), ({max}), ({min}+1), (NULL); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} = ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} <> ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} < ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} <= ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} > ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} >= ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} IS DISTINCT FROM ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} IS NOT DISTINCT FROM ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE ({min})::{type} = v * (-1)::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE ({min})::{type} <> v * (-1)::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE ({min})::{type} < v * (-1)::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE ({min})::{type} > v * (-1)::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE ({min})::{type} IS DISTINCT FROM v * (-1)::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE (-1)::{type} * v <> ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT v * (-1)::{type} <> ({min})::{type} FROM vals WHERE v IS NULL; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT v * (-1)::{type} IS DISTINCT FROM ({min})::{type} FROM vals WHERE v IS NULL; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE -v = ({min})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE -v <> ({min})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE -v < ({min})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE -v >= ({min})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE -v IS DISTINCT FROM ({min})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE -v IS NOT DISTINCT FROM ({min})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} = ({max})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE v * (-1)::{type} = ({min}+1)::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM vals WHERE -v = ({max})::{type}; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE pm_vals(v {type}); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO pm_vals VALUES (0), (2), (-2), (NULL); +-- +ok +== +SELECT count(*) FROM pm_vals WHERE v + 1::{type} = ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v + 1::{type} <> ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v + 1::{type} > ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE 1::{type} + v <> ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v + 1::{type} IS DISTINCT FROM ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v - 1::{type} = ({max})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v - 1::{type} <> ({max})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v - 1::{type} < ({max})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE 1::{type} - v = ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE 1::{type} - v <> ({min})::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v + 1::{type} = 3::{type}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM pm_vals WHERE v - 1::{type} = 1::{type}; +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_negation_limits.test b/parser/testdata/corpus/sql/optimizer/expression/test_negation_limits.test index 75834cb..be5697a 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_negation_limits.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_negation_limits.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_negation_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE vals(id INTEGER, v {type}); diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_nop_arithmetic.test b/parser/testdata/corpus/sql/optimizer/expression/test_nop_arithmetic.test index b804b84..aaa1410 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_nop_arithmetic.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_nop_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_nop_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a + 0 FROM test diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_row_comparison_simplification.test b/parser/testdata/corpus/sql/optimizer/expression/test_row_comparison_simplification.test index 1ffa6ab..fa3d5c0 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_row_comparison_simplification.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_row_comparison_simplification.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_row_comparison_simplification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE rows(a INTEGER, b INTEGER, c INTEGER, d INTEGER); @@ -31,11 +31,23 @@ SELECT row() = row(), row(a + 1, b) = row(c + 1, d) FROM rows WHERE a = 1 AND b -- ok == -SET disabled_optimizers='expression_rewriter'; +EXPLAIN WITH RECURSIVE +edges(here, there) AS ( + VALUES (0, 1), (1, 0) +), +cc(node, comp) USING KEY (node) AS ( + VALUES (0, 0), (1, 1) + UNION ALL + SELECT current.node, changed.comp + FROM cc changed, edges edge, recurring.cc current + WHERE (edge.here, edge.there) = (current.node, changed.node) + AND changed.comp < current.comp +) +SELECT * FROM cc; -- ok == -EXPLAIN WITH RECURSIVE +WITH RECURSIVE edges(here, there) AS ( VALUES (0, 1), (1, 0) ), diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_time_ns_cast_comparison.test b/parser/testdata/corpus/sql/optimizer/expression/test_time_ns_cast_comparison.test new file mode 100644 index 0000000..6aae98e --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/test_time_ns_cast_comparison.test @@ -0,0 +1,37 @@ +# source: test/sql/optimizer/expression/test_time_ns_cast_comparison.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE times AS SELECT TIME_NS '12:34:56.123456789' AS t +-- +ok +== +SELECT t::TIME, count(*) FILTER (WHERE t::TIME = TIME '12:34:56.123457') FROM times GROUP BY ALL +-- +ok +== +SELECT count(*) FROM times WHERE t::TIME = TIME '12:34:56.123457' +-- +ok +== +SELECT count(*) FROM times WHERE t::TIME >= TIME '12:34:56.123457' +-- +ok +== +CREATE TABLE hours AS SELECT TIME '12:00:00' + i * INTERVAL 1 HOUR AS t FROM range(5) r(i) +-- +ok +== +SELECT count(*) FROM hours WHERE t::TIME_NS = TIME_NS '13:00:00.000000001' +-- +ok +== +SELECT count(*) FROM hours WHERE t::TIME_NS > TIME_NS '12:59:59.9999999' +-- +ok +== +SELECT count(*) FROM hours WHERE t::TIME_NS < TIME_NS '13:00:00.0000004' +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/expression/test_timestamp_offset.test b/parser/testdata/corpus/sql/optimizer/expression/test_timestamp_offset.test index 8e20a69..158cb39 100644 --- a/parser/testdata/corpus/sql/optimizer/expression/test_timestamp_offset.test +++ b/parser/testdata/corpus/sql/optimizer/expression/test_timestamp_offset.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/expression/test_timestamp_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table table1 ( diff --git a/parser/testdata/corpus/sql/optimizer/expression/uncommitted_appends_fold_guard.test b/parser/testdata/corpus/sql/optimizer/expression/uncommitted_appends_fold_guard.test new file mode 100644 index 0000000..e9b3948 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/expression/uncommitted_appends_fold_guard.test @@ -0,0 +1,29 @@ +# source: test/sql/optimizer/expression/uncommitted_appends_fold_guard.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM t WHERE i * 2 <> 5; +-- +ok +== +SELECT count(*) FROM t WHERE i IS NULL; +-- +ok +== +CREATE TABLE m1(m mood); +-- +ok +== +INSERT INTO m1 VALUES ('sad'), ('ok'), ('happy'); +-- +ok +== +INSERT INTO m1 VALUES (NULL); +-- +ok +== +SELECT count(*) FROM m1 WHERE m IN ('sad', 'ok', 'happy'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/false_or_null_segment_pruning.test b/parser/testdata/corpus/sql/optimizer/false_or_null_segment_pruning.test new file mode 100644 index 0000000..d14305e --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/false_or_null_segment_pruning.test @@ -0,0 +1,28 @@ +# source: test/sql/optimizer/false_or_null_segment_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE integers AS +SELECT CASE WHEN range % 2 = 0 THEN range::INTEGER ELSE NULL END AS x +FROM range(100000); +-- +ok +== +PRAGMA profiling_output = '{TEST_DIR}/false_or_null_segment_profile.json' +-- +error: Parser Error: Profiler file type ({TEST_DIR}/false_or_null_segment_profile.json) must either have the same file extension as the profiling output type (query_tree), or be a '.txt' file. Set "enable_profiling = 'json'" first. +== +SET tracked_metrics = ['query.total_rows_scanned'] +-- +ok +== +SELECT count(*) FROM integers WHERE x > 100000 - x; +-- +ok +== +SELECT query.total_rows_scanned < 100000 +FROM '{TEST_DIR}/false_or_null_segment_profile.json' +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/false_or_null_segment_pruning.test.metadata.json b/parser/testdata/corpus/sql/optimizer/false_or_null_segment_pruning.test.metadata.json new file mode 100644 index 0000000..351a65e --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/false_or_null_segment_pruning.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "56f0b978d4035874": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/optimizer/in_list_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/in_list_row_group_pruning.test index d7f455d..2e0777d 100644 --- a/parser/testdata/corpus/sql/optimizer/in_list_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/in_list_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/in_list_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/in_list_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); @@ -29,6 +29,23 @@ EXPLAIN ANALYZE SELECT count(*) FROM mixed WHERE i NOT IN (1, 2, 3); -- ok == +CREATE TABLE mixed_nullable AS + SELECT CASE + WHEN range < 2048 THEN CASE WHEN range % 4 = 0 THEN NULL ELSE (range % 3 + 1)::INTEGER END + ELSE (range % 2 + 4)::INTEGER + END AS i + FROM range(6144); +-- +ok +== +SELECT count(*) FROM mixed_nullable WHERE i NOT IN (1, 2, 3); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM mixed_nullable WHERE i NOT IN (1, 2, 3); +-- +ok +== CREATE TABLE doubles AS SELECT unnest([1.0, 1.5, 3.0])::DOUBLE AS i; -- ok @@ -37,3 +54,74 @@ SELECT count(*) FROM doubles WHERE i NOT IN (1, 2, 3); -- ok == +CREATE TABLE strings AS +SELECT CASE range // 2048 + WHEN 0 THEN 'v000000' + WHEN 1 THEN 'v000001' + WHEN 2 THEN 'v000010' + ELSE 'v999999' +END AS s, 1 AS payload +FROM range(8192); +-- +ok +== +SELECT sum(payload) FROM strings WHERE s NOT IN ('v000000', 'v000010'); +-- +ok +== +SELECT sum(payload) FROM strings WHERE s <> 'v000000' AND s <> 'v000010'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(payload) FROM strings WHERE s <> 'v000000' AND s <> 'v000010'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(payload) FROM strings WHERE s NOT IN ('v000000', 'v000010'); +-- +ok +== +CREATE TABLE nullable_strings AS +SELECT CASE range // 2048 + WHEN 0 THEN CASE WHEN range % 2 = 0 THEN NULL ELSE 'a' END + WHEN 1 THEN CASE WHEN range % 2 = 0 THEN 'a' ELSE 'b' END + WHEN 2 THEN 'z' + ELSE 'c' +END AS s, 1 AS payload +FROM range(8192); +-- +ok +== +SELECT sum(payload) FROM nullable_strings WHERE s NOT IN ('a', 'z'); +-- +ok +== +EXPLAIN ANALYZE SELECT sum(payload) FROM nullable_strings WHERE s NOT IN ('a', 'z'); +-- +ok +== +SELECT sum(payload) FROM nullable_strings WHERE s IN ('a', 'z', NULL); +-- +ok +== +SELECT count(*) FROM nullable_strings WHERE s NOT IN ('a', 'z', NULL); +-- +ok +== +CREATE TABLE long_strings AS +SELECT CASE WHEN range < 2048 THEN 'abcdefghijkl' + WHEN range % 2 = 0 THEN 'abcdefghijkla' + ELSE 'abcdefghijklb' +END AS s, 1 AS payload +FROM range(4096); +-- +ok +== +SELECT sum(payload) FROM long_strings WHERE s NOT IN ('abcdefghijkla', 'abcdefghijklc'); +-- +ok +== +EXPLAIN ANALYZE SELECT sum(payload) FROM long_strings WHERE s NOT IN ('abcdefghijkla', 'abcdefghijklc'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/instr_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/instr_zonemap_pruning.test index 25552b4..14ae2e3 100644 --- a/parser/testdata/corpus/sql/optimizer/instr_zonemap_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/instr_zonemap_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/instr_zonemap_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE instr_pruning AS diff --git a/parser/testdata/corpus/sql/optimizer/interval_column_stats_pruning.test b/parser/testdata/corpus/sql/optimizer/interval_column_stats_pruning.test new file mode 100644 index 0000000..bede411 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/interval_column_stats_pruning.test @@ -0,0 +1,24 @@ +# source: test/sql/optimizer/interval_column_stats_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/interval_column_stats_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048, STORAGE_VERSION 'v2.0.0'); +-- +ok +== +CREATE TABLE interval_pairs AS +SELECT (CASE range // 2048 WHEN 0 THEN 1 WHEN 1 THEN 1 ELSE 10 END) * INTERVAL '1 day' AS a, + (CASE range // 2048 WHEN 0 THEN 10 WHEN 1 THEN 10 ELSE 1 END) * INTERVAL '1 day' AS b +FROM range(6144); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM interval_pairs WHERE a > b; +-- +ok +== +SELECT count(*) FROM interval_pairs WHERE a > b; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/interval_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/interval_row_group_pruning.test index 95ec88f..81d0116 100644 --- a/parser/testdata/corpus/sql/optimizer/interval_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/interval_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/interval_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS memory_db; diff --git a/parser/testdata/corpus/sql/optimizer/joins/join_order_deep_setop_chain.test b/parser/testdata/corpus/sql/optimizer/joins/join_order_deep_setop_chain.test new file mode 100644 index 0000000..1b37c6d --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/joins/join_order_deep_setop_chain.test @@ -0,0 +1,9 @@ +# source: test/sql/optimizer/joins/join_order_deep_setop_chain.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1 EXCEPT SELECT 2 EXCEPT SELECT 3 EXCEPT SELECT 4 EXCEPT SELECT 5 EXCEPT SELECT 6 EXCEPT SELECT 7 EXCEPT SELECT 8 EXCEPT SELECT 9 EXCEPT SELECT 10 EXCEPT SELECT 11 EXCEPT SELECT 12 EXCEPT SELECT 13 EXCEPT SELECT 14 EXCEPT SELECT 15 EXCEPT SELECT 16 EXCEPT SELECT 17 EXCEPT SELECT 18 EXCEPT SELECT 19 EXCEPT SELECT 20 EXCEPT SELECT 21 EXCEPT SELECT 22 EXCEPT SELECT 23 EXCEPT SELECT 24 EXCEPT SELECT 25 EXCEPT SELECT 26 EXCEPT SELECT 27 EXCEPT SELECT 28 EXCEPT SELECT 29 EXCEPT SELECT 30 EXCEPT SELECT 31 EXCEPT SELECT 32 EXCEPT SELECT 33 EXCEPT SELECT 34 EXCEPT SELECT 35 EXCEPT SELECT 36 EXCEPT SELECT 37 EXCEPT SELECT 38 EXCEPT SELECT 39 EXCEPT SELECT 40 EXCEPT SELECT 41 EXCEPT SELECT 42 EXCEPT SELECT 43 EXCEPT SELECT 44 EXCEPT SELECT 45 EXCEPT SELECT 46 EXCEPT SELECT 47 EXCEPT SELECT 48 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/late_materialization_pushdown_extract.test b/parser/testdata/corpus/sql/optimizer/late_materialization_pushdown_extract.test index c55abfd..26c58e2 100644 --- a/parser/testdata/corpus/sql/optimizer/late_materialization_pushdown_extract.test +++ b/parser/testdata/corpus/sql/optimizer/late_materialization_pushdown_extract.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/late_materialization_pushdown_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET late_materialization_max_rows = 100; diff --git a/parser/testdata/corpus/sql/optimizer/late_materialization_table_filters.test b/parser/testdata/corpus/sql/optimizer/late_materialization_table_filters.test index 4d53dbc..f8dc3aa 100644 --- a/parser/testdata/corpus/sql/optimizer/late_materialization_table_filters.test +++ b/parser/testdata/corpus/sql/optimizer/late_materialization_table_filters.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/late_materialization_table_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lm_test ( diff --git a/parser/testdata/corpus/sql/optimizer/left_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/left_zonemap_pruning.test new file mode 100644 index 0000000..09e2074 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/left_zonemap_pruning.test @@ -0,0 +1,105 @@ +# source: test/sql/optimizer/left_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/left_zonemap_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE left_pruning AS +SELECT i::INTEGER AS i, lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 4) = '0010'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 4) = '0010'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 4) > '0050'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 4) > '0050'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 4) BETWEEN '0030' AND '0031'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 4) BETWEEN '0030' AND '0031'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 4) BETWEEN '0020' AND '0021'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 4) BETWEEN '0020' AND '0021'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 20) > '005000'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 20) > '005000'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, -2) = '0010'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, -2) = '0010'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, (i % 2) + 4) = '0010'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, (i % 2) + 4) = '0010'; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 0) = ''; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 0) > ''; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 0) > ''; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning WHERE left(s, 0) <= ''; +-- +ok +== +SELECT count(*) FROM left_pruning WHERE left(s, 0) <= ''; +-- +ok +== +CREATE TABLE left_pruning_utf8 AS +SELECT i::INTEGER AS i, '🦆' || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM left_pruning_utf8 WHERE left(s, 5) BETWEEN '🦆0030' AND '🦆0031'; +-- +ok +== +SELECT count(*) FROM left_pruning_utf8 WHERE left(s, 5) BETWEEN '🦆0030' AND '🦆0031'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/list_contains_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/list_contains_row_group_pruning.test new file mode 100644 index 0000000..d11a698 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/list_contains_row_group_pruning.test @@ -0,0 +1,144 @@ +# source: test/sql/optimizer/list_contains_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/list_contains_row_group_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE lists AS +SELECT [i] AS l +FROM range(6144) tbl(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM lists WHERE list_contains(l, 3000); +-- +ok +== +SELECT count(*) FROM lists WHERE list_contains(l, 3000); +-- +ok +== +SELECT count(*) FROM lists WHERE list_position(l, 3000) IS NOT NULL; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM lists WHERE list_position(l, 3000) IS NOT NULL; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM lists WHERE contains(l, 3000); +-- +ok +== +CREATE TABLE nullable_lists AS +SELECT CASE WHEN i % 100 = 0 THEN NULL ELSE [i] END AS l +FROM range(6144) tbl(i); +-- +ok +== +SELECT count(*) FROM nullable_lists WHERE list_contains(l, 3001); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM nullable_lists WHERE list_contains(l, 3001); +-- +ok +== +CREATE TABLE cast_lists AS +SELECT [3000::DOUBLE] AS l +FROM range(6144); +-- +ok +== +CREATE TABLE string_lists AS +SELECT [lpad(i::VARCHAR, 4, '0')] AS l +FROM range(6144) tbl(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM string_lists WHERE list_contains(l, '3000'); +-- +ok +== +SELECT count(*) FROM string_lists WHERE list_contains(l, '3000'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM string_lists WHERE contains(l, '3000'); +-- +ok +== +CREATE TABLE blob_lists AS +SELECT [lpad(i::VARCHAR, 4, '0')::BLOB] AS l +FROM range(6144) tbl(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM blob_lists WHERE list_contains(l, '3000'::BLOB); +-- +ok +== +SELECT count(*) FROM blob_lists WHERE list_contains(l, '3000'::BLOB); +-- +ok +== +CREATE TABLE long_blob_lists AS +SELECT [(lpad(i::VARCHAR, 4, '0') || repeat('x', 20))::BLOB] AS l +FROM range(6144) tbl(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM long_blob_lists +WHERE list_contains(l, ('3000' || repeat('x', 20))::BLOB); +-- +ok +== +SELECT count(*) FROM long_blob_lists WHERE list_contains(l, ('3000' || repeat('x', 20))::BLOB); +-- +ok +== +CREATE TABLE long_string_lists AS +SELECT [repeat('a', 20) || lpad(i::VARCHAR, 4, '0')] AS l +FROM range(6144) tbl(i); +-- +ok +== +SELECT count(*) FROM long_string_lists WHERE list_contains(l, repeat('a', 20) || '3000'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM long_string_lists +WHERE list_contains(l, repeat('a', 20) || '9999'); +-- +ok +== +SELECT count(*) FROM long_string_lists WHERE list_contains(l, repeat('a', 20) || '9999'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM long_string_lists +WHERE list_contains(l, repeat('a', 19) || 'b'); +-- +ok +== +SELECT count(*) FROM long_string_lists WHERE list_contains(l, repeat('a', 19) || 'b'); +-- +ok +== +CREATE TABLE interval_lists AS +SELECT [i * INTERVAL '1 day'] AS l +FROM range(6144) tbl(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM interval_lists WHERE list_contains(l, INTERVAL '3000 days'); +-- +ok +== +SELECT count(*) FROM interval_lists WHERE list_contains(l, INTERVAL '3000 days'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/map_extract_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/map_extract_row_group_pruning.test new file mode 100644 index 0000000..d470dd8 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/map_extract_row_group_pruning.test @@ -0,0 +1,67 @@ +# source: test/sql/optimizer/map_extract_row_group_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/map_extract_row_group_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE maps AS +SELECT MAP {'k': i} AS m +FROM range(6144) tbl(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM maps WHERE m['k'] BETWEEN 2900 AND 3100; +-- +ok +== +SELECT count(*) FROM maps WHERE m['k'] BETWEEN 2900 AND 3100; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM maps WHERE map_extract_value(m, 'k') BETWEEN 2900 AND 3100; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM maps WHERE map_contains_value(m, 3000); +-- +ok +== +SELECT count(*) FROM maps WHERE map_contains_value(m, 3000); +-- +ok +== +CREATE TABLE nullable_map_extract AS +SELECT CASE WHEN i < 2048 THEN NULL ELSE MAP {'k': i} END AS nullable_m +FROM range(6144) tbl(i) +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM nullable_map_extract WHERE map_extract_value(nullable_m, 'k') IS NOT NULL; +-- +ok +== +CREATE TABLE all_null_map_key AS +SELECT MAP {'k': i} AS m, NULL::VARCHAR AS key +FROM range(6144) tbl(i) +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM all_null_map_key WHERE map_extract_value(m, key) IS NOT NULL; +-- +ok +== +CREATE TABLE null_valued_map(m MAP(VARCHAR, INTEGER)) +-- +ok +== +INSERT INTO null_valued_map VALUES (MAP {'k': NULL}) +-- +ok +== +SELECT count(*) FROM null_valued_map WHERE list_position(map_values(m), NULL) = 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/monotone_function_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/monotone_function_zonemap_pruning.test index aca746f..448e921 100644 --- a/parser/testdata/corpus/sql/optimizer/monotone_function_zonemap_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/monotone_function_zonemap_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/monotone_function_zonemap_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT range::INTEGER AS x FROM range(500000); @@ -98,3 +98,40 @@ WHERE tanh(x) > 0.5; -- ok == +ATTACH '{TEST_DIR}/last_day_prune.duckdb' AS last_day_db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE last_day_db.t AS +SELECT CASE WHEN range < 2048 THEN DATE '2025-01-15' + WHEN range < 4096 THEN DATE '2025-02-15' ELSE DATE '2025-03-15' END AS d +FROM range(6144); +-- +ok +== +SELECT count(*) FROM last_day_db.t WHERE last_day(d) = DATE '2025-02-28'; +-- +ok +== +EXPLAIN ANALYZE SELECT d FROM last_day_db.t WHERE last_day(d) = DATE '2025-02-28'; +-- +ok +== +ATTACH '{TEST_DIR}/round_even_prune.duckdb' AS round_even_db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE round_even_db.t AS +SELECT CASE WHEN range < 2048 THEN 10.2 WHEN range < 4096 THEN 20.2 ELSE 60.2 END::DOUBLE AS x +FROM range(6144); +-- +ok +== +SELECT count(*) FROM round_even_db.t WHERE round_even(x, 0) > 50; +-- +ok +== +EXPLAIN ANALYZE SELECT x FROM round_even_db.t WHERE round_even(x, 0) > 50; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/monotone_preimage.test b/parser/testdata/corpus/sql/optimizer/monotone_preimage.test index 1f6ee7b..19f5e77 100644 --- a/parser/testdata/corpus/sql/optimizer/monotone_preimage.test +++ b/parser/testdata/corpus/sql/optimizer/monotone_preimage.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/monotone_preimage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN SELECT count(*) FROM d WHERE year(dt) = 2020; @@ -119,3 +119,140 @@ SELECT count(*) FROM ets WHERE year(t) = 2005; -- ok == +EXPLAIN SELECT count(*) FROM ets WHERE epoch(t) > -9223372036854775807; +-- +ok +== +EXPLAIN SELECT count(*) FROM ets WHERE epoch(t) < 9223372036854775807; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ets WHERE epoch(t) > -9223372036854775807; +-- +ok +== +EXPLAIN SELECT count(*) FROM ets WHERE epoch_ms(t) > -9223372036854775807; +-- +ok +== +EXPLAIN SELECT count(*) FROM ets WHERE year(t) > -1000000000; +-- +ok +== +SELECT count(*) FROM ets WHERE epoch(t) > -9223372036854775807; +-- +ok +== +SELECT count(*) FROM ets WHERE epoch(t) < 9223372036854775807; +-- +ok +== +CREATE TABLE ts_min(t TIMESTAMP); +-- +ok +== +INSERT INTO ts_min VALUES (make_timestamp(-9223372036854775806)); +-- +ok +== +SELECT count(*) FROM ts_min WHERE epoch(t) > -9223372036854775807; +-- +ok +== +CREATE TABLE edge(t TIMESTAMP); +-- +ok +== +INSERT INTO edge VALUES + (make_timestamp(-9223372036854775806)), ('290309-12-22 (BC) 00:00:00'), ('2000-01-01'), + (make_timestamp(9223372036854775806)), ('-infinity'), ('infinity'), (NULL); +-- +ok +== +SELECT count(*) FROM edge WHERE epoch(t) > -9223372036854775807; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch(t) < 9223372036854775807; +-- +ok +== +SELECT count(*) FROM edge WHERE year(t) > -1000000000; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) >= -9223372036854775806; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) <= 9223372036854775806; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge WHERE epoch_us(t) <= 9223372036854775806; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) > -9223372036854775806; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) < -9223372036854775805; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) = -9223372036854775806; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge WHERE epoch_us(t) > -9223372036854775806; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) >= -9223372036854775000; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge WHERE epoch_us(t) >= -9223372036854775000; +-- +ok +== +SELECT count(*) FROM edge WHERE epoch_us(t) = 9223372036854775806; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge WHERE epoch_us(t) = 9223372036854775806; +-- +ok +== +SELECT count(*) FROM ( + SELECT 1 FROM edge WHERE epoch_us(t) {op} {c} + EXCEPT ALL SELECT 1 FROM (SELECT t FROM edge OFFSET 0) WHERE epoch_us(t) {op} {c} +) UNION ALL SELECT count(*) FROM ( + SELECT 1 FROM (SELECT t FROM edge OFFSET 0) WHERE epoch_us(t) {op} {c} + EXCEPT ALL SELECT 1 FROM edge WHERE epoch_us(t) {op} {c} +); +-- +error: Parser Error: syntax error at or near "{" +== +CREATE TABLE edge_d(dt DATE); +-- +ok +== +INSERT INTO edge_d VALUES + (make_date(-2147483646)), ('2000-01-01'), (make_date(2147483646)), ('-infinity'), ('infinity'), (NULL); +-- +ok +== +SELECT count(*) FROM edge_d WHERE epoch(dt) > -9223372036854775807; +-- +ok +== +SELECT count(*) FROM edge_d WHERE year(dt) > -1000000000; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge_d WHERE year(dt) > -1000000000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/monotone_preimage_tinyint_boundaries.test b/parser/testdata/corpus/sql/optimizer/monotone_preimage_tinyint_boundaries.test new file mode 100644 index 0000000..994f80c --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/monotone_preimage_tinyint_boundaries.test @@ -0,0 +1,25 @@ +# source: test/sql/optimizer/monotone_preimage_tinyint_boundaries.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tinyints(x TINYINT) +-- +ok +== +INSERT INTO tinyints VALUES (CAST(-128 AS TINYINT)), (-2), (0), (2), (127), (NULL) +-- +ok +== +SELECT count(*) FROM tinyints WHERE +x > 127::TINYINT +-- +ok +== +SELECT count(*) FROM tinyints WHERE +x >= CAST(-128 AS TINYINT) +-- +ok +== +SELECT count(*) FROM tinyints WHERE 2::TINYINT < +x +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/monotone_preimage_tz.test b/parser/testdata/corpus/sql/optimizer/monotone_preimage_tz.test new file mode 100644 index 0000000..465a1aa --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/monotone_preimage_tz.test @@ -0,0 +1,43 @@ +# source: test/sql/optimizer/monotone_preimage_tz.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE edge_tz(t TIMESTAMPTZ); +-- +ok +== +INSERT INTO edge_tz VALUES + (make_timestamptz(-9223372036854775806)), ('2000-01-01'), (make_timestamptz(9223372036854775806)), + ('-infinity'), ('infinity'), (NULL); +-- +ok +== +SELECT count(*) FROM edge_tz WHERE epoch(t) > -9223372036854775807; +-- +ok +== +SELECT count(*) FROM edge_tz WHERE epoch(t) < 9223372036854775807; +-- +ok +== +SELECT count(*) FROM edge_tz WHERE epoch_us(t) >= -9223372036854775806; +-- +ok +== +SELECT count(*) FROM edge_tz WHERE epoch_us(t) > -9223372036854775806; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge_tz WHERE epoch(t) > -9223372036854775807; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM edge_tz WHERE epoch(t) < 9223372036854775807; +-- +ok +== +EXPLAIN SELECT count(*) FROM edge_tz WHERE epoch_us(t) > -9223372036854775806; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/multiple_column_stats_pruning.test b/parser/testdata/corpus/sql/optimizer/multiple_column_stats_pruning.test new file mode 100644 index 0000000..8080f71 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/multiple_column_stats_pruning.test @@ -0,0 +1,61 @@ +# source: test/sql/optimizer/multiple_column_stats_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE xy AS +SELECT CASE WHEN range % 2 = 0 THEN NULL ELSE range END::BIGINT AS i, (range + 200000)::BIGINT AS j +FROM range(400000); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM xy WHERE i > j; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM xy WHERE i >= j; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM xy WHERE i = j; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM xy WHERE j < i; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM xy WHERE j <= i; +-- +ok +== +SELECT count(*) FROM xy WHERE i > j; +-- +ok +== +EXPLAIN SELECT count(*) FROM xy WHERE i > j AND i >= 0 +UNION ALL +SELECT count(*) FROM xy WHERE i > j AND i >= 0; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM xy WHERE i > j AND i >= 0 +UNION ALL +SELECT count(*) FROM xy WHERE i > j AND i >= 0; +-- +ok +== +CREATE TABLE partially_matching AS +SELECT range::BIGINT AS i, 200000::BIGINT AS j +FROM range(400000); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM partially_matching WHERE i > j; +-- +ok +== +SELECT count(*) FROM partially_matching WHERE i > j; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/narrowing_cast_not_invertible.test b/parser/testdata/corpus/sql/optimizer/narrowing_cast_not_invertible.test new file mode 100644 index 0000000..d49b2ab --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/narrowing_cast_not_invertible.test @@ -0,0 +1,37 @@ +# source: test/sql/optimizer/narrowing_cast_not_invertible.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO t VALUES (51),(127),(128),(200),(300),(-200); +-- +ok +== +SELECT list(a ORDER BY a) FROM t WHERE TRY_CAST(a AS TINYINT) > 50; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE TRY_CAST(a AS TINYINT) > 50; +-- +ok +== +SELECT list(a ORDER BY a) FROM t WHERE TRY_CAST(a AS UTINYINT) > 50; +-- +ok +== +SELECT list(a ORDER BY a) FROM t WHERE TRY_CAST(a AS SMALLINT) > 50; +-- +ok +== +SELECT list(a ORDER BY a) FROM t WHERE TRY_CAST(a AS TINYINT) IN (51, 127, 128); +-- +ok +== +SELECT list(a ORDER BY a) FROM t WHERE CAST(a AS BIGINT) > 50; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE CAST(a AS BIGINT) > 50; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/nested_null_segment_pruning.test b/parser/testdata/corpus/sql/optimizer/nested_null_segment_pruning.test index b278cf3..3b09639 100644 --- a/parser/testdata/corpus/sql/optimizer/nested_null_segment_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/nested_null_segment_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/nested_null_segment_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nested_nulls AS @@ -29,10 +29,6 @@ PRAGMA profiling_output = '{TEST_DIR}/nested_null_profile.json' -- error: Parser Error: Profiler file type ({TEST_DIR}/nested_null_profile.json) must either have the same file extension as the profiling output type (query_tree), or be a '.txt' file. Set "enable_profiling = 'json'" first. == -SET tracked_metrics = ['query.total_rows_scanned'] --- -ok -== SELECT count(*) FROM nested_nulls WHERE s IS NULL -- ok diff --git a/parser/testdata/corpus/sql/optimizer/not_conjunction_simplification.test b/parser/testdata/corpus/sql/optimizer/not_conjunction_simplification.test index 92f5c0e..f7bee3a 100644 --- a/parser/testdata/corpus/sql/optimizer/not_conjunction_simplification.test +++ b/parser/testdata/corpus/sql/optimizer/not_conjunction_simplification.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/not_conjunction_simplification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT range AS i FROM range(1000000); diff --git a/parser/testdata/corpus/sql/optimizer/null_check_statistics_propagation.test b/parser/testdata/corpus/sql/optimizer/null_check_statistics_propagation.test new file mode 100644 index 0000000..b4ca5ff --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/null_check_statistics_propagation.test @@ -0,0 +1,45 @@ +# source: test/sql/optimizer/null_check_statistics_propagation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT 300::INTEGER i, 'hello'::VARCHAR s, {'a': 'x', 'b': 42} st; +-- +ok +== +EXPLAIN SELECT {expr} IS NOT NULL FROM t; +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN SELECT {expr} IS NULL FROM t; +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN SELECT TRY_CAST(st AS VARIANT) IS NOT NULL FROM t; +-- +ok +== +SELECT st::VARIANT IS NOT NULL, st::VARIANT IS NULL FROM t; +-- +ok +== +EXPLAIN SELECT i::VARIANT IS NOT NULL FROM t; +-- +ok +== +SELECT i::VARIANT IS NOT NULL FROM t; +-- +ok +== +EXPLAIN SELECT s IS NOT NULL FROM t; +-- +ok +== +EXPLAIN SELECT s IS NULL FROM t; +-- +ok +== +SELECT nextval('seq') IS NOT NULL FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/nullable_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/nullable_row_group_pruning.test index 3aa7500..1bb8721 100644 --- a/parser/testdata/corpus/sql/optimizer/nullable_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/nullable_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/nullable_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/nullable_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/optimizer/or_null_simplification.test b/parser/testdata/corpus/sql/optimizer/or_null_simplification.test new file mode 100644 index 0000000..6626b65 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/or_null_simplification.test @@ -0,0 +1,98 @@ +# source: test/sql/optimizer/or_null_simplification.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(x INTEGER NOT NULL); +-- +ok +== +INSERT INTO t SELECT range FROM range(0, 100); +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE x = 5 OR NULL; +-- +ok +== +SELECT count(*) FROM t WHERE x = 5 OR NULL; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE x = 5 OR NULL::BOOLEAN; +-- +ok +== +SELECT count(*) FROM t WHERE x = 5 OR NULL::BOOLEAN; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE x = 5 OR NULL OR NULL::BOOLEAN; +-- +ok +== +SELECT count(*) FROM t WHERE x = 5 OR NULL OR NULL::BOOLEAN; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE NULL OR NULL::BOOLEAN; +-- +ok +== +SELECT count(*) FROM t WHERE NULL OR NULL::BOOLEAN; +-- +ok +== +EXPLAIN SELECT count(*) FROM t WHERE x = 5 AND NULL; +-- +ok +== +SELECT count(*) FROM t WHERE x = 5 AND NULL; +-- +ok +== +SELECT x, x = 5 OR NULL FROM t WHERE x IN (4, 5) ORDER BY x; +-- +ok +== +SELECT count(*) FROM t WHERE NOT (x = 5 OR NULL); +-- +ok +== +SELECT count(*) FROM t WHERE (x = 5 OR NULL) IS FALSE; +-- +ok +== +SELECT count(*) FROM t WHERE COALESCE(x = 5 OR NULL, true); +-- +ok +== +SELECT count(*) FROM volatile_t WHERE nextval('s') > 0 OR NULL; +-- +ok +== +SELECT count(*) FROM volatile_t WHERE error('expected')::BOOLEAN OR NULL; +-- +ok +== +EXPLAIN SELECT count(*) +FROM (VALUES (1), (2)) l(x) +JOIN (VALUES (2), (3)) r(y) + ON l.x = r.y OR NULL; +-- +ok +== +SELECT count(*) +FROM (VALUES (1), (2)) l(x) +JOIN (VALUES (2), (3)) r(y) + ON l.x = r.y OR NULL; +-- +ok +== +SELECT count(*) +FROM (VALUES (4), (5)) l(x) +JOIN (VALUES (false)) r(y) + ON (l.x = 5 OR NULL) = r.y; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/plan/dense_or_filter_pushdown.test b/parser/testdata/corpus/sql/optimizer/plan/dense_or_filter_pushdown.test new file mode 100644 index 0000000..c066f62 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/plan/dense_or_filter_pushdown.test @@ -0,0 +1,128 @@ +# source: test/sql/optimizer/plan/dense_or_filter_pushdown.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE dense_or AS SELECT i::INTEGER AS x FROM range(-4, 9) t(i) +-- +ok +== +INSERT INTO dense_or VALUES (NULL) +-- +ok +== +SELECT x FROM dense_or WHERE x = 2 OR -1 = x OR x = 1 OR x = 0 ORDER BY x +-- +ok +== +EXPLAIN (FORMAT JSON) SELECT x FROM dense_or WHERE x BETWEEN 0 AND 3 AND (x = 1 OR x = 2) +-- +ok +== +EXPLAIN (FORMAT JSON) SELECT x FROM dense_or WHERE x = 2 OR -1 = x OR x = 1 OR x = 0 +-- +ok +== +SELECT x FROM dense_or WHERE x = 1 OR x = 3 ORDER BY x +-- +ok +== +EXPLAIN (FORMAT JSON) SELECT x FROM dense_or WHERE x = 1 OR x = 3 +-- +ok +== +SELECT x FROM dense_or WHERE x = 1 OR x = 1 OR x = 2 ORDER BY x +-- +ok +== +SELECT x FROM dense_or WHERE x = 1 OR x = NULL OR x = 2 ORDER BY x +-- +ok +== +SELECT x FROM dense_or WHERE x = 1 OR x = NULL ORDER BY x +-- +ok +== +SELECT x FROM dense_or WHERE x IS NOT DISTINCT FROM NULL OR x = 1 OR x = 2 ORDER BY x NULLS FIRST +-- +ok +== +CREATE TABLE dense_or_other(d DOUBLE, n DECIMAL(9,2), s VARCHAR) +-- +ok +== +INSERT INTO dense_or_other VALUES (1, 1, 'a'), (1.5, 1.5, 'ab'), (2, 2, 'b'), (NULL, NULL, NULL) +-- +ok +== +SELECT count(*) FROM dense_or_other WHERE d = 1 OR d = 2 +-- +ok +== +SELECT count(*) FROM dense_or_other WHERE n = 1 OR n = 2 +-- +ok +== +SELECT count(*) FROM dense_or_other WHERE s = 'a' OR s = 'b' +-- +ok +== +CREATE TABLE dense_or_unsigned(u UBIGINT) +-- +ok +== +INSERT INTO dense_or_unsigned VALUES (0), (18446744073709551613), (18446744073709551614), (18446744073709551615), (NULL) +-- +ok +== +SELECT count(*) FROM dense_or_unsigned WHERE u = 18446744073709551614::UBIGINT OR u = 18446744073709551615::UBIGINT +-- +ok +== +CREATE TABLE dense_or_huge(h HUGEINT) +-- +ok +== +INSERT INTO dense_or_huge VALUES ('-170141183460469231731687303715884105728'::HUGEINT), ('-170141183460469231731687303715884105727'::HUGEINT), (0), (170141183460469231731687303715884105727::HUGEINT) +-- +ok +== +SELECT count(*) FROM dense_or_huge WHERE h = '-170141183460469231731687303715884105728'::HUGEINT OR h = '-170141183460469231731687303715884105727'::HUGEINT +-- +ok +== +SELECT count(*) FROM dense_or_huge WHERE h = '-170141183460469231731687303715884105728'::HUGEINT OR h = 170141183460469231731687303715884105727::HUGEINT +-- +ok +== +PREPARE dense_or_prepared AS SELECT x FROM dense_or WHERE x = $1 OR x = $2 ORDER BY x +-- +ok +== +EXECUTE dense_or_prepared(1, 2) +-- +ok +== +EXECUTE dense_or_prepared(1, 3) +-- +ok +== +EXECUTE dense_or_prepared(NULL, 2) +-- +ok +== +WITH a AS MATERIALIZED (SELECT x FROM dense_or WHERE x BETWEEN 0 AND 3) +SELECT x FROM a WHERE x = 1 UNION ALL SELECT x FROM a WHERE x = 2 ORDER BY x +-- +ok +== +WITH a AS MATERIALIZED (SELECT x FROM dense_or) +SELECT x FROM a WHERE x = 1 UNION ALL SELECT x FROM a WHERE x = 2 ORDER BY x +-- +ok +== +EXPLAIN (FORMAT JSON) WITH a AS MATERIALIZED (SELECT x FROM dense_or) +SELECT x FROM a WHERE x = 1 UNION ALL SELECT x FROM a WHERE x = 2 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/plan/plan_struct_projection_pushdown.test b/parser/testdata/corpus/sql/optimizer/plan/plan_struct_projection_pushdown.test index 478c374..3770838 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/plan_struct_projection_pushdown.test +++ b/parser/testdata/corpus/sql/optimizer/plan/plan_struct_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/plan_struct_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE struct_pushdown_test(id INT, struct_col STRUCT(sub_col1 integer, sub_col2 bool)); diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_empty_child.test b/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_empty_child.test index fee0437..d6f5502 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_empty_child.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_empty_child.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_anti_join_empty_child.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma explain_output='OPTIMIZED_ONLY' diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_projection_map.test b/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_projection_map.test new file mode 100644 index 0000000..2990c5d --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/plan/test_anti_join_projection_map.test @@ -0,0 +1,39 @@ +# source: test/sql/optimizer/plan/test_anti_join_projection_map.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE p AS SELECT i + 1000 AS r, i AS s, i AS q FROM range(5) t(i); +-- +ok +== +CREATE TABLE x AS SELECT i AS w FROM range(5) t(i); +-- +ok +== +CREATE TABLE y AS SELECT i + 100 AS w2 FROM range(5) t(i); +-- +ok +== +CREATE TABLE y2 AS SELECT i AS w2 FROM range(5) t(i); +-- +ok +== +SELECT count(DISTINCT p.q) FROM p ANTI JOIN x ON p.r = x.w JOIN y ON p.s = y.w2 +-- +ok +== +SELECT sum(p.q) FROM p ANTI JOIN x ON p.r = x.w JOIN y ON p.s = y.w2 +-- +ok +== +SELECT count(DISTINCT p.q) FROM p ANTI JOIN x ON p.r = x.w JOIN y2 ON p.s = y2.w2 +-- +ok +== +SELECT count(DISTINCT p.q) +FROM x JOIN BY (TYPE RIGHT_ANTI) p ON p.r = x.w +JOIN y2 ON p.s = y2.w2 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_disable_build_side_probe_side.test b/parser/testdata/corpus/sql/optimizer/plan/test_disable_build_side_probe_side.test index 05a2189..a61092e 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_disable_build_side_probe_side.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_disable_build_side_probe_side.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_disable_build_side_probe_side.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit explain from range(10) r1 right join range(10) r2 using (range) diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_equivalent_filter_mirroring.test b/parser/testdata/corpus/sql/optimizer/plan/test_equivalent_filter_mirroring.test index d6ebdeb..51eec60 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_equivalent_filter_mirroring.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_equivalent_filter_mirroring.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_equivalent_filter_mirroring.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tmp AS SELECT * FROM range(1000); diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_except_empty_rhs.test b/parser/testdata/corpus/sql/optimizer/plan/test_except_empty_rhs.test index e4507c1..26e0115 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_except_empty_rhs.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_except_empty_rhs.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_except_empty_rhs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM (SELECT 1) lhs diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown.test b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown.test index e46c4c7..53e3c8c 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers i1, integers i2 WHERE i1.i=i2.i ORDER BY 1 diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_duplicate.test b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_duplicate.test index 446664c..78ed566 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_duplicate.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_duplicate.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_filter_pushdown_duplicate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE vals1 AS SELECT i AS i, i AS j FROM range(0, 10000, 1) t1(i) diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_large.test b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_large.test index 03e5496..22bc6d0 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_large.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_large.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_filter_pushdown_large.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, k FROM (SELECT i, k FROM vals1, vals2) tbl1 WHERE i=k AND i<5 ORDER BY i diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_materialized_cte.test b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_materialized_cte.test index 98046d8..f88b0cf 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_materialized_cte.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_filter_pushdown_materialized_cte.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_filter_pushdown_materialized_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit call dsdgen(sf=0.01) diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_recursive_build_side_probe_side.test b/parser/testdata/corpus/sql/optimizer/plan/test_recursive_build_side_probe_side.test index 43ca1b8..f70e515 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_recursive_build_side_probe_side.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_recursive_build_side_probe_side.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_recursive_build_side_probe_side.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit explain with recursive t(x) as ( diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_recursive_join_order_guard.test b/parser/testdata/corpus/sql/optimizer/plan/test_recursive_join_order_guard.test index c76dbf6..f67e376 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_recursive_join_order_guard.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_recursive_join_order_guard.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_recursive_join_order_guard.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma explain_output='physical_only' diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_table_filter_pushdown.test b/parser/testdata/corpus/sql/optimizer/plan/test_table_filter_pushdown.test index badcf39..a26bd72 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_table_filter_pushdown.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_table_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_table_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT i AS i, i AS j FROM range(0, 100) tbl(i) diff --git a/parser/testdata/corpus/sql/optimizer/plan/test_unused_column_after_join.test b/parser/testdata/corpus/sql/optimizer/plan/test_unused_column_after_join.test index d91b4c5..3e6f8be 100644 --- a/parser/testdata/corpus/sql/optimizer/plan/test_unused_column_after_join.test +++ b/parser/testdata/corpus/sql/optimizer/plan/test_unused_column_after_join.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/plan/test_unused_column_after_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM test, test2 WHERE test.b = test2.b diff --git a/parser/testdata/corpus/sql/optimizer/power_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/power_zonemap_pruning.test index 02f757b..d9fbaaf 100644 --- a/parser/testdata/corpus/sql/optimizer/power_zonemap_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/power_zonemap_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/power_zonemap_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE power_pruning AS diff --git a/parser/testdata/corpus/sql/optimizer/predicate_factoring.test b/parser/testdata/corpus/sql/optimizer/predicate_factoring.test index 741a234..b462488 100644 --- a/parser/testdata/corpus/sql/optimizer/predicate_factoring.test +++ b/parser/testdata/corpus/sql/optimizer/predicate_factoring.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/predicate_factoring.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (a INTEGER, b INTEGER, c INTEGER); diff --git a/parser/testdata/corpus/sql/optimizer/prefix_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/prefix_zonemap_pruning.test new file mode 100644 index 0000000..753f451 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/prefix_zonemap_pruning.test @@ -0,0 +1,129 @@ +# source: test/sql/optimizer/prefix_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/prefix_zonemap_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE prefix_pruning AS +SELECT i::INTEGER AS i, lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_pruning WHERE starts_with(s, '0040'); +-- +ok +== +SELECT count(*) FROM prefix_pruning WHERE starts_with(s, '0040'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_pruning WHERE NOT prefix(s, '00'); +-- +ok +== +SELECT count(*) FROM prefix_pruning WHERE NOT prefix(s, '00'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_pruning WHERE NOT starts_with(s, '00'); +-- +ok +== +SELECT count(*) FROM prefix_pruning WHERE NOT starts_with(s, '00'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_pruning WHERE NOT starts_with(s, '0040'); +-- +ok +== +SELECT count(*) FROM prefix_pruning WHERE NOT starts_with(s, '0040'); +-- +ok +== +CREATE TABLE prefix_mixed AS +SELECT i::INTEGER AS i, CASE WHEN i < 4096 THEN '00' ELSE '99' END || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_mixed WHERE NOT starts_with(s, '00'); +-- +ok +== +SELECT count(*) FROM prefix_mixed WHERE NOT starts_with(s, '00'); +-- +ok +== +CREATE TABLE prefix_truncated AS +SELECT i::INTEGER AS i, 'ppppppppppppp' || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_truncated WHERE NOT starts_with(s, 'pppppppppppp'); +-- +ok +== +SELECT count(*) FROM prefix_truncated WHERE NOT starts_with(s, 'pppppppppppp'); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_truncated WHERE NOT starts_with(s, 'ppppppppppppp'); +-- +ok +== +SELECT count(*) FROM prefix_truncated WHERE NOT starts_with(s, 'ppppppppppppp'); +-- +ok +== +CREATE TABLE prefix_nullable AS +SELECT i::INTEGER AS i, CASE WHEN i % 100 = 50 THEN NULL ELSE lpad(i::VARCHAR, 6, '0') END AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_nullable WHERE NOT starts_with(s, '00'); +-- +ok +== +SELECT count(*) FROM prefix_nullable WHERE NOT starts_with(s, '00'); +-- +ok +== +CREATE TABLE prefix_nullable_mixed AS +SELECT CASE + WHEN range < 2048 THEN CASE WHEN range % 2 = 0 THEN 'abc' ELSE NULL END + WHEN range < 4096 THEN 'zzz' + ELSE 'abc' + END::VARCHAR AS s +FROM range(6144) +-- +ok +== +SELECT count(*) FROM prefix_nullable_mixed WHERE NOT prefix(s, 'a') +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_nullable_mixed WHERE NOT prefix(s, 'a') +-- +ok +== +CREATE TABLE prefix_utf8 AS +SELECT i::INTEGER AS i, '🦆' || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM prefix_utf8 WHERE NOT starts_with(s, '🦆'); +-- +ok +== +SELECT count(*) FROM prefix_utf8 WHERE NOT starts_with(s, '🦆'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/projection_placement/lift_through_left_join_filter.test b/parser/testdata/corpus/sql/optimizer/projection_placement/lift_through_left_join_filter.test new file mode 100644 index 0000000..4310310 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/projection_placement/lift_through_left_join_filter.test @@ -0,0 +1,44 @@ +# source: test/sql/optimizer/projection_placement/lift_through_left_join_filter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE store_sales AS +SELECT (i % 1800) + 1 AS ss_item_sk, (i % 5) + 1 AS ss_quantity, CAST((i % 1000) / 10.0 AS DECIMAL(7,2)) AS ss_sales_price, + CAST((i % 200) - 100 AS DECIMAL(7,2)) AS ss_net_profit, 2451000 + (i % 1000) AS ss_sold_date_sk, i AS ss_ticket_number +FROM range(3000) t(i); +-- +ok +== +CREATE TABLE item AS SELECT i AS i_item_sk, 'AAAAAAAA' || i AS i_item_id FROM range(1, 1801) t(i); +-- +ok +== +CREATE TABLE date_dim AS SELECT 2451000 + i AS d_date_sk, DATE '2000-01-01' + INTERVAL (i) DAY AS d_date FROM range(1000) t(i); +-- +ok +== +CREATE TABLE store_returns AS SELECT (i % 1800) + 1 AS sr_item_sk, i * 10 AS sr_ticket_number FROM range(300) t(i); +-- +ok +== +SELECT count(*), count(DISTINCT resource_id), min(summary), max(summary), min(first_seen), max(last_seen) +FROM ( + SELECT i.i_item_id, + ss.resource_id, + MAX(CAST(d.d_date AS TIMESTAMPTZ)) AS last_seen, + MIN(CAST(d.d_date AS TIMESTAMPTZ)) AS first_seen, + CAST(SUM(ss.ss_quantity) AS VARCHAR) || '/' || CAST(AVG(ss.ss_sales_price) AS VARCHAR) || '/' || CAST(SUM(ss.ss_net_profit) AS VARCHAR) || '/' || COALESCE(ss.resource_id, '-') AS summary + FROM ( + SELECT ss_item_sk, ss_quantity, ss_sales_price, ss_net_profit, ss_sold_date_sk, ss_ticket_number, + CASE WHEN ss_quantity = 2 AND ss_sales_price > 20 THEN 'resource2' END AS resource_id + FROM store_sales + ) ss + JOIN item i ON ss.ss_item_sk = i.i_item_sk + JOIN date_dim d ON ss.ss_sold_date_sk = d.d_date_sk + LEFT JOIN store_returns sr ON ss.ss_item_sk = sr.sr_item_sk AND ss.ss_ticket_number = sr.sr_ticket_number + GROUP BY i.i_item_id, ss.resource_id +) t +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/projection_placement/lift_through_nested_joins.test b/parser/testdata/corpus/sql/optimizer/projection_placement/lift_through_nested_joins.test new file mode 100644 index 0000000..f0dc47f --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/projection_placement/lift_through_nested_joins.test @@ -0,0 +1,49 @@ +# source: test/sql/optimizer/projection_placement/lift_through_nested_joins.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE store_sales(ss_item_sk INT, ss_customer_sk INT, ss_quantity INT, ss_sales_price DECIMAL(7,2), ss_net_profit DECIMAL(7,2), ss_sold_date_sk INT, ss_coupon_amt DECIMAL(7,2), ss_ticket_number BIGINT); +-- +ok +== +CREATE TABLE item(i_item_sk INT, i_item_id VARCHAR); +-- +ok +== +CREATE TABLE date_dim(d_date_sk INT, d_date DATE); +-- +ok +== +INSERT INTO store_sales VALUES (1, 1, 2, 25.0, 1.0, 1, 0.0, 1), (2, 2, 1, 5.0, -1.0, 2, 1.0, 2), (1, 2, 2, 30.0, 2.0, 2, 0.0, 3); +-- +ok +== +INSERT INTO item VALUES (1, 'a'), (2, 'b'); +-- +ok +== +INSERT INTO date_dim VALUES (1, '2000-01-01'), (2, '2000-01-02'); +-- +ok +== +SELECT i.i_item_id, + ss.resource_id, + MAX(CAST(d.d_date AS TIMESTAMP WITH TIME ZONE)) AS last_seen, + MIN(CAST(d.d_date AS TIMESTAMP WITH TIME ZONE)) AS first_seen, + CAST(SUM(ss.ss_quantity) AS VARCHAR) || '/' || CAST(AVG(ss.ss_sales_price) AS VARCHAR) || '/' || CAST(SUM(ss.ss_net_profit) AS VARCHAR) || '/' || COALESCE(ss.resource_id, '-') AS summary +FROM ( + SELECT ss_item_sk, ss_customer_sk, ss_quantity, ss_sales_price, ss_net_profit, ss_sold_date_sk, + CASE WHEN ss_quantity = 2 THEN 'r' END AS resource_id, + CASE WHEN ss_net_profit > 0 THEN 'active' END AS status, + CASE WHEN ss_coupon_amt > 0 THEN 'discounted' END AS pricing_type, + CASE WHEN regexp_matches(CAST(ss_ticket_number AS VARCHAR), '[0-9]+') THEN 'numeric' END AS ticket_type + FROM store_sales +) ss +JOIN item i ON ss.ss_item_sk = i.i_item_sk +JOIN date_dim d ON ss.ss_sold_date_sk = d.d_date_sk +GROUP BY i.i_item_id, ss.resource_id +ORDER BY i.i_item_id, ss.resource_id +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/pushdown_extract_multiple_filters.test b/parser/testdata/corpus/sql/optimizer/pushdown_extract_multiple_filters.test new file mode 100644 index 0000000..09569bb --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/pushdown_extract_multiple_filters.test @@ -0,0 +1,65 @@ +# source: test/sql/optimizer/pushdown_extract_multiple_filters.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE flat(s STRUCT(a INT, b INT), i INT, j INT); +-- +ok +== +INSERT INTO flat VALUES ({'a': 2, 'b': 3}, 1, 7), ({'a': 0, 'b': 4}, 2, 8); +-- +ok +== +SELECT i, s.b FROM flat WHERE s.a AND i > 0 ORDER BY i +-- +ok +== +SELECT i, j, s.b FROM flat WHERE s.a AND i > 0 AND j > 0 ORDER BY i +-- +ok +== +SELECT i FROM flat WHERE s.a::BOOLEAN AND i > 0 AND j > 0 ORDER BY i +-- +ok +== +CREATE TABLE nested(s STRUCT(a INT, b STRUCT(c INT, d INT)), i INT, j INT); +-- +ok +== +INSERT INTO nested VALUES ({'a': 2, 'b': {'c': 5, 'd': 6}}, 1, 7), ({'a': 0, 'b': {'c': 0, 'd': 10}}, 2, 8); +-- +ok +== +SELECT i, s.b.d FROM nested WHERE s.b.c AND i > 0 AND j > 0 ORDER BY i +-- +ok +== +CREATE TABLE t1(c0 VARCHAR, c1 INT, c2 STRUCT(k0 BOOLEAN, k1 VARCHAR, k2 VARCHAR, k3 INT, k4 BOOLEAN), PRIMARY KEY(c1, c0)); +-- +ok +== +INSERT INTO t1(c0, c1, c2) VALUES ('*', -1537721958, {'k0': false, 'k1': 'O', 'k2': 'w', 'k3': -1093516081, 'k4': false}); +-- +ok +== +SELECT t1.c1 FROM t1 INNER JOIN (SELECT (t1.c0 || t1.c0) AS col0 FROM t1 WHERE t1.c2['k3']) AS sub0 ON t1.c2['k3'] WHERE (t1.c1 > t1.c1) +-- +ok +== +SELECT t1.c1, sub0.col0 FROM t1 INNER JOIN (SELECT (t1.c0 || t1.c0) AS col0 FROM t1 WHERE t1.c2['k3']) AS sub0 ON t1.c2['k3'] +-- +ok +== +SELECT i, s.b FROM flat WHERE s.a AND i < j ORDER BY i +-- +ok +== +SELECT i, j, s.b FROM flat WHERE s.a AND i < j AND i + j > 2 ORDER BY i +-- +ok +== +SELECT i, s.b.d FROM nested WHERE s.b.c AND i < j ORDER BY i +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/pushdown_extract_reapplied.test b/parser/testdata/corpus/sql/optimizer/pushdown_extract_reapplied.test new file mode 100644 index 0000000..b020ce4 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/pushdown_extract_reapplied.test @@ -0,0 +1,75 @@ +# source: test/sql/optimizer/pushdown_extract_reapplied.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE nested_extract AS SELECT + {'id': k + 1000, 'ms': {'a': k + 200, 'b': k + 30, 'c': {'d': k + 7}}} AS v +FROM range(3) t(k); +-- +ok +== +SELECT (v.ms::STRUCT(b VARCHAR, a VARCHAR)).b, (v.ms::STRUCT(b VARCHAR, a VARCHAR)).a +FROM nested_extract ORDER BY v.id LIMIT 1 +-- +ok +== +SELECT (v.ms::STRUCT(c STRUCT(d VARCHAR), b VARCHAR, a VARCHAR)).c.d +FROM nested_extract ORDER BY v.id LIMIT 1 +-- +ok +== +CREATE TABLE nested_variant AS +SELECT {'id': k + 1000, 'ms': {'a': k + 200, 'b': k + 30}}::VARIANT AS v +FROM range(3) t(k); +-- +ok +== +SELECT (v.ms::STRUCT(b VARCHAR, a VARCHAR)).b FROM nested_variant ORDER BY v.id::BIGINT LIMIT 1 +-- +ok +== +CREATE TABLE windowed AS SELECT + k % 2 AS grp, {'id': k + 1000, 'ms': {'a': k + 200, 'b': 50 - k}} AS v +FROM range(6) t(k); +-- +ok +== +SELECT grp, v.id FROM windowed +WHERE v.id > 1000 +QUALIFY row_number() OVER (PARTITION BY grp ORDER BY (v.ms::STRUCT(b VARCHAR, a VARCHAR)).b) = 1 +ORDER BY grp +-- +ok +== +CREATE TABLE unconvertible AS SELECT + {'id': k + 1000, 'ms': {'a': 'xyz', 'b': k + 30}} AS v +FROM range(3) t(k); +-- +ok +== +SELECT (v.ms::STRUCT(a INTEGER, b VARCHAR)).b FROM unconvertible ORDER BY v.id LIMIT 1 +-- +ok +== +SELECT (v.ms::STRUCT(b VARCHAR, a VARCHAR)).b FROM nested_extract ORDER BY v.id LIMIT 1 +-- +ok +== +EXPLAIN SELECT (v.ms::STRUCT(b VARCHAR, a VARCHAR)).b FROM nested_extract ORDER BY v.id LIMIT 1 +-- +ok +== +EXPLAIN SELECT v.ms.b FROM nested_extract ORDER BY v.id LIMIT 1 +-- +ok +== +COPY nested_extract TO '{TEST_DIR}/nested_extract.parquet' (FORMAT PARQUET) +-- +ok +== +SELECT (v.ms::STRUCT(b VARCHAR, a VARCHAR)).b +FROM '{TEST_DIR}/nested_extract.parquet' ORDER BY v.id LIMIT 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/regex_range_filter.test b/parser/testdata/corpus/sql/optimizer/regex_range_filter.test new file mode 100644 index 0000000..0202368 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/regex_range_filter.test @@ -0,0 +1,25 @@ +# source: test/sql/optimizer/regex_range_filter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE regex_values(s VARCHAR); +-- +ok +== +INSERT INTO regex_values VALUES ('foo'), ('food'), ('bar'), (NULL); +-- +ok +== +SET disabled_optimizers = 'filter_pushdown'; +-- +ok +== +EXPLAIN SELECT s FROM regex_values WHERE regexp_full_match(s, 'foo'); +-- +ok +== +SELECT s FROM regex_values WHERE regexp_full_match(s, 'foo'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/rewrite_nan_null.test b/parser/testdata/corpus/sql/optimizer/rewrite_nan_null.test index 1cbbc8e..588e1e3 100644 --- a/parser/testdata/corpus/sql/optimizer/rewrite_nan_null.test +++ b/parser/testdata/corpus/sql/optimizer/rewrite_nan_null.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/rewrite_nan_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE neg(id INTEGER, x DOUBLE) @@ -42,10 +42,6 @@ SELECT count(*) FROM (SELECT x::FLOAT AS f FROM neg) WHERE (-f) >= 0 -- ok == -RESET disabled_optimizers --- -ok -== CREATE TABLE dt(id INTEGER, d DATE) -- ok diff --git a/parser/testdata/corpus/sql/optimizer/secure_view_explain.test b/parser/testdata/corpus/sql/optimizer/secure_view_explain.test new file mode 100644 index 0000000..615c16b --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/secure_view_explain.test @@ -0,0 +1,81 @@ +# source: test/sql/optimizer/secure_view_explain.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE hidden_table AS SELECT i, i % 10 AS j, ('hidden' || i) AS s FROM range(10000) t(i); +-- +ok +== +CREATE TABLE other AS SELECT i, i * 2 AS k FROM range(500) t(i); +-- +ok +== +CREATE SECURE VIEW secure_view AS + SELECT hidden_table.j, count(*) AS c, max(other.k) AS mk + FROM hidden_table JOIN other ON hidden_table.i = other.i + WHERE hidden_table.j <> 7 + GROUP BY hidden_table.j; +-- +ok +== +CREATE VIEW regular_view AS + SELECT hidden_table.j, count(*) AS c, max(other.k) AS mk + FROM hidden_table JOIN other ON hidden_table.i = other.i + WHERE hidden_table.j <> 7 + GROUP BY hidden_table.j; +-- +ok +== +EXPLAIN SELECT * FROM regular_view WHERE c > 0 +-- +ok +== +EXPLAIN SELECT * FROM secure_view WHERE c > 0 +-- +ok +== +SET explain_output='all' +-- +ok +== +SET explain_output='physical_only' +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM secure_view WHERE c > 0 +-- +ok +== +EXPLAIN ANALYZE (FORMAT json) SELECT * FROM secure_view WHERE c > 0 +-- +ok +== +CREATE SECURE VIEW counting_view AS SELECT * FROM hidden_table WHERE j = 3; +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM counting_view +-- +ok +== +SELECT count(*) FROM counting_view +-- +ok +== +EXPLAIN ANALYZE (FORMAT json) SELECT * FROM counting_view +-- +ok +== +CREATE SECURE VIEW heavy_view AS SELECT j, count(*) AS c FROM hidden_table GROUP BY j; +-- +ok +== +EXPLAIN ANALYZE (FORMAT json) SELECT * FROM heavy_view +-- +ok +== +SELECT * FROM secure_view WHERE j = 1 ORDER BY j +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/secure_view_pushdown.test b/parser/testdata/corpus/sql/optimizer/secure_view_pushdown.test new file mode 100644 index 0000000..0a9d8d8 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/secure_view_pushdown.test @@ -0,0 +1,177 @@ +# source: test/sql/optimizer/secure_view_pushdown.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE integers AS SELECT i, i % 10 AS j, i::VARCHAR AS s FROM range(10000) t(i); +-- +ok +== +CREATE VIEW regular_view AS SELECT * FROM integers; +-- +ok +== +CREATE SECURE VIEW secure_view AS SELECT * FROM integers; +-- +ok +== +EXPLAIN SELECT * FROM regular_view WHERE i = 42 +-- +ok +== +EXPLAIN SELECT * FROM secure_view WHERE i = 42 +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM secure_view WHERE i = 42 +-- +ok +== +EXPLAIN SELECT * FROM secure_view WHERE s::INT = 42 +-- +ok +== +EXPLAIN SELECT secure_view.i FROM secure_view JOIN integers USING (i) WHERE integers.i = 42 +-- +ok +== +EXPLAIN SELECT * FROM secure_view +-- +ok +== +SELECT * FROM secure_view WHERE i = 42 +-- +ok +== +SELECT count(*) FROM secure_view WHERE j = 3 +-- +ok +== +SELECT * FROM secure_view WHERE s::INT = 42 +-- +ok +== +EXPLAIN SELECT * FROM secure_view WHERE random() < 0.0 +-- +ok +== +CREATE SECURE VIEW joined_secure_view AS SELECT sec.id, sec.s FROM secrets sec JOIN allowed a ON (sec.id = a.id) +-- +ok +== +SELECT * FROM joined_secure_view WHERE s::INT = 42 +-- +ok +== +CREATE SECURE VIEW small_secure_view AS SELECT * FROM integers WHERE i < 3 +-- +ok +== +SELECT count(*) FROM small_secure_view WHERE nextval('seq') >= 0 +-- +ok +== +CREATE SECURE VIEW limited_secure_view AS SELECT * FROM integers LIMIT 3 +-- +ok +== +SELECT count(*) FROM limited_secure_view WHERE i = 5 +-- +ok +== +CREATE TABLE mixed AS SELECT i, CASE WHEN i < 50 THEN 'hidden_' || i ELSE i::VARCHAR END AS s FROM range(100) t(i) +-- +ok +== +CREATE SECURE VIEW visible AS SELECT * FROM mixed WHERE i >= 50 +-- +ok +== +CREATE SECURE VIEW visible_head AS SELECT * FROM visible WHERE i < 60 +-- +ok +== +SELECT count(*) FROM visible WHERE s::INT = 55 +-- +ok +== +SELECT count(*) FROM visible_head WHERE s::INT = 55 +-- +ok +== +SELECT count(*) FROM visible GROUP BY s::INT HAVING s::INT = 55 +-- +ok +== +SELECT count(*) FROM visible v JOIN mixed m ON (v.i = m.i) WHERE v.s::INT = 55 +-- +ok +== +SELECT count(*) FROM (SELECT * FROM visible ORDER BY i) WHERE s::INT = 55 +-- +ok +== +CREATE VIEW filtered_regular_view AS SELECT * FROM integers WHERE i = 42; +-- +ok +== +CREATE SECURE VIEW filtered_secure_view AS SELECT * FROM integers WHERE i = 42; +-- +ok +== +EXPLAIN SELECT * FROM filtered_regular_view +-- +ok +== +EXPLAIN SELECT * FROM filtered_secure_view +-- +ok +== +SELECT * FROM filtered_secure_view +-- +ok +== +SELECT * FROM filtered_regular_view +-- +ok +== +CREATE SECURE VIEW visible_modulo AS SELECT * FROM (SELECT i, s FROM mixed) WHERE i % 100 >= 50 +-- +ok +== +CREATE SECURE VIEW visible_abs AS SELECT * FROM (SELECT i, s FROM mixed) WHERE abs(i) >= 50 +-- +ok +== +CREATE SECURE VIEW visible_cast AS SELECT * FROM (SELECT i, s FROM mixed) WHERE i::VARCHAR::INT >= 50 +-- +ok +== +SELECT count(*) FROM visible_modulo WHERE s::INT > 0 +-- +ok +== +SELECT count(*) FROM visible_abs WHERE s::INT > 0 +-- +ok +== +SELECT count(*) FROM visible_cast WHERE s::INT > 0 +-- +ok +== +SELECT count(*) FROM visible_modulo WHERE s::INT = 55 +-- +ok +== +SELECT count(*) FROM (SELECT * FROM (SELECT i, s FROM mixed) WHERE i % 100 >= 50) WHERE __internal_barrier(s::INT > 0) +-- +ok +== +CREATE SECURE VIEW visible_projected AS SELECT * FROM (SELECT i, s FROM mixed) WHERE i >= 50 +-- +ok +== +SELECT count(*) FROM visible_projected WHERE s::INT > 0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/secure_view_pushdown_compression.test b/parser/testdata/corpus/sql/optimizer/secure_view_pushdown_compression.test new file mode 100644 index 0000000..1605eec --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/secure_view_pushdown_compression.test @@ -0,0 +1,50 @@ +# source: test/sql/optimizer/secure_view_pushdown_compression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE dict_secrets AS + SELECT (i % 5)::INTEGER AS id, CASE WHEN i % 5 = 0 THEN 'top_secret' ELSE ((i % 5) * 10)::VARCHAR END AS s + FROM range(100000) t(i) +-- +ok +== +SELECT count(*) > 0 FROM pragma_storage_info('dict_secrets') +WHERE column_name = 's' AND compression IN ('DICT_FSST', 'Dictionary') +-- +ok +== +CREATE SECURE VIEW dict_secure_view AS SELECT * FROM dict_secrets WHERE id <> 0 +-- +ok +== +SELECT count(*) FROM dict_secure_view WHERE s::INT = 10 +-- +ok +== +SELECT count(*) FROM dict_secrets WHERE id <> 0 AND __internal_barrier(s::INT = 10) +-- +ok +== +CREATE TABLE rle_secrets AS + SELECT (i // 20000)::INTEGER AS grp, CASE WHEN i < 20000 THEN 100000 ELSE 5 END::INTEGER AS val + FROM range(100000) t(i) +-- +ok +== +SELECT count(*) > 0 FROM pragma_storage_info('rle_secrets') WHERE column_name = 'val' AND compression = 'RLE' +-- +ok +== +CREATE SECURE VIEW rle_secure_view AS SELECT * FROM rle_secrets WHERE grp <> 0 +-- +ok +== +SELECT count(*) FROM rle_secure_view WHERE val::TINYINT = 5 +-- +ok +== +SELECT count(*) FROM rle_secrets WHERE grp <> 0 AND __internal_barrier(val::TINYINT = 5) +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/secure_view_statistics.test b/parser/testdata/corpus/sql/optimizer/secure_view_statistics.test new file mode 100644 index 0000000..d3c4327 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/secure_view_statistics.test @@ -0,0 +1,177 @@ +# source: test/sql/optimizer/secure_view_statistics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE integers AS SELECT i, ('v' || i) AS s FROM range(1000) t(i); +-- +ok +== +SELECT stats(i)::VARCHAR FROM regular_view LIMIT 1 +-- +ok +== +SELECT stats(i)::VARCHAR FROM secure_view LIMIT 1 +-- +ok +== +SELECT stats(i)::VARCHAR FROM secure_view WHERE i > 500 LIMIT 1 +-- +ok +== +CREATE TABLE employees AS SELECT i AS id, ('emp' || i) AS name, i * 1000 AS salary FROM range(10) t(i); +-- +ok +== +CREATE SECURE VIEW public_employees AS SELECT id, name FROM employees; +-- +ok +== +SELECT stats(id)::VARCHAR FROM public_employees LIMIT 1 +-- +ok +== +CREATE SECURE VIEW ordered_secure_view AS SELECT * FROM integers ORDER BY i; +-- +ok +== +SELECT stats(i)::VARCHAR FROM ordered_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW filtered_secure_view AS SELECT * FROM integers WHERE i < 10; +-- +ok +== +SELECT stats(i)::VARCHAR FROM filtered_secure_view LIMIT 1 +-- +ok +== +SELECT stats(s)::VARCHAR FROM filtered_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW limited_secure_view AS SELECT * FROM integers LIMIT 10; +-- +ok +== +SELECT stats(i)::VARCHAR FROM limited_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW distinct_secure_view AS SELECT DISTINCT i FROM integers; +-- +ok +== +SELECT stats(i)::VARCHAR FROM distinct_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW sampled_secure_view AS SELECT * FROM integers USING SAMPLE 10 ROWS; +-- +ok +== +SELECT stats(i)::VARCHAR FROM sampled_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW grouped_secure_view AS SELECT i, count(*) AS c FROM integers GROUP BY i; +-- +ok +== +SELECT stats(i)::VARCHAR FROM grouped_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW joined_secure_view AS SELECT i1.i FROM integers i1 JOIN integers i2 USING (i); +-- +ok +== +SELECT stats(i)::VARCHAR FROM joined_secure_view LIMIT 1 +-- +ok +== +CREATE VIEW view_over_filtered_secure_view AS SELECT * FROM filtered_secure_view; +-- +ok +== +SELECT stats(i)::VARCHAR FROM view_over_filtered_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW secure_view_over_filtered_secure_view AS SELECT * FROM filtered_secure_view; +-- +ok +== +SELECT stats(i)::VARCHAR FROM secure_view_over_filtered_secure_view LIMIT 1 +-- +ok +== +CREATE VIEW view_over_secure_view AS SELECT * FROM secure_view; +-- +ok +== +SELECT stats(i)::VARCHAR FROM view_over_secure_view LIMIT 1 +-- +ok +== +CREATE SECURE VIEW secure_view_over_secure_view AS SELECT * FROM secure_view; +-- +ok +== +SELECT stats(i)::VARCHAR FROM secure_view_over_secure_view LIMIT 1 +-- +ok +== +EXPLAIN SELECT * FROM regular_view WHERE i > 100000 +-- +ok +== +EXPLAIN SELECT * FROM filtered_secure_view WHERE i > 100000 +-- +ok +== +SELECT count(*) FROM filtered_secure_view WHERE i > 100000 +-- +ok +== +EXPLAIN SELECT * FROM filtered_secure_view WHERE i > 1000000000 +-- +ok +== +EXPLAIN SELECT * FROM secure_view WHERE i > 500 +-- +ok +== +CREATE VIEW impossible_regular_view AS SELECT * FROM integers WHERE i > 100000; +-- +ok +== +CREATE SECURE VIEW impossible_secure_view AS SELECT * FROM integers WHERE i > 100000; +-- +ok +== +EXPLAIN SELECT * FROM impossible_regular_view +-- +ok +== +EXPLAIN SELECT * FROM impossible_secure_view +-- +ok +== +SELECT count(*) FROM impossible_secure_view +-- +ok +== +SELECT * FROM filtered_secure_view WHERE i = 5 +-- +ok +== +SELECT count(*) FROM secure_view JOIN integers USING (i) WHERE integers.i < 10 +-- +ok +== +SELECT count(*) FROM filtered_secure_view JOIN integers USING (i) WHERE integers.i < 10 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/sign_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/sign_row_group_pruning.test index 60d9bac..3b2582c 100644 --- a/parser/testdata/corpus/sql/optimizer/sign_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/sign_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/sign_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/sign_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/optimizer/string_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/string_row_group_pruning.test index afbcca7..2345586 100644 --- a/parser/testdata/corpus/sql/optimizer/string_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/string_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/string_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/string_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/optimizer/string_stats_merge.test b/parser/testdata/corpus/sql/optimizer/string_stats_merge.test index 6ac6fe8..5eee778 100644 --- a/parser/testdata/corpus/sql/optimizer/string_stats_merge.test +++ b/parser/testdata/corpus/sql/optimizer/string_stats_merge.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/string_stats_merge.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/string_stats_merge.duckdb' AS db (ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/optimizer/string_stats_merge_truncated_prefix.test b/parser/testdata/corpus/sql/optimizer/string_stats_merge_truncated_prefix.test new file mode 100644 index 0000000..626cbd3 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/string_stats_merge_truncated_prefix.test @@ -0,0 +1,21 @@ +# source: test/sql/optimizer/string_stats_merge_truncated_prefix.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT 'abcdefghijklzzzz' AS s, true AS c; +-- +ok +== +SELECT (CASE WHEN c THEN s ELSE 'abcdefghijklA' END) > 'abcdefghijklB' FROM t; +-- +ok +== +SELECT count(*) FROM t WHERE (CASE WHEN c THEN s ELSE 'abcdefghijklA' END) > 'abcdefghijklB'; +-- +ok +== +SELECT (CASE WHEN NOT c THEN 'abcdefghijklA' ELSE s END) > 'abcdefghijklB' FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/struct_segment_pruning.test b/parser/testdata/corpus/sql/optimizer/struct_segment_pruning.test index e3a5987..7e8c279 100644 --- a/parser/testdata/corpus/sql/optimizer/struct_segment_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/struct_segment_pruning.test @@ -1,12 +1,8 @@ # source: test/sql/optimizer/struct_segment_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET threads = 1 --- -ok -== SET initial_column_segment_size = 2048 -- ok diff --git a/parser/testdata/corpus/sql/optimizer/substring_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/substring_zonemap_pruning.test index 6b04dc9..57d6635 100644 --- a/parser/testdata/corpus/sql/optimizer/substring_zonemap_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/substring_zonemap_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/substring_zonemap_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE substring_pruning AS diff --git a/parser/testdata/corpus/sql/optimizer/sum_aggregate_stats_propagation.test b/parser/testdata/corpus/sql/optimizer/sum_aggregate_stats_propagation.test new file mode 100644 index 0000000..ff6c2c1 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/sum_aggregate_stats_propagation.test @@ -0,0 +1,149 @@ +# source: test/sql/optimizer/sum_aggregate_stats_propagation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT range::INTEGER AS x FROM range(10000); +-- +ok +== +EXPLAIN SELECT sum(x) FROM t HAVING sum(x) < 0; +-- +ok +== +SELECT count(*) FROM (SELECT sum(x) AS s FROM t HAVING sum(x) < 0); +-- +ok +== +EXPLAIN SELECT sum(x) FROM t HAVING sum(x) > 100000000; +-- +ok +== +SELECT count(*) FROM (SELECT sum(x) AS s FROM t HAVING sum(x) > 100000000); +-- +ok +== +EXPLAIN SELECT sum(x) FROM t HAVING sum(x) > 0; +-- +ok +== +SELECT sum(x) FROM t HAVING sum(x) > 0; +-- +ok +== +CREATE TABLE tb AS SELECT (range % 3 = 0) AS b FROM range(10000); +-- +ok +== +EXPLAIN SELECT sum(b) FROM tb HAVING sum(b) < 0; +-- +ok +== +SELECT sum(b) FROM tb HAVING sum(b) > 0; +-- +ok +== +CREATE TABLE tsh AS SELECT (range % 100)::SMALLINT AS s FROM range(10000); +-- +ok +== +EXPLAIN SELECT sum(s) FROM tsh HAVING sum(s) < 0; +-- +ok +== +SELECT sum(s) FROM tsh HAVING sum(s) > 0; +-- +ok +== +CREATE TABLE tshn AS SELECT (-(range % 100))::SMALLINT AS s FROM range(10000); +-- +ok +== +EXPLAIN SELECT sum(s) FROM tshn HAVING sum(s) > 0; +-- +ok +== +SELECT sum(s) FROM tshn HAVING sum(s) < 0; +-- +ok +== +CREATE TABLE thh AS SELECT range::HUGEINT AS x FROM range(10000); +-- +ok +== +EXPLAIN SELECT sum(x) FROM thh HAVING sum(x) < 0; +-- +ok +== +SELECT sum(x) FROM thh HAVING sum(x) > 0; +-- +ok +== +CREATE TABLE tu8 AS SELECT (range % 100)::UTINYINT AS x FROM range(10000); +-- +ok +== +CREATE TABLE tu16 AS SELECT (range % 100)::USMALLINT AS x FROM range(10000); +-- +ok +== +CREATE TABLE tu32 AS SELECT (range % 100)::UINTEGER AS x FROM range(10000); +-- +ok +== +CREATE TABLE tu64 AS SELECT (range % 100)::UBIGINT AS x FROM range(10000); +-- +ok +== +EXPLAIN SELECT sum(x) FROM tu8 HAVING sum(x) < 0; +-- +ok +== +EXPLAIN SELECT sum(x) FROM tu16 HAVING sum(x) < 0; +-- +ok +== +EXPLAIN SELECT sum(x) FROM tu32 HAVING sum(x) < 0; +-- +ok +== +EXPLAIN SELECT sum(x) FROM tu64 HAVING sum(x) < 0; +-- +ok +== +SELECT sum(x) FROM tu64 HAVING sum(x) > 0; +-- +ok +== +CREATE TABLE tallneg AS SELECT range::INTEGER AS g, (-1 - (range % 100))::INTEGER AS v FROM range(10000); +-- +ok +== +EXPLAIN SELECT g FROM tallneg GROUP BY g HAVING sum(v) > -50; +-- +ok +== +SELECT count(*) FROM (SELECT g FROM tallneg GROUP BY g HAVING sum(v) > -50); +-- +ok +== +EXPLAIN SELECT g FROM tallneg GROUP BY g HAVING sum(v) > 0; +-- +ok +== +CREATE TABLE tallpos AS SELECT range::INTEGER AS g, (1 + (range % 100))::INTEGER AS v FROM range(10000); +-- +ok +== +EXPLAIN SELECT g FROM tallpos GROUP BY g HAVING sum(v) < 50; +-- +ok +== +SELECT count(*) FROM (SELECT g FROM tallpos GROUP BY g HAVING sum(v) < 50); +-- +ok +== +EXPLAIN SELECT g FROM tallpos GROUP BY g HAVING sum(v) < 0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/table_filters.test b/parser/testdata/corpus/sql/optimizer/table_filters.test index a6424f7..b9459eb 100644 --- a/parser/testdata/corpus/sql/optimizer/table_filters.test +++ b/parser/testdata/corpus/sql/optimizer/table_filters.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/table_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET dynamic_or_filter_threshold=0 diff --git a/parser/testdata/corpus/sql/optimizer/temporal_cast_dst.test b/parser/testdata/corpus/sql/optimizer/temporal_cast_dst.test index 244a186..d286340 100644 --- a/parser/testdata/corpus/sql/optimizer/temporal_cast_dst.test +++ b/parser/testdata/corpus/sql/optimizer/temporal_cast_dst.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/temporal_cast_dst.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET timezone='Europe/Paris'; diff --git a/parser/testdata/corpus/sql/optimizer/temporal_cast_zonemap.test b/parser/testdata/corpus/sql/optimizer/temporal_cast_zonemap.test index 21cdb78..8806041 100644 --- a/parser/testdata/corpus/sql/optimizer/temporal_cast_zonemap.test +++ b/parser/testdata/corpus/sql/optimizer/temporal_cast_zonemap.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/temporal_cast_zonemap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ts_table AS SELECT '2020-01-01'::TIMESTAMP + (i * INTERVAL '1 minute') AS col FROM range(1000000) t(i); diff --git a/parser/testdata/corpus/sql/optimizer/test_common_subplan_cte_binding_order.test b/parser/testdata/corpus/sql/optimizer/test_common_subplan_cte_binding_order.test index 8473fd7..1973d7b 100644 --- a/parser/testdata/corpus/sql/optimizer/test_common_subplan_cte_binding_order.test +++ b/parser/testdata/corpus/sql/optimizer/test_common_subplan_cte_binding_order.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_common_subplan_cte_binding_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE orders (id INT, amount INT, status VARCHAR, created_at TIMESTAMP); diff --git a/parser/testdata/corpus/sql/optimizer/test_common_subplan_nested_bindings.test b/parser/testdata/corpus/sql/optimizer/test_common_subplan_nested_bindings.test new file mode 100644 index 0000000..1364eac --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/test_common_subplan_nested_bindings.test @@ -0,0 +1,25 @@ +# source: test/sql/optimizer/test_common_subplan_nested_bindings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE d (id INT, j INT, x INT, y INT, z INT, k INT); +-- +ok +== +INSERT INTO d VALUES (1, 1, 1, 1, NULL, 1), (2, 2, NULL, NULL, 1, 2); +-- +ok +== +CREATE VIEW v AS SELECT id, j, x, y, z FROM d QUALIFY ROW_NUMBER() OVER (PARTITION BY k) = 1; +-- +ok +== +SELECT a.id, b.y FROM v a LEFT JOIN v b ON a.j = b.j WHERE a.x IS NOT NULL AND (b.y > 5 OR a.x > 5) IS NULL +UNION ALL SELECT a.id, b.y FROM v a, v b WHERE a.x IS NOT NULL +UNION ALL SELECT a.id, b.y FROM v a, v b WHERE a.x IS NOT NULL +UNION ALL SELECT a.id, b.y FROM v a, v b WHERE a.x IS NOT NULL +UNION ALL SELECT a.id, b.y FROM v a LEFT JOIN v b ON a.j = b.j WHERE a.x IS NOT NULL AND b.z IS NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/test_common_subplan_projection_maps.test b/parser/testdata/corpus/sql/optimizer/test_common_subplan_projection_maps.test index 98bfd59..4107a27 100644 --- a/parser/testdata/corpus/sql/optimizer/test_common_subplan_projection_maps.test +++ b/parser/testdata/corpus/sql/optimizer/test_common_subplan_projection_maps.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_common_subplan_projection_maps.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE csp_pm_a_upserts(customer_id BIGINT, id BIGINT); diff --git a/parser/testdata/corpus/sql/optimizer/test_common_subplan_table_filters.test b/parser/testdata/corpus/sql/optimizer/test_common_subplan_table_filters.test index ef692b4..a30e009 100644 --- a/parser/testdata/corpus/sql/optimizer/test_common_subplan_table_filters.test +++ b/parser/testdata/corpus/sql/optimizer/test_common_subplan_table_filters.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_common_subplan_table_filters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE csp_filter_key(a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/optimizer/test_duplicate_groups_optimizer.test b/parser/testdata/corpus/sql/optimizer/test_duplicate_groups_optimizer.test index 672af4c..7208f0c 100644 --- a/parser/testdata/corpus/sql/optimizer/test_duplicate_groups_optimizer.test +++ b/parser/testdata/corpus/sql/optimizer/test_duplicate_groups_optimizer.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_duplicate_groups_optimizer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(col1 int, col2 int); diff --git a/parser/testdata/corpus/sql/optimizer/test_fd_derived_groups.test b/parser/testdata/corpus/sql/optimizer/test_fd_derived_groups.test index e770d88..f959e5d 100644 --- a/parser/testdata/corpus/sql/optimizer/test_fd_derived_groups.test +++ b/parser/testdata/corpus/sql/optimizer/test_fd_derived_groups.test @@ -1,16 +1,12 @@ # source: test/sql/optimizer/test_fd_derived_groups.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(x INTEGER); -- ok == -INSERT INTO t SELECT range FROM range(0, 100); --- -ok -== CREATE TABLE f(x DOUBLE); -- ok diff --git a/parser/testdata/corpus/sql/optimizer/test_glob_row_group_pruning.test b/parser/testdata/corpus/sql/optimizer/test_glob_row_group_pruning.test index b0b7f99..c1cda56 100644 --- a/parser/testdata/corpus/sql/optimizer/test_glob_row_group_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/test_glob_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_glob_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/glob_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); @@ -37,6 +37,14 @@ EXPLAIN ANALYZE SELECT count(*) FROM t WHERE s GLOB 'm?m*'; -- ok == +EXPLAIN ANALYZE SELECT count(*) FROM t WHERE s GLOB '*m?m*'; +-- +ok +== +SELECT count(*) FROM t WHERE s GLOB '*m?m*'; +-- +ok +== SELECT count(*) FROM t WHERE s NOT GLOB 'qqq'; -- ok diff --git a/parser/testdata/corpus/sql/optimizer/test_in_rewrite_rule.test b/parser/testdata/corpus/sql/optimizer/test_in_rewrite_rule.test index dbe29bb..a468afd 100644 --- a/parser/testdata/corpus/sql/optimizer/test_in_rewrite_rule.test +++ b/parser/testdata/corpus/sql/optimizer/test_in_rewrite_rule.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_in_rewrite_rule.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (i integer); diff --git a/parser/testdata/corpus/sql/optimizer/test_negated_filter_cardinality.test b/parser/testdata/corpus/sql/optimizer/test_negated_filter_cardinality.test index 20357a4..9ac7ce1 100644 --- a/parser/testdata/corpus/sql/optimizer/test_negated_filter_cardinality.test +++ b/parser/testdata/corpus/sql/optimizer/test_negated_filter_cardinality.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_negated_filter_cardinality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(value VARCHAR NOT NULL); diff --git a/parser/testdata/corpus/sql/optimizer/test_no_pushdown_cast_into_cte.test b/parser/testdata/corpus/sql/optimizer/test_no_pushdown_cast_into_cte.test index a3c5675..0c315e3 100644 --- a/parser/testdata/corpus/sql/optimizer/test_no_pushdown_cast_into_cte.test +++ b/parser/testdata/corpus/sql/optimizer/test_no_pushdown_cast_into_cte.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_no_pushdown_cast_into_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t(a, b) AS ( diff --git a/parser/testdata/corpus/sql/optimizer/test_not_comparison_simplification.test b/parser/testdata/corpus/sql/optimizer/test_not_comparison_simplification.test index 10fcfcc..bdc7ee3 100644 --- a/parser/testdata/corpus/sql/optimizer/test_not_comparison_simplification.test +++ b/parser/testdata/corpus/sql/optimizer/test_not_comparison_simplification.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_not_comparison_simplification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT * FROM (VALUES (1),(2),(3),(NULL)) v(a); diff --git a/parser/testdata/corpus/sql/optimizer/test_rollup_column_pruning.test b/parser/testdata/corpus/sql/optimizer/test_rollup_column_pruning.test index 24c9847..66cfa62 100644 --- a/parser/testdata/corpus/sql/optimizer/test_rollup_column_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/test_rollup_column_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_rollup_column_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE events( diff --git a/parser/testdata/corpus/sql/optimizer/test_rowid_pruning.test b/parser/testdata/corpus/sql/optimizer/test_rowid_pruning.test index f50bdf5..551095a 100644 --- a/parser/testdata/corpus/sql/optimizer/test_rowid_pruning.test +++ b/parser/testdata/corpus/sql/optimizer/test_rowid_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_rowid_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE rowid_prune AS SELECT range AS v FROM range(300000); diff --git a/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown.test b/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown.test index ebfaea7..6637f7f 100644 --- a/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown.test +++ b/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_rowid_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT i + 100 as x FROM range(250000) AS t(i); @@ -43,3 +43,15 @@ EXPLAIN SELECT * FROM t1 where rowid = 6 OR rowid = 9 ORDER BY ALL; -- ok == +CREATE TABLE nested_columns(s STRUCT(a INTEGER, b INTEGER)); +-- +ok +== +INSERT INTO nested_columns VALUES ({'a': 1, 'b': 0}), ({'a': 3, 'b': 2}); +-- +ok +== +EXPLAIN SELECT s.a FROM nested_columns WHERE s.a = 3 AND s.b = 2 AND rowid >= 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_deletes.test b/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_deletes.test index 93df123..2f955af 100644 --- a/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_deletes.test +++ b/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_rowid_pushdown_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_grow_shrink (id_var VARCHAR, id_int INTEGER, id_point BIGINT); diff --git a/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_plan.test b/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_plan.test index 3270309..a990bf1 100644 --- a/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_plan.test +++ b/parser/testdata/corpus/sql/optimizer/test_rowid_pushdown_plan.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_rowid_pushdown_plan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM lineitem ORDER BY l_orderkey DESC LIMIT 5; diff --git a/parser/testdata/corpus/sql/optimizer/test_window_self_join.test b/parser/testdata/corpus/sql/optimizer/test_window_self_join.test index 7a00e8a..bb12083 100644 --- a/parser/testdata/corpus/sql/optimizer/test_window_self_join.test +++ b/parser/testdata/corpus/sql/optimizer/test_window_self_join.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/test_window_self_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE services (date DATE, train_number INT); @@ -179,6 +179,13 @@ ORDER BY grp, seq; -- ok == +SELECT grp, sum(seq) OVER (PARTITION BY grp ORDER BY seq + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) +FROM (VALUES (1,1),(1,2),(1,3),(2,1),(2,2)) t(grp,seq) +ORDER BY 1,2; +-- +ok +== explain SELECT seq, sum(seq) OVER (PARTITION BY grp {framing} BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumsum diff --git a/parser/testdata/corpus/sql/optimizer/tests_no_pushdown_under_samples.test b/parser/testdata/corpus/sql/optimizer/tests_no_pushdown_under_samples.test index ae18393..7f04ab1 100644 --- a/parser/testdata/corpus/sql/optimizer/tests_no_pushdown_under_samples.test +++ b/parser/testdata/corpus/sql/optimizer/tests_no_pushdown_under_samples.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/tests_no_pushdown_under_samples.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE df AS (SELECT * AS i FROM range(10)); diff --git a/parser/testdata/corpus/sql/optimizer/timestamp_tz_cast_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/timestamp_tz_cast_zonemap_pruning.test new file mode 100644 index 0000000..035e18d --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/timestamp_tz_cast_zonemap_pruning.test @@ -0,0 +1,45 @@ +# source: test/sql/optimizer/timestamp_tz_cast_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/ts_tz_cast_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE ts_us AS SELECT TIMESTAMP '2000-01-01' + to_seconds(range) AS ts FROM range(10240); +-- +ok +== +CREATE TABLE ts_tz AS SELECT to_timestamp(range) AS ts FROM range(10240); +-- +ok +== +CREATE TABLE ts_tz_ns AS SELECT (TIMESTAMP '2000-01-01' + to_seconds(range))::TIMESTAMPTZ_NS AS ts FROM range(10240); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_tz_ns WHERE ts::TIMESTAMPTZ > TIMESTAMPTZ '2000-01-01 02:50:00+00'; +-- +ok +== +SELECT count(*) FROM ts_tz_ns WHERE ts::TIMESTAMPTZ > TIMESTAMPTZ '2000-01-01 02:50:00+00'; +-- +ok +== +SELECT count(*) FROM ts_us WHERE ts > TIMESTAMPTZ '2000-01-01 08:30:00+00'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_us WHERE ts > TIMESTAMPTZ '2000-01-01 08:30:00+00'; +-- +ok +== +SELECT count(*) FROM ts_tz WHERE ts::TIMESTAMP < TIMESTAMP '1970-01-01 00:30:00'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_tz WHERE ts::TIMESTAMP < TIMESTAMP '1970-01-01 00:30:00'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/timestamp_unit_cast_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/timestamp_unit_cast_zonemap_pruning.test new file mode 100644 index 0000000..e7507c0 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/timestamp_unit_cast_zonemap_pruning.test @@ -0,0 +1,77 @@ +# source: test/sql/optimizer/timestamp_unit_cast_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/ts_unit_cast_prune.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE ts_ms AS SELECT (TIMESTAMP '2000-01-01' + to_seconds(range))::TIMESTAMP_MS AS ts FROM range(10240); +-- +ok +== +CREATE TABLE ts_sec AS SELECT (TIMESTAMP '2000-01-01' + to_seconds(range))::TIMESTAMP_S AS ts FROM range(10240); +-- +ok +== +CREATE TABLE ts_ns AS SELECT (TIMESTAMP '2000-01-01' + to_seconds(range))::TIMESTAMP_NS AS ts FROM range(10240); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_ms WHERE ts > TIMESTAMP '2000-01-01 02:50:00'; +-- +ok +== +SELECT count(*) FROM ts_ms WHERE ts > TIMESTAMP '2000-01-01 02:50:00'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_ms WHERE ts < TIMESTAMP '2000-01-01 00:01:40'; +-- +ok +== +SELECT count(*) FROM ts_ms WHERE ts < TIMESTAMP '2000-01-01 00:01:40'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_ms WHERE ts = TIMESTAMP '2000-01-01 01:23:20'; +-- +ok +== +SELECT count(*) FROM ts_ms WHERE ts = TIMESTAMP '2000-01-01 01:23:20'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_sec WHERE ts > TIMESTAMP '2000-01-01 02:50:00'; +-- +ok +== +SELECT count(*) FROM ts_sec WHERE ts > TIMESTAMP '2000-01-01 02:50:00'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_sec WHERE ts < TIMESTAMP '2000-01-01 00:01:40'; +-- +ok +== +SELECT count(*) FROM ts_sec WHERE ts < TIMESTAMP '2000-01-01 00:01:40'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_us WHERE ts > '2000-01-01 02:50:00'::TIMESTAMP_NS; +-- +ok +== +SELECT count(*) FROM ts_us WHERE ts > '2000-01-01 02:50:00'::TIMESTAMP_NS; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM ts_ns WHERE ts > TIMESTAMP '2000-01-01 02:50:00'; +-- +ok +== +SELECT count(*) FROM ts_ns WHERE ts > TIMESTAMP '2000-01-01 02:50:00'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/topn_window_elimination_argument_order.test b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_argument_order.test new file mode 100644 index 0000000..a382d83 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_argument_order.test @@ -0,0 +1,31 @@ +# source: test/sql/optimizer/topn_window_elimination_argument_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE row_number_order (id INTEGER, g INTEGER, p INTEGER); +-- +ok +== +INSERT INTO row_number_order VALUES (1, 1, 1), (2, 1, 2), (3, 1, 3), (4, 2, 1), (5, 2, 2); +-- +ok +== +SELECT id, g, p +FROM row_number_order +QUALIFY ROW_NUMBER(ORDER BY id DESC) OVER ( + PARTITION BY g + ORDER BY p ASC + ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING +) <= 1 +ORDER BY g, id; +-- +ok +== +SELECT id, g, p +FROM row_number_order +QUALIFY ROW_NUMBER(ORDER BY id DESC) OVER (PARTITION BY g ORDER BY p ASC) = 1 +ORDER BY g, id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/topn_window_elimination_late_materialization.test b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_late_materialization.test index d4bd452..1af167d 100644 --- a/parser/testdata/corpus/sql/optimizer/topn_window_elimination_late_materialization.test +++ b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_late_materialization.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/topn_window_elimination_late_materialization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE sample_table AS @@ -91,3 +91,45 @@ SELECT * FROM cte QUALIFY row_number() OVER (PARTITION BY a ORDER BY c DESC) = 1 -- ok == +CREATE TABLE try_cast_t (key VARCHAR, ts INTEGER, val VARCHAR, note VARCHAR); +-- +ok +== +INSERT INTO try_cast_t VALUES ('a', 1, '100', 'n1'), ('a', 2, 'oops', 'n2'), ('b', 1, '7', 'n3'), ('b', 2, '8', 'n4'); +-- +ok +== +EXPLAIN SELECT key, v, note FROM ( + SELECT key, ts, TRY_CAST(val AS INTEGER) AS v, note FROM try_cast_t) +QUALIFY row_number() OVER (PARTITION BY key ORDER BY ts DESC) = 1 +-- +ok +== +SELECT key, v, note FROM ( + SELECT key, ts, TRY_CAST(val AS INTEGER) AS v, note FROM try_cast_t) +QUALIFY row_number() OVER (PARTITION BY key ORDER BY ts DESC) = 1 +ORDER BY key +-- +ok +== +CREATE TABLE nested_cast_t (key VARCHAR, ts INTEGER, x DOUBLE, note VARCHAR); +-- +ok +== +INSERT INTO nested_cast_t VALUES ('a', 1, 1.1, 'n1'), ('a', 2, 3.7, 'n2'), ('b', 1, 2.2, 'n3'), ('b', 2, 8.9, 'n4'); +-- +ok +== +EXPLAIN SELECT key, r, note FROM ( + SELECT key, ts, CAST(CAST(x AS INTEGER) AS DOUBLE) AS r, note FROM nested_cast_t) +QUALIFY row_number() OVER (PARTITION BY key ORDER BY ts DESC) = 1 +-- +ok +== +SELECT key, r, note FROM ( + SELECT key, ts, CAST(CAST(x AS INTEGER) AS DOUBLE) AS r, note FROM nested_cast_t) +QUALIFY row_number() OVER (PARTITION BY key ORDER BY ts DESC) = 1 +ORDER BY key +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/topn_window_elimination_max_n.test b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_max_n.test new file mode 100644 index 0000000..a469417 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_max_n.test @@ -0,0 +1,49 @@ +# source: test/sql/optimizer/topn_window_elimination_max_n.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t2 (c_pk INTEGER, c_int INTEGER); +-- +ok +== +INSERT INTO t2 VALUES (1, 10), (2, 20), (3, 30); +-- +ok +== +SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 1000000 +-- +ok +== +EXPLAIN SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 1000000 +-- +ok +== +SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) < 1000001 +-- +ok +== +SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 5000000 +-- +ok +== +EXPLAIN SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 999999 +-- +ok +== +SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) < 1000000 +-- +ok +== +EXPLAIN SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 2 +-- +ok +== +SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 2 +-- +ok +== +SELECT c_pk, c_int FROM t2 QUALIFY (ROW_NUMBER() OVER (ORDER BY c_pk)) <= 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/topn_window_elimination_multiplicity.test b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_multiplicity.test new file mode 100644 index 0000000..30898e7 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_multiplicity.test @@ -0,0 +1,113 @@ +# source: test/sql/optimizer/topn_window_elimination_multiplicity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE l_topn_dup(id INTEGER, k INTEGER, p VARCHAR) +-- +ok +== +CREATE TABLE r_topn_dup(k INTEGER, s INTEGER) +-- +ok +== +INSERT INTO l_topn_dup VALUES (1, 1, 'x') +-- +ok +== +INSERT INTO r_topn_dup VALUES (1, 30), (1, 20), (1, 10) +-- +ok +== +SELECT id, p +FROM ( + SELECT l_topn_dup.id, l_topn_dup.p, r_topn_dup.s + FROM l_topn_dup + JOIN r_topn_dup ON l_topn_dup.k = r_topn_dup.k +) AS src +QUALIFY ROW_NUMBER() OVER (ORDER BY s DESC NULLS LAST) <= 2 +ORDER BY ALL +-- +ok +== +SELECT id, k, p +FROM ( + SELECT l_topn_dup.id, l_topn_dup.k, l_topn_dup.p, r_topn_dup.s + FROM l_topn_dup + JOIN r_topn_dup ON l_topn_dup.k = r_topn_dup.k +) AS src +QUALIFY ROW_NUMBER() OVER (PARTITION BY k ORDER BY s DESC NULLS LAST) <= 2 +ORDER BY ALL +-- +ok +== +SELECT id, p, row_num +FROM ( + SELECT l_topn_dup.id, l_topn_dup.p, + ROW_NUMBER() OVER (ORDER BY r_topn_dup.s DESC NULLS LAST) AS row_num + FROM l_topn_dup + JOIN r_topn_dup ON l_topn_dup.k = r_topn_dup.k +) AS src +WHERE row_num <= 2 +ORDER BY ALL +-- +ok +== +CREATE TABLE l_topn_dup_other(k INTEGER, s INTEGER) +-- +ok +== +CREATE TABLE r_topn_dup_other(id INTEGER, k INTEGER, p VARCHAR) +-- +ok +== +INSERT INTO l_topn_dup_other VALUES (1, 20), (1, 10) +-- +ok +== +INSERT INTO r_topn_dup_other VALUES (2, 1, 'y') +-- +ok +== +SELECT id, p +FROM ( + SELECT r_topn_dup_other.id, r_topn_dup_other.p, l_topn_dup_other.s + FROM l_topn_dup_other + JOIN r_topn_dup_other ON l_topn_dup_other.k = r_topn_dup_other.k +) AS src +QUALIFY ROW_NUMBER() OVER (ORDER BY s DESC NULLS LAST) <= 2 +ORDER BY ALL +-- +ok +== +EXPLAIN SELECT id, p +FROM ( + SELECT l_topn_dup.id, l_topn_dup.p, r_topn_dup.s + FROM l_topn_dup + JOIN r_topn_dup ON l_topn_dup.k = r_topn_dup.k +) AS src +QUALIFY ROW_NUMBER() OVER (ORDER BY s DESC NULLS LAST) <= 2 +-- +ok +== +CREATE TABLE topn_unique_rowids(id INTEGER, p VARCHAR, s INTEGER) +-- +ok +== +INSERT INTO topn_unique_rowids VALUES (1, 'a', 30), (2, 'b', 20), (3, 'c', 10) +-- +ok +== +EXPLAIN SELECT id, p +FROM topn_unique_rowids +QUALIFY ROW_NUMBER() OVER (ORDER BY s DESC NULLS LAST) <= 2 +-- +ok +== +SELECT id, p +FROM topn_unique_rowids +QUALIFY ROW_NUMBER() OVER (ORDER BY s DESC NULLS LAST) <= 1 +ORDER BY ALL +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/topn_window_elimination_nullable_order.test b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_nullable_order.test new file mode 100644 index 0000000..09c6fb8 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/topn_window_elimination_nullable_order.test @@ -0,0 +1,52 @@ +# source: test/sql/optimizer/topn_window_elimination_nullable_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(id INTEGER PRIMARY KEY); +-- +ok +== +SELECT id, ROW_NUMBER() OVER (ORDER BY NULLIF(id % 3, 0) DESC NULLS LAST) AS rn +FROM t +QUALIFY rn <= 3 +ORDER BY rn; +-- +ok +== +CREATE TABLE t2(g INTEGER, id INTEGER); +-- +ok +== +INSERT INTO t2 VALUES (1,1),(1,2),(1,3),(2,4),(2,5),(2,6); +-- +ok +== +SELECT g, id, ROW_NUMBER() OVER (PARTITION BY g ORDER BY NULLIF(id % 3, 0) DESC NULLS LAST) AS rn +FROM t2 +QUALIFY rn <= 3 +ORDER BY g, rn; +-- +ok +== +SELECT id, ROW_NUMBER() OVER (ORDER BY NULLIF(id % 3, 0) ASC NULLS LAST) AS rn +FROM t +QUALIFY rn <= 3 +ORDER BY rn; +-- +ok +== +SELECT ROW_NUMBER() OVER (ORDER BY NULLIF(id % 3, 0) DESC NULLS LAST) AS rn +FROM t +QUALIFY rn <= 3 +ORDER BY rn; +-- +ok +== +SELECT id, ROW_NUMBER() OVER (ORDER BY NULLIF(id % 3, 0) DESC NULLS LAST) AS rn +FROM t +QUALIFY rn <= 1 +ORDER BY rn; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/topn_window_set_elimination.test b/parser/testdata/corpus/sql/optimizer/topn_window_set_elimination.test index 60202b9..2301961 100644 --- a/parser/testdata/corpus/sql/optimizer/topn_window_set_elimination.test +++ b/parser/testdata/corpus/sql/optimizer/topn_window_set_elimination.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/topn_window_set_elimination.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE or replace TABLE timeseries AS diff --git a/parser/testdata/corpus/sql/optimizer/try_struct_extract_cast.test b/parser/testdata/corpus/sql/optimizer/try_struct_extract_cast.test new file mode 100644 index 0000000..0f6d360 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/try_struct_extract_cast.test @@ -0,0 +1,43 @@ +# source: test/sql/optimizer/try_struct_extract_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE foo AS SELECT 'x' AS t, {'bar': 'x'} AS t2; +-- +ok +== +SELECT TRY(t::INTEGER) FROM foo +-- +ok +== +SELECT TRY(t2.bar::INTEGER) FROM foo +-- +ok +== +SELECT TRY(t::INTEGER), TRY(t2.bar::INTEGER) FROM foo +-- +ok +== +SELECT TRY_CAST(t2.bar AS INTEGER) FROM foo +-- +ok +== +SELECT t2.bar::INTEGER FROM foo +-- +ok +== +WITH src AS (SELECT '2026-05-02, 00:00:00' AS t, {'bar': '2026-05-02, 00:00:00'} AS t2) +SELECT TRY(t::TIMESTAMPTZ), TRY(t2.bar::TIMESTAMPTZ) FROM src +-- +ok +== +SELECT TRY(t2.bar::INTEGER) +FROM (SELECT {'bar': '7'} AS t2) +-- +ok +== +SELECT TRY(t2.bar::INTEGER + 1) FROM foo +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/unsigned_divide_statistics.test b/parser/testdata/corpus/sql/optimizer/unsigned_divide_statistics.test new file mode 100644 index 0000000..31b7d69 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/unsigned_divide_statistics.test @@ -0,0 +1,26 @@ +# source: test/sql/optimizer/unsigned_divide_statistics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE unsigned_divide_stats(i {type}); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO unsigned_divide_stats VALUES (0), ({divisor}); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT s.min, s.max +FROM (SELECT stats(i // {divisor}::{type}) AS s FROM unsigned_divide_stats LIMIT 1); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT i // {divisor}::{type} FROM unsigned_divide_stats ORDER BY i; +-- +error: Parser Error: syntax error at or near "}" +== +DROP TABLE unsigned_divide_stats; +-- +ok +== diff --git a/parser/testdata/corpus/sql/optimizer/upper_lower_zonemap_pruning.test b/parser/testdata/corpus/sql/optimizer/upper_lower_zonemap_pruning.test new file mode 100644 index 0000000..537deb2 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/upper_lower_zonemap_pruning.test @@ -0,0 +1,138 @@ +# source: test/sql/optimizer/upper_lower_zonemap_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/upper_lower_zonemap_pruning.duckdb' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +CREATE TABLE case_pruning AS +SELECT i::INTEGER AS i, CASE WHEN i < 2048 THEN 'alpha' WHEN i < 4096 THEN 'Beta' ELSE 'GAMMA' END AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM case_pruning WHERE upper(s) = 'BETA'; +-- +ok +== +SELECT count(*) FROM case_pruning WHERE upper(s) = 'BETA'; +-- +ok +== +EXPLAIN ANALYZE SELECT sum(i) FROM case_pruning WHERE lower(s) = 'gamma'; +-- +ok +== +SELECT count(*) FROM case_pruning WHERE lower(s) = 'gamma'; +-- +ok +== +CREATE TABLE case_mixed AS +SELECT i::INTEGER AS i, 'v' || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM case_mixed WHERE upper(s) = 'V004000'; +-- +ok +== +SELECT count(*) FROM case_mixed WHERE upper(s) = 'V004000'; +-- +ok +== +CREATE TABLE case_lengthening AS +SELECT i::INTEGER AS i, CASE WHEN i < 2048 THEN 'ɐɐɐɐɐɐ' WHEN i < 4096 THEN 'oooooo' ELSE 'zzzzzz' END AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT i FROM case_lengthening WHERE upper(s) = 'ⱯⱯⱯⱯⱯⱯ'; +-- +ok +== +SELECT count(*) FROM case_lengthening WHERE upper(s) = 'ⱯⱯⱯⱯⱯⱯ'; +-- +ok +== +CREATE TABLE case_truncated AS +SELECT i::INTEGER AS i, + CASE WHEN i < 2048 THEN 'prefixprefix_alpha' WHEN i < 4096 THEN 'prefixprefix_beta' ELSE 'prefixprefix_gamma' END AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM case_truncated WHERE upper(s) = 'PREFIXPREFIX_BETA'; +-- +ok +== +SELECT count(*) FROM case_truncated WHERE upper(s) = 'PREFIXPREFIX_BETA'; +-- +ok +== +CREATE TABLE case_truncated_distinct AS +SELECT i::INTEGER AS i, + CASE WHEN i < 2048 THEN 'aaaaaaaaaaaa' WHEN i < 4096 THEN 'bbbbbbbbbbbb' ELSE 'cccccccccccc' END + || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM case_truncated_distinct WHERE upper(s) = 'BBBBBBBBBBBB002500'; +-- +ok +== +SELECT count(*) FROM case_truncated_distinct WHERE upper(s) = 'BBBBBBBBBBBB002500'; +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM case_truncated_distinct WHERE upper(s) = 'ZZZZ'; +-- +ok +== +SELECT count(*) FROM case_truncated_distinct WHERE upper(s) = 'ZZZZ'; +-- +ok +== +CREATE TABLE case_split_char AS +SELECT i::INTEGER AS i, + CASE WHEN i < 2048 THEN 'abcdefghij' WHEN i < 4096 THEN 'klmnopqrst' ELSE 'uvwxyzabcd' END + || '🦆' || lpad(i::VARCHAR, 6, '0') AS s +FROM range(6144) r(i); +-- +ok +== +EXPLAIN ANALYZE SELECT count(*) FROM case_split_char WHERE upper(s) = 'KLMNOPQRST🦆002500'; +-- +ok +== +SELECT count(*) FROM case_split_char WHERE upper(s) = 'KLMNOPQRST🦆002500'; +-- +ok +== +CREATE TABLE case_prefix AS +SELECT CASE WHEN i < 2048 THEN 'alpha' + WHEN i < 4096 THEN 'Beta' + ELSE 'GAMMA' END || i::VARCHAR AS s +FROM range(6144) t(i); +-- +ok +== +EXPLAIN ANALYZE SELECT s FROM case_prefix WHERE {func}(s) LIKE {func}('beta%'); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM case_prefix WHERE {func}(s) LIKE {func}('beta%'); +-- +error: Parser Error: syntax error at or near "}" +== +EXPLAIN ANALYZE SELECT s FROM case_prefix WHERE {func}(s) > {func}('beta'); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM case_prefix WHERE {func}(s) > {func}('beta'); +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/optimizer/variant_json_cast_pushdown.test b/parser/testdata/corpus/sql/optimizer/variant_json_cast_pushdown.test new file mode 100644 index 0000000..33cbb26 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/variant_json_cast_pushdown.test @@ -0,0 +1,110 @@ +# source: test/sql/optimizer/variant_json_cast_pushdown.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE strings AS +SELECT id, {'k': s, 'nested': {'k': s}}::VARIANT AS v +FROM (VALUES + (1, 'true'), + (2, 'x'), + (3, '1'), + (4, 'false'), + (5, 'null'), + (6, '[]'), + (7, '{"n":1}'), + (8, E'quote"\\line\n'), + (9, ''), + (10, NULL) +) t(id, s); +-- +ok +== +COPY strings TO '{TEST_DIR}/variant_json_unshredded.parquet' (SHREDDING {'v': 'NULL'}); +-- +ok +== +COPY strings TO '{TEST_DIR}/variant_json_shredded.parquet' +(SHREDDING {'v': 'STRUCT(k VARCHAR, nested STRUCT(k VARCHAR))'}); +-- +ok +== +EXPLAIN SELECT v.k::JSON FROM {SOURCE}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT id, (variant_extract(v, 'k')::JSON)::VARCHAR, + json_type(variant_extract(v, 'k')::JSON) +FROM {SOURCE} WHERE id IN (1, 3) ORDER BY id; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT (variant_extract(v, 'k')::JSON)::VARCHAR +FROM {SOURCE} WHERE id = 2; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT id, ({EXPR}::JSON)::VARCHAR, json_type({EXPR}::JSON) +FROM {SOURCE} ORDER BY id; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT id, TRY_CAST({EXPR} AS JSON)::VARCHAR +FROM {SOURCE} WHERE id IN (1, 2, 3, 10) ORDER BY id; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT id, to_json({EXPR})::VARCHAR +FROM {SOURCE} WHERE id IN (1, 2, 3, 10) ORDER BY id; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT id FROM {SOURCE} +WHERE ({EXPR}::JSON)::VARCHAR = '"true"'; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM {SOURCE} +WHERE json_type({EXPR}::JSON) = 'VARCHAR'; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) FROM {SOURCE} +WHERE ({EXPR}::JSON) IS NULL; +-- +error: Parser Error: syntax error at or near "{" +== +COPY ( + SELECT id, {'b': b, 'i': i, 'd': d}::VARIANT AS v + FROM (VALUES + (1, true, 1, 1.5::DOUBLE), + (2, false, -1, -1.5::DOUBLE), + (3, NULL, NULL, NULL) + ) t(id, b, i, d) +) TO '{TEST_DIR}/variant_json_primitives.parquet' +(SHREDDING {'v': 'STRUCT(b BOOLEAN, i INTEGER, d DOUBLE)'}); +-- +ok +== +SELECT id, (v.b::JSON)::VARCHAR, json_type(v.b::JSON), + (v.i::JSON)::VARCHAR, json_type(v.i::JSON), + (v.d::JSON)::VARCHAR, json_type(v.d::JSON) +FROM '{TEST_DIR}/variant_json_primitives.parquet' ORDER BY id; +-- +ok +== +CREATE TABLE struct_strings AS +SELECT id, {'k': s} AS v +FROM (VALUES (1, 'true'), (2, '"x"'), (3, '1'), (4, NULL)) t(id, s); +-- +ok +== +COPY struct_strings TO '{TEST_DIR}/struct_json_cast.parquet'; +-- +ok +== +SELECT id, (v.k::JSON)::VARCHAR, json_type(v.k::JSON) +FROM {SOURCE} ORDER BY id; +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/optimizer/window_self_join_optimizer_csv.test b/parser/testdata/corpus/sql/optimizer/window_self_join_optimizer_csv.test index f3d7e19..4519268 100644 --- a/parser/testdata/corpus/sql/optimizer/window_self_join_optimizer_csv.test +++ b/parser/testdata/corpus/sql/optimizer/window_self_join_optimizer_csv.test @@ -1,6 +1,6 @@ # source: test/sql/optimizer/window_self_join_optimizer_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/optimizer/yearweek_negative_iso_year.test b/parser/testdata/corpus/sql/optimizer/yearweek_negative_iso_year.test new file mode 100644 index 0000000..71f67a5 --- /dev/null +++ b/parser/testdata/corpus/sql/optimizer/yearweek_negative_iso_year.test @@ -0,0 +1,85 @@ +# source: test/sql/optimizer/yearweek_negative_iso_year.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE dates AS +SELECT DATE '-00043-01-01' + CAST(i AS INTEGER) AS d +FROM range(800) r(i); +-- +ok +== +SELECT count(*) FROM dates WHERE yearweek(d) >= -4310; +-- +ok +== +SELECT count(*) FROM dates WHERE yearweek(d) < -4310; +-- +ok +== +SELECT count(*) FROM dates WHERE date_part('yearweek', d) < -4310; +-- +ok +== +SELECT count(*) FROM dates WHERE extract(yearweek FROM d) < -4310; +-- +ok +== +PREPARE yearweek_ge AS SELECT count(*) FROM dates WHERE yearweek(d) >= $1; +-- +ok +== +EXECUTE yearweek_ge(-4310); +-- +ok +== +CREATE TABLE timestamps AS +SELECT TIMESTAMP '-00043-01-01' + INTERVAL (i) DAY AS ts +FROM range(120) r(i); +-- +ok +== +SELECT count(*) FROM timestamps WHERE yearweek(ts) >= -4310; +-- +ok +== +SELECT count(*) FROM timestamps WHERE yearweek(ts) < -4310; +-- +ok +== +CREATE TABLE year_zero AS +SELECT DATE '-00001-11-01' + CAST(i AS INTEGER) AS d +FROM range(120) r(i); +-- +ok +== +SELECT count(*) FROM year_zero WHERE yearweek(d) >= -10; +-- +ok +== +CREATE TABLE modern AS +SELECT DATE '2020-01-01' + CAST(i AS INTEGER) AS d +FROM range(400) r(i); +-- +ok +== +SELECT count(*) FROM modern WHERE yearweek(d) >= 202010; +-- +ok +== +SELECT count(*) FROM modern WHERE yearweek(d) >= -4310; +-- +ok +== +CREATE TABLE special(d DATE); +-- +ok +== +INSERT INTO special VALUES (NULL), ('infinity'), ('-infinity'), (DATE '-00043-01-01'), (DATE '-00043-01-01' + 69); +-- +ok +== +SELECT d, yearweek(d) FROM special WHERE yearweek(d) >= -4310 ORDER BY d; +-- +ok +== diff --git a/parser/testdata/corpus/sql/order/hugeint_order_by_extremes.test b/parser/testdata/corpus/sql/order/hugeint_order_by_extremes.test index fd93503..55e85a6 100644 --- a/parser/testdata/corpus/sql/order/hugeint_order_by_extremes.test +++ b/parser/testdata/corpus/sql/order/hugeint_order_by_extremes.test @@ -1,6 +1,6 @@ # source: test/sql/order/hugeint_order_by_extremes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a hugeint); diff --git a/parser/testdata/corpus/sql/order/issue_11936.test b/parser/testdata/corpus/sql/order/issue_11936.test index 9d3dc38..d161b8f 100644 --- a/parser/testdata/corpus/sql/order/issue_11936.test +++ b/parser/testdata/corpus/sql/order/issue_11936.test @@ -1,6 +1,6 @@ # source: test/sql/order/issue_11936.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(col1 INT, col2 INT2[][][][][][]); diff --git a/parser/testdata/corpus/sql/order/limit_full_outer_join.test b/parser/testdata/corpus/sql/order/limit_full_outer_join.test index cfcb5d4..c550667 100644 --- a/parser/testdata/corpus/sql/order/limit_full_outer_join.test +++ b/parser/testdata/corpus/sql/order/limit_full_outer_join.test @@ -1,6 +1,6 @@ # source: test/sql/order/limit_full_outer_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, j, k, l FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY ALL LIMIT 2 diff --git a/parser/testdata/corpus/sql/order/limit_invalid_index_value.test b/parser/testdata/corpus/sql/order/limit_invalid_index_value.test new file mode 100644 index 0000000..582bf46 --- /dev/null +++ b/parser/testdata/corpus/sql/order/limit_invalid_index_value.test @@ -0,0 +1,29 @@ +# source: test/sql/order/limit_invalid_index_value.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM range(5) LIMIT (SELECT 18446744073709551615); +-- +ok +== +SELECT * FROM range(5) OFFSET (SELECT 18446744073709551615); +-- +ok +== +SELECT * FROM range(5) ORDER BY 1 LIMIT 2 OFFSET (SELECT 18446744073709551615); +-- +ok +== +SELECT * FROM range(5) LIMIT (SELECT 9223372036854775807::UBIGINT + 1); +-- +ok +== +SELECT * FROM range(5) LIMIT (SELECT 2) OFFSET (SELECT 1); +-- +ok +== +SELECT * FROM range(5) LIMIT 50% OFFSET (SELECT 18446744073709551615); +-- +ok +== diff --git a/parser/testdata/corpus/sql/order/limit_parameter.test b/parser/testdata/corpus/sql/order/limit_parameter.test index 880da30..fca1e8b 100644 --- a/parser/testdata/corpus/sql/order/limit_parameter.test +++ b/parser/testdata/corpus/sql/order/limit_parameter.test @@ -1,6 +1,6 @@ # source: test/sql/order/limit_parameter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM generate_series(0, 10000, 1) tbl(i) ORDER BY i DESC LIMIT 5 diff --git a/parser/testdata/corpus/sql/order/limit_percent_view.test b/parser/testdata/corpus/sql/order/limit_percent_view.test index d9685da..f8e03ab 100644 --- a/parser/testdata/corpus/sql/order/limit_percent_view.test +++ b/parser/testdata/corpus/sql/order/limit_percent_view.test @@ -1,6 +1,6 @@ # source: test/sql/order/limit_percent_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (12, 21), (13, 22), (14, 32), (15, 52) diff --git a/parser/testdata/corpus/sql/order/limit_union.test b/parser/testdata/corpus/sql/order/limit_union.test index 9533a93..a3872a9 100644 --- a/parser/testdata/corpus/sql/order/limit_union.test +++ b/parser/testdata/corpus/sql/order/limit_union.test @@ -1,6 +1,6 @@ # source: test/sql/order/limit_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM range(5) UNION ALL SELECT * FROM range(5) LIMIT 7 diff --git a/parser/testdata/corpus/sql/order/negative_offset.test b/parser/testdata/corpus/sql/order/negative_offset.test index 7ef21dd..6e9b57f 100644 --- a/parser/testdata/corpus/sql/order/negative_offset.test +++ b/parser/testdata/corpus/sql/order/negative_offset.test @@ -1,6 +1,6 @@ # source: test/sql/order/negative_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM generate_series(0,10,1) LIMIT 3 OFFSET -1; diff --git a/parser/testdata/corpus/sql/order/order_by_all.test b/parser/testdata/corpus/sql/order/order_by_all.test index a473ded..e3da1c4 100644 --- a/parser/testdata/corpus/sql/order/order_by_all.test +++ b/parser/testdata/corpus/sql/order/order_by_all.test @@ -1,6 +1,6 @@ # source: test/sql/order/order_by_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers ORDER BY ALL diff --git a/parser/testdata/corpus/sql/order/order_by_internal_5293.test b/parser/testdata/corpus/sql/order/order_by_internal_5293.test index f1cc034..186f556 100644 --- a/parser/testdata/corpus/sql/order/order_by_internal_5293.test +++ b/parser/testdata/corpus/sql/order/order_by_internal_5293.test @@ -1,6 +1,6 @@ # source: test/sql/order/order_by_internal_5293.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as from VALUES diff --git a/parser/testdata/corpus/sql/order/order_by_negative_zero.test b/parser/testdata/corpus/sql/order/order_by_negative_zero.test new file mode 100644 index 0000000..370051c --- /dev/null +++ b/parser/testdata/corpus/sql/order/order_by_negative_zero.test @@ -0,0 +1,40 @@ +# source: test/sql/order/order_by_negative_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE zero_probe(id INTEGER, v DOUBLE, vf FLOAT); +-- +ok +== +INSERT INTO zero_probe VALUES (1, '-0.0', '-0.0'), (2, '0.0', '0.0'); +-- +ok +== +SELECT id, signbit(v), signbit(vf) FROM zero_probe ORDER BY id; +-- +ok +== +SELECT id, signbit(v), signbit(vf) FROM zero_probe ORDER BY v, id; +-- +ok +== +SELECT v, 1.0 / v FROM zero_probe ORDER BY v, id; +-- +ok +== +CREATE TEMP TABLE srs_zero_probe(id INTEGER, v DOUBLE); +-- +ok +== +INSERT INTO srs_zero_probe VALUES (1, '-0.0'), (2, '0.0'); +-- +ok +== +WITH q AS MATERIALIZED ( + SELECT id, v FROM srs_zero_probe ORDER BY v, id +) +SELECT id, v, signbit(v), 1.0 / v FROM q ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/order/order_merge_buffer_fallback.test b/parser/testdata/corpus/sql/order/order_merge_buffer_fallback.test new file mode 100644 index 0000000..2af9592 --- /dev/null +++ b/parser/testdata/corpus/sql/order/order_merge_buffer_fallback.test @@ -0,0 +1,58 @@ +# source: test/sql/order/order_merge_buffer_fallback.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET temp_directory = '{TEST_DIR}/order_merge_buffer_tmp'; +-- +ok +== +CREATE TABLE tiny_wide AS SELECT 'common_prefix' || lpad(((i % 1000) * 2 + i // 1000)::VARCHAR, 6, '0') AS s, i FROM range(2000) t(i); +-- +ok +== +CREATE TABLE tiny_fixed AS SELECT (i // 1000)::BIGINT AS c, ((i % 1000) * 2 + i // 1000)::BIGINT AS k, i FROM range(2000) t(i); +-- +ok +== +SELECT s, i FROM tiny_wide ORDER BY s, i; +-- +ok +== +SELECT s, i FROM tiny_wide ORDER BY s DESC, i DESC; +-- +ok +== +SELECT c, k, i FROM tiny_fixed ORDER BY k, c, i; +-- +ok +== +CREATE TABLE wide AS + SELECT 'common_prefix' || lpad(CASE WHEN i < 60000 THEN i ELSE ((i - 60000) % 5000) * 8 + (i - 60000) // 5000 END::VARCHAR, 6, '0') AS s, i + FROM range(100000) t(i); +-- +ok +== +CREATE TABLE fixed AS + SELECT CASE WHEN i < 60000 THEN 4611686018427387904 ELSE 0 END::BIGINT AS c, + CASE WHEN i < 60000 THEN i ELSE ((i - 60000) % 5000) * 8 + (i - 60000) // 5000 END::BIGINT AS k, i + FROM range(100000) t(i); +-- +ok +== +SELECT s, i FROM wide ORDER BY s, i; +-- +ok +== +SELECT s, i FROM wide ORDER BY s DESC, i DESC; +-- +ok +== +SELECT c, k, i FROM fixed ORDER BY c, k, i; +-- +ok +== +SELECT c, k, i FROM fixed ORDER BY c DESC, k DESC, i DESC; +-- +ok +== diff --git a/parser/testdata/corpus/sql/order/order_overflow.test b/parser/testdata/corpus/sql/order/order_overflow.test index 395dede..8b9d4fb 100644 --- a/parser/testdata/corpus/sql/order/order_overflow.test +++ b/parser/testdata/corpus/sql/order/order_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/order/order_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42 ORDER BY -9223372036854775808; diff --git a/parser/testdata/corpus/sql/order/test_limit.test b/parser/testdata/corpus/sql/order/test_limit.test index 11428ce..1592fea 100644 --- a/parser/testdata/corpus/sql/order/test_limit.test +++ b/parser/testdata/corpus/sql/order/test_limit.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (12, 21), (13, 22) @@ -11,6 +11,14 @@ SELECT a FROM test LIMIT 1 -- ok == +SELECT * FROM range(10) LIMIT 20 +-- +ok +== +EXPLAIN SELECT * FROM range(10) LIMIT 20 +-- +ok +== SELECT a FROM test LIMIT 1.25 -- ok diff --git a/parser/testdata/corpus/sql/order/test_limit_cte.test b/parser/testdata/corpus/sql/order/test_limit_cte.test index f847f28..3ec9e0b 100644 --- a/parser/testdata/corpus/sql/order/test_limit_cte.test +++ b/parser/testdata/corpus/sql/order/test_limit_cte.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_limit_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte AS (SELECT 3) SELECT * FROM range(10000000) LIMIT (SELECT * FROM cte) diff --git a/parser/testdata/corpus/sql/order/test_limit_nested_types.test b/parser/testdata/corpus/sql/order/test_limit_nested_types.test new file mode 100644 index 0000000..963f89e --- /dev/null +++ b/parser/testdata/corpus/sql/order/test_limit_nested_types.test @@ -0,0 +1,45 @@ +# source: test/sql/order/test_limit_nested_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT [1] LIMIT (SELECT 5); +-- +ok +== +SELECT map {1:2} LIMIT (SELECT 5); +-- +ok +== +SELECT {'a': 1} OFFSET (SELECT 0); +-- +ok +== +SELECT {'a': 1} LIMIT 1 + random()::INT; +-- +ok +== +SELECT [1,2]::INT[2] LIMIT (SELECT 5); +-- +ok +== +SELECT 1::VARIANT LIMIT (SELECT 5); +-- +ok +== +CREATE TABLE t AS SELECT [i] l, {'a': i} s, [i, i]::BIGINT[2] a, i::VARIANT v, i FROM range(5000) t(i); +-- +ok +== +SELECT * FROM t LIMIT (SELECT 3); +-- +ok +== +SELECT count(*) FROM (SELECT * FROM t LIMIT (SELECT 3000) OFFSET (SELECT 1000)); +-- +ok +== +SELECT l, s FROM t ORDER BY i DESC LIMIT (SELECT 2); +-- +ok +== diff --git a/parser/testdata/corpus/sql/order/test_limit_parameter.test b/parser/testdata/corpus/sql/order/test_limit_parameter.test index fd7f1cc..3c64b01 100644 --- a/parser/testdata/corpus/sql/order/test_limit_parameter.test +++ b/parser/testdata/corpus/sql/order/test_limit_parameter.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_limit_parameter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'Test' LIMIT ? diff --git a/parser/testdata/corpus/sql/order/test_limit_percent.test b/parser/testdata/corpus/sql/order/test_limit_percent.test index 1c2c860..66265e7 100644 --- a/parser/testdata/corpus/sql/order/test_limit_percent.test +++ b/parser/testdata/corpus/sql/order/test_limit_percent.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_limit_percent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a FROM test LIMIT 20 % diff --git a/parser/testdata/corpus/sql/order/test_nulls_first.test b/parser/testdata/corpus/sql/order/test_nulls_first.test index 6b2e7e4..d729163 100644 --- a/parser/testdata/corpus/sql/order/test_nulls_first.test +++ b/parser/testdata/corpus/sql/order/test_nulls_first.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_nulls_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1), (NULL) diff --git a/parser/testdata/corpus/sql/order/test_order_by.test b/parser/testdata/corpus/sql/order/test_order_by.test index 09d674a..628df1f 100644 --- a/parser/testdata/corpus/sql/order/test_order_by.test +++ b/parser/testdata/corpus/sql/order/test_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (12, 21), (13, 22); diff --git a/parser/testdata/corpus/sql/order/test_order_by_exceptions.test b/parser/testdata/corpus/sql/order/test_order_by_exceptions.test index 48917ca..b5c3d41 100644 --- a/parser/testdata/corpus/sql/order/test_order_by_exceptions.test +++ b/parser/testdata/corpus/sql/order/test_order_by_exceptions.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_by_exceptions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a FROM test ORDER BY 2 diff --git a/parser/testdata/corpus/sql/order/test_order_by_non_ordinal_literal.test b/parser/testdata/corpus/sql/order/test_order_by_non_ordinal_literal.test index 7afb76f..7487f3f 100644 --- a/parser/testdata/corpus/sql/order/test_order_by_non_ordinal_literal.test +++ b/parser/testdata/corpus/sql/order/test_order_by_non_ordinal_literal.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_by_non_ordinal_literal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/order/test_order_large.test b/parser/testdata/corpus/sql/order/test_order_large.test index 632dbb3..6b1c047 100644 --- a/parser/testdata/corpus/sql/order/test_order_large.test +++ b/parser/testdata/corpus/sql/order/test_order_large.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_large.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT a FROM range(10000, 0, -1) t1(a) diff --git a/parser/testdata/corpus/sql/order/test_order_pragma.test b/parser/testdata/corpus/sql/order/test_order_pragma.test index e2d6f7a..9ec437c 100644 --- a/parser/testdata/corpus/sql/order/test_order_pragma.test +++ b/parser/testdata/corpus/sql/order/test_order_pragma.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_pragma.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a FROM test ORDER BY a diff --git a/parser/testdata/corpus/sql/order/test_order_range_mapping.test b/parser/testdata/corpus/sql/order/test_order_range_mapping.test index 5ab5bee..ada5339 100644 --- a/parser/testdata/corpus/sql/order/test_order_range_mapping.test +++ b/parser/testdata/corpus/sql/order/test_order_range_mapping.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_range_mapping.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test (i {type}) diff --git a/parser/testdata/corpus/sql/order/test_order_unnest.test b/parser/testdata/corpus/sql/order/test_order_unnest.test index e3d8225..4b09f4e 100644 --- a/parser/testdata/corpus/sql/order/test_order_unnest.test +++ b/parser/testdata/corpus/sql/order/test_order_unnest.test @@ -1,6 +1,6 @@ # source: test/sql/order/test_order_unnest.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_structs AS SELECT diff --git a/parser/testdata/corpus/sql/order/top_n_issue_21623.test b/parser/testdata/corpus/sql/order/top_n_issue_21623.test index 8952a6d..444f6f3 100644 --- a/parser/testdata/corpus/sql/order/top_n_issue_21623.test +++ b/parser/testdata/corpus/sql/order/top_n_issue_21623.test @@ -1,6 +1,6 @@ # source: test/sql/order/top_n_issue_21623.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t3(c VARCHAR); diff --git a/parser/testdata/corpus/sql/order/top_n_limit_zero.test b/parser/testdata/corpus/sql/order/top_n_limit_zero.test new file mode 100644 index 0000000..2f20958 --- /dev/null +++ b/parser/testdata/corpus/sql/order/top_n_limit_zero.test @@ -0,0 +1,45 @@ +# source: test/sql/order/top_n_limit_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET disabled_optimizers='filter_pushdown,join_order'; +-- +ok +== +CREATE TABLE src(vp_rowid BIGINT PRIMARY KEY, c0 BOOLEAN, c1 BOOLEAN, c2 BIGINT); +-- +ok +== +INSERT INTO src VALUES (1, TRUE, NULL, NULL), (2, TRUE, FALSE, 42); +-- +ok +== +CREATE TABLE l AS SELECT vp_rowid, c2 FROM src; +-- +ok +== +CREATE TABLE r AS SELECT vp_rowid, c0, c1 FROM src; +-- +ok +== +SELECT c2 FROM src ORDER BY vp_rowid LIMIT 0 +-- +ok +== +SELECT c2 FROM src ORDER BY vp_rowid LIMIT 0 OFFSET 1 +-- +ok +== +SELECT sub.c2 +FROM ( + SELECT l.vp_rowid, r.c0, r.c1, l.c2 + FROM l + JOIN r ON l.vp_rowid = r.vp_rowid + WHERE NOT EXISTS (SELECT 1 FROM r rx WHERE rx.vp_rowid = l.vp_rowid AND rx.vp_rowid <> l.vp_rowid) +) sub +ORDER BY sub.vp_rowid +LIMIT 0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/order/top_n_nulls.test b/parser/testdata/corpus/sql/order/top_n_nulls.test index 411349f..9fa19d0 100644 --- a/parser/testdata/corpus/sql/order/top_n_nulls.test +++ b/parser/testdata/corpus/sql/order/top_n_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/order/top_n_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE orders_small AS SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/orders_small_parquet.test'); diff --git a/parser/testdata/corpus/sql/ordinality/ordinality_constant.test b/parser/testdata/corpus/sql/ordinality/ordinality_constant.test index 1d7eeb8..4219765 100644 --- a/parser/testdata/corpus/sql/ordinality/ordinality_constant.test +++ b/parser/testdata/corpus/sql/ordinality/ordinality_constant.test @@ -1,6 +1,6 @@ # source: test/sql/ordinality/ordinality_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM range(1) WITH ORDINALITY AS _(ordinality); diff --git a/parser/testdata/corpus/sql/ordinality/ordinality_inout.test b/parser/testdata/corpus/sql/ordinality/ordinality_inout.test index 2be8c4c..dd12d17 100644 --- a/parser/testdata/corpus/sql/ordinality/ordinality_inout.test +++ b/parser/testdata/corpus/sql/ordinality/ordinality_inout.test @@ -1,6 +1,6 @@ # source: test/sql/ordinality/ordinality_inout.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a int); diff --git a/parser/testdata/corpus/sql/overflow/bigint_overflow.test b/parser/testdata/corpus/sql/overflow/bigint_overflow.test index 27bb725..0581d72 100644 --- a/parser/testdata/corpus/sql/overflow/bigint_overflow.test +++ b/parser/testdata/corpus/sql/overflow/bigint_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/bigint_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 251658240::BIGINT * 251658240::BIGINT diff --git a/parser/testdata/corpus/sql/overflow/double_float_overflow.test b/parser/testdata/corpus/sql/overflow/double_float_overflow.test index 6aa8573..649a6a2 100644 --- a/parser/testdata/corpus/sql/overflow/double_float_overflow.test +++ b/parser/testdata/corpus/sql/overflow/double_float_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/double_float_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1e308::DOUBLE + 1e308::DOUBLE; diff --git a/parser/testdata/corpus/sql/overflow/expression_tree_depth.test b/parser/testdata/corpus/sql/overflow/expression_tree_depth.test index 6ea10c5..3a04a3d 100644 --- a/parser/testdata/corpus/sql/overflow/expression_tree_depth.test +++ b/parser/testdata/corpus/sql/overflow/expression_tree_depth.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/expression_tree_depth.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(x INTEGER) @@ -15,3 +15,75 @@ SELECT x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x -- error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. == +CREATE TABLE deep_t(x INTEGER) +-- +ok +== +SET max_expression_depth=1000 +-- +ok +== +SET max_expression_depth=100 +-- +ok +== +CREATE TABLE idx_t(x INTEGER) +-- +ok +== +CREATE VIEW dv AS SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +CREATE TABLE dctas AS SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) AS a +-- +ok +== +CREATE MACRO dm() AS abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +CREATE MACRO dtm() AS TABLE SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) AS a +-- +ok +== +CREATE INDEX di ON idx_t(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(x))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT 1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +INSERT INTO idx_t SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +INSERT INTO idx_t VALUES (abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +UPDATE idx_t SET x = abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(x)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +DELETE FROM idx_t WHERE abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(x)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) > 0 +-- +ok +== +EXPLAIN SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +PREPARE p AS SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== +COPY (SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) TO '__TEST_DIR__/depth.csv' +-- +ok +== +SET VARIABLE v = abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== diff --git a/parser/testdata/corpus/sql/overflow/expression_tree_depth.test.metadata.json b/parser/testdata/corpus/sql/overflow/expression_tree_depth.test.metadata.json deleted file mode 100644 index 1528a5c..0000000 --- a/parser/testdata/corpus/sql/overflow/expression_tree_depth.test.metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "todo": { - "700a2a3f3ebdd6f9": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" - } -} diff --git a/parser/testdata/corpus/sql/overflow/integer_overflow.test b/parser/testdata/corpus/sql/overflow/integer_overflow.test index 59ba947..cbb80e2 100644 --- a/parser/testdata/corpus/sql/overflow/integer_overflow.test +++ b/parser/testdata/corpus/sql/overflow/integer_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/integer_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 100::TINYINT + 1::TINYINT diff --git a/parser/testdata/corpus/sql/overflow/table_overflow.test b/parser/testdata/corpus/sql/overflow/table_overflow.test index b3f7722..aba10f8 100644 --- a/parser/testdata/corpus/sql/overflow/table_overflow.test +++ b/parser/testdata/corpus/sql/overflow/table_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/table_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tinyints(i TINYINT); diff --git a/parser/testdata/corpus/sql/overflow/test_numeric_overflow.test b/parser/testdata/corpus/sql/overflow/test_numeric_overflow.test index 5f57736..302a4ed 100644 --- a/parser/testdata/corpus/sql/overflow/test_numeric_overflow.test +++ b/parser/testdata/corpus/sql/overflow/test_numeric_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/test_numeric_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1e1000 diff --git a/parser/testdata/corpus/sql/overflow/test_overflow.test b/parser/testdata/corpus/sql/overflow/test_overflow.test index df46163..e2b1300 100644 --- a/parser/testdata/corpus/sql/overflow/test_overflow.test +++ b/parser/testdata/corpus/sql/overflow/test_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/overflow/test_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (-1099511627776, 3) diff --git a/parser/testdata/corpus/sql/parallelism/async_task_schedule_pool.test b/parser/testdata/corpus/sql/parallelism/async_task_schedule_pool.test index 1b113da..20e62bb 100644 --- a/parser/testdata/corpus/sql/parallelism/async_task_schedule_pool.test +++ b/parser/testdata/corpus/sql/parallelism/async_task_schedule_pool.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/async_task_schedule_pool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_physical_table_scan_execution_strategy=DEFAULT diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_appends.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_appends.test index cc4d716..9649231 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_appends.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_appends.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_appends.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT * FROM range(100); diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_checkpoint_insert.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_checkpoint_insert.test index 21a5526..1bde753 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_checkpoint_insert.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_checkpoint_insert.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_checkpoint_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/bla_{j}.db' AS db{j}; diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_force_checkpoint.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_force_checkpoint.test index 951468b..2b75186 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_force_checkpoint.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_force_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_force_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE integers(i INTEGER) diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_index_scans_while_appending.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_index_scans_while_appending.test index cf06c7a..db28f55 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_index_scans_while_appending.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_index_scans_while_appending.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_index_scans_while_appending.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE i={i} * ({threadid} * 300); diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_altering.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_altering.test index ac4972f..5c8f9c6 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_altering.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_altering.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_reads_while_altering.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE integers ADD COLUMN newcol_{i} INTEGER diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_renaming.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_renaming.test index 7639fc8..61589fb 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_renaming.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_reads_while_renaming.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_reads_while_renaming.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE integers RENAME TO integers_{i} diff --git a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_set_async_threads_read_ahead.test b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_set_async_threads_read_ahead.test index 52a2e4e..9222247 100644 --- a/parser/testdata/corpus/sql/parallelism/interquery/concurrent_set_async_threads_read_ahead.test +++ b/parser/testdata/corpus/sql/parallelism/interquery/concurrent_set_async_threads_read_ahead.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/interquery/concurrent_set_async_threads_read_ahead.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_physical_table_scan_execution_strategy='SYNCHRONOUS' diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/depth_first_evaluation_union_and_join.test b/parser/testdata/corpus/sql/parallelism/intraquery/depth_first_evaluation_union_and_join.test index 7b33696..d32db25 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/depth_first_evaluation_union_and_join.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/depth_first_evaluation_union_and_join.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/depth_first_evaluation_union_and_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ss_quantity quantity, diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/error_in_pipeline.test b/parser/testdata/corpus/sql/parallelism/intraquery/error_in_pipeline.test index 7abaee2..ba086d6 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/error_in_pipeline.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/error_in_pipeline.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/error_in_pipeline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA threads=16 diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/parallel_sample.test b/parser/testdata/corpus/sql/parallelism/intraquery/parallel_sample.test index 3b1f4b6..9e7eede 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/parallel_sample.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/parallel_sample.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/parallel_sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(50000) tbl(i) diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/test_parallel_nested_aggregates.test b/parser/testdata/corpus/sql/parallelism/intraquery/test_parallel_nested_aggregates.test index 85c68d0..9109f58 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/test_parallel_nested_aggregates.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/test_parallel_nested_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/test_parallel_nested_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t as select range a, range%10 b from range(100000); diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/test_persistent_parallelism.test b/parser/testdata/corpus/sql/parallelism/intraquery/test_persistent_parallelism.test index 90b0b2a..46d4eea 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/test_persistent_parallelism.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/test_persistent_parallelism.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/test_persistent_parallelism.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(0, 5000) tbl(i) @@ -11,6 +11,14 @@ SELECT MIN(i), MAX(i) FROM integers -- ok == +CREATE TABLE large_integers AS SELECT * FROM range(1000000) tbl(i) +-- +ok +== +SELECT COUNT(*), MIN(i), MAX(i) FROM large_integers +-- +ok +== INSERT INTO integers SELECT * FROM range(5000, 10000) -- ok diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/test_simple_parallelism.test b/parser/testdata/corpus/sql/parallelism/intraquery/test_simple_parallelism.test index 48df3d7..161a4ef 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/test_simple_parallelism.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/test_simple_parallelism.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/test_simple_parallelism.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(i) FROM integers UNION ALL SELECT AVG(i) FROM integers UNION ALL SELECT MIN(i) FROM integers UNION ALL SELECT MAX(i) FROM integers; diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/test_transaction_local_parallelism.test b/parser/testdata/corpus/sql/parallelism/intraquery/test_transaction_local_parallelism.test new file mode 100644 index 0000000..5b255fd --- /dev/null +++ b/parser/testdata/corpus/sql/parallelism/intraquery/test_transaction_local_parallelism.test @@ -0,0 +1,69 @@ +# source: test/sql/parallelism/intraquery/test_transaction_local_parallelism.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA {parallelism_pragma} +-- +error: Parser Error: syntax error at or near "{" +== +CREATE TABLE committed AS SELECT range AS i FROM range(1000) +-- +ok +== +CREATE TABLE t AS SELECT range AS i FROM range(1000000) +-- +ok +== +SELECT count(*), sum(i), max(i) FROM t +-- +ok +== +CREATE TABLE t2 AS SELECT * FROM t +-- +ok +== +SELECT i FROM t2 LIMIT 3 OFFSET 777777 +-- +ok +== +SELECT count(*) FROM (SELECT i, rowid - min(rowid) OVER () AS pos FROM t2) WHERE i <> pos +-- +ok +== +INSERT INTO t SELECT * FROM t +-- +ok +== +UPDATE t SET i = i + 1 WHERE i % 3 = 0 +-- +ok +== +INSERT INTO committed SELECT range FROM range(1000, 1000000) +-- +ok +== +SELECT count(*), sum(i) FROM committed +-- +ok +== +SELECT count(*) FROM range(1000000) r(i) WHERE i IN (SELECT i FROM t2) +-- +ok +== +DROP TABLE t +-- +ok +== +DROP TABLE committed +-- +ok +== +SET storage_block_prefetch='always_prefetch' +-- +ok +== +INSERT INTO t SELECT * FROM t LIMIT 300000 +-- +ok +== diff --git a/parser/testdata/corpus/sql/parallelism/intraquery/test_verify_parallelism.test b/parser/testdata/corpus/sql/parallelism/intraquery/test_verify_parallelism.test index 43976da..f780224 100644 --- a/parser/testdata/corpus/sql/parallelism/intraquery/test_verify_parallelism.test +++ b/parser/testdata/corpus/sql/parallelism/intraquery/test_verify_parallelism.test @@ -1,6 +1,6 @@ # source: test/sql/parallelism/intraquery/test_verify_parallelism.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MIN(i), MAX(i) FROM integers WHERE i>2000 diff --git a/parser/testdata/corpus/sql/parser/adjacent_string_literal.test b/parser/testdata/corpus/sql/parser/adjacent_string_literal.test new file mode 100644 index 0000000..9b20237 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/adjacent_string_literal.test @@ -0,0 +1,84 @@ +# source: test/sql/parser/adjacent_string_literal.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 'foo' +'bar'; +-- +ok +== +SELECT 'one' -- comment +'two'; +-- +ok +== +SELECT 'one' /* comment +*/ 'two'; +-- +error: Parser Error: syntax error at or near "'two'" +== +SELECT 'one' /* comment */ +'two'; +-- +error: Parser Error: syntax error at or near "'two'" +== +SELECT 'one' +'two' +'three'; +-- +ok +== +SELECT DATE '2020-' +'01-01'::VARCHAR; +-- +ok +== +SELECT N'national' +' string'; +-- +ok +== +SELECT E'escape\n' +'string' = 'escape' || chr(10) || 'string'; +-- +ok +== +SELECT X'48656C6C6F' +'20576F726C64'::VARCHAR; +-- +ok +== +SELECT B'1010' +'0101'; +-- +ok +== +SELECT 'same-line' 'whitespace'; +-- +error: Parser Error: syntax error at or near "'whitespace'" +== +SELECT 'same-line' /* comment */ 'block comment'; +-- +error: Parser Error: syntax error at or near "'block comment'" +== +SELECT $tag$a +$tag$'b'; +-- +error: Parser Error: syntax error at or near "'b'" +== +SELECT $tag$a$tag$ +'b'; +-- +error: Parser Error: syntax error at or near "'b'" +== +SELECT 'a' +$tag$b$tag$; +-- +error: Parser Error: syntax error at or near "$tag$b$tag$" +== +SELECT $tag$a$tag$ +$other$b$other$; +-- +error: Parser Error: syntax error at or near "$other$b$other$" +== diff --git a/parser/testdata/corpus/sql/parser/backtick_identifiers.test b/parser/testdata/corpus/sql/parser/backtick_identifiers.test new file mode 100644 index 0000000..415fc91 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/backtick_identifiers.test @@ -0,0 +1,202 @@ +# source: test/sql/parser/backtick_identifiers.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT `x` FROM (SELECT 1 x) t; +-- +ok +== +SELECT 42 AS `my alias`; +-- +ok +== +SELECT `my alias` FROM (SELECT 42 AS `my alias`); +-- +ok +== +CREATE TABLE `my table`(`a col` INTEGER, `b col` VARCHAR); +-- +ok +== +INSERT INTO `my table` VALUES (1, 'one'), (2, 'two'); +-- +ok +== +SELECT `t`.`a col`, `t`.`b col` FROM `my table` `t` ORDER BY `t`.`a col`; +-- +ok +== +SELECT `t`.`a col`, `t`.`b col` FROM `my table` AS `t` ORDER BY ALL; +-- +ok +== +SELECT "a col", `a col` FROM "my table" ORDER BY `a col`; +-- +ok +== +CREATE SCHEMA `my schema`; +-- +ok +== +CREATE TABLE `my schema`.`tbl`(`i` INTEGER); +-- +ok +== +INSERT INTO `my schema`.`tbl` VALUES (7); +-- +ok +== +SELECT `i` FROM `my schema`.`tbl`; +-- +ok +== +SELECT i FROM "my schema".tbl; +-- +ok +== +ALTER TABLE `my table` ADD COLUMN `c col` INTEGER DEFAULT 3; +-- +ok +== +SELECT `c col` FROM `my table` LIMIT 1; +-- +ok +== +CREATE VIEW `my view` AS SELECT `a col` FROM `my table`; +-- +ok +== +SELECT COUNT(*) FROM `my view`; +-- +ok +== +UPDATE `my table` SET `b col` = 'ONE' WHERE `a col` = 1; +-- +ok +== +SELECT `b col` FROM `my table` WHERE `a col` = 1; +-- +ok +== +DELETE FROM `my table` WHERE `a col` = 2; +-- +ok +== +SELECT COUNT(*) FROM `my table`; +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT 1 AS `a``b`); +-- +ok +== +SELECT "a`b" FROM (SELECT 1 AS `a``b`); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT 1 AS `a"b`); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT 1 AS "a`b"); +-- +ok +== +SELECT `a"b` FROM (SELECT 1 AS "a""b"); +-- +ok +== +SELECT '`' || 'a' || '`'; +-- +ok +== +SELECT 'it''s `quoted`'; +-- +ok +== +SELECT $$`x`$$; +-- +ok +== +SELECT $tag$a ` b$tag$; +-- +ok +== +SELECT 1 -- `not an identifier +; +-- +ok +== +SELECT /* `also` not */ 2; +-- +ok +== +SELECT `b col` || `b col` FROM `my table`; +-- +ok +== +SELECT `a col`! FROM `my table`; +-- +ok +== +SELECT -`a col` FROM `my table`; +-- +ok +== +SELECT `a col`+`c col`*2 FROM `my table`; +-- +ok +== +SELECT `select` FROM (SELECT 5 AS `select`); +-- +ok +== +SELECT `from`.`select` FROM (SELECT 5 AS `select`) `from`; +-- +ok +== +SELECT `upper`('abc'); +-- +ok +== +SELECT ``; +-- +error: Parser Error: zero-length delimited identifier +== +SELECT `x FROM (SELECT 1 x); +-- +error: Parser Error: unterminated quoted identifier +== +SELECT 1 AS `a``; +-- +error: Parser Error: unterminated quoted identifier +== +SELECT `x" FROM (SELECT 1 x); +-- +error: Parser Error: unterminated quoted identifier +== +SET preserve_identifier_case TO 'lowercase'; +-- +ok +== +CREATE TABLE `MixedCase`(`ColA` INTEGER, ColB INTEGER); +-- +ok +== +SELECT table_name, column_name FROM duckdb_columns() WHERE table_name = 'MixedCase' ORDER BY column_name; +-- +ok +== +SELECT `ColA`, ColB FROM `MixedCase` LIMIT 0; +-- +ok +== +RESET preserve_identifier_case; +-- +ok +== +SELECT sql FROM duckdb_views() WHERE view_name = 'my view'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/bare_column_alias.test b/parser/testdata/corpus/sql/parser/bare_column_alias.test new file mode 100644 index 0000000..ca4ff25 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/bare_column_alias.test @@ -0,0 +1,193 @@ +# source: test/sql/parser/bare_column_alias.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO t VALUES (1, 2), (3, 4); +-- +ok +== +SELECT a foo, b type, a name, b value FROM t ORDER BY a; +-- +ok +== +SELECT a first, b last FROM t ORDER BY a; +-- +ok +== +SELECT a nulls, b rows, a range FROM t ORDER BY a; +-- +ok +== +SELECT typeof(a + b) type FROM t LIMIT 1; +-- +ok +== +SELECT a NAME, b Type FROM t ORDER BY a; +-- +ok +== +INSERT INTO t VALUES (5, 6) RETURNING a name, b value; +-- +ok +== +INSERT INTO t VALUES (7, 8) RETURNING a day; +-- +error: Parser Error: syntax error at or near "day" +== +DELETE FROM t WHERE a = 5; +-- +ok +== +UNPIVOT (SELECT 1 AS x, 2 AS y) ON x key, y INTO NAME col VALUE val; +-- +ok +== +UNPIVOT (SELECT 1 AS x, 2 AS y) ON x day, y INTO NAME col VALUE val; +-- +error: Parser Error: syntax error at or near "day" +== +CREATE TABLE p(k VARCHAR, a INTEGER); +-- +ok +== +INSERT INTO p VALUES ('x', 1), ('y', 2); +-- +ok +== +PIVOT p ON k USING sum(a) total; +-- +ok +== +PIVOT p ON k USING sum(a) filter; +-- +error: Parser Error: syntax error at or near ";" +== +WITH c AS (SELECT a name FROM t) SELECT name FROM c ORDER BY name LIMIT 1; +-- +ok +== +SELECT (SELECT 1 name) sub; +-- +ok +== +CREATE MACRO m() AS TABLE SELECT 1 name, 2 type; +-- +ok +== +SELECT name, type FROM m(); +-- +ok +== +SELECT [1, 2] list, {'a': 1} struct_val, MAP {1: 2} map_val; +-- +ok +== +SELECT sum(a) OVER w total FROM t WINDOW w AS () LIMIT 1; +-- +ok +== +SELECT DATE '2020-01-01' + 1 month; +-- +error: Parser Error: syntax error at or near "month" +== +SELECT DATE '2020-01-01' - 2 weeks; +-- +error: Parser Error: syntax error at or near "weeks" +== +SELECT DATE '2020-01-01' + 1 year, 5; +-- +error: Parser Error: syntax error at or near "year" +== +SELECT INTERVAL '1' day hour; +-- +error: Parser Error: syntax error at or near "hour" +== +SELECT count(*) filter FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT sum(a) over FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT first(a) ignore FROM t; +-- +error: Parser Error: syntax error at or near "ignore" +== +SELECT first(a) respect FROM t; +-- +error: Parser Error: syntax error at or near "respect" +== +SELECT string_agg(a, ',') within FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT 'a' LIKE 'b' escape FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT '2020-01-01'::TIMESTAMP without FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT 1::CHARACTER VARYING varying; +-- +error: Parser Error: syntax error at or near "varying" +== +SELECT 1::INTEGER precision; +-- +error: Parser Error: syntax error at or near "precision" +== +SELECT * exclude FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT * replace FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT * rename FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT a select FROM t; +-- +error: Parser Error: syntax error at or near "select" +== +SELECT a at FROM t; +-- +error: Parser Error: syntax error at or near "FROM" +== +SELECT a AS month, b AS filter, a "over", b `without` FROM t ORDER BY a; +-- +ok +== +SELECT (DATE '2020-01-01' + INTERVAL 1 month)::DATE; +-- +ok +== +SELECT INTERVAL '1' day; +-- +ok +== +SELECT 'a%' LIKE 'a\%' ESCAPE '\'; +-- +ok +== +SELECT count(*) FILTER (WHERE a > 1) FROM t; +-- +ok +== +SELECT sum(a) OVER () FROM t LIMIT 1; +-- +ok +== +SELECT '2020-01-01'::TIMESTAMP WITHOUT TIME ZONE; +-- +ok +== +SELECT * EXCLUDE (b) FROM t ORDER BY a; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/columns_aliases.test b/parser/testdata/corpus/sql/parser/columns_aliases.test index 3f14b76..dc99bf4 100644 --- a/parser/testdata/corpus/sql/parser/columns_aliases.test +++ b/parser/testdata/corpus/sql/parser/columns_aliases.test @@ -1,6 +1,6 @@ # source: test/sql/parser/columns_aliases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT 42 i, 84 j UNION ALL SELECT 13, 14 diff --git a/parser/testdata/corpus/sql/parser/columns_issue9867.test b/parser/testdata/corpus/sql/parser/columns_issue9867.test index defb2a3..fe6d0cc 100644 --- a/parser/testdata/corpus/sql/parser/columns_issue9867.test +++ b/parser/testdata/corpus/sql/parser/columns_issue9867.test @@ -1,6 +1,6 @@ # source: test/sql/parser/columns_issue9867.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE df1 AS diff --git a/parser/testdata/corpus/sql/parser/create_macro_tostring.test b/parser/testdata/corpus/sql/parser/create_macro_tostring.test new file mode 100644 index 0000000..cb4c344 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/create_macro_tostring.test @@ -0,0 +1,17 @@ +# source: test/sql/parser/create_macro_tostring.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_statement='{mode}' +-- +ok +== +CREATE OR REPLACE MACRO "overloaded macro"("a b") AS "a b", ("a b", "c d") AS "a b" + "c d" +-- +ok +== +SELECT "overloaded macro"(2), "overloaded macro"(2, 3); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/cte_printing.test b/parser/testdata/corpus/sql/parser/cte_printing.test new file mode 100644 index 0000000..27167a2 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/cte_printing.test @@ -0,0 +1,25 @@ +# source: test/sql/parser/cte_printing.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE VIEW printable_cte AS WITH x AS (SELECT 1 AS i) SELECT i FROM x; +-- +ok +== +CREATE VIEW printable_recursive_cte AS WITH RECURSIVE r(i) AS (SELECT 1 UNION ALL SELECT i + 1 FROM r WHERE i < 3) SELECT i FROM r; +-- +ok +== +SELECT contains(sql, ') SELECT ') FROM duckdb_views() WHERE view_name = 'printable_cte'; +-- +ok +== +SELECT contains(sql, ') SELECT '), contains(sql, ' UNION ALL ') FROM duckdb_views() WHERE view_name = 'printable_recursive_cte'; +-- +ok +== +SELECT * FROM printable_recursive_cte ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/custom_prefix_operator.test b/parser/testdata/corpus/sql/parser/custom_prefix_operator.test new file mode 100644 index 0000000..153bab4 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/custom_prefix_operator.test @@ -0,0 +1,17 @@ +# source: test/sql/parser/custom_prefix_operator.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT @5; +-- +ok +== +SELECT @(-5); +-- +ok +== +SELECT @ -5 + -6; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/deeply_nested_types.test b/parser/testdata/corpus/sql/parser/deeply_nested_types.test new file mode 100644 index 0000000..826777b --- /dev/null +++ b/parser/testdata/corpus/sql/parser/deeply_nested_types.test @@ -0,0 +1,45 @@ +# source: test/sql/parser/deeply_nested_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_expression_depth=1000; +-- +ok +== +FROM query('SELECT (NULL::' || repeat('MAP(INTEGER, ', {depth}) || 'INTEGER' || repeat(')', {depth}) || ') IS NULL'); +-- +error: Parser Error: syntax error at or near "}" +== +FROM query('SELECT (NULL::' || repeat('STRUCT(a ', {depth}) || 'INTEGER' || repeat(')', {depth}) || ') IS NULL'); +-- +error: Parser Error: syntax error at or near "}" +== +FROM query('SELECT (NULL::' || repeat('UNION(u ', {depth}) || 'INTEGER' || repeat(')', {depth}) || ') IS NULL'); +-- +error: Parser Error: syntax error at or near "}" +== +FROM query('SELECT (NULL::' || repeat('TUPLE(', {depth}) || 'INTEGER' || repeat(')', {depth}) || ') IS NULL'); +-- +error: Parser Error: syntax error at or near "}" +== +FROM query('SELECT (NULL::' || repeat('MAP(INTEGER, STRUCT(a ', 100) || 'INTEGER[]' || repeat('))', 100) || ') IS NULL'); +-- +ok +== +FROM query('SELECT (NULL::' || repeat('MAP(INTEGER, STRUCT(a ', {depth}) || 'INTEGER[]' || repeat('))', {depth}) || ') IS NULL'); +-- +error: Parser Error: syntax error at or near "}" +== +SET max_expression_depth=100; +-- +ok +== +FROM query('SELECT (NULL::' || repeat('MAP(INTEGER, ', 200) || 'INTEGER' || repeat(')', 200) || ') IS NULL'); +-- +ok +== +SELECT typeof(NULL::MAP(INTEGER, STRUCT(a UNION(u TUPLE(INTEGER[], VARCHAR))))[]); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/digit_separators.test b/parser/testdata/corpus/sql/parser/digit_separators.test index 9d4bfb2..3edc160 100644 --- a/parser/testdata/corpus/sql/parser/digit_separators.test +++ b/parser/testdata/corpus/sql/parser/digit_separators.test @@ -1,6 +1,6 @@ # source: test/sql/parser/digit_separators.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1_2 diff --git a/parser/testdata/corpus/sql/parser/division_operator_precedence.test b/parser/testdata/corpus/sql/parser/division_operator_precedence.test index 8ccb9d8..7676b85 100644 --- a/parser/testdata/corpus/sql/parser/division_operator_precedence.test +++ b/parser/testdata/corpus/sql/parser/division_operator_precedence.test @@ -1,6 +1,6 @@ # source: test/sql/parser/division_operator_precedence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 6 * 1 / 2 diff --git a/parser/testdata/corpus/sql/parser/dollar_quotes_internal_issue2224.test b/parser/testdata/corpus/sql/parser/dollar_quotes_internal_issue2224.test index 2a842de..8805d8e 100644 --- a/parser/testdata/corpus/sql/parser/dollar_quotes_internal_issue2224.test +++ b/parser/testdata/corpus/sql/parser/dollar_quotes_internal_issue2224.test @@ -1,6 +1,6 @@ # source: test/sql/parser/dollar_quotes_internal_issue2224.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select $tag$ $tag$ = $tag$ $tag$; diff --git a/parser/testdata/corpus/sql/parser/drop_qualified_names.test b/parser/testdata/corpus/sql/parser/drop_qualified_names.test new file mode 100644 index 0000000..9f2e8d7 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/drop_qualified_names.test @@ -0,0 +1,53 @@ +# source: test/sql/parser/drop_qualified_names.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO s.tm() AS TABLE SELECT 1 AS x; +-- +ok +== +CREATE MACRO main.tm() AS TABLE SELECT 2 AS x; +-- +ok +== +DROP MACRO TABLE s.tm; +-- +ok +== +SELECT * FROM tm(); +-- +ok +== +CREATE MACRO db2.s2.tm() AS TABLE SELECT 3 AS x; +-- +ok +== +DROP MACRO TABLE db2.s2.tm; +-- +ok +== +DROP MACRO TABLE "main"."tm"; +-- +ok +== +SELECT count(*) FROM duckdb_functions() WHERE function_name = 'tm'; +-- +ok +== +DROP MACRO TABLE IF EXISTS nonexistent_db.nonexistent_schema.tm; +-- +ok +== +CREATE MACRO s.sm(a) AS a + 1; +-- +ok +== +DROP MACRO TABLE s.sm; +-- +ok +== +DROP MACRO TABLE s.tm1, s.tm2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/empty_quoted_identifier.test b/parser/testdata/corpus/sql/parser/empty_quoted_identifier.test index 570cca2..8dd62a4 100644 --- a/parser/testdata/corpus/sql/parser/empty_quoted_identifier.test +++ b/parser/testdata/corpus/sql/parser/empty_quoted_identifier.test @@ -1,6 +1,6 @@ # source: test/sql/parser/empty_quoted_identifier.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a.""; diff --git a/parser/testdata/corpus/sql/parser/expression_depth_limit.test b/parser/testdata/corpus/sql/parser/expression_depth_limit.test index 67e5e49..29ba993 100644 --- a/parser/testdata/corpus/sql/parser/expression_depth_limit.test +++ b/parser/testdata/corpus/sql/parser/expression_depth_limit.test @@ -1,6 +1,6 @@ # source: test/sql/parser/expression_depth_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (1+(1+(1+(1+(1+(1+(1+1))))))); diff --git a/parser/testdata/corpus/sql/parser/external_resource_roundtrip.test b/parser/testdata/corpus/sql/parser/external_resource_roundtrip.test index 0eda814..386f86d 100644 --- a/parser/testdata/corpus/sql/parser/external_resource_roundtrip.test +++ b/parser/testdata/corpus/sql/parser/external_resource_roundtrip.test @@ -1,12 +1,8 @@ # source: test/sql/parser/external_resource_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET debug_verify_statement='{mode}' --- -ok -== DESTROY EXTERNAL RESOURCE plain_name -- ok @@ -39,6 +35,10 @@ CREATE EXTERNAL RESOURCE 'aws:ec2:quack' AS "select" (REGION 'eu-west-1') -- ok == +CREATE EXTERNAL RESOURCE 'aws:ec2:quack' AS x (REGION NULL) +-- +ok +== CREATE EXTERNAL RESOURCE 'aws:ec2:quack' -- ok diff --git a/parser/testdata/corpus/sql/parser/fetch_first.test b/parser/testdata/corpus/sql/parser/fetch_first.test index 6aaac1a..744f031 100644 --- a/parser/testdata/corpus/sql/parser/fetch_first.test +++ b/parser/testdata/corpus/sql/parser/fetch_first.test @@ -1,6 +1,6 @@ # source: test/sql/parser/fetch_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(a INT); @@ -35,3 +35,31 @@ SELECT * FROM t ORDER BY a FETCH FIRST (1 + 1) ROWS ONLY -- ok == +SELECT * FROM t ORDER BY a FETCH FIRST ROW ONLY +-- +ok +== +SELECT * FROM t ORDER BY a FETCH FIRST ROWS ONLY +-- +ok +== +SELECT * FROM t ORDER BY a FETCH NEXT ROW ONLY +-- +ok +== +SELECT * FROM t ORDER BY a FETCH NEXT ROWS ONLY +-- +ok +== +SELECT * FROM t ORDER BY a OFFSET 1 ROW FETCH NEXT ROW ONLY +-- +ok +== +SELECT * FROM t ORDER BY a FETCH FIRST 2 ROWS ONLY OFFSET 1 ROW +-- +ok +== +SELECT * FROM t ORDER BY a FETCH NEXT ROW ONLY OFFSET 1 ROWS +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/from_first.test b/parser/testdata/corpus/sql/parser/from_first.test index b7771f1..91d1094 100644 --- a/parser/testdata/corpus/sql/parser/from_first.test +++ b/parser/testdata/corpus/sql/parser/from_first.test @@ -1,6 +1,6 @@ # source: test/sql/parser/from_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM integers SELECT i + 1 diff --git a/parser/testdata/corpus/sql/parser/function_chaining.test b/parser/testdata/corpus/sql/parser/function_chaining.test index 913b0cf..5d54fbe 100644 --- a/parser/testdata/corpus/sql/parser/function_chaining.test +++ b/parser/testdata/corpus/sql/parser/function_chaining.test @@ -1,6 +1,6 @@ # source: test/sql/parser/function_chaining.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO varchars VALUES ('Hello'), ('World') @@ -71,3 +71,13 @@ EXECUTE v1('Hello World') -- ok == +SELECT strftime(ci.purchasedate.nullif('1899-12-30T00:00:00'), '%Y-%m-%d') +FROM (VALUES (TIMESTAMP '2026-01-01')) AS ci("PurchaseDate") +-- +ok +== +SELECT strftime(ci.PURCHASEDATE.nullif('1899-12-30T00:00:00'), '%Y-%m-%d') +FROM (VALUES (TIMESTAMP '2026-01-01')) AS ci("PurchaseDate") +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/hex_string_literal.test b/parser/testdata/corpus/sql/parser/hex_string_literal.test index 7ebc004..c96f0e8 100644 --- a/parser/testdata/corpus/sql/parser/hex_string_literal.test +++ b/parser/testdata/corpus/sql/parser/hex_string_literal.test @@ -1,6 +1,6 @@ # source: test/sql/parser/hex_string_literal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT pg_typeof(X'FF'); diff --git a/parser/testdata/corpus/sql/parser/indirection.test b/parser/testdata/corpus/sql/parser/indirection.test index cb341a1..7f1bb24 100644 --- a/parser/testdata/corpus/sql/parser/indirection.test +++ b/parser/testdata/corpus/sql/parser/indirection.test @@ -1,6 +1,6 @@ # source: test/sql/parser/indirection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select case when true then {'a': 42} end.a; diff --git a/parser/testdata/corpus/sql/parser/invalid_utf8_parser_location.test b/parser/testdata/corpus/sql/parser/invalid_utf8_parser_location.test index 3bdf88a..e425b78 100644 --- a/parser/testdata/corpus/sql/parser/invalid_utf8_parser_location.test +++ b/parser/testdata/corpus/sql/parser/invalid_utf8_parser_location.test @@ -1,6 +1,6 @@ # source: test/sql/parser/invalid_utf8_parser_location.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/parser/invisible_spaces.test b/parser/testdata/corpus/sql/parser/invisible_spaces.test index 0db2fa7..7e1fc5e 100644 --- a/parser/testdata/corpus/sql/parser/invisible_spaces.test +++ b/parser/testdata/corpus/sql/parser/invisible_spaces.test @@ -1,6 +1,6 @@ # source: test/sql/parser/invisible_spaces.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT{unicode_space}42; @@ -30,7 +30,7 @@ error: Parser Error: syntax error at or near "{" == SELEC  -- -ok +error: Parser Error: syntax error at or near "SELEC" ==   -- @@ -38,5 +38,5 @@ ok == S -- -ok +error: Parser Error: syntax error at or near "S" == diff --git a/parser/testdata/corpus/sql/parser/is_not_null_cast.test b/parser/testdata/corpus/sql/parser/is_not_null_cast.test new file mode 100644 index 0000000..157d785 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/is_not_null_cast.test @@ -0,0 +1,53 @@ +# source: test/sql/parser/is_not_null_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 10 IS NOT NULL::VARCHAR; +-- +ok +== +SELECT 10 IS NULL::VARCHAR, typeof(10 IS NULL::VARCHAR); +-- +ok +== +SELECT 10 NOTNULL::VARCHAR, 10 ISNULL::VARCHAR; +-- +ok +== +SELECT true IS TRUE::VARCHAR, true IS NOT FALSE::VARCHAR, NULL IS UNKNOWN::VARCHAR; +-- +ok +== +SELECT NULL IS NULL::INT::VARCHAR; +-- +ok +== +SELECT 10 IS NOT NULL::INT + 1; +-- +ok +== +SELECT NOT 10 IS NOT NULL::VARCHAR; +-- +ok +== +SELECT 1 IN (1, 2)::VARCHAR, typeof(1 IN (1, 2)::VARCHAR); +-- +ok +== +SELECT 1 NOT IN (1, 2)::INT, 1 IN (1)::INT::VARCHAR::INT; +-- +ok +== +SELECT 1 IN (1)::INT IN (1), 1 IN (1) BETWEEN 0 AND 1; +-- +ok +== +SELECT 1 IN (SELECT 1)::INT; +-- +ok +== +SELECT 1 IN (1) IS NULL::INT; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/join_alias.test b/parser/testdata/corpus/sql/parser/join_alias.test index 463418a..318de14 100644 --- a/parser/testdata/corpus/sql/parser/join_alias.test +++ b/parser/testdata/corpus/sql/parser/join_alias.test @@ -1,6 +1,6 @@ # source: test/sql/parser/join_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select t.* diff --git a/parser/testdata/corpus/sql/parser/literal_round_trip.test b/parser/testdata/corpus/sql/parser/literal_round_trip.test new file mode 100644 index 0000000..14653d7 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/literal_round_trip.test @@ -0,0 +1,125 @@ +# source: test/sql/parser/literal_round_trip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1_000, 1e3, 1.50, -9223372036854775808, -170141183460469231731687303715884105728, X'FF', B'0101', E'a\x41b', $$a'b$$, N'x', 'it''s', DATE '2020-01-01', -(-5), 2 - -5, .5, 170141183460469231731687303715884105728, 123456789012345678901234567890123456789012345678901234567890, TRUE +-- +ok +== +SELECT typeof(1_000), typeof(1e3), typeof(1.50), typeof(-9223372036854775808), typeof(-170141183460469231731687303715884105728), typeof(X'FF'), typeof(B'0101'), typeof(.5), typeof(170141183460469231731687303715884105728), typeof(123456789012345678901234567890123456789012345678901234567890) +-- +ok +== +SELECT typeof(-1), typeof(- -1), -(-(-3)) +-- +ok +== +SELECT X'F' +-- +error: Parser Error: Hex string literal must have an even number of hex digits +== +SELECT B'012' +-- +error: Parser Error: Bit string literal contains a non-binary character '2' +== +CREATE VIEW v AS SELECT 1_000 a, 1e3 b, 1.50 c, X'FF' d, B'0101' e, 'it''s' f, DATE '2020-01-01' g, [1, 2, 3][:2] h, [1, 2, 3][2:] i, [1, 2, 3][:-1] j, TRUE k, NULL l +-- +ok +== +SELECT sql FROM duckdb_views() WHERE view_name = 'v' +-- +ok +== +CREATE MACRO m(a := 1_000, b := 'x') AS a || b +-- +ok +== +CREATE TABLE t(i INTEGER DEFAULT 1_000, s VARCHAR DEFAULT 'it''s', d DATE DEFAULT DATE '2020-01-01', f DOUBLE DEFAULT 1e3) +-- +ok +== +INSERT INTO t DEFAULT VALUES +-- +ok +== +SELECT * FROM v +-- +ok +== +SELECT typeof(a), typeof(b), typeof(c), typeof(d) FROM v +-- +ok +== +SELECT m(), m(b := 'y') +-- +ok +== +SELECT i FROM t GROUP BY 1 ORDER BY 1 +-- +ok +== +SELECT i FROM t ORDER BY 0 +-- +ok +== +SELECT i FROM t ORDER BY 'i' +-- +ok +== +SELECT #1 FROM (SELECT 42) +-- +ok +== +PREPARE p AS SELECT $1 + $2 +-- +ok +== +EXECUTE p(1, 2) +-- +ok +== +PREPARE q AS SELECT ?::INTEGER + ?::INTEGER +-- +ok +== +EXECUTE q(1, 2) +-- +ok +== +SELECT 'a' COLLATE NOCASE = 'A' +-- +ok +== +SELECT count(*) FROM range(100) USING SAMPLE 10 ROWS +-- +ok +== +SELECT count(*) <= 100 FROM range(100) USING SAMPLE 10% +-- +ok +== +SELECT [1, 2, 3, 4, 5][2:[]], [1, 2, 3, 4, 5][[]:2] +-- +ok +== +SELECT [1, 2, 3][[1]:2] +-- +ok +== +CREATE TABLE s(v STRUCT(a INTEGER, b VARCHAR) DEFAULT {'a': 1, 'b': 'x'}) +-- +ok +== +INSERT INTO s DEFAULT VALUES +-- +ok +== +ALTER TABLE s ADD COLUMN v.c INTEGER DEFAULT 7 +-- +ok +== +SELECT v FROM s ORDER BY ALL +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/nested_join_backtracking.test b/parser/testdata/corpus/sql/parser/nested_join_backtracking.test new file mode 100644 index 0000000..c94bad1 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/nested_join_backtracking.test @@ -0,0 +1,21 @@ +# source: test/sql/parser/nested_join_backtracking.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(e INTEGER); +-- +ok +== +SELECT * FROM (VALUES (1)) t1(a) LEFT JOIN (VALUES (1)) t2(b) JOIN (VALUES (1)) t3(c) ON t2.b = t3.c ON t1.a = t2.b +-- +ok +== +SELECT * FROM t LEFT JOIN t a0 LEFT JOIN t a1 LEFT JOIN t a2 LEFT JOIN t a3 LEFT JOIN t a4 LEFT JOIN t a5 LEFT JOIN t a6 LEFT JOIN t a7 LEFT JOIN t a8 LEFT JOIN t a9 LEFT JOIN t a10 LEFT JOIN t a11 LEFT JOIN t a12 LEFT JOIN t a13 LEFT JOIN t a14 LEFT JOIN t a15 LEFT JOIN t a16 LEFT JOIN t a17 LEFT JOIN t a18 LEFT JOIN t a19 LEFT JOIN t a20 LEFT JOIN t a21 LEFT JOIN t a22 LEFT JOIN t a23 LEFT JOIN t a24 LEFT JOIN t a25 LEFT JOIN t a26 LEFT JOIN t a27 LEFT JOIN t a28 LEFT JOIN t a29 LEFT JOIN t a30 LEFT JOIN t a31 LEFT JOIN t a32 LEFT JOIN t a33 LEFT JOIN t a34 LEFT JOIN t a35 LEFT JOIN t a36 LEFT JOIN t a37 LEFT JOIN t a38 LEFT JOIN t a39 LEFT JOIN t a40 LEFT JOIN t a41 LEFT JOIN t a42 LEFT JOIN t a43 LEFT JOIN t a44 LEFT JOIN t a45 LEFT JOIN t a46 LEFT JOIN t a47 LEFT JOIN t a48 LEFT JOIN t a49 LEFT JOIN t a50 LEFT JOIN t a51 LEFT JOIN t a52 LEFT JOIN t a53 LEFT JOIN t a54 LEFT JOIN t a55 LEFT JOIN t a56 LEFT JOIN t a57 LEFT JOIN t a58 LEFT JOIN t a59 ON e +-- +error: Parser Error: syntax error at or near "e" +== +SELECT * FROM t LEFT JOIN t a0 LEFT JOIN t a1 LEFT JOIN t a2 LEFT JOIN t a3 LEFT JOIN t a4 LEFT JOIN t a5 LEFT JOIN t a6 LEFT JOIN t a7 LEFT JOIN t a8 LEFT JOIN t a9 LEFT JOIN t a10 LEFT JOIN t a11 LEFT JOIN t a12 LEFT JOIN t a13 LEFT JOIN t a14 LEFT JOIN t a15 LEFT JOIN t a16 LEFT JOIN t a17 LEFT JOIN t a18 LEFT JOIN t a19 LEFT JOIN t a20 LEFT JOIN t a21 LEFT JOIN t a22 LEFT JOIN t a23 LEFT JOIN t a24 LEFT JOIN t a25 LEFT JOIN t a26 LEFT JOIN t a27 LEFT JOIN t a28 LEFT JOIN t a29 LEFT JOIN t a30 LEFT JOIN t a31 LEFT JOIN t a32 LEFT JOIN t a33 LEFT JOIN t a34 LEFT JOIN t a35 LEFT JOIN t a36 LEFT JOIN t a37 LEFT JOIN t a38 LEFT JOIN t a39 LEFT JOIN t a40 LEFT JOIN t a41 LEFT JOIN t a42 LEFT JOIN t a43 LEFT JOIN t a44 LEFT JOIN t a45 LEFT JOIN t a46 LEFT JOIN t a47 LEFT JOIN t a48 LEFT JOIN t a49 LEFT JOIN t a50 LEFT JOIN t a51 LEFT JOIN t a52 LEFT JOIN t a53 LEFT JOIN t a54 LEFT JOIN t a55 LEFT JOIN t a56 LEFT JOIN t a57 LEFT JOIN t a58 LEFT JOIN t a59 ON e LEFT JOIN t a0 LEFT JOIN t a1 LEFT JOIN t a2 LEFT JOIN t a3 LEFT JOIN t a4 LEFT JOIN t a5 LEFT JOIN t a6 LEFT JOIN t a7 LEFT JOIN t a8 LEFT JOIN t a9 LEFT JOIN t a10 LEFT JOIN t a11 LEFT JOIN t a12 LEFT JOIN t a13 LEFT JOIN t a14 LEFT JOIN t a15 LEFT JOIN t a16 LEFT JOIN t a17 LEFT JOIN t a18 LEFT JOIN t a19 LEFT JOIN t a20 LEFT JOIN t a21 LEFT JOIN t a22 LEFT JOIN t a23 LEFT JOIN t a24 LEFT JOIN t a25 LEFT JOIN t a26 LEFT JOIN t a27 LEFT JOIN t a28 LEFT JOIN t a29 LEFT JOIN t a30 LEFT JOIN t a31 LEFT JOIN t a32 LEFT JOIN t a33 LEFT JOIN t a34 LEFT JOIN t a35 LEFT JOIN t a36 LEFT JOIN t a37 LEFT JOIN t a38 LEFT JOIN t a39 LEFT JOIN t a40 LEFT JOIN t a41 LEFT JOIN t a42 LEFT JOIN t a43 LEFT JOIN t a44 LEFT JOIN t a45 LEFT JOIN t a46 LEFT JOIN t a47 LEFT JOIN t a48 LEFT JOIN t a49 LEFT JOIN t a50 LEFT JOIN t a51 LEFT JOIN t a52 LEFT JOIN t a53 LEFT JOIN t a54 LEFT JOIN t a55 LEFT JOIN t a56 LEFT JOIN t a57 LEFT JOIN t a58 LEFT JOIN t a59 +-- +error: Parser Error: syntax error at or near "a59" +== diff --git a/parser/testdata/corpus/sql/parser/not_comparison_precedence.test b/parser/testdata/corpus/sql/parser/not_comparison_precedence.test new file mode 100644 index 0000000..684a35b --- /dev/null +++ b/parser/testdata/corpus/sql/parser/not_comparison_precedence.test @@ -0,0 +1,69 @@ +# source: test/sql/parser/not_comparison_precedence.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT false < NOT true IS NULL +-- +ok +== +SELECT NOT NULL IS NULL +-- +ok +== +SELECT 1 < NOT 2 = 2 +-- +ok +== +SELECT (1 < NOT 2) = 2 +-- +ok +== +SELECT true = NOT false +-- +ok +== +SELECT true = NOT NOT true +-- +ok +== +SELECT true = NOT 3 IN (1, 2) +-- +ok +== +SELECT false = NOT 1 BETWEEN 0 AND 2 +-- +ok +== +SELECT true <> NOT 'a' LIKE 'b' +-- +ok +== +SELECT true = NOT false IS DISTINCT FROM NULL +-- +ok +== +SELECT 1 < NOT 2 = 2 AND true +-- +ok +== +SELECT 1 < NOT 2 = 2 OR false +-- +ok +== +SELECT NOT 1 < 2 IS NULL +-- +ok +== +SELECT false < NOT true IS NULL = true +-- +ok +== +CREATE TABLE t AS SELECT * FROM (VALUES (1, NULL), (2, 2)) v(a, b); +-- +ok +== +SELECT a, a < NOT b IS NULL FROM t ORDER BY a +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/numeric_literal_underscore_trailing_dot.test b/parser/testdata/corpus/sql/parser/numeric_literal_underscore_trailing_dot.test new file mode 100644 index 0000000..593c991 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/numeric_literal_underscore_trailing_dot.test @@ -0,0 +1,33 @@ +# source: test/sql/parser/numeric_literal_underscore_trailing_dot.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1.2_3.; +-- +error: Parser Error: syntax error at or near "1.2_3." +== +SELECT 9.41_29.; +-- +error: Parser Error: syntax error at or near "9.41_29." +== +SELECT 1_2.3_4.; +-- +error: Parser Error: syntax error at or near "1_2.3_4." +== +SELECT -9.41_29.; +-- +error: Parser Error: syntax error at or near "9.41_29." +== +SELECT 999/008.09_91.; +-- +error: Parser Error: syntax error at or near "008.09_91." +== +SELECT 1.2.3; +-- +error: Parser Error: syntax error at or near "1.2.3" +== +SELECT 1.23, 1_000.5, 1_2., 12., 100000.000001, -1.23; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/parsed_data_statement_roundtrip.test b/parser/testdata/corpus/sql/parser/parsed_data_statement_roundtrip.test new file mode 100644 index 0000000..0c00375 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/parsed_data_statement_roundtrip.test @@ -0,0 +1,250 @@ +# source: test/sql/parser/parsed_data_statement_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA IF NOT EXISTS parsed_data_options WITH (location='somewhere', format='parquet') +-- +ok +== +CREATE OR REPLACE SCHEMA parsed_data_options WITH (location='somewhere') +-- +ok +== +CREATE TEMPORARY SCHEMA parsed_data_temporary +-- +ok +== +CREATE TABLE parsed_data_options_table(i INTEGER, j VARCHAR) +PARTITIONED BY (i) +SORTED BY (j) +WITH (format='parquet', location='somewhere') +-- +ok +== +CREATE SCHEMA IF NOT EXISTS parsed_data_schema +-- +ok +== +ALTER SCHEMA IF EXISTS parsed_data_schema SET (foo='bar', answer=42) +-- +ok +== +ALTER SCHEMA IF EXISTS parsed_data_schema RESET (foo, answer) +-- +ok +== +ATTACH OR REPLACE ':memory:' AS parsed_data_db (READ_ONLY false) +-- +ok +== +ALTER DATABASE IF EXISTS missing_database SET ALIAS TO other_name +-- +ok +== +CONNECT LOCAL +-- +ok +== +CONNECT +-- +ok +== +CONNECT missing_connection +-- +ok +== +CONNECT 'missing connection' (foo 'bar') +-- +ok +== +CREATE OR REPLACE SECRET parsed_data_secret IN connection ( + TYPE HTTP, + PROVIDER CONFIG, + SCOPE 'https://example.com/data/', + BEARER_TOKEN 'token' +) +-- +ok +== +CREATE PERSISTENT SECRET parsed_data_persistent IN connection (TYPE HTTP) +-- +ok +== +DROP SECRET IF EXISTS parsed_data_secret FROM connection +-- +ok +== +CREATE EXTENSION REPOSITORY IF NOT EXISTS parsed_data_repo WITH PREFIX '{TEST_DIR}' +-- +ok +== +DROP EXTENSION REPOSITORY IF EXISTS parsed_data_repo +-- +ok +== +DROP TABLE IF EXISTS parsed_data_trigger_target +-- +ok +== +DROP TABLE IF EXISTS parsed_data_trigger_audit +-- +ok +== +CREATE TEMP TABLE parsed_data_trigger_target(i INTEGER, j INTEGER) +-- +ok +== +CREATE TEMP TABLE parsed_data_trigger_audit(i INTEGER) +-- +ok +== +CREATE OR REPLACE TRIGGER parsed_data_tr +AFTER UPDATE ON parsed_data_trigger_target +REFERENCING NEW TABLE AS new_rows OLD TABLE AS old_rows +FOR EACH STATEMENT +INSERT INTO parsed_data_trigger_audit SELECT i FROM new_rows +-- +ok +== +DROP TRIGGER parsed_data_tr ON parsed_data_trigger_target +-- +ok +== +CREATE TRIGGER IF NOT EXISTS parsed_data_missing_tr +AFTER UPDATE OF i, j ON missing_trigger_table +FOR EACH ROW +INSERT INTO parsed_data_trigger_audit VALUES (1) +-- +ok +== +DROP TABLE IF EXISTS parsed_data_alter +-- +ok +== +CREATE TABLE parsed_data_alter( + i INTEGER, + nested STRUCT(a INTEGER, b INTEGER), + removable INTEGER +) +-- +ok +== +CREATE TABLE IF NOT EXISTS parsed_data_if_not_exists(i INTEGER) +-- +ok +== +CREATE OR REPLACE VIEW parsed_data_deferred WITH (DEFER_BINDING) AS SELECT * FROM missing_deferred_table +-- +ok +== +ALTER SEQUENCE IF EXISTS missing_sequence OWNED BY parsed_data_alter +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter RENAME COLUMN nested.a TO renamed +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ADD COLUMN nested.c INTEGER +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter DROP COLUMN IF EXISTS nested.b CASCADE +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ADD COLUMN constrained INTEGER NOT NULL UNIQUE USING COMPRESSION uncompressed +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ALTER COLUMN nested.renamed SET DEFAULT 7 +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ALTER COLUMN nested.renamed DROP DEFAULT +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ALTER COLUMN nested.renamed TYPE VARCHAR COLLATE nocase +USING nested.renamed::VARCHAR +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ALTER COLUMN removable SET NOT NULL +-- +ok +== +ALTER TABLE IF EXISTS parsed_data_alter ALTER COLUMN removable DROP NOT NULL +-- +ok +== +ALTER TABLE parsed_data_alter SET PARTITIONED BY (i, nested.renamed) +-- +ok +== +ALTER TABLE parsed_data_alter RESET PARTITIONED BY +-- +ok +== +ALTER TABLE parsed_data_alter SET SORTED BY (i DESC NULLS FIRST, removable) +-- +ok +== +ALTER TABLE parsed_data_alter RESET SORTED BY +-- +ok +== +ALTER TABLE parsed_data_alter SET (format='parquet', location='somewhere') +-- +ok +== +ALTER TABLE parsed_data_alter RESET (format, location) +-- +ok +== +CREATE INDEX IF NOT EXISTS parsed_data_index ON parsed_data_alter(i) +-- +ok +== +COPY parsed_data_alter (i, removable) TO '{TEST_DIR}/parsed_data_copy.csv' +(FORMAT CSV, FORCE_QUOTE (i, removable), HEADER) +-- +ok +== +SET VARIABLE parsed_data_copy_path='{TEST_DIR}/parsed_data_copy_expression.csv' +-- +ok +== +COPY parsed_data_alter TO (getvariable('parsed_data_copy_path')) +-- +ok +== +COPY parsed_data_alter TO '{TEST_DIR}/parsed_data_copy_plain.csv' +-- +ok +== +CREATE OR REPLACE SEQUENCE parsed_data_sequence +-- +ok +== +CREATE TEMPORARY SEQUENCE IF NOT EXISTS parsed_data_temp_sequence +-- +ok +== +PRAGMA missing_parsed_data_pragma(1, 'two') +-- +ok +== +VACUUM ANALYZE parsed_data_alter(i, removable) +-- +ok +== +BEGIN TRANSACTION READ WRITE +-- +ok +== +DETACH IF EXISTS parsed_data_db +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/parser_rewrites_method_chain.test b/parser/testdata/corpus/sql/parser/parser_rewrites_method_chain.test new file mode 100644 index 0000000..27adc20 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/parser_rewrites_method_chain.test @@ -0,0 +1,201 @@ +# source: test/sql/parser/parser_rewrites_method_chain.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT (3).ifnull(5); +-- +ok +== +SELECT (NULL::INTEGER).ifnull(5); +-- +ok +== +SELECT ifnull(NULL::INTEGER, 5); +-- +ok +== +SELECT ['abc'].ifnull(['def']); +-- +ok +== +SELECT ['abc'].ifnull(NULL); +-- +ok +== +SELECT (NULL::VARCHAR).ifnull('x').ifnull('y'); +-- +ok +== +SELECT (3).nullif(3); +-- +ok +== +SELECT ('abc'::INTEGER).try(); +-- +ok +== +SELECT try('abc'::INTEGER); +-- +ok +== +SELECT (1).construct_array(2, 3); +-- +ok +== +SELECT construct_array(1, 2, 3); +-- +ok +== +SELECT ('2020-01-01').date(); +-- +ok +== +SELECT date('2020-01-01'); +-- +ok +== +SELECT ([1,2]).unpack(); +-- +ok +== +SELECT unpack([1,2]); +-- +ok +== +SELECT (NULL::INTEGER).coalesce(5); +-- +ok +== +SELECT (NULL::INTEGER).coalesce(NULL, 7); +-- +ok +== +SELECT coalesce(NULL::INTEGER, 5); +-- +ok +== +SELECT (NULL::INTEGER).coalesce(NULL, NULL, 9); +-- +ok +== +SELECT (1).coalesce(error('must not be evaluated')); +-- +ok +== +CREATE TABLE integers(a INTEGER, b INTEGER); +-- +ok +== +INSERT INTO integers VALUES (1, 2), (3, 4); +-- +ok +== +SELECT [(COLUMNS(*).unpack())] FROM integers ORDER BY ALL; +-- +ok +== +CREATE MACRO "try"(x) AS 999; +-- +ok +== +SELECT try(1); +-- +ok +== +SELECT (1)."try"(); +-- +ok +== +CREATE MACRO chain_probe(x) AS 999; +-- +ok +== +SELECT (1).chain_probe(); +-- +ok +== +SELECT (1).ifnull(2, 3); +-- +error: Parser Error: Wrong number of arguments to IFNULL. +== +SELECT ifnull(1, 2, 3); +-- +error: Parser Error: Wrong number of arguments to IFNULL. +== +SELECT (1).ifnull(a := 2); +-- +error: Parser Error: Named arguments are not supported in IFNULL expressions +== +SELECT ifnull(1, a := 2); +-- +error: Parser Error: Named arguments are not supported in IFNULL expressions +== +SELECT ('2020-01-01').date('extra'); +-- +error: Parser Error: Wrong number of arguments provided to DATE function +== +SELECT (1).no_such_function_xyz(); +-- +ok +== +CREATE MACRO "coalesce"(a, b) AS 999; +-- +ok +== +CREATE MACRO s.coalesce(a, b) AS 777; +-- +ok +== +SELECT "coalesce"(NULL, 5), s.coalesce(NULL, 5); +-- +ok +== +SELECT COALESCE(NULL, 5); +-- +ok +== +SELECT (NULL::INTEGER).coalesce(1); +-- +ok +== +SELECT (NULL).coalesce(DISTINCT 5); +-- +error: Parser Error: DISTINCT is not supported in COALESCE expressions +== +SELECT (NULL).coalesce(5 ORDER BY 1); +-- +error: Parser Error: ORDER BY is not supported in COALESCE expressions +== +SELECT (1).ifnull(DISTINCT 2); +-- +error: Parser Error: DISTINCT is not supported in IFNULL expressions +== +SELECT (1).ifnull(2 ORDER BY 1); +-- +error: Parser Error: ORDER BY is not supported in IFNULL expressions +== +SELECT ('abc'::INTEGER).try(ORDER BY 1); +-- +error: Parser Error: ORDER BY is not supported in TRY expressions +== +SELECT (1).construct_array(DISTINCT 2); +-- +error: Parser Error: DISTINCT is not supported in CONSTRUCT_ARRAY expressions +== +SELECT ('2020-01-01').date(ORDER BY 1); +-- +error: Parser Error: ORDER BY is not supported in DATE expressions +== +SELECT (a).string_agg(',' ORDER BY a DESC) FROM integers; +-- +ok +== +SELECT (NULL).coalesce(5 IGNORE NULLS); +-- +error: Parser Error: RESPECT/IGNORE NULLS is not supported for non-window functions +== +SELECT (NULL).coalesce(5) FILTER (WHERE true); +-- +error: Parser Error: syntax error at or near "FILTER" +== diff --git a/parser/testdata/corpus/sql/parser/position_prepare.test b/parser/testdata/corpus/sql/parser/position_prepare.test index 04b6ef7..2b3ede1 100644 --- a/parser/testdata/corpus/sql/parser/position_prepare.test +++ b/parser/testdata/corpus/sql/parser/position_prepare.test @@ -1,6 +1,6 @@ # source: test/sql/parser/position_prepare.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT POSITION(? in ?) diff --git a/parser/testdata/corpus/sql/parser/qualified_underscore_digit.test b/parser/testdata/corpus/sql/parser/qualified_underscore_digit.test new file mode 100644 index 0000000..d8f0e6f --- /dev/null +++ b/parser/testdata/corpus/sql/parser/qualified_underscore_digit.test @@ -0,0 +1,53 @@ +# source: test/sql/parser/qualified_underscore_digit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA "_3_schema"; +-- +ok +== +CREATE TABLE "_3_schema"."_4_table"("_0_a" INTEGER, "__2_c" INTEGER, _a3 INTEGER); +-- +ok +== +INSERT INTO "_3_schema"."_4_table" VALUES (1,2,3),(1,2,3),(NULL,NULL,4); +-- +ok +== +CREATE VIEW quoted_columns AS SELECT t."_0_a", t."__2_c", t._a3 FROM "_3_schema"."_4_table" t; +-- +ok +== +SELECT contains(sql, 't."_0_a"') FROM duckdb_views() WHERE view_name = 'quoted_columns'; +-- +ok +== +SELECT * FROM quoted_columns; +-- +ok +== +CREATE VIEW printable_join AS SELECT count(*) n FROM "_3_schema"."_4_table" l JOIN "_3_schema"."_4_table" r ON l."_0_a"=r."_0_a"; +-- +ok +== +SELECT n FROM printable_join; +-- +ok +== +COPY (SELECT 'bad' AS a) TO '{TEST_DIR}/underscore_digit.csv' (HEADER false); +-- +ok +== +SELECT a FROM read_csv('{TEST_DIR}/underscore_digit.csv', columns={'a':'INTEGER'}, header=false, store_rejects=true, rejects_table='_0_errors', rejects_scan='_9e3'); +-- +ok +== +SELECT count(*) FROM temp.main."_0_errors"; +-- +ok +== +SELECT count(*) FROM temp.main."_9e3"; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/reject_accidental_expression_syntax.test b/parser/testdata/corpus/sql/parser/reject_accidental_expression_syntax.test new file mode 100644 index 0000000..6017518 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/reject_accidental_expression_syntax.test @@ -0,0 +1,101 @@ +# source: test/sql/parser/reject_accidental_expression_syntax.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 'a' NOT !~~ 'b'; +-- +error: Parser Error: NOT cannot precede an operator that is already negated (!~~, !~~*, !~ or !~*) +== +SELECT 'a' NOT !~~* 'b'; +-- +error: Parser Error: NOT cannot precede an operator that is already negated (!~~, !~~*, !~ or !~*) +== +SELECT 'a' NOT !~ 'b'; +-- +error: Parser Error: NOT cannot precede an operator that is already negated (!~~, !~~*, !~ or !~*) +== +SELECT 'a' NOT !~* 'b'; +-- +error: Parser Error: NOT cannot precede an operator that is already negated (!~~, !~~*, !~ or !~*) +== +SELECT 'a' NOT LIKE 'b', 'a' NOT ILIKE 'b', 'a' NOT GLOB 'b', 'a' NOT SIMILAR TO 'b', 'a' !~~ 'b'; +-- +ok +== +SELECT a[1:-] FROM (SELECT [1, 2, 3] a); +-- +error: Parser Error: syntax error at or near "]" +== +SELECT a[:-] FROM (SELECT [1, 2, 3] a); +-- +error: Parser Error: syntax error at or near "]" +== +SELECT a[:-:2], a[2:-1], a[:-2], a[-2:] FROM (SELECT [1, 2, 3] a); +-- +ok +== +SELECT abs(x INT := 1); +-- +error: Parser Error: syntax error at or near "INT" +== +SELECT * FROM range(x INT := 3); +-- +error: Parser Error: syntax error at or near "INT" +== +CREATE TEMP MACRO m(a INT := 1) AS a + 1; +-- +ok +== +SELECT m(), m(a := 5); +-- +ok +== +SELECT 1..2; +-- +error: Parser Error: syntax error at or near "1..2" +== +SELECT .5.; +-- +error: Parser Error: syntax error at or near ".5." +== +SELECT 1.5.abs(); +-- +error: Parser Error: syntax error at or near "1.5." +== +SELECT 1e5.abs(); +-- +error: Parser Error: syntax error at or near "1e5." +== +SELECT 1..abs(); +-- +error: Parser Error: syntax error at or near "1.." +== +SELECT 1.5.x; +-- +error: Parser Error: syntax error at or near "1.5." +== +SELECT 1.5, .5, 1., 1e5, 1.5e-3, 1_000.5; +-- +ok +== +SELECT 'abc' x'41'; +-- +error: Parser Error: syntax error at or near "x'41'" +== +SELECT 1 e'ab'; +-- +error: Parser Error: syntax error at or near "e'ab'" +== +SELECT * FROM t x'41'; +-- +error: Parser Error: syntax error at or near "x'41'" +== +SELECT x'41', e'ab', b'101', n'abc'; +-- +ok +== +SELECT 1 IN (), 1 NOT IN (); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/reject_accidental_statement_syntax.test b/parser/testdata/corpus/sql/parser/reject_accidental_statement_syntax.test new file mode 100644 index 0000000..816b991 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/reject_accidental_statement_syntax.test @@ -0,0 +1,129 @@ +# source: test/sql/parser/reject_accidental_statement_syntax.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE PERSISTENT TABLE x (a INTEGER); +-- +error: Parser Error: PERSISTENT is only supported for CREATE SECRET +== +CREATE PERSISTENT MACRO m() AS 1; +-- +error: Parser Error: PERSISTENT is only supported for CREATE SECRET +== +SET secret_directory='{TEST_DIR}/reject_accidental_statement_syntax'; +-- +ok +== +CREATE TEMPORARY TABLE x (a INTEGER); +-- +ok +== +CREATE TEMPORARY SECRET s (TYPE http); +-- +ok +== +CREATE PERSISTENT SECRET p (TYPE http); +-- +ok +== +SELECT name, persistent FROM duckdb_secrets() WHERE name = 'p'; +-- +ok +== +DROP PERSISTENT SECRET p; +-- +ok +== +DROP SECRET s CASCADE; +-- +error: Parser Error: CASCADE and RESTRICT are not supported for DROP SECRET +== +DROP SECRET s RESTRICT; +-- +error: Parser Error: CASCADE and RESTRICT are not supported for DROP SECRET +== +DROP SECRET s; +-- +ok +== +CREATE RECURSIVE VIEW v AS SELECT 1; +-- +error: Parser Error: CREATE RECURSIVE VIEW requires a column list +== +CREATE RECURSIVE VIEW v(n) AS SELECT 1 UNION ALL SELECT n + 1 FROM v WHERE n < 3; +-- +ok +== +SELECT count(*) FROM v; +-- +ok +== +PIVOT t; +-- +error: Parser Error: PIVOT requires an ON, USING or GROUP BY clause +== +PIVOT t USING count(*); +-- +ok +== +PIVOT t GROUP BY a ORDER BY a; +-- +ok +== +CREATE TABLE y (a INTEGER CONSTRAINT c); +-- +error: Parser Error: syntax error at or near ")" +== +CREATE TABLE y (a INTEGER CONSTRAINT c NOT NULL, b INTEGER CONSTRAINT d CHECK (b > 0)); +-- +ok +== +SELECT * FROM t WHERE a > 0 TABLESAMPLE 1 ROWS; +-- +error: Parser Error: syntax error at or near "TABLESAMPLE" +== +SELECT a FROM t GROUP BY a TABLESAMPLE 1; +-- +error: Parser Error: syntax error at or near "TABLESAMPLE" +== +SELECT a FROM t USING SAMPLE 1 USING SAMPLE 1; +-- +error: Parser Error: syntax error at or near "USING" +== +SELECT count(*) FROM t TABLESAMPLE 2 ROWS; +-- +ok +== +SELECT count(*) FROM t WHERE a > 0 USING SAMPLE 1 ROWS; +-- +ok +== +SELECT count(*) FROM range(100) TABLESAMPLE 10 ROWS; +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(100)) TABLESAMPLE 10 ROWS; +-- +ok +== +SELECT count(*) FROM VALUES (1), (2), (3) v(x) TABLESAMPLE 1 ROWS; +-- +ok +== +SELECT count(*) FROM VALUES (1), (2), (3) TABLESAMPLE 2 ROWS; +-- +ok +== +SELECT count(*) FROM range(3) t, LATERAL (SELECT t.range) s TABLESAMPLE 1 ROWS; +-- +error: Parser Error: TABLESAMPLE cannot be applied to a LATERAL subquery +== +SELECT count(*) FROM range(3) t, LATERAL range(t.range) s TABLESAMPLE 1 ROWS; +-- +error: Parser Error: TABLESAMPLE cannot be applied to a LATERAL table function +== +SELECT count(*) FROM range(3) t, LATERAL (SELECT t.range) s; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/reject_accidental_type_syntax.test b/parser/testdata/corpus/sql/parser/reject_accidental_type_syntax.test new file mode 100644 index 0000000..4375dc3 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/reject_accidental_type_syntax.test @@ -0,0 +1,14 @@ +# source: test/sql/parser/reject_accidental_type_syntax.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT '2020-01-01'::TIMESTAMP(3) WITH TIME ZONE; +-- +error: Parser Error: TIMESTAMP WITH TIME ZONE does not take a precision +== +SELECT typeof('2020-01-01'::TIMESTAMP(3)), typeof('2020-01-01'::TIMESTAMP(3) WITHOUT TIME ZONE), + typeof('2020-01-01'::TIMESTAMP WITH TIME ZONE); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/reject_unknown_option_values.test b/parser/testdata/corpus/sql/parser/reject_unknown_option_values.test new file mode 100644 index 0000000..22f5946 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/reject_unknown_option_values.test @@ -0,0 +1,49 @@ +# source: test/sql/parser/reject_unknown_option_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +VACUUM (foo); +-- +error: Parser Error: unrecognized VACUUM option "foo" +== +VACUUM (ANALYZE, foo, bar) t; +-- +error: Parser Error: unrecognized VACUUM option "foo" +== +VACUUM (ANALYZE) t; +-- +ok +== +VACUUM (ANALYSE) t; +-- +ok +== +CREATE SEQUENCE s INCREMENT BY 1.5; +-- +error: Parser Error: Expected an integer argument for INCREMENT, got 1.5 +== +CREATE SEQUENCE s START 2.7; +-- +error: Parser Error: Expected an integer argument for START, got 2.7 +== +CREATE SEQUENCE s MAXVALUE 2.5; +-- +error: Parser Error: Expected an integer argument for MAXVALUE, got 2.5 +== +CREATE SEQUENCE s MINVALUE -2.5; +-- +error: Parser Error: Expected an integer argument for MINVALUE, got -2.5 +== +CREATE SEQUENCE s START WITH 'abc'; +-- +error: Parser Error: Expected an integer argument for START, got 'abc' +== +CREATE SEQUENCE s INCREMENT BY -2 START WITH -1 MINVALUE -100 MAXVALUE -1; +-- +ok +== +SELECT nextval('s'), nextval('s'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/single_quoted_names.test b/parser/testdata/corpus/sql/parser/single_quoted_names.test new file mode 100644 index 0000000..74a2d3f --- /dev/null +++ b/parser/testdata/corpus/sql/parser/single_quoted_names.test @@ -0,0 +1,84 @@ +# source: test/sql/parser/single_quoted_names.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PREPARE 'p' AS SELECT 42; +-- +ok +== +EXECUTE 'p'; +-- +ok +== +DEALLOCATE 'p'; +-- +ok +== +WITH x('a') AS (SELECT 1) +SELECT a FROM x; +-- +ok +== +SELECT * +FROM (VALUES (1)) a(i) +JOIN (VALUES (1)) b(i) USING ('i'); +-- +ok +== +CREATE TABLE named_constraint(i INT, CONSTRAINT 'u' UNIQUE(i)); +-- +ok +== +INSERT INTO named_constraint VALUES (1); +-- +ok +== +ALTER TABLE named_constraint DROP CONSTRAINT 'u'; +-- +ok +== +CREATE TABLE rename_target(i INT); +-- +ok +== +INSERT INTO rename_target VALUES (1); +-- +ok +== +ALTER TABLE rename_target RENAME COLUMN i TO 'renamed_i'; +-- +ok +== +ALTER TABLE rename_target RENAME TO 'renamed_table'; +-- +ok +== +SELECT renamed_i FROM renamed_table; +-- +ok +== +CREATE TABLE analyze_target(i INT); +-- +ok +== +ANALYZE analyze_target('i'); +-- +ok +== +VACUUM ANALYZE analyze_target('i'); +-- +ok +== +CREATE TABLE 'commented'(i INT); +-- +ok +== +COMMENT ON TABLE 'commented' IS 'hello'; +-- +ok +== +SELECT comment FROM duckdb_tables() WHERE table_name = 'commented'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/star_expression.test b/parser/testdata/corpus/sql/parser/star_expression.test index 42e68f8..539bd69 100644 --- a/parser/testdata/corpus/sql/parser/star_expression.test +++ b/parser/testdata/corpus/sql/parser/star_expression.test @@ -1,6 +1,6 @@ # source: test/sql/parser/star_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE * diff --git a/parser/testdata/corpus/sql/parser/statement_tostring_roundtrip.test b/parser/testdata/corpus/sql/parser/statement_tostring_roundtrip.test index f5c0c63..cdfbc04 100644 --- a/parser/testdata/corpus/sql/parser/statement_tostring_roundtrip.test +++ b/parser/testdata/corpus/sql/parser/statement_tostring_roundtrip.test @@ -1,6 +1,6 @@ # source: test/sql/parser/statement_tostring_roundtrip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "weird name"("odd col" INTEGER, "select" VARCHAR, "He said ""hi""" INTEGER) @@ -147,6 +147,22 @@ MERGE INTO "t chk" USING "t chk" AS "src x" ON "t chk"."a b" = "src x"."a b" WHE -- ok == +SELECT ~1 + 2 +-- +ok +== +SELECT (~1) + 2 +-- +ok +== +SELECT (-x) + 2 FROM (VALUES (1)) t(x) +-- +ok +== +SELECT (+x) + 2 FROM (VALUES (1)) t(x) +-- +ok +== SELECT "odder col" AS "a b" FROM "weird name" AS "al ias" ORDER BY "a b" -- ok diff --git a/parser/testdata/corpus/sql/parser/switch_case.test b/parser/testdata/corpus/sql/parser/switch_case.test index df27cab..8a7c79d 100644 --- a/parser/testdata/corpus/sql/parser/switch_case.test +++ b/parser/testdata/corpus/sql/parser/switch_case.test @@ -1,6 +1,6 @@ # source: test/sql/parser/switch_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS FROM values(1), (4), (8), (0) i(x); @@ -83,3 +83,31 @@ SELECT SWITCH (1, i) FROM map_expr; -- ok == +SELECT switch(i, MAP {i : 1}) FROM (SELECT 1 i); +-- +ok +== +SELECT switch(map([false],[10]), map([map([false],[10])],[999]), 777); +-- +ok +== +SELECT switch(2, map([1,2,3],['a','b','c'])); +-- +ok +== +SELECT switch(9, map([1,2],['a','b']), 'dflt'); +-- +ok +== +SELECT switch(map([true],[10]), 99); +-- +ok +== +SELECT switch(map([true],[10])); +-- +ok +== +SELECT switch(map([1],[2]), map([true],[7]), 55); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/switch_null_arguments.test b/parser/testdata/corpus/sql/parser/switch_null_arguments.test new file mode 100644 index 0000000..45adc10 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/switch_null_arguments.test @@ -0,0 +1,21 @@ +# source: test/sql/parser/switch_null_arguments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT val, switch(val, MAP {1: 'one'}, NULL) FROM null_test ORDER BY val; +-- +ok +== +SELECT switch(NULL::INT, MAP {1: 'one'}, 'other'); +-- +ok +== +SELECT switch(MAP {true: 'one'}, NULL); +-- +ok +== +SELECT switch(val, MAP {1: 'one', 2: 'two'}, 'other') FROM null_test ORDER BY val; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/table_at_clause.test b/parser/testdata/corpus/sql/parser/table_at_clause.test index 1a1dbed..e144447 100644 --- a/parser/testdata/corpus/sql/parser/table_at_clause.test +++ b/parser/testdata/corpus/sql/parser/table_at_clause.test @@ -1,6 +1,6 @@ # source: test/sql/parser/table_at_clause.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM tbl AT (TIMESTAMP => TIMESTAMP '2020-01-01') diff --git a/parser/testdata/corpus/sql/parser/test_columns.test b/parser/testdata/corpus/sql/parser/test_columns.test index 911cd8d..9d2da08 100644 --- a/parser/testdata/corpus/sql/parser/test_columns.test +++ b/parser/testdata/corpus/sql/parser/test_columns.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COLUMNS(*) FROM integers diff --git a/parser/testdata/corpus/sql/parser/test_columns_lists.test b/parser/testdata/corpus/sql/parser/test_columns_lists.test index e9659cc..00c12e3 100644 --- a/parser/testdata/corpus/sql/parser/test_columns_lists.test +++ b/parser/testdata/corpus/sql/parser/test_columns_lists.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_columns_lists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COLUMNS([x for x in *]) FROM integers diff --git a/parser/testdata/corpus/sql/parser/test_columns_order.test b/parser/testdata/corpus/sql/parser/test_columns_order.test index 440402b..bfd49e5 100644 --- a/parser/testdata/corpus/sql/parser/test_columns_order.test +++ b/parser/testdata/corpus/sql/parser/test_columns_order.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_columns_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(col1 INTEGER, col2 INTEGER, col3 INTEGER); diff --git a/parser/testdata/corpus/sql/parser/test_columns_prepared.test b/parser/testdata/corpus/sql/parser/test_columns_prepared.test index 2c88f6d..46c25e4 100644 --- a/parser/testdata/corpus/sql/parser/test_columns_prepared.test +++ b/parser/testdata/corpus/sql/parser/test_columns_prepared.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_columns_prepared.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table my_table as diff --git a/parser/testdata/corpus/sql/parser/test_columns_unpacked.test b/parser/testdata/corpus/sql/parser/test_columns_unpacked.test index 8fd3d8c..b68d76e 100644 --- a/parser/testdata/corpus/sql/parser/test_columns_unpacked.test +++ b/parser/testdata/corpus/sql/parser/test_columns_unpacked.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_columns_unpacked.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select COALESCE(*COLUMNS(*)) from (select NULL, 2, 3) t(a, b, c); diff --git a/parser/testdata/corpus/sql/parser/test_columns_where.test b/parser/testdata/corpus/sql/parser/test_columns_where.test index 40d45fc..0f12654 100644 --- a/parser/testdata/corpus/sql/parser/test_columns_where.test +++ b/parser/testdata/corpus/sql/parser/test_columns_where.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_columns_where.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM tbl WHERE COLUMNS(*) >= 2 ORDER BY ALL diff --git a/parser/testdata/corpus/sql/parser/test_deep_expression_chains.test b/parser/testdata/corpus/sql/parser/test_deep_expression_chains.test new file mode 100644 index 0000000..9429241 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/test_deep_expression_chains.test @@ -0,0 +1,81 @@ +# source: test/sql/parser/test_deep_expression_chains.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +FROM query('SELECT 1' || repeat('::INTEGER', 150)) +-- +ok +== +FROM query('SELECT [1]' || repeat('[1]', 150)) +-- +ok +== +FROM query('SELECT ''a''' || repeat('.lower()', 150)) +-- +ok +== +FROM query('SELECT 1' || repeat(' IS NULL', 150)) +-- +ok +== +FROM query('SELECT 1 IN (1)' || repeat('::BOOLEAN', 150)) +-- +ok +== +FROM query('SELECT ''a''' || repeat(' COLLATE nocase', 150)) +-- +ok +== +FROM query('SELECT TIMESTAMP ''2020-01-01''' || repeat(' AT TIME ZONE ''UTC''', 150)) +-- +ok +== +FROM query('SELECT ''a''' || repeat(' || ''a''', 150)) +-- +ok +== +FROM query('SELECT ' || repeat('- ', 150) || '1') +-- +ok +== +FROM query('SELECT 1' || repeat('::INTEGER', 50)) +-- +ok +== +FROM query('SELECT ''a''' || repeat('.lower()', 50)) +-- +ok +== +FROM query('SELECT 1 IN (1)' || repeat('::BOOLEAN', 50)) +-- +ok +== +FROM query('SELECT length(''a''' || repeat(' || ''a''', 50) || ')') +-- +ok +== +FROM query('SELECT NULL::' || repeat('STRUCT(a ', 150) || 'INTEGER' || repeat(')', 150)) +-- +ok +== +FROM query('SELECT NULL::' || repeat('MAP(INTEGER, ', 150) || 'INTEGER' || repeat(')', 150)) +-- +ok +== +FROM query('CREATE TABLE deep_struct(c ' || repeat('STRUCT(a ', 150) || 'INTEGER' || repeat(')', 150) || ')') +-- +error: Parser Error: Expected a single SELECT statement +== +FROM query('SELECT x IS NULL FROM (SELECT NULL::' || repeat('STRUCT(a ', 50) || 'INTEGER' || repeat(')', 50) || ' AS x)') +-- +ok +== +FROM query('SELECT ' || repeat('abs(', 60) || 'length(''a''' || repeat(' || ''a''', 60) || ')' || repeat(')', 60)) +-- +ok +== +FROM query('SELECT ' || repeat('abs(', 30) || 'length(''a''' || repeat(' || ''a''', 30) || ')' || repeat(')', 30)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/test_deep_expression_chains.test.metadata.json b/parser/testdata/corpus/sql/parser/test_deep_expression_chains.test.metadata.json new file mode 100644 index 0000000..793809d --- /dev/null +++ b/parser/testdata/corpus/sql/parser/test_deep_expression_chains.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "f1312a5fec4558a0": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/parser/test_deep_expression_nesting.test b/parser/testdata/corpus/sql/parser/test_deep_expression_nesting.test new file mode 100644 index 0000000..a52dae0 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/test_deep_expression_nesting.test @@ -0,0 +1,41 @@ +# source: test/sql/parser/test_deep_expression_nesting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +SELECT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT NOT true +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +SELECT {'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':{'a':1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +SELECT ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT 1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +SELECT [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] IS NOT NULL +-- +ok +== +SET max_expression_depth=300 +-- +ok +== +SELECT abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/test_long_error.test b/parser/testdata/corpus/sql/parser/test_long_error.test index d4c7980..8299cf6 100644 --- a/parser/testdata/corpus/sql/parser/test_long_error.test +++ b/parser/testdata/corpus/sql/parser/test_long_error.test @@ -1,11 +1,11 @@ # source: test/sql/parser/test_long_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -- -ok +error: Parser Error: syntax error at or near "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" == SELECT xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -- diff --git a/parser/testdata/corpus/sql/parser/test_many_or.test b/parser/testdata/corpus/sql/parser/test_many_or.test new file mode 100644 index 0000000..aea49d2 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/test_many_or.test @@ -0,0 +1,29 @@ +# source: test/sql/parser/test_many_or.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_expression_depth=10 +-- +ok +== +CREATE TABLE data AS SELECT x FROM range(100) t(x); +-- +ok +== +FROM query('SELECT count(*) FROM data WHERE x < 1' || repeat(' OR x < 50', 49)) +-- +ok +== +FROM query('SELECT count(*) FROM data WHERE x >= 0' || repeat(' AND x < 50', 50)) +-- +ok +== +FROM query('SELECT count(*) FROM data WHERE x < 1' || repeat(' OR x < 50 AND x >= 0', 49)) +-- +ok +== +FROM query('SELECT count(*) FROM data WHERE x < 1' || repeat(' OR x < 50', 20000)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/test_operator_precedence.test b/parser/testdata/corpus/sql/parser/test_operator_precedence.test index 1bce883..c2a482b 100644 --- a/parser/testdata/corpus/sql/parser/test_operator_precedence.test +++ b/parser/testdata/corpus/sql/parser/test_operator_precedence.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_operator_precedence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 2*3+1 @@ -55,3 +55,43 @@ SELECT 2**3^2; -- ok == +SELECT ~1 + 2; +-- +ok +== +SELECT ~1 * 2; +-- +ok +== +SELECT ~(1 + 2); +-- +ok +== +SELECT (~1) + 2; +-- +ok +== +SELECT ~1 & 3; +-- +ok +== +SELECT ~1 | 3; +-- +ok +== +SELECT 5 & ~1 + 2; +-- +ok +== +SELECT ~ ~1 + 2; +-- +ok +== +SELECT ~2 ^ 2; +-- +ok +== +SELECT (~2) ^ 2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/test_value_functions.test b/parser/testdata/corpus/sql/parser/test_value_functions.test index 9a1d2b7..b5893d5 100644 --- a/parser/testdata/corpus/sql/parser/test_value_functions.test +++ b/parser/testdata/corpus/sql/parser/test_value_functions.test @@ -1,6 +1,6 @@ # source: test/sql/parser/test_value_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT user FROM (VALUES ('hello world')) t(user) diff --git a/parser/testdata/corpus/sql/parser/trailing_commas.test b/parser/testdata/corpus/sql/parser/trailing_commas.test index aa2a88e..73c06b3 100644 --- a/parser/testdata/corpus/sql/parser/trailing_commas.test +++ b/parser/testdata/corpus/sql/parser/trailing_commas.test @@ -1,6 +1,6 @@ # source: test/sql/parser/trailing_commas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42, diff --git a/parser/testdata/corpus/sql/parser/unquoted_underscore_digit_identifiers.test b/parser/testdata/corpus/sql/parser/unquoted_underscore_digit_identifiers.test new file mode 100644 index 0000000..2f22647 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/unquoted_underscore_digit_identifiers.test @@ -0,0 +1,81 @@ +# source: test/sql/parser/unquoted_underscore_digit_identifiers.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE _1099_vendors (id INTEGER, _1099_amount DECIMAL(10,2)); +-- +ok +== +INSERT INTO _1099_vendors VALUES (1, 12.5); +-- +ok +== +SELECT v._1099_amount FROM _1099_vendors v; +-- +ok +== +SELECT * FROM main._1099_vendors; +-- +ok +== +ATTACH ':memory:' AS _0_db; +-- +ok +== +CREATE TABLE _0_db.main._1099_vendors AS SELECT * FROM _1099_vendors; +-- +ok +== +SELECT * FROM _0_db.main._1099_vendors; +-- +ok +== +SELECT _1099_vendors._1099_amount, main._1099_vendors.id FROM main._1099_vendors; +-- +ok +== +SELECT s._1, {'_2': 42}._2 FROM (SELECT {'_1': 7} AS s); +-- +ok +== +CREATE SCHEMA _0_db._2_schema; +-- +ok +== +CREATE TABLE _0_db._2_schema._3_table (_4_col INTEGER); +-- +ok +== +INSERT INTO _0_db._2_schema._3_table VALUES (5); +-- +ok +== +USE _0_db; +-- +ok +== +SELECT t._4_col FROM _2_schema._3_table t WHERE t._4_col = 5; +-- +ok +== +SELECT _0_db._2_schema._3_table._4_col FROM _0_db._2_schema._3_table; +-- +ok +== +SELECT 1_000, .5, 1.5_5, 1_0.2_5; +-- +ok +== +SELECT ._1; +-- +error: Parser Error: syntax error at or near "." +== +SELECT c FROM (SELECT 1._5) t(c); +-- +ok +== +SELECT _5 FROM (SELECT 1._5); +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/unreserved_keyword_casing.test b/parser/testdata/corpus/sql/parser/unreserved_keyword_casing.test index cabc06e..d84399b 100644 --- a/parser/testdata/corpus/sql/parser/unreserved_keyword_casing.test +++ b/parser/testdata/corpus/sql/parser/unreserved_keyword_casing.test @@ -1,6 +1,6 @@ # source: test/sql/parser/unreserved_keyword_casing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE people(Name VARCHAR, STATE VARCHAR, Country VARCHAR); diff --git a/parser/testdata/corpus/sql/parser/values_list_error.test b/parser/testdata/corpus/sql/parser/values_list_error.test index efdb9ab..f170fbf 100644 --- a/parser/testdata/corpus/sql/parser/values_list_error.test +++ b/parser/testdata/corpus/sql/parser/values_list_error.test @@ -1,6 +1,6 @@ # source: test/sql/parser/values_list_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM (VALUES ('1', '2'), ('1')) diff --git a/parser/testdata/corpus/sql/parser/values_list_without_brackets.test b/parser/testdata/corpus/sql/parser/values_list_without_brackets.test index cb85d23..97037e1 100644 --- a/parser/testdata/corpus/sql/parser/values_list_without_brackets.test +++ b/parser/testdata/corpus/sql/parser/values_list_without_brackets.test @@ -1,6 +1,6 @@ # source: test/sql/parser/values_list_without_brackets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM values (42) t; diff --git a/parser/testdata/corpus/sql/parser/wide_type_definitions.test b/parser/testdata/corpus/sql/parser/wide_type_definitions.test new file mode 100644 index 0000000..190bccc --- /dev/null +++ b/parser/testdata/corpus/sql/parser/wide_type_definitions.test @@ -0,0 +1,42 @@ +# source: test/sql/parser/wide_type_definitions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET VARIABLE wide_struct_sql = ( + SELECT 'SELECT (NULL::STRUCT(' || string_agg('c' || i || ' INTEGER', ',') || ')) IS NULL' + FROM range(1500) t(i) +); +-- +ok +== +FROM query(getvariable('wide_struct_sql')); +-- +error: Parser Error: syntax error at or near "NULL" +== +SET VARIABLE many_structs_sql = ( + SELECT 'SELECT ' || string_agg('NULL::STRUCT(a INTEGER) AS c' || i, ',') + FROM range(600) t(i) +); +-- +ok +== +SELECT count(*) FROM query(getvariable('many_structs_sql')); +-- +error: Parser Error: syntax error at or near "NULL" +== +SET VARIABLE many_maps_sql = ( + SELECT 'SELECT ' || string_agg('NULL::MAP(INTEGER, INTEGER) AS c' || i, ',') + FROM range(1100) t(i) +); +-- +ok +== +CREATE TABLE wide_maps AS FROM query(getvariable('many_maps_sql')); +-- +error: Parser Error: syntax error at or near "NULL" +== +SELECT count(*) FROM wide_maps +-- +ok +== diff --git a/parser/testdata/corpus/sql/parser/wide_type_definitions.test.metadata.json b/parser/testdata/corpus/sql/parser/wide_type_definitions.test.metadata.json new file mode 100644 index 0000000..f8cb673 --- /dev/null +++ b/parser/testdata/corpus/sql/parser/wide_type_definitions.test.metadata.json @@ -0,0 +1,7 @@ +{ + "skip": { + "2109897e39338191": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", + "6526cba1f8dbb5fd": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", + "89b14571b03404e6": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it" + } +} diff --git a/parser/testdata/corpus/sql/peg_parser/binary_type.test b/parser/testdata/corpus/sql/peg_parser/binary_type.test index aaefb16..f20aed7 100644 --- a/parser/testdata/corpus/sql/peg_parser/binary_type.test +++ b/parser/testdata/corpus/sql/peg_parser/binary_type.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/binary_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(b binary, c blob, d varbinary); diff --git a/parser/testdata/corpus/sql/peg_parser/deep_nesting.test b/parser/testdata/corpus/sql/peg_parser/deep_nesting.test new file mode 100644 index 0000000..db15cb8 --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/deep_nesting.test @@ -0,0 +1,29 @@ +# source: test/sql/peg_parser/deep_nesting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_expression_depth=1000000; +-- +ok +== +FROM query('SELECT ' || repeat('(', 10000) || '1' || repeat(')', 10000)); +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== +FROM query('SELECT (' || repeat('[', {depth}) || '1' || repeat(']', {depth}) || ') IS NOT NULL'); +-- +error: Parser Error: syntax error at or near "}" +== +FROM query('SELECT (' || repeat('[', 500) || '1' || repeat(']', 500) || ') IS NOT NULL AS result'); +-- +ok +== +FROM query('SELECT (NULL::INT' || repeat('[]', 100) || ') IS NULL'); +-- +ok +== +FROM query('SELECT (NULL::INT' || repeat('[]', 10000) || ') IS NULL'); +-- +error: Parser Error: Max expression depth limit of 1000 exceeded. Use "SET max_expression_depth TO x" to increase the maximum expression depth. +== diff --git a/parser/testdata/corpus/sql/peg_parser/deep_nesting.test.metadata.json b/parser/testdata/corpus/sql/peg_parser/deep_nesting.test.metadata.json new file mode 100644 index 0000000..153b2db --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/deep_nesting.test.metadata.json @@ -0,0 +1,6 @@ +{ + "todo": { + "3e03dfab7886be24": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "c2eee3b98c638244": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/peg_parser/enable_peg_parser.test b/parser/testdata/corpus/sql/peg_parser/enable_peg_parser.test index aef8193..e02b842 100644 --- a/parser/testdata/corpus/sql/peg_parser/enable_peg_parser.test +++ b/parser/testdata/corpus/sql/peg_parser/enable_peg_parser.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/enable_peg_parser.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select xvariable a = 1; diff --git a/parser/testdata/corpus/sql/peg_parser/escape_string.test b/parser/testdata/corpus/sql/peg_parser/escape_string.test index bc94ab7..ff50625 100644 --- a/parser/testdata/corpus/sql/peg_parser/escape_string.test +++ b/parser/testdata/corpus/sql/peg_parser/escape_string.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/escape_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT E'it\'s a test' = 'it''s a test'; diff --git a/parser/testdata/corpus/sql/peg_parser/expression_statement.test b/parser/testdata/corpus/sql/peg_parser/expression_statement.test deleted file mode 100644 index 5c6b6a4..0000000 --- a/parser/testdata/corpus/sql/peg_parser/expression_statement.test +++ /dev/null @@ -1,49 +0,0 @@ -# source: test/sql/peg_parser/expression_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -1 + 1; --- -ok -== -[1,2,3][1]; --- -ok -== -CREATE TABLE foo (i integer); --- -ok -== -INSERT INTO foo values (1), (2), (3); --- -ok -== -foo; --- -ok -== -('hello world').replace(' ', '_'); --- -ok -== -bar: 1 + 1 --- -ok -== -foo: 1 + 1, bar: ('hello world').replace(' ', '_'), [1,2,3][1] as list_element; --- -ok -== -1 + 1 foo --- -error: Parser Error: syntax error at or near "foo" -== -selec 42 --- -error: Parser Error: syntax error at or near "42" -== -SEL --- -ok -== diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0000.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0000.test index efa872e..de9f240 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0000.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0000.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0000.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DETACH IF EXISTS my_table; diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0002.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0002.test index 9b16432..28c7a19 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0002.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0002.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0002.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ANALYZE VERBOSE diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0004.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0004.test index 3a67b49..97f41d2 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0004.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0004.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0004.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP MATERIALIZED VIEW IF EXISTS t diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0007.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0007.test index a2e1cf9..f9c0cd6 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0007.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0007.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0007.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN ( entry ) RESET SESSION item diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0009.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0009.test index 27b646c..8d0f6ae 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0009.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0009.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0009.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE SEQUENCE t1 NO MINVALUE diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0014.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0014.test index ca6dad3..02cbb6d 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0014.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0014.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0014.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN RESET LOCAL result diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0020.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0020.test index 7fe6fec..c4cffd5 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0020.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0020.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0020.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE y AS DEALLOCATE PREPARE result diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0039.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0039.test index e98850b..81f3e7e 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0039.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0039.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0039.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t(i bigint); diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0060.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0060.test index ac5c5fc..b81f379 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0060.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/diverge_0060.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/diverge_0060.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t(i bigint);create table t1(i bigint); diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/fuzzer_4434.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/fuzzer_4434.test index ce83d8d..4ae4ee5 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/fuzzer_4434.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/fuzzer_4434.test @@ -1,14 +1,14 @@ # source: test/sql/peg_parser/fuzzer/fuzzer_4434.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit n''''+ST�&6>ttacrotablesampimportleT�&6>tta�rordeT�Niqeger[], e�tfilter% t_not_currorderent; -- -error: Parser Error: Empty subscript '[]' is not allowed +error: Parser Error: syntax error at or near "n''''" == -[1,2,3][]; +SELECT [1,2,3][]; -- error: Parser Error: Empty subscript '[]' is not allowed == diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0001.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0001.test index c0449ae..1f5f073 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0001.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0001.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/internal_0001.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SECRET ( x '\r' ); diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0206.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0206.test index d31a527..3a2fe81 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0206.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0206.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/internal_0206.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP COLLATION a diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0208.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0208.test index 445f52e..26629e0 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0208.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0208.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/internal_0208.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSTALL 'CWQqtzCCq9' FROM ''''' 'bj7OGvEqL' diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0227.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0227.test index c94f576..6d5cc55 100644 --- a/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0227.test +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/internal_0227.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/fuzzer/internal_0227.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table mytbl(i bigint); diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/new_parser_failure_0074.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/new_parser_failure_0074.test new file mode 100644 index 0000000..95d6c0f --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/new_parser_failure_0074.test @@ -0,0 +1,57 @@ +# source: test/sql/peg_parser/fuzzer/new_parser_failure_0074.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0) OVER () FROM (VALUES (2), (1), (3)) t(col0) LIMIT 1 +-- +ok +== +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0) FILTER (WHERE TRUE) OVER () FROM (VALUES (2), (1), (3)) t(col0) LIMIT 1 +-- +ok +== +CREATE TABLE t AS SELECT * FROM (VALUES (2), (1), (3), (3)) v(col0); +-- +ok +== +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0) FILTER (WHERE TRUE) OVER () FROM t LIMIT 1; +-- +ok +== +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0 DESC) OVER () FROM t LIMIT 1; +-- +ok +== +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0) FILTER (WHERE col0 > 1) OVER () FROM t LIMIT 1; +-- +ok +== +SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY col0) FILTER (WHERE col0 > 1) FROM t; +-- +ok +== +SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY col0) FILTER (WHERE col0 < 3) FROM t; +-- +ok +== +SELECT array_agg(col0 ORDER BY col0 DESC) WITHIN GROUP (ORDER BY col0) OVER () FROM t; +-- +error: Parser Error: Cannot use multiple ORDER BY statements with WITHIN GROUP +== +SELECT array_agg(DISTINCT col0) WITHIN GROUP (ORDER BY col0) OVER () FROM t; +-- +error: Parser Error: DISTINCT is not allowed in combination with WITHIN GROUP +== +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0, col0) OVER () FROM t; +-- +error: Parser Error: Cannot use multiple ORDER BY clauses with WITHIN GROUP +== +SELECT array_agg(col0) WITHIN GROUP (ORDER BY col0) FILTER (WHERE TRUE) FROM t; +-- +error: Parser Error: Unknown ordered aggregate "array_agg". +== +SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY col0) OVER () FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/fuzzer/new_parser_failure_0076.test b/parser/testdata/corpus/sql/peg_parser/fuzzer/new_parser_failure_0076.test new file mode 100644 index 0000000..de6a366 --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/fuzzer/new_parser_failure_0076.test @@ -0,0 +1,73 @@ +# source: test/sql/peg_parser/fuzzer/new_parser_failure_0076.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1 IN (1, 2) IN (TRUE, FALSE); +-- +ok +== +SELECT 3 IN (1, 2) IN (FALSE); +-- +ok +== +SELECT 1 IN (1, 2) NOT IN (FALSE); +-- +ok +== +SELECT 1 IN (1, 2) BETWEEN FALSE AND TRUE; +-- +ok +== +SELECT 1 IN (1, 2) NOT BETWEEN FALSE AND TRUE; +-- +ok +== +SELECT 1 IN (1) IN (TRUE) BETWEEN FALSE AND TRUE; +-- +ok +== +SELECT 1 IN [1, 2] IN (TRUE); +-- +ok +== +SELECT 1 IN (SELECT 1) IN (TRUE); +-- +ok +== +SELECT NOT 1 IN (1) IN (TRUE); +-- +ok +== +SELECT 1 IN (1) IN (FALSE) = FALSE; +-- +ok +== +SELECT FALSE OR 0 IN (1) IN (FALSE) AND TRUE; +-- +ok +== +SELECT 1 IN (1) LIKE 'true'; +-- +ok +== +SELECT 1 BETWEEN 0 AND 2 IN (TRUE); +-- +error: Parser Error: syntax error at or near "IN" +== +SELECT (1 BETWEEN 0 AND 2) IN (TRUE); +-- +ok +== +SELECT '1' LIKE '1' IN (TRUE); +-- +error: Parser Error: syntax error at or near "IN" +== +SELECT 'a' LIKE 'a' ESCAPE '' = TRUE; +-- +ok +== +SELECT 1 IN (1) LIKE 'true' ESCAPE '' IN (TRUE); +-- +error: Parser Error: syntax error at or near "IN" +== diff --git a/parser/testdata/corpus/sql/peg_parser/identifier.test b/parser/testdata/corpus/sql/peg_parser/identifier.test index 3b889fb..87cd609 100644 --- a/parser/testdata/corpus/sql/peg_parser/identifier.test +++ b/parser/testdata/corpus/sql/peg_parser/identifier.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/identifier.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 a; diff --git a/parser/testdata/corpus/sql/peg_parser/parser/alter.test b/parser/testdata/corpus/sql/peg_parser/parser/alter.test index 109ef97..6257694 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/alter.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/alter.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/alter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$ALTER TABLE tbl SET SORTED BY (i DESC NULLS FIRST)$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/analyze_vacuum.test b/parser/testdata/corpus/sql/peg_parser/parser/analyze_vacuum.test index 8df14e5..ac0aab2 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/analyze_vacuum.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/analyze_vacuum.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/analyze_vacuum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$ANALYZE;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/array_subquery.test b/parser/testdata/corpus/sql/peg_parser/parser/array_subquery.test index 2f02799..09c3763 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/array_subquery.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/array_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/array_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT i, ARRAY( SELECT 42 ) top FROM integers i1 ORDER BY i$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/attach_or_replace.test b/parser/testdata/corpus/sql/peg_parser/parser/attach_or_replace.test index d6bb826..f4c9c3e 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/attach_or_replace.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/attach_or_replace.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/attach_or_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$ATTACH OR REPLACE '{TEST_DIR}/attach_or_replace.db' AS db1;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/collate.test b/parser/testdata/corpus/sql/peg_parser/parser/collate.test index fe86668..044d509 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/collate.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/collate.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$select left(b collate de, 6) from tbl order by all;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/colon_alias.test b/parser/testdata/corpus/sql/peg_parser/parser/colon_alias.test index d011b2f..704b03d 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/colon_alias.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/colon_alias.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/colon_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT * FROM b : a$TEST_PEG_PARSER$); @@ -19,3 +19,19 @@ CALL check_peg_parser($TEST_PEG_PARSER$from my_wonderful_values : (values(42))$T -- ok == +CALL check_peg_parser($TEST_PEG_PARSER$SELECT t.a FROM t: (SELECT 42 AS a) ORDER BY t.a$TEST_PEG_PARSER$); +-- +ok +== +SELECT t.a FROM t: (SELECT 42 AS a) ORDER BY t.a +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$SELECT v.col0 FROM v: VALUES (42) ORDER BY v.col0$TEST_PEG_PARSER$); +-- +ok +== +SELECT v.col0 FROM v: VALUES (42) ORDER BY v.col0 +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/parser/comments.test b/parser/testdata/corpus/sql/peg_parser/parser/comments.test index 2257520..ec7a3c9 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/comments.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/comments.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/comments.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 /* I /* love */ comments */ + 2; @@ -12,6 +12,14 @@ SELECT 1 -- /* not a block */ rest -- ok == +SELECT 1+/**/2, 1*/**/2, 1+/* comment */2; +-- +ok +== +SELECT 8//**/2; +-- +ok +== CALL check_peg_parser($TEST_PEG_PARSER$SELECT 1 /* outer /* inner */ rest */ + 2;$TEST_PEG_PARSER$); -- ok diff --git a/parser/testdata/corpus/sql/peg_parser/parser/copy_expression.test b/parser/testdata/corpus/sql/peg_parser/parser/copy_expression.test index 29018db..d8423d7 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/copy_expression.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/copy_expression.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/copy_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$COPY (SELECT * FROM foo) TO ('foo') WITH (HEADER)$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/copy_file_name.test b/parser/testdata/corpus/sql/peg_parser/parser/copy_file_name.test new file mode 100644 index 0000000..8f196e3 --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/parser/copy_file_name.test @@ -0,0 +1,97 @@ +# source: test/sql/peg_parser/parser/copy_file_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE OR REPLACE TABLE copy_file_name(a INTEGER); +-- +ok +== +INSERT INTO copy_file_name VALUES (1), (2); +-- +ok +== +SET file_search_path='{TEST_DIR}'; +-- +ok +== +EXPLAIN COPY copy_file_name TO parity.{suffix} (FORMAT CSV); +-- +error: Parser Error: syntax error at or near "{" +== +EXPLAIN COPY (SELECT 1) TO parity.{suffix} (FORMAT CSV); +-- +error: Parser Error: syntax error at or near "{" +== +COPY copy_file_name TO "{TEST_DIR}/copy_file_name".{suffix} (FORMAT CSV); +-- +error: Parser Error: syntax error at or near "{" +== +CREATE OR REPLACE TABLE copy_file_name_result(a INTEGER); +-- +ok +== +COPY copy_file_name_result FROM copy_file_name.{suffix} (FORMAT CSV); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT * FROM copy_file_name_result ORDER BY a; +-- +ok +== +COPY copy_file_name TO "{TEST_DIR}/copy_file_name_auto".csv.gz; +-- +ok +== +CREATE OR REPLACE TABLE copy_file_name_compressed(a INTEGER); +-- +ok +== +COPY copy_file_name_compressed FROM copy_file_name_auto.csv.gz; +-- +ok +== +SELECT * FROM copy_file_name_compressed ORDER BY a; +-- +ok +== +SELECT starts_with(hex(content), '1F8B') FROM read_blob('{TEST_DIR}/copy_file_name_auto.csv.gz'); +-- +ok +== +EXPLAIN COPY copy_file_name TO 'parity.csv' (FORMAT CSV); +-- +ok +== +EXPLAIN COPY copy_file_name TO parity CSV HEADER; +-- +ok +== +EXPLAIN COPY copy_file_name TO stdout (FORMAT CSV); +-- +ok +== +COPY copy_file_name_result FROM '{TEST_DIR}/copy_file_name.csv' (FORMAT CSV); +-- +ok +== +SELECT count(*) FROM copy_file_name_result; +-- +ok +== +COPY copy_file_name {direction} parity.csv. (FORMAT CSV); +-- +error: Parser Error: syntax error at or near "{" +== +COPY copy_file_name {direction} parity. (FORMAT CSV); +-- +error: Parser Error: syntax error at or near "{" +== +COPY (SELECT 3 AS a) TO "{TEST_DIR}/copy_select_file_name".csv.gz (FORMAT CSV); +-- +ok +== +SELECT * FROM read_csv('{TEST_DIR}/copy_select_file_name.csv.gz'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/parser/create_macro.test b/parser/testdata/corpus/sql/peg_parser/parser/create_macro.test index 7d33547..aefbf49 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/create_macro.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/create_macro.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/create_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$create macro my_range(x) as table from range(x);$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/create_table.test b/parser/testdata/corpus/sql/peg_parser/parser/create_table.test index 650d6ac..746d44e 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/create_table.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/create_table.test @@ -1,12 +1,50 @@ # source: test/sql/peg_parser/parser/create_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$CREATE TABLE test (bar GENERATED ALWAYS AS (1));$TEST_PEG_PARSER$); -- ok == +CREATE TABLE generated_by_default(b INTEGER, a INTEGER GENERATED BY DEFAULT AS (b + 1)); +-- +error: Parser Error: for a generated column, GENERATED ALWAYS must be specified +== +CREATE TABLE generated_by_default_stored(b INTEGER, a INTEGER GENERATED BY DEFAULT AS (b + 1) STORED); +-- +error: Parser Error: for a generated column, GENERATED ALWAYS must be specified +== +CREATE TABLE generated_without_always(b INTEGER, a INTEGER GENERATED AS (b + 1)); +-- +error: Parser Error: syntax error at or near "AS" +== +CREATE TABLE generated_always(b INTEGER, a INTEGER GENERATED ALWAYS AS (b + 1)); +-- +ok +== +CREATE TABLE generated_shorthand(b INTEGER, a INTEGER AS (b + 1)); +-- +ok +== +INSERT INTO generated_always(b) VALUES (41); +-- +ok +== +INSERT INTO generated_shorthand(b) VALUES (41); +-- +ok +== +SELECT table_name, a +FROM ( + SELECT 'generated_always' AS table_name, a FROM generated_always + UNION ALL + SELECT 'generated_shorthand' AS table_name, a FROM generated_shorthand +) +ORDER BY table_name; +-- +ok +== CALL check_peg_parser($TEST_PEG_PARSER$CREATE TABLE database.schema.table(col INTEGER);$TEST_PEG_PARSER$); -- ok @@ -31,3 +69,15 @@ CALL check_peg_parser($TEST_PEG_PARSER$CREATE TABLE tbl8 AS SELECT 42 WITH NO DA -- ok == +CREATE TABLE dotted_column_name(a.b INTEGER); +-- +error: Parser Error: syntax error at or near "." +== +CREATE TABLE dotted_column_name("a.b" INTEGER); +-- +ok +== +DESCRIBE dotted_column_name; +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/parser/create_type.test b/parser/testdata/corpus/sql/peg_parser/parser/create_type.test index 5c76cd8..a4c8413 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/create_type.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/create_type.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/create_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$CREATE TYPE t4 AS UNION ( v0 SETOF t4 );$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/custom_operator.test b/parser/testdata/corpus/sql/peg_parser/parser/custom_operator.test index 0732428..3566aa0 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/custom_operator.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/custom_operator.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/custom_operator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT i FROM tbl WHERE i >>= '127.0.0.1/8';$TEST_PEG_PARSER$); @@ -15,6 +15,14 @@ CALL check_peg_parser($TEST_PEG_PARSER$SELECT 2**2 + 1;$TEST_PEG_PARSER$); -- ok == +CALL check_peg_parser($TEST_PEG_PARSER$SELECT 1 @@@ 2;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$SELECT 1 @ 2;$TEST_PEG_PARSER$); +-- +ok +== CALL check_peg_parser($TEST_PEG_PARSER$select 1 not null; $TEST_PEG_PARSER$); -- ok diff --git a/parser/testdata/corpus/sql/peg_parser/parser/delete_from.test b/parser/testdata/corpus/sql/peg_parser/parser/delete_from.test index e5a8c46..6306dc1 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/delete_from.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/delete_from.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/delete_from.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$DELETE FROM integers i1 WHERE i>(SELECT MAX(i) FROM integers WHERE i1.i<>i)$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/dollar_quoted.test b/parser/testdata/corpus/sql/peg_parser/parser/dollar_quoted.test index 759bd06..efa9ae7 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/dollar_quoted.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/dollar_quoted.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/dollar_quoted.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$set variable time_travel_snapshot_id = $$foo$$$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/dotted_functions.test b/parser/testdata/corpus/sql/peg_parser/parser/dotted_functions.test index 8218498..618561c 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/dotted_functions.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/dotted_functions.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/dotted_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$select trim('a')$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/empty_map.test b/parser/testdata/corpus/sql/peg_parser/parser/empty_map.test index 829485b..778f4c7 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/empty_map.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/empty_map.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/empty_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT MAP {};$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/ignore_nulls.test b/parser/testdata/corpus/sql/peg_parser/parser/ignore_nulls.test index a3c0113..8d3019c 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/ignore_nulls.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/ignore_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/ignore_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$explain select first_value(i IGNORE NULLS) over () from integers$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/index.test b/parser/testdata/corpus/sql/peg_parser/parser/index.test index 6b92229..05733bc 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/index.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/index.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$create unique index part_comp_key_index on insertconflicttest(key, fruit) where 1;$TEST_PEG_PARSER$); @@ -23,3 +23,38 @@ CALL check_peg_parser($TEST_PEG_PARSER$DROP INDEX s.i_index;$TEST_PEG_PARSER$); -- ok == +CREATE TABLE create_index_syntax(a INTEGER, b INTEGER); +-- +ok +== +CREATE INDEX duplicate_index_list ON create_index_syntax(a) (b); +-- +error: Parser Error: syntax error at or near "(" +== +CREATE INDEX missing_index_list ON create_index_syntax; +-- +error: Parser Error: syntax error at or near ";" +== +CREATE INDEX plain_index ON create_index_syntax(a, b); +-- +ok +== +CREATE INDEX expression_index ON create_index_syntax((a + b)); +-- +ok +== +CREATE INDEX using_index ON create_index_syntax USING ART(a); +-- +ok +== +SELECT index_name, sql, expressions +FROM duckdb_indexes() +WHERE table_name = 'create_index_syntax' +ORDER BY index_name; +-- +ok +== +CREATE INDEX missing_column_index ON create_index_syntax(missing); +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/parser/insert.test b/parser/testdata/corpus/sql/peg_parser/parser/insert.test index 94f4817..2ef0c32 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/insert.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/insert.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT TRUE OFFSET 1 ROWS;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/insert_statement.test b/parser/testdata/corpus/sql/peg_parser/parser/insert_statement.test index 764368f..0c5422f 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/insert_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/insert_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/insert_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$INSERT INTO v0 BY POSITION ( SELECT TRUE ) OFFSET 1 ROWS RETURNING v0 . * EXCLUDE c1 ;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/invisible_space.test b/parser/testdata/corpus/sql/peg_parser/parser/invisible_space.test index 5c7d49e..6e24807 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/invisible_space.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/invisible_space.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/invisible_space.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$ $TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/lambda_functions.test b/parser/testdata/corpus/sql/peg_parser/parser/lambda_functions.test index 938c0a7..1b539e4 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/lambda_functions.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/lambda_functions.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/lambda_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$select histogram(g) from hist_data group by g%2==0 ORDER BY g%2==0$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/list_slices.test b/parser/testdata/corpus/sql/peg_parser/parser/list_slices.test index 65fdaf0..a9c227f 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/list_slices.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/list_slices.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/list_slices.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT ([1,2,3])[1:-1:1];$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/load_extension.test b/parser/testdata/corpus/sql/peg_parser/parser/load_extension.test index cc77b1c..64a8746 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/load_extension.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/load_extension.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/load_extension.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$INSTALL tpch;$TEST_PEG_PARSER$); @@ -23,3 +23,67 @@ CALL check_peg_parser($TEST_PEG_PARSER$LOAD '{SPATIAL_EXTENSION}'$TEST_PEG_PARSE -- ok == +CALL check_peg_parser($TEST_PEG_PARSER$INSTALL AND LOAD tpch;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$INSTALL AND LOAD tpch FROM core;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$FORCE INSTALL AND LOAD tpch;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$INSTALL tpch FROM core;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$INSTALL my_package FROM my_repo;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$LOAD tpch FROM core;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$LOAD shellfs FROM community;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$LOAD my_package FROM my_repo AS mp;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$CREATE EXTENSION REPOSITORY acme WITH PREFIX 'http://acme.com' USING PUBLIC KEY 'mykey';$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$CREATE OR REPLACE EXTENSION REPOSITORY acme WITH PREFIX 'http://acme.com' USING PUBLIC KEY 'mykey';$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$CREATE EXTENSION REPOSITORY IF NOT EXISTS acme WITH PREFIX 'http://acme.com' USING PUBLIC KEY 'mykey';$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$CREATE EXTENSION REPOSITORY acme WITH PREFIX 'http://acme.com';$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$CREATE EXTENSION REPOSITORY acme PREFIX 'http://acme.com' PUBLIC KEY 'mykey';$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$CREATE EXTENSION REPOSITORY acme WITH PREFIX 'http://acme.com' USING PUBLIC KEYS 'key1', 'key2';$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$DROP EXTENSION REPOSITORY acme;$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$DROP EXTENSION REPOSITORY IF EXISTS acme;$TEST_PEG_PARSER$); +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/parser/map.test b/parser/testdata/corpus/sql/peg_parser/parser/map.test index 1eeb2ed..da79a49 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/map.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/map.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$INSERT INTO test VALUES (MAP {ROW(3,3): ROW(1, 1)}), (MAP {ROW(4,4): ROW(2, 2)})$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/merge_into.test b/parser/testdata/corpus/sql/peg_parser/parser/merge_into.test index 0b37a53..5c888c0 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/merge_into.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/merge_into.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/merge_into.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$WITH initial_stocks(item_id, balance) AS (VALUES (10, 2200), (20, 1900)) MERGE INTO Stock USING initial_stocks ON FALSE WHEN MATCHED THEN DO NOTHING WHEN NOT MATCHED THEN INSERT VALUES (initial_stocks.item_id, initial_stocks.balance) RETURNING merge_action, *$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/named_parameters.test b/parser/testdata/corpus/sql/peg_parser/parser/named_parameters.test index bf9ec89..84f4400 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/named_parameters.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/named_parameters.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/named_parameters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT * FROM read_csv('file.csv', columns := {'a': 'INTEGER'})$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/nested_join.test b/parser/testdata/corpus/sql/peg_parser/parser/nested_join.test index bb2ce13..42e37b6 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/nested_join.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/nested_join.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/nested_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$from tenk1 join tenk1 join int8_tbl on 1 = 1 on 1 = 1;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/on_conflict.test b/parser/testdata/corpus/sql/peg_parser/parser/on_conflict.test index 2e5f963..bd07a4f 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/on_conflict.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/on_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/on_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$INSERT INTO tbl_comp VALUES (2, 'hello', 1, 'world') ON CONFLICT (c, b) DO UPDATE SET a = excluded.a, d = excluded.d;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/pivot_statement.test b/parser/testdata/corpus/sql/peg_parser/parser/pivot_statement.test index 0914c14..cc4d764 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/pivot_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/pivot_statement.test @@ -1,9 +1,17 @@ # source: test/sql/peg_parser/parser/pivot_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT * FROM oncall UNPIVOT ((name) FOR precedence IN ((name1), (name2)));$TEST_PEG_PARSER$); -- ok == +CALL check_peg_parser($TEST_PEG_PARSER$PIVOT t ON year USING sum(sales) GROUP BY (g);$TEST_PEG_PARSER$); +-- +ok +== +CALL check_peg_parser($TEST_PEG_PARSER$UNPIVOT t ON jan, feb INTO NAME m VALUE (jan);$TEST_PEG_PARSER$); +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/parser/position.test b/parser/testdata/corpus/sql/peg_parser/parser/position.test index 4a00905..53da56f 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/position.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/position.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/position.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT POSITION('a' || 'b' IN 'xab')$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/recursive.test b/parser/testdata/corpus/sql/peg_parser/parser/recursive.test index 27e0eca..cee8f3e 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/recursive.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/recursive.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/recursive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$CREATE RECURSIVE VIEW nums (n) AS VALUES (1) UNION ALL SELECT n+1;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/sample.test b/parser/testdata/corpus/sql/peg_parser/parser/sample.test index 5195e8c..b020dc2 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/sample.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/sample.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$select count(*)$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/scientific_notation.test b/parser/testdata/corpus/sql/peg_parser/parser/scientific_notation.test index c9efd57..04debc3 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/scientific_notation.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/scientific_notation.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/scientific_notation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$select +1234.56789e-1$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/select_star.test b/parser/testdata/corpus/sql/peg_parser/parser/select_star.test index 5bafd1a..bac0abf 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/select_star.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/select_star.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/select_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT integers.* EXCLUDE ('i')$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/show_table.test b/parser/testdata/corpus/sql/peg_parser/parser/show_table.test index b2a63c2..4fea5e9 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/show_table.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/show_table.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/show_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SHOW TABLES FROM db.main$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/struct_identifier.test b/parser/testdata/corpus/sql/peg_parser/parser/struct_identifier.test index 6cce1c7..7576beb 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/struct_identifier.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/struct_identifier.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/struct_identifier.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$ALTER TABLE test ADD COLUMN s.i INTEGER$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/support_optional_not_null_constraint.test b/parser/testdata/corpus/sql/peg_parser/parser/support_optional_not_null_constraint.test index 9fc0f6e..c09a035 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/support_optional_not_null_constraint.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/support_optional_not_null_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/support_optional_not_null_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$CREATE TABLE tag_8764 ( key VARCHAR(65535) NOT NULL, name VARCHAR(65535) NULL, value VARCHAR(65535) NOT NULL, PRIMARY KEY (key, name) );$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/support_try.test b/parser/testdata/corpus/sql/peg_parser/parser/support_try.test index 0e45043..1345b60 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/support_try.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/support_try.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/support_try.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$select TRY(~CAST('abc' as INTEGER))$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/support_unreserved_keywords.test b/parser/testdata/corpus/sql/peg_parser/parser/support_unreserved_keywords.test index 0535e0f..941af49 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/support_unreserved_keywords.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/support_unreserved_keywords.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/support_unreserved_keywords.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$CREATE OR REPLACE TABLE 'everflow_daily' AS SELECT *$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/type.test b/parser/testdata/corpus/sql/peg_parser/parser/type.test index 08e30a4..b37fe12 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/type.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/type.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$CREATE TYPE type_int AS ENUM (SELECT 1);$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/update_statement.test b/parser/testdata/corpus/sql/peg_parser/parser/update_statement.test index b024ef4..ab907db 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/update_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/update_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/update_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$UPDATE temp.a SET i = 44$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/use_statement.test b/parser/testdata/corpus/sql/peg_parser/parser/use_statement.test index d3c1e01..53ed6b8 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/use_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/use_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/use_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$use my_datalake.default;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/window_function.test b/parser/testdata/corpus/sql/peg_parser/parser/window_function.test index 4a6235a..5cb4f2c 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/window_function.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/window_function.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/window_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$explain select first_value(i IGNORE NULLS) over () from integers;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/parser/with_ordinality.test b/parser/testdata/corpus/sql/peg_parser/parser/with_ordinality.test index f47eb6d..a8d727c 100644 --- a/parser/testdata/corpus/sql/peg_parser/parser/with_ordinality.test +++ b/parser/testdata/corpus/sql/peg_parser/parser/with_ordinality.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/parser/with_ordinality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$FROM foo() WITH ORDINALITY AS _(ordinality);$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/peg_syntax_error.test b/parser/testdata/corpus/sql/peg_parser/peg_syntax_error.test index 286fd3c..6d66337 100644 --- a/parser/testdata/corpus/sql/peg_parser/peg_syntax_error.test +++ b/parser/testdata/corpus/sql/peg_parser/peg_syntax_error.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/peg_syntax_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (1 + (2 * 3) diff --git a/parser/testdata/corpus/sql/peg_parser/qualified_operator.test b/parser/testdata/corpus/sql/peg_parser/qualified_operator.test index b4e4c93..03831eb 100644 --- a/parser/testdata/corpus/sql/peg_parser/qualified_operator.test +++ b/parser/testdata/corpus/sql/peg_parser/qualified_operator.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/qualified_operator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 1 OPERATOR(main.+) 2; diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/alter_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/alter_statement.test index b31ee71..0625797 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/alter_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/alter_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/alter_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test3(s integer); diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/attach_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/attach_statement.test index 6c40f17..6f8d184 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/attach_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/attach_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/attach_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET VARIABLE db_type='DUCKDB'; @@ -11,6 +11,10 @@ ATTACH ':memory:' AS db1 (TYPE getvariable('db_type')); -- ok == +ATTACH ':memory:' AS duplicate_options (TYPE duckdb, TYPE sqlite); +-- +error: Parser Error: Unexpected duplicate option "type" +== ATTACH '{TEST_DIR}/attach_read_only.db' AS db2 -- ok diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/between_asymmetric.test b/parser/testdata/corpus/sql/peg_parser/transformer/between_asymmetric.test new file mode 100644 index 0000000..446e3a5 --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/transformer/between_asymmetric.test @@ -0,0 +1,25 @@ +# source: test/sql/peg_parser/transformer/between_asymmetric.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 5 BETWEEN ASYMMETRIC 1 AND 10; +-- +ok +== +SELECT 5 NOT BETWEEN ASYMMETRIC 1 AND 10; +-- +ok +== +SELECT 5 BETWEEN 1 AND 10; +-- +ok +== +SELECT 5 BETWEEN ASYMMETRIC 10 AND 1; +-- +ok +== +SELECT 5 NOT BETWEEN ASYMMETRIC 10 AND 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/call_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/call_statement.test index ff24f4a..04e5a8f 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/call_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/call_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/call_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL enable_logging(['FileSystem'], storage='file', storage_config={'path': '{TEST_DIR}/logging_csv_log.csv', 'normalize': false}); diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/delete_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/delete_statement.test index 94d4127..483be18 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/delete_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/delete_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/delete_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers (i bigint); diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/drop_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/drop_statement.test index 514995a..641fe14 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/drop_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/drop_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/drop_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP MACRO plus1; diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/is_predicate_operators.test b/parser/testdata/corpus/sql/peg_parser/transformer/is_predicate_operators.test new file mode 100644 index 0000000..36cddb9 --- /dev/null +++ b/parser/testdata/corpus/sql/peg_parser/transformer/is_predicate_operators.test @@ -0,0 +1,77 @@ +# source: test/sql/peg_parser/transformer/is_predicate_operators.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1 IS NULL = FALSE; +-- +ok +== +SELECT 1 IS NOT NULL = TRUE; +-- +ok +== +SELECT NULL ISNULL = TRUE; +-- +ok +== +SELECT NULL NOTNULL = FALSE; +-- +ok +== +SELECT 1 IS UNKNOWN = FALSE; +-- +ok +== +SELECT 1 IS NULL || ''; +-- +ok +== +SELECT 1 IS DISTINCT FROM 2; +-- +ok +== +SELECT 1 IS NOT DISTINCT FROM 1; +-- +ok +== +SELECT 1 = 1 IS DISTINCT FROM FALSE; +-- +ok +== +SELECT 1 IS NULL IS DISTINCT FROM TRUE; +-- +ok +== +SELECT 1 IS NOT NULL IS NOT DISTINCT FROM TRUE; +-- +ok +== +SELECT (1 + 2) IS NULL = FALSE; +-- +ok +== +SELECT (1 IS NULL) = FALSE; +-- +ok +== +SELECT 1 = 1 IS NULL; +-- +ok +== +SELECT (NULL, 1, NULL) <> (5, 6, 7) IS NULL; +-- +ok +== +SELECT 'abc' ~ ANY(['z', NULL]) IS NULL; +-- +ok +== +SELECT 1 IS NULL = FALSE = TRUE; +-- +error: Parser Error: Chained comparisons are not supported, use AND to combine comparisons +== +SELECT 1 IS NULL IS DISTINCT FROM FALSE IS DISTINCT FROM TRUE; +-- +error: Parser Error: Chained comparisons are not supported, use AND to combine comparisons +== diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/load_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/load_statement.test index 85c2a43..85974eb 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/load_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/load_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/load_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set extension_directory='{TEST_DIR}/install_extension' diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/peg_transformer.test b/parser/testdata/corpus/sql/peg_parser/transformer/peg_transformer.test index c04fcf0..3b14d7c 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/peg_transformer.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/peg_transformer.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/peg_transformer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 1; diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test index ec2bfe2..0b354c0 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/set_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set VARIABLE dataset_size = 122880; @@ -15,10 +15,6 @@ SET GLOBAL enable_progress_bar=true; -- ok == -SET TimeZone='UTC'; --- -ok -== SET TIME ZONE 'UTC'; -- ok diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test.metadata.json b/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test.metadata.json deleted file mode 100644 index 9811c4f..0000000 --- a/parser/testdata/corpus/sql/peg_parser/transformer/set_statement.test.metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "todo": { - "137ba824c42917c0": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" - } -} diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/special_string.test b/parser/testdata/corpus/sql/peg_parser/transformer/special_string.test index 1846938..a84d851 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/special_string.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/special_string.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/special_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select B'1010'; diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/statement_length.test b/parser/testdata/corpus/sql/peg_parser/transformer/statement_length.test index 1e4578c..74901fc 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/statement_length.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/statement_length.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/statement_length.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET allow_parser_override_extension = strict; diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/transaction_statement.test b/parser/testdata/corpus/sql/peg_parser/transformer/transaction_statement.test index 1638b51..11b56dd 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/transaction_statement.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/transaction_statement.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/transaction_statement.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit BEGIN TRANSACTION READ ONLY; diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/trim.test b/parser/testdata/corpus/sql/peg_parser/transformer/trim.test index 09d2812..808edb5 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/trim.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/trim.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/trim.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRIM(TRAILING FROM 'hello'); diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/unary_expression.test b/parser/testdata/corpus/sql/peg_parser/transformer/unary_expression.test index 9157606..f3f9070 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/unary_expression.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/unary_expression.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/unary_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$SELECT - + 16;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/update_extensions.test b/parser/testdata/corpus/sql/peg_parser/transformer/update_extensions.test index 9d75519..e294b71 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/update_extensions.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/update_extensions.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/transformer/update_extensions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL check_peg_parser($TEST_PEG_PARSER$UPDATE EXTENSIONS;$TEST_PEG_PARSER$); diff --git a/parser/testdata/corpus/sql/peg_parser/transformer/use_statement_trampoline.test b/parser/testdata/corpus/sql/peg_parser/transformer/use_statement.test similarity index 65% rename from parser/testdata/corpus/sql/peg_parser/transformer/use_statement_trampoline.test rename to parser/testdata/corpus/sql/peg_parser/transformer/use_statement.test index 47009ae..99a0e64 100644 --- a/parser/testdata/corpus/sql/peg_parser/transformer/use_statement_trampoline.test +++ b/parser/testdata/corpus/sql/peg_parser/transformer/use_statement.test @@ -1,13 +1,13 @@ -# source: test/sql/peg_parser/transformer/use_statement_trampoline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# source: test/sql/peg_parser/transformer/use_statement.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH ':memory:' AS trampoline_use_catalog -- ok == -SET debug_transformer_trampoline_style=true +ATTACH ':memory:' AS "my""db" -- ok == @@ -31,6 +31,14 @@ USE "trampoline_use_catalog"."main" -- ok == +USE 'main' +-- +ok +== +USE 'trampoline_use_catalog' +-- +ok +== USE temp -- ok diff --git a/parser/testdata/corpus/sql/peg_parser/unterminated_literals.test b/parser/testdata/corpus/sql/peg_parser/unterminated_literals.test index 09e895f..42d3636 100644 --- a/parser/testdata/corpus/sql/peg_parser/unterminated_literals.test +++ b/parser/testdata/corpus/sql/peg_parser/unterminated_literals.test @@ -1,6 +1,6 @@ # source: test/sql/peg_parser/unterminated_literals.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'hello @@ -19,3 +19,7 @@ SELECT "my_col -- error: Parser Error: unterminated quoted identifier == +SELECT 1 /*; +-- +error: Parser Error: unterminated /* comment at or near "/*;" +== diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_attribute.test b/parser/testdata/corpus/sql/pg_catalog/pg_attribute.test index 86427e0..4128646 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_attribute.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_attribute.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_attribute.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_attribute diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_constraint.test b/parser/testdata/corpus/sql/pg_catalog/pg_constraint.test index 68d9c1b..ace83ee 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_constraint.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_constraint diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_database.test b/parser/testdata/corpus/sql/pg_catalog/pg_database.test index 06b6497..b3f20c8 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_database.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_database.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_database.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_database diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_depend.test b/parser/testdata/corpus/sql/pg_catalog/pg_depend.test index 07f0fd9..6d47193 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_depend.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_depend.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_depend.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_depend ORDER BY ALL diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_enum.test b/parser/testdata/corpus/sql/pg_catalog/pg_enum.test index e0d51b9..06c75cd 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_enum.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_enum.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_enum diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_index.test b/parser/testdata/corpus/sql/pg_catalog/pg_index.test index 597c7a4..5f4855c 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_index.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_index.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j INTEGER, k INTEGER) diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_namespace.test b/parser/testdata/corpus/sql/pg_catalog/pg_namespace.test index 9fd5a15..40ff0bc 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_namespace.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_namespace.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_namespace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM pg_namespace WHERE nspname='myschema' diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_prepared_statements.test b/parser/testdata/corpus/sql/pg_catalog/pg_prepared_statements.test index 6d92632..1a0e161 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_prepared_statements.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_prepared_statements.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_prepared_statements.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit prepare p1 as select 42; diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_privilege.test b/parser/testdata/corpus/sql/pg_catalog/pg_privilege.test index bef666f..eff6d18 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_privilege.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_privilege.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_privilege.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {function}('main', 'test') diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_sequence.test b/parser/testdata/corpus/sql/pg_catalog/pg_sequence.test index 385d614..e94af69 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_sequence.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_sequence diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_sequences.test b/parser/testdata/corpus/sql/pg_catalog/pg_sequences.test index 72b266d..cc0cb20 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_sequences.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_sequences.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_sequences.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_sequences diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_settings.test b/parser/testdata/corpus/sql/pg_catalog/pg_settings.test index da0e723..af48561 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_settings.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_settings.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_settings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_settings; diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_tablespace.test b/parser/testdata/corpus/sql/pg_catalog/pg_tablespace.test index 8c303e8..029dd88 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_tablespace.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_tablespace.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_tablespace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_tablespace diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_type.test b/parser/testdata/corpus/sql/pg_catalog/pg_type.test index 2478885..56631da 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_type.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_type.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE greeting AS ENUM('hi', 'bonjour', 'konnichiwa', 'howdy') diff --git a/parser/testdata/corpus/sql/pg_catalog/pg_views.test b/parser/testdata/corpus/sql/pg_catalog/pg_views.test index 0cecdcf..2cfd151 100644 --- a/parser/testdata/corpus/sql/pg_catalog/pg_views.test +++ b/parser/testdata/corpus/sql/pg_catalog/pg_views.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/pg_views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pg_views diff --git a/parser/testdata/corpus/sql/pg_catalog/sqlalchemy.test b/parser/testdata/corpus/sql/pg_catalog/sqlalchemy.test index 64bae43..bc6d67a 100644 --- a/parser/testdata/corpus/sql/pg_catalog/sqlalchemy.test +++ b/parser/testdata/corpus/sql/pg_catalog/sqlalchemy.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/sqlalchemy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integral_values ( diff --git a/parser/testdata/corpus/sql/pg_catalog/system_functions.test b/parser/testdata/corpus/sql/pg_catalog/system_functions.test index 8e3eb99..38a8669 100644 --- a/parser/testdata/corpus/sql/pg_catalog/system_functions.test +++ b/parser/testdata/corpus/sql/pg_catalog/system_functions.test @@ -1,6 +1,6 @@ # source: test/sql/pg_catalog/system_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CURRENT_USER diff --git a/parser/testdata/corpus/sql/pivot/optional_pivots.test b/parser/testdata/corpus/sql/pivot/optional_pivots.test index 1daaff8..4c7b146 100644 --- a/parser/testdata/corpus/sql/pivot/optional_pivots.test +++ b/parser/testdata/corpus/sql/pivot/optional_pivots.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/optional_pivots.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Cities(Country VARCHAR, Name VARCHAR, Year INT, Population INT); @@ -47,6 +47,10 @@ PIVOT Cities USING SUM(Population) GROUP BY Country; -- ok == +PIVOT Cities ON Year USING SUM(Population) GROUP BY (Country); +-- +ok +== PIVOT Cities GROUP BY Country; -- ok diff --git a/parser/testdata/corpus/sql/pivot/pivot_15141.test b/parser/testdata/corpus/sql/pivot/pivot_15141.test index e24e581..a4597b0 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_15141.test +++ b/parser/testdata/corpus/sql/pivot/pivot_15141.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_15141.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table p (col1 timestamp, col2 int); diff --git a/parser/testdata/corpus/sql/pivot/pivot_6390.test b/parser/testdata/corpus/sql/pivot/pivot_6390.test index 9282d2d..14f86b0 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_6390.test +++ b/parser/testdata/corpus/sql/pivot/pivot_6390.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_6390.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE cpb_tbl AS diff --git a/parser/testdata/corpus/sql/pivot/pivot_bigquery.test b/parser/testdata/corpus/sql/pivot/pivot_bigquery.test index 33fd86a..b91977b 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_bigquery.test +++ b/parser/testdata/corpus/sql/pivot/pivot_bigquery.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_bigquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Produce AS diff --git a/parser/testdata/corpus/sql/pivot/pivot_case_insensitive.test b/parser/testdata/corpus/sql/pivot/pivot_case_insensitive.test index 064c67d..6c12f39 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_case_insensitive.test +++ b/parser/testdata/corpus/sql/pivot/pivot_case_insensitive.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_case_insensitive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Cities (Name VARCHAR, id INTEGER); diff --git a/parser/testdata/corpus/sql/pivot/pivot_databricks.test b/parser/testdata/corpus/sql/pivot/pivot_databricks.test index b140f94..95bde83 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_databricks.test +++ b/parser/testdata/corpus/sql/pivot/pivot_databricks.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_databricks.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP VIEW sales(year, quarter, region, sales) AS diff --git a/parser/testdata/corpus/sql/pivot/pivot_empty.test b/parser/testdata/corpus/sql/pivot/pivot_empty.test index dffa150..6b2932d 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_empty.test +++ b/parser/testdata/corpus/sql/pivot/pivot_empty.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PIVOT Cities ON Country USING SUM(Population); diff --git a/parser/testdata/corpus/sql/pivot/pivot_empty_string_value.test b/parser/testdata/corpus/sql/pivot/pivot_empty_string_value.test new file mode 100644 index 0000000..343018d --- /dev/null +++ b/parser/testdata/corpus/sql/pivot/pivot_empty_string_value.test @@ -0,0 +1,33 @@ +# source: test/sql/pivot/pivot_empty_string_value.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET pivot_filter_threshold = 1 +-- +ok +== +CREATE TABLE z AS PIVOT (SELECT * FROM (VALUES (''), ('a')) t(v)) ON v USING count(*) +-- +ok +== +SELECT column_name FROM duckdb_columns() WHERE table_name = 'z' ORDER BY ALL +-- +ok +== +RESET pivot_filter_threshold +-- +ok +== +CREATE TABLE z2 AS PIVOT (SELECT * FROM (VALUES (''), ('a')) t(v)) ON v USING count(*) +-- +ok +== +SELECT column_name FROM duckdb_columns() WHERE table_name = 'z2' ORDER BY ALL +-- +ok +== +SELECT count(*) FROM (PIVOT (SELECT CASE WHEN r = 0 THEN '' ELSE 'x' || r END v FROM range(21) t(r)) ON v USING count(*)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/pivot/pivot_enum.test b/parser/testdata/corpus/sql/pivot/pivot_enum.test index b20b1a4..4afe805 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_enum.test +++ b/parser/testdata/corpus/sql/pivot/pivot_enum.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE monthly_sales(empid INT, amount INT, month TEXT); diff --git a/parser/testdata/corpus/sql/pivot/pivot_errors.test b/parser/testdata/corpus/sql/pivot/pivot_errors.test index 3df2115..35000e0 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_errors.test +++ b/parser/testdata/corpus/sql/pivot/pivot_errors.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INT, j VARCHAR); @@ -31,3 +31,15 @@ FROM tbl PIVOT (c FOR IN enum_val); -- error: Parser Error: syntax error at or near "IN" == +SELECT * FROM (SELECT 1 AS a, 'x' AS b) t PIVOT (sum(a) FOR b IN (CAST(map() AS INTEGER))); +-- +ok +== +PIVOT test ON j IN (row()); +-- +ok +== +PIVOT test ON j IN (row(row())); +-- +ok +== diff --git a/parser/testdata/corpus/sql/pivot/pivot_expressions.test b/parser/testdata/corpus/sql/pivot/pivot_expressions.test index 8456731..20731e1 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_expressions.test +++ b/parser/testdata/corpus/sql/pivot/pivot_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PIVOT Cities ON Country || '_' || Name USING SUM(Population) GROUP BY Year; diff --git a/parser/testdata/corpus/sql/pivot/pivot_generated.test b/parser/testdata/corpus/sql/pivot/pivot_generated.test index 7daaa85..28f7694 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_generated.test +++ b/parser/testdata/corpus/sql/pivot/pivot_generated.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_generated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Product(DaysToManufacture int, StandardCost int GENERATED ALWAYS AS (DaysToManufacture * 5)); diff --git a/parser/testdata/corpus/sql/pivot/pivot_identical_aggregates_names.test b/parser/testdata/corpus/sql/pivot/pivot_identical_aggregates_names.test new file mode 100644 index 0000000..f7a3785 --- /dev/null +++ b/parser/testdata/corpus/sql/pivot/pivot_identical_aggregates_names.test @@ -0,0 +1,13 @@ +# source: test/sql/pivot/pivot_identical_aggregates_names.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PIVOT (SELECT 'k' || (r % 21) a, r v FROM range(42) t(r)) ON a USING sum(v) AS x, sum(v) AS y; +-- +ok +== +SELECT k0_x, k0_y FROM (PIVOT (SELECT 'k' || (r % 21) a, r v FROM range(42) t(r)) ON a USING sum(v) AS x, max(v) AS y); +-- +ok +== diff --git a/parser/testdata/corpus/sql/pivot/pivot_in_boolean.test b/parser/testdata/corpus/sql/pivot/pivot_in_boolean.test index 041b9de..bbc1b72 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_in_boolean.test +++ b/parser/testdata/corpus/sql/pivot/pivot_in_boolean.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_in_boolean.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pivot cities on (Country='NL') using avg(Population) group by name; diff --git a/parser/testdata/corpus/sql/pivot/pivot_in_map.test b/parser/testdata/corpus/sql/pivot/pivot_in_map.test new file mode 100644 index 0000000..3879173 --- /dev/null +++ b/parser/testdata/corpus/sql/pivot/pivot_in_map.test @@ -0,0 +1,45 @@ +# source: test/sql/pivot/pivot_in_map.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(col VARCHAR); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (CAST(map() AS VARCHAR))); +-- +ok +== +INSERT INTO t VALUES ('{}'), ('x'), ('{a=1}'); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (map())); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (CAST(map(['a'], [1]) AS VARCHAR))); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (CAST(MAP {} AS VARCHAR))); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (MAP {'a': 1})); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (CAST([map()] AS VARCHAR), CAST({'k': map()} AS VARCHAR))); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (CAST(map([1]) AS VARCHAR))); +-- +ok +== +SELECT * FROM t PIVOT (count(*) FOR col IN (CAST(map([1], [2], [3]) AS VARCHAR))); +-- +ok +== diff --git a/parser/testdata/corpus/sql/pivot/pivot_in_subquery.test b/parser/testdata/corpus/sql/pivot/pivot_in_subquery.test index baf87bd..6288dd7 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_in_subquery.test +++ b/parser/testdata/corpus/sql/pivot/pivot_in_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_in_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PIVOT Cities ON Year IN (SELECT Year FROM Cities ORDER BY Year DESC) USING SUM(Population); diff --git a/parser/testdata/corpus/sql/pivot/pivot_operator_expression.test b/parser/testdata/corpus/sql/pivot/pivot_operator_expression.test index cf6c902..9be975b 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_operator_expression.test +++ b/parser/testdata/corpus/sql/pivot/pivot_operator_expression.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_operator_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO monthly_sales VALUES diff --git a/parser/testdata/corpus/sql/pivot/pivot_prepare.test b/parser/testdata/corpus/sql/pivot/pivot_prepare.test index 4d3ea66..f717874 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_prepare.test +++ b/parser/testdata/corpus/sql/pivot/pivot_prepare.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_prepare.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO monthly_sales VALUES diff --git a/parser/testdata/corpus/sql/pivot/pivot_query_text.test b/parser/testdata/corpus/sql/pivot/pivot_query_text.test index b9c8969..d47cf59 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_query_text.test +++ b/parser/testdata/corpus/sql/pivot/pivot_query_text.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_query_text.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(c VARCHAR, v INTEGER); diff --git a/parser/testdata/corpus/sql/pivot/pivot_star.test b/parser/testdata/corpus/sql/pivot/pivot_star.test index 3489ba0..635636d 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_star.test +++ b/parser/testdata/corpus/sql/pivot/pivot_star.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(id INT, jan INT, feb INT); diff --git a/parser/testdata/corpus/sql/pivot/pivot_storage.test b/parser/testdata/corpus/sql/pivot/pivot_storage.test index 669fdc5..8b1f233 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_storage.test +++ b/parser/testdata/corpus/sql/pivot/pivot_storage.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT * diff --git a/parser/testdata/corpus/sql/pivot/pivot_struct_aggregate.test b/parser/testdata/corpus/sql/pivot/pivot_struct_aggregate.test index 914c92b..90e13ec 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_struct_aggregate.test +++ b/parser/testdata/corpus/sql/pivot/pivot_struct_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_struct_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table donnees_csv as select {'year': i::varchar, 'month': i::varchar} AS donnee, i%5 as variable_id, i%10 id_niv from range(1000) t(i); diff --git a/parser/testdata/corpus/sql/pivot/pivot_subquery.test b/parser/testdata/corpus/sql/pivot/pivot_subquery.test index 04ecbfe..5700b63 100644 --- a/parser/testdata/corpus/sql/pivot/pivot_subquery.test +++ b/parser/testdata/corpus/sql/pivot/pivot_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/pivot_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE sales(empid INT, amount INT, d DATE); @@ -32,6 +32,16 @@ ON empid USING SUM(COALESCE("2000_1",0) + COALESCE("2000_2",0) + COALESCE("2000_ -- ok == +PIVOT (WITH cte AS (SELECT 1 AS col, 10 AS v UNION ALL SELECT 2, 20) SELECT * FROM cte) ON col USING SUM(v) ORDER BY ALL; +-- +ok +== +WITH x AS (SELECT 1 AS col) +SELECT 42 +ORDER BY (SELECT * FROM (PIVOT x ON col)); +-- +ok +== CREATE VIEW pivot_view AS PIVOT (SELECT YEAR(d) AS year, MONTH(d) AS month, empid, amount FROM sales) ON YEAR, MONTH USING SUM(AMOUNT); -- error: Parser Error: PIVOT statements with pivot elements extracted from the data cannot be used in views. diff --git a/parser/testdata/corpus/sql/pivot/pivot_value_collisions.test b/parser/testdata/corpus/sql/pivot/pivot_value_collisions.test new file mode 100644 index 0000000..7e2e233 --- /dev/null +++ b/parser/testdata/corpus/sql/pivot/pivot_value_collisions.test @@ -0,0 +1,41 @@ +# source: test/sql/pivot/pivot_value_collisions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET pivot_filter_threshold=1 +-- +ok +== +CREATE TABLE t AS SELECT * FROM (VALUES ('x_y', 'z', 1), ('x', 'y_z', 10)) t(a, b, v) +-- +ok +== +SELECT x_y_z, x_y_z_1 FROM (PIVOT t ON a, b USING sum(v)) +-- +ok +== +SELECT v, x_y_z, x_y_z_1 FROM (PIVOT t ON a, b USING sum(v) GROUP BY v) ORDER BY v +-- +ok +== +CREATE TABLE n AS SELECT * FROM (VALUES (NULL, 1), ('NULL', 10), ('a', 100)) t(a, v) +-- +ok +== +SELECT * FROM (PIVOT n ON a IN (NULL, 'NULL', 'a') USING sum(v)) +-- +ok +== +CREATE TABLE t2 AS SELECT * FROM (VALUES ('x_y', 'z', 1), ('x', 'y_z', 10)) t(a, b, v) UNION ALL SELECT 'p' || r, 'q', 0 FROM range(20) t(r) +-- +ok +== +SELECT x_y_z, x_y_z_1 FROM (PIVOT t2 ON a, b USING sum(v)) +-- +ok +== +SELECT p3_q FROM (PIVOT t2 ON a, b USING sum(v)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/pivot/test_multi_pivot.test b/parser/testdata/corpus/sql/pivot/test_multi_pivot.test index 8ff0003..0219ee8 100644 --- a/parser/testdata/corpus/sql/pivot/test_multi_pivot.test +++ b/parser/testdata/corpus/sql/pivot/test_multi_pivot.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/test_multi_pivot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE sales(empid INT, amount INT, month TEXT, year INT); diff --git a/parser/testdata/corpus/sql/pivot/test_pivot.test b/parser/testdata/corpus/sql/pivot/test_pivot.test index 4759114..7eb3cc8 100644 --- a/parser/testdata/corpus/sql/pivot/test_pivot.test +++ b/parser/testdata/corpus/sql/pivot/test_pivot.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/test_pivot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Product(DaysToManufacture int, StandardCost int); diff --git a/parser/testdata/corpus/sql/pivot/test_pivot_duplicate_aggregates.test b/parser/testdata/corpus/sql/pivot/test_pivot_duplicate_aggregates.test index 338f361..eec19ef 100644 --- a/parser/testdata/corpus/sql/pivot/test_pivot_duplicate_aggregates.test +++ b/parser/testdata/corpus/sql/pivot/test_pivot_duplicate_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/test_pivot_duplicate_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PIVOT (FROM range(21)) ON range USING sum(range), sum(range); diff --git a/parser/testdata/corpus/sql/pivot/test_unpivot.test b/parser/testdata/corpus/sql/pivot/test_unpivot.test index 3ddb576..30e7841 100644 --- a/parser/testdata/corpus/sql/pivot/test_unpivot.test +++ b/parser/testdata/corpus/sql/pivot/test_unpivot.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/test_unpivot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE monthly_sales(empid INT, dept TEXT, Jan INT, Feb INT, Mar INT, April INT); diff --git a/parser/testdata/corpus/sql/pivot/test_unpivot_stmt.test b/parser/testdata/corpus/sql/pivot/test_unpivot_stmt.test index baa79b4..00e1018 100644 --- a/parser/testdata/corpus/sql/pivot/test_unpivot_stmt.test +++ b/parser/testdata/corpus/sql/pivot/test_unpivot_stmt.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/test_unpivot_stmt.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(id BIGINT, "Sales (05/19/2020)" BIGINT, "Sales (06/03/2020)" BIGINT, "Sales (10/23/2020)" BIGINT); diff --git a/parser/testdata/corpus/sql/pivot/top_level_pivot_syntax.test b/parser/testdata/corpus/sql/pivot/top_level_pivot_syntax.test index ee02507..4ecfc59 100644 --- a/parser/testdata/corpus/sql/pivot/top_level_pivot_syntax.test +++ b/parser/testdata/corpus/sql/pivot/top_level_pivot_syntax.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/top_level_pivot_syntax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PIVOT monthly_sales ON MONTH USING SUM(AMOUNT) diff --git a/parser/testdata/corpus/sql/pivot/unpivot_expression.test b/parser/testdata/corpus/sql/pivot/unpivot_expression.test index dad19b1..ec1bea2 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_expression.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_expression.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit unpivot (select 42 as col1, 'woot' as col2) diff --git a/parser/testdata/corpus/sql/pivot/unpivot_internal_names.test b/parser/testdata/corpus/sql/pivot/unpivot_internal_names.test index ef0e100..b5eae1a 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_internal_names.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_internal_names.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_internal_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unpivot_names(unpivot_names VARCHAR, unpivot_list VARCHAR, unpivot_list_2 VARCHAR, col1 INT, col2 INT, col3 INT); diff --git a/parser/testdata/corpus/sql/pivot/unpivot_no_columns.test b/parser/testdata/corpus/sql/pivot/unpivot_no_columns.test index 0902bfd..338590c 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_no_columns.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_no_columns.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_no_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers(i integer); diff --git a/parser/testdata/corpus/sql/pivot/unpivot_non_aligned_columns.test b/parser/testdata/corpus/sql/pivot/unpivot_non_aligned_columns.test index 7d35c07..4e33411 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_non_aligned_columns.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_non_aligned_columns.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_non_aligned_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(id BIGINT, metric_1 VARCHAR, value_x VARCHAR, metric_2 VARCHAR, value_q VARCHAR, metric_3 VARCHAR, value_j VARCHAR);; diff --git a/parser/testdata/corpus/sql/pivot/unpivot_types.test b/parser/testdata/corpus/sql/pivot/unpivot_types.test index cb214f8..8da3d30 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_types.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_types.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT column_name, column_type FROM (DESCRIBE unpivot ( select 42) on columns(*)) diff --git a/parser/testdata/corpus/sql/pivot/unpivot_unnamed_subquery.test b/parser/testdata/corpus/sql/pivot/unpivot_unnamed_subquery.test index 4077393..6fe6265 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_unnamed_subquery.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_unnamed_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_unnamed_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit unpivot (select cast(columns(*) as varchar) from (select 42 as col1, 'woot' as col2)) diff --git a/parser/testdata/corpus/sql/pivot/unpivot_view.test b/parser/testdata/corpus/sql/pivot/unpivot_view.test index 0655b1d..3ac3650 100644 --- a/parser/testdata/corpus/sql/pivot/unpivot_view.test +++ b/parser/testdata/corpus/sql/pivot/unpivot_view.test @@ -1,6 +1,6 @@ # source: test/sql/pivot/unpivot_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t ( diff --git a/parser/testdata/corpus/sql/pragma/pragma_database_size_readonly.test b/parser/testdata/corpus/sql/pragma/pragma_database_size_readonly.test index 776b084..b9b603e 100644 --- a/parser/testdata/corpus/sql/pragma/pragma_database_size_readonly.test +++ b/parser/testdata/corpus/sql/pragma/pragma_database_size_readonly.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/pragma_database_size_readonly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA database_size diff --git a/parser/testdata/corpus/sql/pragma/profiling/call_enable_profiling_function.test b/parser/testdata/corpus/sql/pragma/profiling/call_enable_profiling_function.test index 7f35db7..6e34363 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/call_enable_profiling_function.test +++ b/parser/testdata/corpus/sql/pragma/profiling/call_enable_profiling_function.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/call_enable_profiling_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA profiling_output = '{TEST_DIR}/test.txt' diff --git a/parser/testdata/corpus/sql/pragma/profiling/profiling_renderer_settings_null.test b/parser/testdata/corpus/sql/pragma/profiling/profiling_renderer_settings_null.test new file mode 100644 index 0000000..1e9fa1b --- /dev/null +++ b/parser/testdata/corpus/sql/pragma/profiling/profiling_renderer_settings_null.test @@ -0,0 +1,25 @@ +# source: test/sql/pragma/profiling/profiling_renderer_settings_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET profiling_renderer_settings = MAP {'expand_all': NULL::INTEGER[]}; +-- +ok +== +SET profiling_renderer_settings = MAP {'expand_all': NULL}; +-- +ok +== +SET profiling_renderer_settings = MAP {'max_extra_lines': 3, 'expand_all': NULL::BOOLEAN}; +-- +ok +== +SET profiling_renderer_settings = MAP {'max_extra_lines': NULL::INTEGER}; +-- +ok +== +SET profiling_renderer_settings = MAP {'max_extra_lines': 3}; +-- +ok +== diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_all_profiling_settings.test b/parser/testdata/corpus/sql/pragma/profiling/test_all_profiling_settings.test index 1ac3b42..f57f7e6 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_all_profiling_settings.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_all_profiling_settings.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_all_profiling_settings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET profiling_mode='all'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_attach_and_checkpoint_latency.test b/parser/testdata/corpus/sql/pragma/profiling/test_attach_and_checkpoint_latency.test index 767980c..52cd28d 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_attach_and_checkpoint_latency.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_attach_and_checkpoint_latency.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_attach_and_checkpoint_latency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/profile_fs.db'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_autocheckpoint_latency.test b/parser/testdata/corpus/sql/pragma/profiling/test_autocheckpoint_latency.test index 449cfeb..8dde49b 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_autocheckpoint_latency.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_autocheckpoint_latency.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_autocheckpoint_latency.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/autocheckpoint_latency.db' AS acp_db; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_checkpoint_profiling.test b/parser/testdata/corpus/sql/pragma/profiling/test_checkpoint_profiling.test index 3ebd85e..1e85153 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_checkpoint_profiling.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_checkpoint_profiling.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_checkpoint_profiling.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/checkpoint_prof.db'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_commit_write_wal_latency_and_count.test b/parser/testdata/corpus/sql/pragma/profiling/test_commit_write_wal_latency_and_count.test index 6e142dd..35aa220 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_commit_write_wal_latency_and_count.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_commit_write_wal_latency_and_count.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_commit_write_wal_latency_and_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/wal_latency.db' AS wal_latency; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_blocked_thread_time.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_blocked_thread_time.test index 088e5ce..3ede982 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_blocked_thread_time.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_blocked_thread_time.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_blocked_thread_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA threads = 4; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_disable_metrics.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_disable_metrics.test index 8db0a57..9e07631 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_disable_metrics.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_disable_metrics.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_disable_metrics.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET tracked_metrics = ['operator.extra_info', 'operator.intermediate_rows', 'operator.timing', 'query.total_time']; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_errors.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_errors.test index 9f7afbf..bb1662a 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_errors.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_errors.test @@ -1,16 +1,12 @@ # source: test/sql/pragma/profiling/test_custom_profiling_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA custom_profiling_settings='}}}}}}'; -- ok == -PRAGMA custom_profiling_settings=BONJOUR; --- -ok -== PRAGMA configure_profiling='{"INVALID_SETTING": "true"}'; -- ok diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_optimizer_settings.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_optimizer_settings.test index 89d56c2..f5035d0 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_optimizer_settings.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_optimizer_settings.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_optimizer_settings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET profiling_mode='standard'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_peak_streaming_buffer_size.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_peak_streaming_buffer_size.test new file mode 100644 index 0000000..e348850 --- /dev/null +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_peak_streaming_buffer_size.test @@ -0,0 +1,17 @@ +# source: test/sql/pragma/profiling/test_custom_profiling_peak_streaming_buffer_size.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET tracked_metrics = ['system.peak_streaming_buffer_size']; +-- +ok +== +SELECT COUNT(*) FROM range(10000); +-- +ok +== +SELECT COUNT(system.peak_streaming_buffer_size) FROM metrics_output; +-- +ok +== diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_result_set_size.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_result_set_size.test index 1598575..134a090 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_result_set_size.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_result_set_size.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_result_set_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET tracked_metrics = ['operator.intermediate_size_bytes', 'operator.intermediate_rows']; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_row_group_metrics_local_storage.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_row_group_metrics_local_storage.test index 43d4c27..c56dd6d 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_row_group_metrics_local_storage.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_row_group_metrics_local_storage.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_row_group_metrics_local_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE local_pruned(i BIGINT); diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned.test index b67bc80..80317af 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_rows_scanned.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET tracked_metrics = ['operator.intermediate_rows', 'operator.rows_scanned', 'query.total_intermediate_rows', 'query.total_rows_scanned']; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned_parquet.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned_parquet.test index f3cd6ac..6888e1f 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned_parquet.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_rows_scanned_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_rows_scanned_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT * FROM range(0, 10) as r(i)) TO '{TEST_DIR}/range.parquet' (FORMAT 'parquet'); diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_total_memory_allocated.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_total_memory_allocated.test index b0870e9..9130e91 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_total_memory_allocated.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_total_memory_allocated.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_total_memory_allocated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET tracked_metrics = ['system.total_memory_allocated']; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_using_groups.test b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_using_groups.test index 9e2e2d3..9bc4531 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_using_groups.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_custom_profiling_using_groups.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_custom_profiling_using_groups.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT operator[1].extra_info, diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_duckdb_profiling_settings_function.test b/parser/testdata/corpus/sql/pragma/profiling/test_duckdb_profiling_settings_function.test index e23101a..e17f057 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_duckdb_profiling_settings_function.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_duckdb_profiling_settings_function.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_duckdb_profiling_settings_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * EXCLUDE(value, description) FROM duckdb_profiling_settings(); diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_empty_profiling_settings.test b/parser/testdata/corpus/sql/pragma/profiling/test_empty_profiling_settings.test index 9bc1163..25438b0 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_empty_profiling_settings.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_empty_profiling_settings.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_empty_profiling_settings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT cpu_time FROM metrics_output; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_legacy_metrics_format.test b/parser/testdata/corpus/sql/pragma/profiling/test_legacy_metrics_format.test index a86f461..4db057e 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_legacy_metrics_format.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_legacy_metrics_format.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_legacy_metrics_format.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET tracked_metrics = ['query.total_time', 'query.cpu_time', 'query.sql', 'query.total_intermediate_rows', 'query.total_rows_scanned', 'operator.type', 'operator.timing', 'operator.intermediate_rows']; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_logging_interaction.test b/parser/testdata/corpus/sql/pragma/profiling/test_logging_interaction.test index 48a4b35..057e2a3 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_logging_interaction.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_logging_interaction.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_logging_interaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA profiling_output = '{TEST_DIR}/profile_attach.json'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_metrics_log_timing.test b/parser/testdata/corpus/sql/pragma/profiling/test_metrics_log_timing.test new file mode 100644 index 0000000..28d36e1 --- /dev/null +++ b/parser/testdata/corpus/sql/pragma/profiling/test_metrics_log_timing.test @@ -0,0 +1,70 @@ +# source: test/sql/pragma/profiling/test_metrics_log_timing.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CALL enable_logging('Metrics') +-- +ok +== +SET tracked_metrics = [ + 'query.sql', + 'query.total_time', + 'parser.total_time', + 'planner.total_time', + 'optimizer.total_time', + 'physical_planner.total_time' +] +-- +ok +== +SET enable_profiling = 'no_output' +-- +ok +== +SELECT sum(i) FROM range(1000) t(i) +-- +ok +== +CALL disable_profiling() +-- +ok +== +SELECT count(*) +FROM duckdb_logs_parsed('Metrics') +WHERE metric IN ( + 'query.total_time', + 'parser.total_time', + 'planner.total_time', + 'optimizer.total_time', + 'physical_planner.total_time' +) +AND ( + start_time IS NULL + OR end_time IS NULL + OR start_time > end_time +) +-- +ok +== +SELECT CASE + WHEN current_setting('debug_verify_statement') = 'none' THEN count(*) = 5 + ELSE count(*) > 0 +END +FROM duckdb_logs_parsed('Metrics') +WHERE metric IN ( + 'query.total_time', + 'parser.total_time', + 'planner.total_time', + 'optimizer.total_time', + 'physical_planner.total_time' +) +-- +ok +== +SELECT start_time IS NULL, end_time IS NULL +FROM duckdb_logs_parsed('Metrics') +WHERE metric = 'query.sql' +-- +ok +== diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_no_reset_setting.test b/parser/testdata/corpus/sql/pragma/profiling/test_no_reset_setting.test index e89dd25..0b8efa5 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_no_reset_setting.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_no_reset_setting.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_no_reset_setting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA profiling_output = '{TEST_DIR}/profile_file.json'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_operator_info_suppression.test b/parser/testdata/corpus/sql/pragma/profiling/test_operator_info_suppression.test index 4ffc4d5..8fd0f11 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_operator_info_suppression.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_operator_info_suppression.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_operator_info_suppression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET tracked_metrics = ['operator.timing']; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_profiling_all.test b/parser/testdata/corpus/sql/pragma/profiling/test_profiling_all.test index c395d7e..4f6f3a7 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_profiling_all.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_profiling_all.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_profiling_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/profile_attach.db'; diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_profiling_fs.test b/parser/testdata/corpus/sql/pragma/profiling/test_profiling_fs.test index b28abf4..6f8ca29 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_profiling_fs.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_profiling_fs.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_profiling_fs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE profile_fs.tbl AS SELECT range AS id FROM range(10000); diff --git a/parser/testdata/corpus/sql/pragma/profiling/test_profiling_output_file_overwrite.test b/parser/testdata/corpus/sql/pragma/profiling/test_profiling_output_file_overwrite.test index 81afae5..4a87484 100644 --- a/parser/testdata/corpus/sql/pragma/profiling/test_profiling_output_file_overwrite.test +++ b/parser/testdata/corpus/sql/pragma/profiling/test_profiling_output_file_overwrite.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/profiling/test_profiling_output_file_overwrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA profiling_output = '{TEST_DIR}/profiler.json'; diff --git a/parser/testdata/corpus/sql/pragma/storage_info_empty_enum.test b/parser/testdata/corpus/sql/pragma/storage_info_empty_enum.test new file mode 100644 index 0000000..6fe4c13 --- /dev/null +++ b/parser/testdata/corpus/sql/pragma/storage_info_empty_enum.test @@ -0,0 +1,61 @@ +# source: test/sql/pragma/storage_info_empty_enum.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE empty_enum AS ENUM(); +-- +ok +== +CREATE TABLE t(m empty_enum); +-- +ok +== +SELECT stats::VARCHAR FROM pragma_storage_info('t') ORDER BY ALL +-- +ok +== +SELECT m, m::VARIANT FROM t +-- +ok +== +CREATE TYPE single_enum AS ENUM('a'); +-- +ok +== +CREATE TABLE t1(m single_enum); +-- +ok +== +SELECT stats::VARCHAR FROM pragma_storage_info('t1') ORDER BY ALL +-- +ok +== +SELECT count(*) FROM t1 WHERE m = 'a' +-- +ok +== +INSERT INTO t1 VALUES ('a'); +-- +ok +== +CREATE TYPE two_enum AS ENUM('a', 'b'); +-- +ok +== +CREATE TABLE t2(m two_enum); +-- +ok +== +INSERT INTO t2 VALUES ('b'), (NULL); +-- +ok +== +SELECT stats::VARCHAR FROM pragma_storage_info('t2') WHERE segment_type <> 'VALIDITY' +-- +ok +== +SELECT count(*) FROM t2 WHERE m = 'b' +-- +ok +== diff --git a/parser/testdata/corpus/sql/pragma/test_db_invalidation_after_load.test b/parser/testdata/corpus/sql/pragma/test_db_invalidation_after_load.test index 3ccb2a6..6839dd3 100644 --- a/parser/testdata/corpus/sql/pragma/test_db_invalidation_after_load.test +++ b/parser/testdata/corpus/sql/pragma/test_db_invalidation_after_load.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_db_invalidation_after_load.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET disable_database_invalidation=true; diff --git a/parser/testdata/corpus/sql/pragma/test_disabled_compression.test b/parser/testdata/corpus/sql/pragma/test_disabled_compression.test index 4b3fd1c..e2d0fb3 100644 --- a/parser/testdata/corpus/sql/pragma/test_disabled_compression.test +++ b/parser/testdata/corpus/sql/pragma/test_disabled_compression.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_disabled_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA disabled_compression_methods='{compression}' @@ -19,3 +19,11 @@ PRAGMA disabled_compression_methods='xzx' -- ok == +SET disabled_compression_methods='ENUM_SIZE' +-- +ok +== +SET disabled_compression_methods='COMPRESSION_COUNT' +-- +ok +== diff --git a/parser/testdata/corpus/sql/pragma/test_enable_profile.test b/parser/testdata/corpus/sql/pragma/test_enable_profile.test index 120a68e..ce75836 100644 --- a/parser/testdata/corpus/sql/pragma/test_enable_profile.test +++ b/parser/testdata/corpus/sql/pragma/test_enable_profile.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_enable_profile.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA enable_profiling() diff --git a/parser/testdata/corpus/sql/pragma/test_force_compression.test b/parser/testdata/corpus/sql/pragma/test_force_compression.test index 05472ef..ee66356 100644 --- a/parser/testdata/corpus/sql/pragma/test_force_compression.test +++ b/parser/testdata/corpus/sql/pragma/test_force_compression.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_force_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='{compression}' diff --git a/parser/testdata/corpus/sql/pragma/test_memory_limit.test b/parser/testdata/corpus/sql/pragma/test_memory_limit.test index d302bf5..fe548d5 100644 --- a/parser/testdata/corpus/sql/pragma/test_memory_limit.test +++ b/parser/testdata/corpus/sql/pragma/test_memory_limit.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_memory_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA memory_limit='1GB' @@ -59,10 +59,6 @@ PRAGMA memory_limit='100M' -- ok == -PRAGMA memory_limit='100MB' --- -ok -== PRAGMA memory_limit='100mb' -- ok diff --git a/parser/testdata/corpus/sql/pragma/test_metadata_info.test b/parser/testdata/corpus/sql/pragma/test_metadata_info.test index 27d0418..4f45acb 100644 --- a/parser/testdata/corpus/sql/pragma/test_metadata_info.test +++ b/parser/testdata/corpus/sql/pragma/test_metadata_info.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_metadata_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA metadata_info; diff --git a/parser/testdata/corpus/sql/pragma/test_pragma_database_list.test b/parser/testdata/corpus/sql/pragma/test_pragma_database_list.test index e910487..4acc7af 100644 --- a/parser/testdata/corpus/sql/pragma/test_pragma_database_list.test +++ b/parser/testdata/corpus/sql/pragma/test_pragma_database_list.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_pragma_database_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA database_list diff --git a/parser/testdata/corpus/sql/pragma/test_pragma_database_size.test b/parser/testdata/corpus/sql/pragma/test_pragma_database_size.test index 792b1a0..90d4ddf 100644 --- a/parser/testdata/corpus/sql/pragma/test_pragma_database_size.test +++ b/parser/testdata/corpus/sql/pragma/test_pragma_database_size.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_pragma_database_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA database_size; diff --git a/parser/testdata/corpus/sql/pragma/test_pragma_functions.test b/parser/testdata/corpus/sql/pragma/test_pragma_functions.test index 048edae..b5086e6 100644 --- a/parser/testdata/corpus/sql/pragma/test_pragma_functions.test +++ b/parser/testdata/corpus/sql/pragma/test_pragma_functions.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_pragma_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA functions diff --git a/parser/testdata/corpus/sql/pragma/test_pragma_parsing.test b/parser/testdata/corpus/sql/pragma/test_pragma_parsing.test index a001b45..5e7d264 100644 --- a/parser/testdata/corpus/sql/pragma/test_pragma_parsing.test +++ b/parser/testdata/corpus/sql/pragma/test_pragma_parsing.test @@ -1,15 +1,15 @@ # source: test/sql/pragma/test_pragma_parsing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAG -- -ok +error: Parser Error: syntax error at or near "PRAG" == PRAGMA -- -ok +error: Parser Error: syntax error at or near "PRAGMA" == PRAGMA random_unknown_pragma -- diff --git a/parser/testdata/corpus/sql/pragma/test_pragma_sanitized_inputs.test b/parser/testdata/corpus/sql/pragma/test_pragma_sanitized_inputs.test index a7a4a6b..223e142 100644 --- a/parser/testdata/corpus/sql/pragma/test_pragma_sanitized_inputs.test +++ b/parser/testdata/corpus/sql/pragma/test_pragma_sanitized_inputs.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_pragma_sanitized_inputs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_table(i INTEGER, j VARCHAR) diff --git a/parser/testdata/corpus/sql/pragma/test_pragma_version.test b/parser/testdata/corpus/sql/pragma/test_pragma_version.test index 68689e4..b4e555a 100644 --- a/parser/testdata/corpus/sql/pragma/test_pragma_version.test +++ b/parser/testdata/corpus/sql/pragma/test_pragma_version.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_pragma_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA version; diff --git a/parser/testdata/corpus/sql/pragma/test_query_log.test b/parser/testdata/corpus/sql/pragma/test_query_log.test index 911792a..9db4c35 100644 --- a/parser/testdata/corpus/sql/pragma/test_query_log.test +++ b/parser/testdata/corpus/sql/pragma/test_query_log.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_query_log.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CURRENT_SETTING('log_query_path') diff --git a/parser/testdata/corpus/sql/pragma/test_show_tables.test b/parser/testdata/corpus/sql/pragma/test_show_tables.test index d2caed4..d7f7213 100644 --- a/parser/testdata/corpus/sql/pragma/test_show_tables.test +++ b/parser/testdata/corpus/sql/pragma/test_show_tables.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_show_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "select"(i INTEGER); diff --git a/parser/testdata/corpus/sql/pragma/test_show_tables_from.test b/parser/testdata/corpus/sql/pragma/test_show_tables_from.test index 1c934fd..c89b19c 100644 --- a/parser/testdata/corpus/sql/pragma/test_show_tables_from.test +++ b/parser/testdata/corpus/sql/pragma/test_show_tables_from.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_show_tables_from.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH IF NOT EXISTS ':memory:' AS db diff --git a/parser/testdata/corpus/sql/pragma/test_show_tables_temp_views.test b/parser/testdata/corpus/sql/pragma/test_show_tables_temp_views.test index 0b7db47..709be8e 100644 --- a/parser/testdata/corpus/sql/pragma/test_show_tables_temp_views.test +++ b/parser/testdata/corpus/sql/pragma/test_show_tables_temp_views.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_show_tables_temp_views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY VIEW v1 AS SELECT 42 AS a diff --git a/parser/testdata/corpus/sql/pragma/test_storage_info.test b/parser/testdata/corpus/sql/pragma/test_storage_info.test index f23abe3..e7faded 100644 --- a/parser/testdata/corpus/sql/pragma/test_storage_info.test +++ b/parser/testdata/corpus/sql/pragma/test_storage_info.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_storage_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA storage_info('integers') diff --git a/parser/testdata/corpus/sql/pragma/test_table_info.test b/parser/testdata/corpus/sql/pragma/test_table_info.test index 146b747..6354717 100644 --- a/parser/testdata/corpus/sql/pragma/test_table_info.test +++ b/parser/testdata/corpus/sql/pragma/test_table_info.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_table_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER DEFAULT 1+3, j INTEGER) diff --git a/parser/testdata/corpus/sql/pragma/test_table_info_quoted_names.test b/parser/testdata/corpus/sql/pragma/test_table_info_quoted_names.test index c2c4d85..6b9bdbf 100644 --- a/parser/testdata/corpus/sql/pragma/test_table_info_quoted_names.test +++ b/parser/testdata/corpus/sql/pragma/test_table_info_quoted_names.test @@ -1,6 +1,6 @@ # source: test/sql/pragma/test_table_info_quoted_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA "my.schema" diff --git a/parser/testdata/corpus/sql/pragma/test_various_pragmas.test b/parser/testdata/corpus/sql/pragma/test_various_pragmas.test index 5012e04..3a89909 100644 --- a/parser/testdata/corpus/sql/pragma/test_various_pragmas.test +++ b/parser/testdata/corpus/sql/pragma/test_various_pragmas.test @@ -1,16 +1,12 @@ # source: test/sql/pragma/test_various_pragmas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA enable_checkpoint_on_shutdown -- ok == -PRAGMA disable_verify_parallelism --- -ok -== PRAGMA explain_output='all' -- ok diff --git a/parser/testdata/corpus/sql/prepared/invalid_prepare.test b/parser/testdata/corpus/sql/prepared/invalid_prepare.test index 01e516f..19c2c53 100644 --- a/parser/testdata/corpus/sql/prepared/invalid_prepare.test +++ b/parser/testdata/corpus/sql/prepared/invalid_prepare.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/invalid_prepare.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select ?; diff --git a/parser/testdata/corpus/sql/prepared/parameter_order_subquery.test b/parser/testdata/corpus/sql/prepared/parameter_order_subquery.test index ab66565..62c34c2 100644 --- a/parser/testdata/corpus/sql/prepared/parameter_order_subquery.test +++ b/parser/testdata/corpus/sql/prepared/parameter_order_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/parameter_order_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT2); diff --git a/parser/testdata/corpus/sql/prepared/parameter_variants.test b/parser/testdata/corpus/sql/prepared/parameter_variants.test index 5ba43e6..e44c967 100644 --- a/parser/testdata/corpus/sql/prepared/parameter_variants.test +++ b/parser/testdata/corpus/sql/prepared/parameter_variants.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/parameter_variants.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE s1 AS SELECT CAST(? AS INTEGER), CAST(? AS STRING) diff --git a/parser/testdata/corpus/sql/prepared/prepare_catalog_table_functions.test b/parser/testdata/corpus/sql/prepared/prepare_catalog_table_functions.test new file mode 100644 index 0000000..9322a4f --- /dev/null +++ b/parser/testdata/corpus/sql/prepared/prepare_catalog_table_functions.test @@ -0,0 +1,29 @@ +# source: test/sql/prepared/prepare_catalog_table_functions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INTEGER) +-- +ok +== +PREPARE p AS SELECT * FROM {func}('t') +-- +error: Parser Error: syntax error at or near "{" +== +EXECUTE p +-- +ok +== +DEALLOCATE p +-- +ok +== +PREPARE p AS SELECT name, type FROM pragma_table_info('t') +-- +ok +== +CREATE TABLE t(zzz VARCHAR, q DOUBLE) +-- +ok +== diff --git a/parser/testdata/corpus/sql/prepared/prepare_copy.test b/parser/testdata/corpus/sql/prepared/prepare_copy.test index 911cd0e..878cc8e 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_copy.test +++ b/parser/testdata/corpus/sql/prepared/prepare_copy.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE q1 AS @@ -37,3 +37,43 @@ select i from '{TEST_DIR}/res2.csv' tbl(i); -- ok == +INSERT INTO t VALUES (1, 2); +-- +ok +== +PREPARE q3 AS COPY (SELECT * FROM t) TO '{TEST_DIR}/res3.csv' (FORMAT CSV, DELIMITER ?); +-- +ok +== +EXECUTE q3('|'); +-- +ok +== +SELECT trim(replace(content, chr(10), ' ')) FROM read_text('{TEST_DIR}/res3.csv'); +-- +ok +== +PREPARE q4 AS COPY t TO '{TEST_DIR}/res4.csv' (FORMAT CSV, HEADER $1, DELIMITER $2); +-- +ok +== +EXECUTE q4(false, ';'); +-- +ok +== +SELECT trim(replace(content, chr(10), ' ')) FROM read_text('{TEST_DIR}/res4.csv'); +-- +ok +== +PREPARE q5 AS COPY t FROM '{TEST_DIR}/res3.csv' (FORMAT CSV, DELIMITER ?); +-- +ok +== +EXECUTE q5('|'); +-- +ok +== +SELECT * FROM t ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/prepared/prepare_default_varchar.test b/parser/testdata/corpus/sql/prepared/prepare_default_varchar.test index f8eac8a..2d0899c 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_default_varchar.test +++ b/parser/testdata/corpus/sql/prepared/prepare_default_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_default_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT ? diff --git a/parser/testdata/corpus/sql/prepared/prepare_from_first.test b/parser/testdata/corpus/sql/prepared/prepare_from_first.test index d187a59..472f6fd 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_from_first.test +++ b/parser/testdata/corpus/sql/prepared/prepare_from_first.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_from_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit prepare fromFirst as from (select ? fromV) select ? selectV,*; diff --git a/parser/testdata/corpus/sql/prepared/prepare_in.test b/parser/testdata/corpus/sql/prepared/prepare_in.test index 5f97dc3..6c8ed8f 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_in.test +++ b/parser/testdata/corpus/sql/prepared/prepare_in.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_in.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test(id varchar); diff --git a/parser/testdata/corpus/sql/prepared/prepare_lambda.test b/parser/testdata/corpus/sql/prepared/prepare_lambda.test index f697873..a546c9e 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_lambda.test +++ b/parser/testdata/corpus/sql/prepared/prepare_lambda.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_lambda.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT list_transform(?, lambda x: x + 1) diff --git a/parser/testdata/corpus/sql/prepared/prepare_list_functions.test b/parser/testdata/corpus/sql/prepared/prepare_list_functions.test index 821ef6a..8a02a39 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_list_functions.test +++ b/parser/testdata/corpus/sql/prepared/prepare_list_functions.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_list_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT list_aggregate(?, 'min') diff --git a/parser/testdata/corpus/sql/prepared/prepare_maintain_types.test b/parser/testdata/corpus/sql/prepared/prepare_maintain_types.test index bf27745..7006404 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_maintain_types.test +++ b/parser/testdata/corpus/sql/prepared/prepare_maintain_types.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_maintain_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit prepare v1 as select cast(111 as short) * $1; diff --git a/parser/testdata/corpus/sql/prepared/prepare_mixed_types.test b/parser/testdata/corpus/sql/prepared/prepare_mixed_types.test index 99fcec3..1b8d1b9 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_mixed_types.test +++ b/parser/testdata/corpus/sql/prepared/prepare_mixed_types.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_mixed_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT $1::INT, $1::BIGINT diff --git a/parser/testdata/corpus/sql/prepared/prepare_offset_first.test b/parser/testdata/corpus/sql/prepared/prepare_offset_first.test index e7591ec..341e559 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_offset_first.test +++ b/parser/testdata/corpus/sql/prepared/prepare_offset_first.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_offset_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE q AS SELECT x FROM generate_series(1, 10) t(x) OFFSET ? LIMIT ?; diff --git a/parser/testdata/corpus/sql/prepared/prepare_summarize.test b/parser/testdata/corpus/sql/prepared/prepare_summarize.test index 6f6c0c5..039ae59 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_summarize.test +++ b/parser/testdata/corpus/sql/prepared/prepare_summarize.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_summarize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE accounts AS SELECT 1 id, 'Mark' AS name diff --git a/parser/testdata/corpus/sql/prepared/prepare_window_functions.test b/parser/testdata/corpus/sql/prepared/prepare_window_functions.test index ed799e7..10eac60 100644 --- a/parser/testdata/corpus/sql/prepared/prepare_window_functions.test +++ b/parser/testdata/corpus/sql/prepared/prepare_window_functions.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepare_window_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT SUM(?) OVER () diff --git a/parser/testdata/corpus/sql/prepared/prepared_named_param.test b/parser/testdata/corpus/sql/prepared/prepared_named_param.test index 262bb9c..5338083 100644 --- a/parser/testdata/corpus/sql/prepared/prepared_named_param.test +++ b/parser/testdata/corpus/sql/prepared/prepared_named_param.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepared_named_param.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit prepare q123 as select $param, $other_name, $param; @@ -15,6 +15,10 @@ execute q123(param := 5, 3) -- ok == +execute q123(5, other_name := 3) +-- +ok +== prepare q01 as select $1, ?, $2; -- ok @@ -31,3 +35,11 @@ execute q01(a, 2, 0) -- ok == +prepare q03 as select $aa, $bb, $cc, $dd, $ee; +-- +ok +== +execute q03(aa := 1, bb := 2); +-- +ok +== diff --git a/parser/testdata/corpus/sql/prepared/prepared_null_binding.test b/parser/testdata/corpus/sql/prepared/prepared_null_binding.test index b098c94..fbfef96 100644 --- a/parser/testdata/corpus/sql/prepared/prepared_null_binding.test +++ b/parser/testdata/corpus/sql/prepared/prepared_null_binding.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepared_null_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT COALESCE(COALESCE(NULL, $1) / 42::BIGINT, 0.5); diff --git a/parser/testdata/corpus/sql/prepared/prepared_select.test b/parser/testdata/corpus/sql/prepared/prepared_select.test index c51111a..d234e18 100644 --- a/parser/testdata/corpus/sql/prepared/prepared_select.test +++ b/parser/testdata/corpus/sql/prepared/prepared_select.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepared_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE s1 AS SELECT ?::VARCHAR FROM (SELECT ?::INTEGER) tbl(i) WHERE i > ?::INTEGER diff --git a/parser/testdata/corpus/sql/prepared/prepared_stale_statistics.test b/parser/testdata/corpus/sql/prepared/prepared_stale_statistics.test index 2ee905d..1ad9cfb 100644 --- a/parser/testdata/corpus/sql/prepared/prepared_stale_statistics.test +++ b/parser/testdata/corpus/sql/prepared/prepared_stale_statistics.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepared_stale_statistics.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE filter_t(i INTEGER); @@ -64,10 +64,6 @@ EXECUTE stale_join; -- ok == -DELETE FROM build; --- -ok -== INSERT INTO build VALUES (1), (2); -- ok diff --git a/parser/testdata/corpus/sql/prepared/prepared_statistics_optimization.test b/parser/testdata/corpus/sql/prepared/prepared_statistics_optimization.test index 6bebdd2..3c47784 100644 --- a/parser/testdata/corpus/sql/prepared/prepared_statistics_optimization.test +++ b/parser/testdata/corpus/sql/prepared/prepared_statistics_optimization.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepared_statistics_optimization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE cached_constant AS SELECT 42; @@ -117,10 +117,6 @@ INSERT INTO stats_t VALUES (5), (NULL); -- ok == -SET disabled_optimizers = 'statistics_propagation'; --- -ok -== CREATE TABLE row_group_t AS SELECT i::INTEGER AS i FROM range(245760) t(i); -- ok diff --git a/parser/testdata/corpus/sql/prepared/prepared_update.test b/parser/testdata/corpus/sql/prepared/prepared_update.test index bd61d70..e17c4d4 100644 --- a/parser/testdata/corpus/sql/prepared/prepared_update.test +++ b/parser/testdata/corpus/sql/prepared/prepared_update.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/prepared_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j VARCHAR) diff --git a/parser/testdata/corpus/sql/prepared/test_basic_prepare.test b/parser/testdata/corpus/sql/prepared/test_basic_prepare.test index 051cfc0..a8ce46d 100644 --- a/parser/testdata/corpus/sql/prepared/test_basic_prepare.test +++ b/parser/testdata/corpus/sql/prepared/test_basic_prepare.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_basic_prepare.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE s1 AS SELECT CAST($1 AS INTEGER), CAST($2 AS STRING) diff --git a/parser/testdata/corpus/sql/prepared/test_issue_2079.test b/parser/testdata/corpus/sql/prepared/test_issue_2079.test index 0dcefb6..e20bce0 100644 --- a/parser/testdata/corpus/sql/prepared/test_issue_2079.test +++ b/parser/testdata/corpus/sql/prepared/test_issue_2079.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_issue_2079.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT ? + 1.0 AS a diff --git a/parser/testdata/corpus/sql/prepared/test_issue_21077.test b/parser/testdata/corpus/sql/prepared/test_issue_21077.test index 9034f01..9b9cd66 100644 --- a/parser/testdata/corpus/sql/prepared/test_issue_21077.test +++ b/parser/testdata/corpus/sql/prepared/test_issue_21077.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_issue_21077.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE pssmallint AS SELECT - ? diff --git a/parser/testdata/corpus/sql/prepared/test_issue_4010.test b/parser/testdata/corpus/sql/prepared/test_issue_4010.test index 0f1e716..8c7623d 100644 --- a/parser/testdata/corpus/sql/prepared/test_issue_4010.test +++ b/parser/testdata/corpus/sql/prepared/test_issue_4010.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_issue_4010.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE table T1(A0 TIMESTAMP, A1 INTEGER, A2 VARCHAR, A3 VARCHAR, A4 INTEGER, A5 DOUBLE) diff --git a/parser/testdata/corpus/sql/prepared/test_issue_4042.test b/parser/testdata/corpus/sql/prepared/test_issue_4042.test index 133f01d..88fb863 100644 --- a/parser/testdata/corpus/sql/prepared/test_issue_4042.test +++ b/parser/testdata/corpus/sql/prepared/test_issue_4042.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_issue_4042.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE stringliterals AS SELECT 1 AS ID, 1::BIGINT AS a1,'value-1' AS a2,'value-1' AS a3,10::BIGINT AS a4 diff --git a/parser/testdata/corpus/sql/prepared/test_issue_6276.test b/parser/testdata/corpus/sql/prepared/test_issue_6276.test index ac2d22d..e898780 100644 --- a/parser/testdata/corpus/sql/prepared/test_issue_6276.test +++ b/parser/testdata/corpus/sql/prepared/test_issue_6276.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_issue_6276.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT CASE ? WHEN ? THEN ? WHEN ? THEN ? ELSE ? END AS x diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_ambiguous_type.test b/parser/testdata/corpus/sql/prepared/test_prepare_ambiguous_type.test index 21b20d1..965b903 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_ambiguous_type.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_ambiguous_type.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_ambiguous_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT typeof(?) diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_delete.test b/parser/testdata/corpus/sql/prepared/test_prepare_delete.test index 139dd60..fe2c744 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_delete.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_delete.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE b (i TINYINT) diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_delete_update.test b/parser/testdata/corpus/sql/prepared/test_prepare_delete_update.test index e13b4bb..ecc53fd 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_delete_update.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_delete_update.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_delete_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE s1 AS UPDATE b SET i=$1 WHERE i=$2 diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_drop.test b/parser/testdata/corpus/sql/prepared/test_prepare_drop.test index 2c966ba..004e371 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_drop.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_drop.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_drop.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a (i TINYINT) diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_error.test b/parser/testdata/corpus/sql/prepared/test_prepare_error.test index aa4c8e3..380b3f3 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_error.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_error.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT ?::VARCHAR::INT diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_issue_5132.test b/parser/testdata/corpus/sql/prepared/test_prepare_issue_5132.test index 6606d03..aadfbdb 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_issue_5132.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_issue_5132.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_issue_5132.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select 42 i diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_issue_8500.test b/parser/testdata/corpus/sql/prepared/test_prepare_issue_8500.test index 96113b1..4e6f0b4 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_issue_8500.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_issue_8500.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_issue_8500.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE S1 AS SELECT (? / 1) + 1; diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_null.test b/parser/testdata/corpus/sql/prepared/test_prepare_null.test index 19ff5e5..c4c209f 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_null.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_null.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE s1 AS INSERT INTO b VALUES ($1) diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_select.test b/parser/testdata/corpus/sql/prepared/test_prepare_select.test index 5ecd628..017b254 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_select.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_select.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES (42) diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_subquery.test b/parser/testdata/corpus/sql/prepared/test_prepare_subquery.test index bf02b1e..fee008c 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_subquery.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PREPARE v1 AS SELECT * FROM (SELECT $1::INTEGER) sq1; diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_types.test b/parser/testdata/corpus/sql/prepared/test_prepare_types.test index 9b6ccdb..c6c2712 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_types.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_types.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a TINYINT, b SMALLINT, c INTEGER, d BIGINT, e REAL, f DOUBLE, g DATE, h VARCHAR) diff --git a/parser/testdata/corpus/sql/prepared/test_prepare_unused_cte.test b/parser/testdata/corpus/sql/prepared/test_prepare_unused_cte.test index 38947b6..29de678 100644 --- a/parser/testdata/corpus/sql/prepared/test_prepare_unused_cte.test +++ b/parser/testdata/corpus/sql/prepared/test_prepare_unused_cte.test @@ -1,6 +1,6 @@ # source: test/sql/prepared/test_prepare_unused_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "user" (name string); diff --git a/parser/testdata/corpus/sql/progress/test_verify_progress.test b/parser/testdata/corpus/sql/progress/test_verify_progress.test new file mode 100644 index 0000000..8c15ea4 --- /dev/null +++ b/parser/testdata/corpus/sql/progress/test_verify_progress.test @@ -0,0 +1,197 @@ +# source: test/sql/progress/test_verify_progress.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_progress='unknown' +-- +ok +== +CREATE TABLE integers AS SELECT i FROM range(500000) t(i) +-- +ok +== +SET debug_verify_progress='error' +-- +ok +== +SET debug_verify_progress_ignore='' +-- +ok +== +SELECT sum(i) FROM integers +-- +ok +== +SELECT sum(i) FROM range(500000) t(i) +-- +ok +== +SELECT count(*) FROM generate_series(TIMESTAMP '2000-01-01', TIMESTAMP '2001-01-01', INTERVAL 1 MINUTE) +-- +ok +== +SELECT count(*) FROM repeat(42, 100000) +-- +ok +== +SELECT count(*) FROM repeat_row(1, 'hello', num_rows=100000) +-- +ok +== +CREATE TABLE wide_{i}(c0 INTEGER, c1 INTEGER, c2 INTEGER, c3 INTEGER, c4 INTEGER, c5 INTEGER, c6 INTEGER, c7 INTEGER, c8 INTEGER, c9 INTEGER, c10 INTEGER, c11 INTEGER, c12 INTEGER, c13 INTEGER, c14 INTEGER, c15 INTEGER, c16 INTEGER, c17 INTEGER, c18 INTEGER, c19 INTEGER, c20 INTEGER, c21 INTEGER, c22 INTEGER, c23 INTEGER, c24 INTEGER, c25 INTEGER, c26 INTEGER, c27 INTEGER, c28 INTEGER, c29 INTEGER, c30 INTEGER, c31 INTEGER, c32 INTEGER, c33 INTEGER, c34 INTEGER, c35 INTEGER, c36 INTEGER, c37 INTEGER, c38 INTEGER, c39 INTEGER, c40 INTEGER, c41 INTEGER, c42 INTEGER, c43 INTEGER, c44 INTEGER, c45 INTEGER, c46 INTEGER, c47 INTEGER, c48 INTEGER, c49 INTEGER) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*) > 4096 FROM duckdb_columns() +-- +ok +== +SELECT count(*) > 2048 FROM duckdb_functions() +-- +ok +== +SELECT count(*) > 0 FROM test_vector_types(NULL::INT, NULL::VARCHAR, NULL::INT[]) +-- +ok +== +SELECT count(*) FROM (SELECT * FROM read_text('test/sql/table_function/files/*.txt') ORDER BY filename) +-- +ok +== +CREATE TABLE small_integers AS SELECT i FROM range(30000) t(i) +-- +ok +== +SELECT sum(i) FROM (SELECT i FROM small_integers WHERE i % 2 = 0 LIMIT 5000 OFFSET 10) +-- +ok +== +SELECT sum(i) FROM (SELECT i FROM range(1000000) t(i) ORDER BY i DESC LIMIT 5000 OFFSET 10) +-- +ok +== +SET perfect_ht_threshold=16 +-- +ok +== +CREATE TABLE groups AS SELECT (i % 10000)::SMALLINT g FROM range(100000) t(i) +-- +ok +== +SELECT count(*), sum(c) FROM (SELECT g, count(*) c FROM groups GROUP BY g) +-- +ok +== +RESET perfect_ht_threshold +-- +ok +== +CREATE TABLE modified AS SELECT i FROM range(10000) t(i) +-- +ok +== +WITH u AS (UPDATE modified SET i = i + 1 RETURNING i) SELECT count(*) FROM u +-- +ok +== +WITH d AS (DELETE FROM modified RETURNING i) SELECT count(*), sum(i) FROM d +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(100000) t(i) USING SAMPLE 10000 ROWS) +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(300000) t(i) USING SAMPLE 10 PERCENT (reservoir, 42)) +-- +ok +== +SELECT count(*) FROM (SELECT i, count(*) FROM range(500000) t(i) GROUP BY i) +-- +ok +== +SELECT sum(i) FROM (SELECT i FROM integers LIMIT 100000 OFFSET 10) +-- +ok +== +CREATE INDEX integers_index ON integers(i) +-- +ok +== +DROP INDEX integers_index +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(1000000) t(i) ORDER BY i DESC) +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(1000000) t(i) WHERE i < 0 ORDER BY i DESC) +-- +ok +== +SELECT count(*) FROM (SELECT sum(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM range(100000) t(i)) +-- +ok +== +SELECT count(*) FROM (SELECT sum(i) OVER (PARTITION BY i % 7 ORDER BY i) FROM range(100000) t(i)) +-- +ok +== +SELECT count(*) FROM (SELECT row_number() OVER () FROM range(100000) t(i)) +-- +ok +== +WITH RECURSIVE t(i) AS (SELECT * FROM range(100000) UNION ALL SELECT i + 100000 FROM t WHERE i < 400000) SELECT sum(i) FROM t +-- +ok +== +WITH RECURSIVE t(i) AS (SELECT 1 UNION ALL SELECT i + 1 FROM t WHERE i < 20000) SELECT count(*) FROM t +-- +ok +== +WITH RECURSIVE t(i) AS (SELECT * FROM range(100000) UNION ALL SELECT i // 2 FROM t WHERE i > 1 AND i % 2 = 0) SELECT count(*) FROM t +-- +ok +== +WITH RECURSIVE t(k, v) USING KEY (k) AS (SELECT i, 0 FROM range(10000) t(i) UNION (SELECT r.k, r.v + 1 FROM recurring.t r WHERE r.v < 3 AND EXISTS (SELECT 1 FROM t LIMIT 1))) SELECT count(*), sum(v) FROM t +-- +ok +== +SELECT sum(i) FROM unnest(range(500000)) t(i) +-- +ok +== +SET debug_verify_progress_ignore='{ignore}' +-- +ok +== +SELECT sum(i) FROM range(2) t(i) +-- +ok +== +SELECT max(i) FROM (SELECT i FROM integers WHERE i % 2 = 0 LIMIT 5000) +-- +ok +== +SET debug_verify_progress='log' +-- +ok +== +CALL enable_logging('ProgressVerification') +-- +ok +== +SELECT invariant, operator, pipeline FROM duckdb_logs_parsed('ProgressVerification') +-- +ok +== +SET debug_verify_progress='none' +-- +ok +== +SELECT count(*) FROM duckdb_logs_parsed('ProgressVerification') +-- +ok +== diff --git a/parser/testdata/corpus/sql/projection/coalesce_error.test b/parser/testdata/corpus/sql/projection/coalesce_error.test index 4612bbf..1a0667e 100644 --- a/parser/testdata/corpus/sql/projection/coalesce_error.test +++ b/parser/testdata/corpus/sql/projection/coalesce_error.test @@ -1,6 +1,6 @@ # source: test/sql/projection/coalesce_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COALESCE(1, 'hello'::INT) diff --git a/parser/testdata/corpus/sql/projection/coalesce_rowid.test b/parser/testdata/corpus/sql/projection/coalesce_rowid.test index 6c44138..0948ef6 100644 --- a/parser/testdata/corpus/sql/projection/coalesce_rowid.test +++ b/parser/testdata/corpus/sql/projection/coalesce_rowid.test @@ -1,6 +1,6 @@ # source: test/sql/projection/coalesce_rowid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select case when i%2=0 then null else i end as i from range(10) tbl(i); diff --git a/parser/testdata/corpus/sql/projection/reference_only_output.test b/parser/testdata/corpus/sql/projection/reference_only_output.test new file mode 100644 index 0000000..96c9dee --- /dev/null +++ b/parser/testdata/corpus/sql/projection/reference_only_output.test @@ -0,0 +1,62 @@ +# source: test/sql/projection/reference_only_output.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE projection_input AS +SELECT i, CASE WHEN i % 7 = 0 THEN NULL ELSE 'long value carried through a projection ' || i::VARCHAR END AS s, + [i, NULL, i + 1] AS l, {'x': i, 'y': i::VARCHAR} AS r +FROM range(5003) t(i) +-- +ok +== +WITH p AS MATERIALIZED ( + SELECT s, r, i AS j, l, i AS duplicate FROM projection_input WHERE i % 2 = 1 +) +SELECT count(*), sum(j), count(s), bool_and(j = duplicate), + bool_and(l[1] = j AND l[2] IS NULL AND l[3] = j + 1), + bool_and(r.x = j AND r.y = j::VARCHAR AND (s IS NOT DISTINCT FROM + CASE WHEN j % 7 = 0 THEN NULL ELSE 'long value carried through a projection ' || j::VARCHAR END)) +FROM p +-- +ok +== +WITH p AS MATERIALIZED (SELECT s, i, l, r FROM projection_input WHERE i < 0) +SELECT count(*) FROM p +-- +ok +== +WITH p AS MATERIALIZED ( + SELECT s, r, i AS j, l, i AS duplicate FROM projection_input + WHERE i < 2 OR md5(i::VARCHAR) = '' +) +SELECT count(*), sum(j) FROM p +-- +ok +== +PREPARE reference_output AS +WITH p AS MATERIALIZED (SELECT s, l, i, r FROM projection_input WHERE i < $1) +SELECT count(*), coalesce(sum(i), 0), count(s) FROM p +-- +ok +== +EXECUTE reference_output(100) +-- +ok +== +EXECUTE reference_output(0) +-- +ok +== +EXECUTE reference_output(5003) +-- +ok +== +WITH RECURSIVE r(i, s) AS ( + SELECT 0, 'long value carried through a recursive projection' + UNION ALL SELECT i + 1, s FROM r WHERE i < 20 +) +SELECT count(*), sum(i), count(DISTINCT s) FROM r +-- +ok +== diff --git a/parser/testdata/corpus/sql/projection/select_star_exclude.test b/parser/testdata/corpus/sql/projection/select_star_exclude.test index 4c38441..24423f4 100644 --- a/parser/testdata/corpus/sql/projection/select_star_exclude.test +++ b/parser/testdata/corpus/sql/projection/select_star_exclude.test @@ -1,6 +1,6 @@ # source: test/sql/projection/select_star_exclude.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * EXCLUDE i FROM integers @@ -79,6 +79,18 @@ SELECT * EXCLUDE (INTEGERS.i, integers.J) FROM integers -- ok == +SELECT * EXCLUDE ("a.b") FROM (SELECT 1 AS "a.b", 2 AS c) +-- +ok +== +SELECT * EXCLUDE ("table.with.dot"."column.with.dot") FROM (SELECT 1 AS "column.with.dot", 2 AS c) AS "table.with.dot" +-- +ok +== +SELECT * EXCLUDE (a.b.c.d.e) FROM (SELECT 1 AS e) +-- +error: Parser Error: Expected at most 4 entries (catalog.schema.table.column), but found 5 entries (input: a.b.c.d.e) +== SELECT * EXCLUDE (integers.i, integers.j, integers2.i) FROM integers -- ok @@ -103,10 +115,22 @@ SELECT * EXCLUDE (blabla) FROM integers -- ok == +SELECT * EXCLUDE (type) FROM (SELECT 'hello' AS greeting) +-- +ok +== +SELECT * EXCLUDE (ii) FROM integers +-- +ok +== SELECT integers.* EXCLUDE (blabla) FROM integers -- ok == +SELECT integers.* EXCLUDE (ii) FROM integers +-- +ok +== SELECT * EXCEPT i FROM integers -- ok diff --git a/parser/testdata/corpus/sql/projection/select_star_like.test b/parser/testdata/corpus/sql/projection/select_star_like.test index 87bee33..02e3192 100644 --- a/parser/testdata/corpus/sql/projection/select_star_like.test +++ b/parser/testdata/corpus/sql/projection/select_star_like.test @@ -1,6 +1,6 @@ # source: test/sql/projection/select_star_like.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COLUMNS(lambda x: x LIKE 'col%') FROM integers diff --git a/parser/testdata/corpus/sql/projection/select_star_rename.test b/parser/testdata/corpus/sql/projection/select_star_rename.test index 9b212cf..980fbed 100644 --- a/parser/testdata/corpus/sql/projection/select_star_rename.test +++ b/parser/testdata/corpus/sql/projection/select_star_rename.test @@ -1,6 +1,6 @@ # source: test/sql/projection/select_star_rename.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 2, 3); @@ -23,6 +23,14 @@ SELECT renamed_col FROM (SELECT integers.* RENAME integers.i AS renamed_col FROM -- ok == +SELECT d, c FROM (SELECT * RENAME ("a.b" AS d) FROM (SELECT 1 AS "a.b", 2 AS c)) +-- +ok +== +SELECT d, c FROM (SELECT * RENAME ("table.with.dot"."column.with.dot" AS d) FROM (SELECT 1 AS "column.with.dot", 2 AS c) AS "table.with.dot") +-- +ok +== SELECT r1, r2 FROM (SELECT * RENAME (integers.i AS r1, j AS r2) FROM integers) -- ok diff --git a/parser/testdata/corpus/sql/projection/select_star_replace.test b/parser/testdata/corpus/sql/projection/select_star_replace.test index f6b1782..bacd2ee 100644 --- a/parser/testdata/corpus/sql/projection/select_star_replace.test +++ b/parser/testdata/corpus/sql/projection/select_star_replace.test @@ -1,6 +1,6 @@ # source: test/sql/projection/select_star_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * REPLACE i+100 AS i FROM integers @@ -27,13 +27,25 @@ SELECT * REPLACE (i+100 AS blabla) FROM integers -- ok == +SELECT * REPLACE (42 AS type) FROM (SELECT 'hello' AS greeting) +-- +ok +== +SELECT * REPLACE (i+100 AS ii) FROM integers +-- +ok +== SELECT integers.* REPLACE (i+100 AS blabla) FROM integers -- ok == +SELECT integers.* REPLACE (i+100 AS ii) FROM integers +-- +ok +== SELECT * EXCLUDE (i) REPLACE (i+100 AS i) FROM integers -- -error: Parser Error: Column "i" cannot occur in both EXCLUDE and REPLACE list +error: Parser Error: Column ""i"" cannot occur in both EXCLUDE and REPLACE list == CREATE TABLE test_star(id INTEGER, col1 VARCHAR, col2 VARCHAR, col3 INTEGER); -- diff --git a/parser/testdata/corpus/sql/projection/select_struct_star.test b/parser/testdata/corpus/sql/projection/select_struct_star.test index 0f0f7cf..e9735f4 100644 --- a/parser/testdata/corpus/sql/projection/select_struct_star.test +++ b/parser/testdata/corpus/sql/projection/select_struct_star.test @@ -1,6 +1,6 @@ # source: test/sql/projection/select_struct_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a STRUCT(i INT, j INT)); diff --git a/parser/testdata/corpus/sql/projection/test_columns_replace_using.test b/parser/testdata/corpus/sql/projection/test_columns_replace_using.test index 76e80fd..b89dcd4 100644 --- a/parser/testdata/corpus/sql/projection/test_columns_replace_using.test +++ b/parser/testdata/corpus/sql/projection/test_columns_replace_using.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_columns_replace_using.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COLUMNS(* REPLACE a AS a) FROM range(1) t1(a) NATURAL JOIN range(1) t2(a) diff --git a/parser/testdata/corpus/sql/projection/test_complex_expressions.test b/parser/testdata/corpus/sql/projection/test_complex_expressions.test index 8a3f732..af0d3af 100644 --- a/parser/testdata/corpus/sql/projection/test_complex_expressions.test +++ b/parser/testdata/corpus/sql/projection/test_complex_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_complex_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM exprtest diff --git a/parser/testdata/corpus/sql/projection/test_row_id.test b/parser/testdata/corpus/sql/projection/test_row_id.test index f3f4b9e..384702f 100644 --- a/parser/testdata/corpus/sql/projection/test_row_id.test +++ b/parser/testdata/corpus/sql/projection/test_row_id.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_row_id.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into a values (42), (44); diff --git a/parser/testdata/corpus/sql/projection/test_row_id_expression.test b/parser/testdata/corpus/sql/projection/test_row_id_expression.test index 245559a..e6aeddc 100644 --- a/parser/testdata/corpus/sql/projection/test_row_id_expression.test +++ b/parser/testdata/corpus/sql/projection/test_row_id_expression.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_row_id_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT rowid + 1, rowid - 1, rowid + rowid, i + rowid FROM a diff --git a/parser/testdata/corpus/sql/projection/test_scalar_projection.test b/parser/testdata/corpus/sql/projection/test_scalar_projection.test index e564322..7902590 100644 --- a/parser/testdata/corpus/sql/projection/test_scalar_projection.test +++ b/parser/testdata/corpus/sql/projection/test_scalar_projection.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_scalar_projection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42 + 1 diff --git a/parser/testdata/corpus/sql/projection/test_simple_projection.test b/parser/testdata/corpus/sql/projection/test_simple_projection.test index 9d06c55..b095182 100644 --- a/parser/testdata/corpus/sql/projection/test_simple_projection.test +++ b/parser/testdata/corpus/sql/projection/test_simple_projection.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_simple_projection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, j FROM a; diff --git a/parser/testdata/corpus/sql/projection/test_table_star.test b/parser/testdata/corpus/sql/projection/test_table_star.test index aacd8f5..dccb9c6 100644 --- a/parser/testdata/corpus/sql/projection/test_table_star.test +++ b/parser/testdata/corpus/sql/projection/test_table_star.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_table_star.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT test.* FROM test diff --git a/parser/testdata/corpus/sql/projection/test_value_list.test b/parser/testdata/corpus/sql/projection/test_value_list.test index 19a8d3f..be587ea 100644 --- a/parser/testdata/corpus/sql/projection/test_value_list.test +++ b/parser/testdata/corpus/sql/projection/test_value_list.test @@ -1,6 +1,6 @@ # source: test/sql/projection/test_value_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit (VALUES (1, 3), (2, 4)); diff --git a/parser/testdata/corpus/sql/returning/no_crash_when_no_returning_columns.test b/parser/testdata/corpus/sql/returning/no_crash_when_no_returning_columns.test index 53f42b5..feb692f 100644 --- a/parser/testdata/corpus/sql/returning/no_crash_when_no_returning_columns.test +++ b/parser/testdata/corpus/sql/returning/no_crash_when_no_returning_columns.test @@ -1,6 +1,6 @@ # source: test/sql/returning/no_crash_when_no_returning_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE v0 ( c1 INT ); diff --git a/parser/testdata/corpus/sql/returning/returning_delete.test b/parser/testdata/corpus/sql/returning/returning_delete.test index 36ffe10..96241a6 100644 --- a/parser/testdata/corpus/sql/returning/returning_delete.test +++ b/parser/testdata/corpus/sql/returning/returning_delete.test @@ -1,6 +1,6 @@ # source: test/sql/returning/returning_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE table1 (a INTEGER DEFAULT -1, b INTEGER DEFAULT -2, c INTEGER DEFAULT -3); diff --git a/parser/testdata/corpus/sql/returning/returning_delete_list.test b/parser/testdata/corpus/sql/returning/returning_delete_list.test index c411fe3..ad0080a 100644 --- a/parser/testdata/corpus/sql/returning/returning_delete_list.test +++ b/parser/testdata/corpus/sql/returning/returning_delete_list.test @@ -1,6 +1,6 @@ # source: test/sql/returning/returning_delete_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE all_types("varchar" VARCHAR, nested_int_array INTEGER[][]);; diff --git a/parser/testdata/corpus/sql/returning/returning_delete_same_transaction.test b/parser/testdata/corpus/sql/returning/returning_delete_same_transaction.test index 2a0a9b7..5857820 100644 --- a/parser/testdata/corpus/sql/returning/returning_delete_same_transaction.test +++ b/parser/testdata/corpus/sql/returning/returning_delete_same_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/returning/returning_delete_same_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INT PRIMARY KEY, name TEXT); diff --git a/parser/testdata/corpus/sql/returning/returning_insert.test b/parser/testdata/corpus/sql/returning/returning_insert.test index a9fa1dc..3d59262 100644 --- a/parser/testdata/corpus/sql/returning/returning_insert.test +++ b/parser/testdata/corpus/sql/returning/returning_insert.test @@ -1,6 +1,6 @@ # source: test/sql/returning/returning_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO table1 VALUES (1, 2, 3); diff --git a/parser/testdata/corpus/sql/returning/returning_large.test b/parser/testdata/corpus/sql/returning/returning_large.test index 5f73c9b..4633c84 100644 --- a/parser/testdata/corpus/sql/returning/returning_large.test +++ b/parser/testdata/corpus/sql/returning/returning_large.test @@ -1,6 +1,6 @@ # source: test/sql/returning/returning_large.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO table1(a, b, c) SELECT a, b, c FROM table1 RETURNING a; diff --git a/parser/testdata/corpus/sql/returning/returning_update.test b/parser/testdata/corpus/sql/returning/returning_update.test index 9b4df4d..c7ba1a9 100644 --- a/parser/testdata/corpus/sql/returning/returning_update.test +++ b/parser/testdata/corpus/sql/returning/returning_update.test @@ -1,6 +1,6 @@ # source: test/sql/returning/returning_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE table1 diff --git a/parser/testdata/corpus/sql/sample/can_sample_from_ingested_files.test b/parser/testdata/corpus/sql/sample/can_sample_from_ingested_files.test index ff183f4..f7d837e 100644 --- a/parser/testdata/corpus/sql/sample/can_sample_from_ingested_files.test +++ b/parser/testdata/corpus/sql/sample/can_sample_from_ingested_files.test @@ -1,6 +1,6 @@ # source: test/sql/sample/can_sample_from_ingested_files.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table all_types as select * exclude(small_enum, medium_enum, large_enum, "union", bit, empty_struct) from test_all_types(); diff --git a/parser/testdata/corpus/sql/sample/helper_operator_coverage.test b/parser/testdata/corpus/sql/sample/helper_operator_coverage.test new file mode 100644 index 0000000..7156db1 --- /dev/null +++ b/parser/testdata/corpus/sql/sample/helper_operator_coverage.test @@ -0,0 +1,29 @@ +# source: test/sql/sample/helper_operator_coverage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM range(100) USING SAMPLE 0 PERCENT (reservoir, 42); +-- +ok +== +SELECT count(*) +FROM (SELECT i, random() AS r FROM range(10) t(i)) s +USING SAMPLE 0 ROWS (system, 42); +-- +ok +== +SELECT count(*) +FROM (SELECT i, random() AS r FROM range(10) t(i)) s +USING SAMPLE 20 ROWS (system, 42); +-- +ok +== +EXPLAIN SELECT * FROM range(10) LIMIT 40 PERCENT OFFSET 2; +-- +ok +== +RESET GLOBAL current_dialect; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sample/reservoir_sample.test b/parser/testdata/corpus/sql/sample/reservoir_sample.test new file mode 100644 index 0000000..b9b747f --- /dev/null +++ b/parser/testdata/corpus/sql/sample/reservoir_sample.test @@ -0,0 +1,30 @@ +# source: test/sql/sample/reservoir_sample.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*), count(DISTINCT i) +FROM range(200000) t(i) USING SAMPLE 5000 ROWS (reservoir, 42); +-- +ok +== +SELECT count(*), count(DISTINCT i) +FROM range(10000) t(i) USING SAMPLE 1 ROWS (reservoir, 42); +-- +ok +== +SELECT count(*), count(DISTINCT i) +FROM range(1000) t(i) USING SAMPLE 10 PERCENT (reservoir, 42); +-- +ok +== +SELECT count(*), count(DISTINCT i) +FROM range(200000) t(i) USING SAMPLE 1 PERCENT (reservoir, 42); +-- +ok +== +SELECT count(*) +FROM range(150000) t(i) USING SAMPLE 100 PERCENT (reservoir, 42); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sample/reservoir_sample_memory_limit.test b/parser/testdata/corpus/sql/sample/reservoir_sample_memory_limit.test new file mode 100644 index 0000000..7e71116 --- /dev/null +++ b/parser/testdata/corpus/sql/sample/reservoir_sample_memory_limit.test @@ -0,0 +1,13 @@ +# source: test/sql/sample/reservoir_sample_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT sum(length(s)) FROM (SELECT repeat('x', 1000) s FROM range(300000)) USING SAMPLE 50 PERCENT (reservoir) +-- +ok +== +SELECT sum(length(s)) FROM (SELECT repeat('x', 1000) s FROM range(300000)) USING SAMPLE 1000 ROWS (reservoir) +-- +ok +== diff --git a/parser/testdata/corpus/sql/sample/same_seed_same_sample.test b/parser/testdata/corpus/sql/sample/same_seed_same_sample.test index e74ac4f..4739a0c 100644 --- a/parser/testdata/corpus/sql/sample/same_seed_same_sample.test +++ b/parser/testdata/corpus/sql/sample/same_seed_same_sample.test @@ -1,6 +1,6 @@ # source: test/sql/sample/same_seed_same_sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE test AS SELECT UNNEST(RANGE(100000)) as x; diff --git a/parser/testdata/corpus/sql/sample/system_sample_index_scan.test b/parser/testdata/corpus/sql/sample/system_sample_index_scan.test new file mode 100644 index 0000000..046d137 --- /dev/null +++ b/parser/testdata/corpus/sql/sample/system_sample_index_scan.test @@ -0,0 +1,35 @@ +# source: test/sql/sample/system_sample_index_scan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t0(c1 BOOLEAN); +-- +ok +== +CREATE INDEX i0 ON t0 (c1); +-- +ok +== +INSERT INTO t0(c1) SELECT (i % 8 = 1) FROM range(16384) g(i); +-- +ok +== +SELECT count(*) FROM t0 WHERE c1 IN (VALUES (true)); +-- +ok +== +SELECT count(*) < 16384 FROM t0 TABLESAMPLE SYSTEM (10%) REPEATABLE (7); +-- +ok +== +SELECT (SELECT count(*) FROM t0 TABLESAMPLE SYSTEM (10%) REPEATABLE (7) WHERE c1 IN (VALUES (true))) + <= (SELECT count(*) FROM t0 TABLESAMPLE SYSTEM (10%) REPEATABLE (7)); +-- +ok +== +SELECT (SELECT count(*) FROM t0 TABLESAMPLE SYSTEM (10%) REPEATABLE (7) WHERE c1 IN (VALUES (true))) + = (SELECT count(*) FROM t0 TABLESAMPLE SYSTEM (10%) REPEATABLE (7) WHERE c1 = true); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sample/table_samples/basic_sample_tests.test b/parser/testdata/corpus/sql/sample/table_samples/basic_sample_tests.test index 295e5eb..587169f 100644 --- a/parser/testdata/corpus/sql/sample/table_samples/basic_sample_tests.test +++ b/parser/testdata/corpus/sql/sample/table_samples/basic_sample_tests.test @@ -1,6 +1,6 @@ # source: test/sql/sample/table_samples/basic_sample_tests.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from range(100000) using sample (10000); diff --git a/parser/testdata/corpus/sql/sample/table_samples/table_sample_converts_to_block_sample.test b/parser/testdata/corpus/sql/sample/table_samples/table_sample_converts_to_block_sample.test index 194bb7b..1c0507f 100644 --- a/parser/testdata/corpus/sql/sample/table_samples/table_sample_converts_to_block_sample.test +++ b/parser/testdata/corpus/sql/sample/table_samples/table_sample_converts_to_block_sample.test @@ -1,6 +1,6 @@ # source: test/sql/sample/table_samples/table_sample_converts_to_block_sample.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table materialized_range as select 1 a from range(102400); diff --git a/parser/testdata/corpus/sql/sample/table_samples/test_sample_is_destroyed_on_updates.test b/parser/testdata/corpus/sql/sample/table_samples/test_sample_is_destroyed_on_updates.test index b693ff6..d32d6cc 100644 --- a/parser/testdata/corpus/sql/sample/table_samples/test_sample_is_destroyed_on_updates.test +++ b/parser/testdata/corpus/sql/sample/table_samples/test_sample_is_destroyed_on_updates.test @@ -1,6 +1,6 @@ # source: test/sql/sample/table_samples/test_sample_is_destroyed_on_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table integers_1 as select range a, range+1 b from range(102400); diff --git a/parser/testdata/corpus/sql/sample/table_samples/test_sample_types.test b/parser/testdata/corpus/sql/sample/table_samples/test_sample_types.test index 0aa902c..84747ca 100644 --- a/parser/testdata/corpus/sql/sample/table_samples/test_sample_types.test +++ b/parser/testdata/corpus/sql/sample/table_samples/test_sample_types.test @@ -1,6 +1,6 @@ # source: test/sql/sample/table_samples/test_sample_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table string_samples as select range::Varchar a from range(204800); diff --git a/parser/testdata/corpus/sql/sample/table_samples/test_table_sample_errors.test b/parser/testdata/corpus/sql/sample/table_samples/test_table_sample_errors.test index f069b6f..9b18aa5 100644 --- a/parser/testdata/corpus/sql/sample/table_samples/test_table_sample_errors.test +++ b/parser/testdata/corpus/sql/sample/table_samples/test_table_sample_errors.test @@ -1,6 +1,6 @@ # source: test/sql/sample/table_samples/test_table_sample_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create view v1 as select * from t1; diff --git a/parser/testdata/corpus/sql/sample/test_sample_too_big.test b/parser/testdata/corpus/sql/sample/test_sample_too_big.test index bf1a624..9601c43 100644 --- a/parser/testdata/corpus/sql/sample/test_sample_too_big.test +++ b/parser/testdata/corpus/sql/sample/test_sample_too_big.test @@ -1,6 +1,6 @@ # source: test/sql/sample/test_sample_too_big.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(a INT); diff --git a/parser/testdata/corpus/sql/sample/test_system_rows.test b/parser/testdata/corpus/sql/sample/test_system_rows.test index a1c7d1a..637109a 100644 --- a/parser/testdata/corpus/sql/sample/test_system_rows.test +++ b/parser/testdata/corpus/sql/sample/test_system_rows.test @@ -1,6 +1,6 @@ # source: test/sql/sample/test_system_rows.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_table AS SELECT i FROM range(10000) tbl(i); @@ -31,6 +31,14 @@ SELECT COUNT(*) FROM test_table USING SAMPLE 0 ROWS (system); -- ok == +CREATE TABLE empty_table(i INTEGER); +-- +ok +== +SELECT COUNT(*) FROM empty_table USING SAMPLE 5 ROWS (system); +-- +ok +== SELECT COUNT(*) FROM test_table USING SAMPLE 1 ROWS (system); -- ok diff --git a/parser/testdata/corpus/sql/sample/test_system_rows_pushdown.test b/parser/testdata/corpus/sql/sample/test_system_rows_pushdown.test index f46da48..a9b1365 100644 --- a/parser/testdata/corpus/sql/sample/test_system_rows_pushdown.test +++ b/parser/testdata/corpus/sql/sample/test_system_rows_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/sample/test_system_rows_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pushdown_test AS SELECT i FROM range(1000000) tbl(i); diff --git a/parser/testdata/corpus/sql/secrets/connection_secret_storage.test b/parser/testdata/corpus/sql/secrets/connection_secret_storage.test new file mode 100644 index 0000000..320945b --- /dev/null +++ b/parser/testdata/corpus/sql/secrets/connection_secret_storage.test @@ -0,0 +1,73 @@ +# source: test/sql/secrets/connection_secret_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SECRET s1 IN connection (TYPE http, SCOPE 'https://a.example.com') +-- +ok +== +SELECT count(*) FROM duckdb_secrets() WHERE name = 's1' AND storage = 'connection' +-- +ok +== +SELECT count(*) FROM duckdb_secrets() WHERE name = 's1' +-- +ok +== +CREATE SECRET s1 IN connection (TYPE http, SCOPE 'https://b.example.com') +-- +ok +== +SELECT scope = ['https://a.example.com'] FROM duckdb_secrets() WHERE name = 's1' AND storage = 'connection' +-- +ok +== +SELECT scope = ['https://b.example.com'] FROM duckdb_secrets() WHERE name = 's1' AND storage = 'connection' +-- +ok +== +CREATE OR REPLACE SECRET s1 IN connection (TYPE http, SCOPE 'https://a2.example.com') +-- +ok +== +SELECT scope = ['https://a2.example.com'] FROM duckdb_secrets() WHERE name = 's1' AND storage = 'connection' +-- +ok +== +DROP SECRET s1 FROM connection +-- +ok +== +DROP SECRET nope FROM connection +-- +ok +== +DROP SECRET IF EXISTS nope FROM connection +-- +ok +== +CREATE TEMPORARY SECRET s2 IN connection (TYPE http, SCOPE 'https://c.example.com') +-- +ok +== +SELECT count(*) FROM duckdb_secrets() WHERE name = 's2' AND storage = 'connection' +-- +ok +== +CREATE PERSISTENT SECRET s3 IN connection (TYPE http) +-- +ok +== +CREATE SECRET txn_conn IN connection (TYPE http, SCOPE 'https://txn.example.com') +-- +ok +== +SELECT count(*) FROM duckdb_secrets() WHERE name = 'txn_conn' AND storage = 'connection' +-- +ok +== +DROP SECRET txn_conn FROM connection +-- +ok +== diff --git a/parser/testdata/corpus/sql/secrets/create_secret_expression.test b/parser/testdata/corpus/sql/secrets/create_secret_expression.test index dd94a01..a37ab8f 100644 --- a/parser/testdata/corpus/sql/secrets/create_secret_expression.test +++ b/parser/testdata/corpus/sql/secrets/create_secret_expression.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/create_secret_expression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SECRET a (TYPE http); diff --git a/parser/testdata/corpus/sql/secrets/create_secret_filesystem_logging.test b/parser/testdata/corpus/sql/secrets/create_secret_filesystem_logging.test index 70b4f9b..27945ae 100644 --- a/parser/testdata/corpus/sql/secrets/create_secret_filesystem_logging.test +++ b/parser/testdata/corpus/sql/secrets/create_secret_filesystem_logging.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/create_secret_filesystem_logging.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET secret_directory='{TEST_DIR}/secret_fs_logging'; diff --git a/parser/testdata/corpus/sql/secrets/create_secret_hffs_autoload.test b/parser/testdata/corpus/sql/secrets/create_secret_hffs_autoload.test index ba2f2b8..188c332 100644 --- a/parser/testdata/corpus/sql/secrets/create_secret_hffs_autoload.test +++ b/parser/testdata/corpus/sql/secrets/create_secret_hffs_autoload.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/create_secret_hffs_autoload.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set allow_persistent_secrets=false; diff --git a/parser/testdata/corpus/sql/secrets/create_secret_persistence_no_client_context.test b/parser/testdata/corpus/sql/secrets/create_secret_persistence_no_client_context.test index 0d5ded1..5cab70c 100644 --- a/parser/testdata/corpus/sql/secrets/create_secret_persistence_no_client_context.test +++ b/parser/testdata/corpus/sql/secrets/create_secret_persistence_no_client_context.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/create_secret_persistence_no_client_context.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set secret_directory='{TEST_DIR}/create_secret_persistence_no_client_context' diff --git a/parser/testdata/corpus/sql/secrets/create_transaction_secret.test b/parser/testdata/corpus/sql/secrets/create_transaction_secret.test index 55f3d72..1993a2e 100644 --- a/parser/testdata/corpus/sql/secrets/create_transaction_secret.test +++ b/parser/testdata/corpus/sql/secrets/create_transaction_secret.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/create_transaction_secret.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRANSACTION SECRET transaction_secret (TYPE HTTP); diff --git a/parser/testdata/corpus/sql/secrets/drop_persistent_secret_if_exists.test b/parser/testdata/corpus/sql/secrets/drop_persistent_secret_if_exists.test index 6b44876..71fb5cf 100644 --- a/parser/testdata/corpus/sql/secrets/drop_persistent_secret_if_exists.test +++ b/parser/testdata/corpus/sql/secrets/drop_persistent_secret_if_exists.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/drop_persistent_secret_if_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set secret_directory='{TEST_DIR}/drop_persistent_secret_if_exists' diff --git a/parser/testdata/corpus/sql/secrets/drop_temporary_secret_storage.test b/parser/testdata/corpus/sql/secrets/drop_temporary_secret_storage.test new file mode 100644 index 0000000..38f22d8 --- /dev/null +++ b/parser/testdata/corpus/sql/secrets/drop_temporary_secret_storage.test @@ -0,0 +1,25 @@ +# source: test/sql/secrets/drop_temporary_secret_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TEMPORARY SECRET s (TYPE http) +-- +ok +== +DROP TEMPORARY SECRET s FROM local_file +-- +error: Parser Error: Can not combine TEMPORARY with specifying a storage for drop secret +== +DROP TEMP SECRET IF EXISTS s FROM memory +-- +error: Parser Error: Can not combine TEMPORARY with specifying a storage for drop secret +== +SELECT count(*) FROM duckdb_secrets() WHERE name = 's' +-- +ok +== +DROP TEMPORARY SECRET s +-- +ok +== diff --git a/parser/testdata/corpus/sql/secrets/http_env_scope_lookup.test b/parser/testdata/corpus/sql/secrets/http_env_scope_lookup.test new file mode 100644 index 0000000..53586a7 --- /dev/null +++ b/parser/testdata/corpus/sql/secrets/http_env_scope_lookup.test @@ -0,0 +1,72 @@ +# source: test/sql/secrets/http_env_scope_lookup.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET secret_directory = '{TEST_DIR}/http_env_scope_lookup' +-- +ok +== +CREATE SECRET env_secret ( + TYPE HTTP, + PROVIDER ENV, + SCOPE 'https://env.example/', + VERIFY_SSL false, + HTTP_PROXY 'http://proxy/', + HTTP_PROXY_USERNAME 'user', + HTTP_PROXY_PASSWORD 'password', + BEARER_TOKEN 'token', + EXTRA_HTTP_HEADERS MAP {'x': 'y'} +) +-- +ok +== +SELECT provider, + secret_string LIKE '%http_proxy=http://proxy/%', + secret_string LIKE '%http_proxy_password=redacted%', + secret_string LIKE '%bearer_token=redacted%' +FROM duckdb_secrets() +WHERE name = 'env_secret' +-- +ok +== +CREATE SECRET z_catchall (TYPE HTTP) +-- +ok +== +CREATE SECRET a_empty (TYPE HTTP, SCOPE '') +-- +ok +== +CREATE SECRET b_same (TYPE HTTP, SCOPE 'https://example.com/data/') +-- +ok +== +CREATE SECRET a_same (TYPE HTTP, SCOPE 'https://example.com/data/') +-- +ok +== +CREATE SECRET nested (TYPE HTTP, SCOPE 'https://example.com/data/nested/') +-- +ok +== +SELECT name FROM which_secret('https://example.com/data/nested/file.csv', 'http') +-- +ok +== +SELECT name FROM which_secret('https://example.com/data/file.csv', 'http') +-- +ok +== +SELECT name FROM which_secret('https://unrelated.example/file.csv', 'http') +-- +ok +== +SELECT count(*) FROM which_secret('anything', 'missing') +-- +ok +== +CREATE TEMPORARY SECRET invalid_storage IN local_file (TYPE HTTP) +-- +ok +== diff --git a/parser/testdata/corpus/sql/secrets/http_secret_redaction.test b/parser/testdata/corpus/sql/secrets/http_secret_redaction.test new file mode 100644 index 0000000..3dac0ff --- /dev/null +++ b/parser/testdata/corpus/sql/secrets/http_secret_redaction.test @@ -0,0 +1,34 @@ +# source: test/sql/secrets/http_secret_redaction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET allow_unredacted_secrets = false; +-- +ok +== +CREATE SECRET http_header_redaction_{provider} ( + TYPE HTTP, + PROVIDER {provider}, + BEARER_TOKEN 'dummy-bearer-token', + HTTP_PROXY_PASSWORD 'dummy-proxy-password', + VERIFY_SSL true, + EXTRA_HTTP_HEADERS MAP { + 'Authorization': 'Bearer dummy-header-token', + 'X-API-Key': 'dummy-api-key' + } +); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT * FROM duckdb_secrets(redact = false); +-- +ok +== +SELECT name, field +FROM duckdb_secrets(), UNNEST(string_split(secret_string, ';')) AS fields(field) +WHERE name IN ('http_header_redaction_config', 'http_header_redaction_env') + AND split_part(field, '=', 1) IN ('extra_http_headers', 'bearer_token', 'http_proxy_password', 'verify_ssl'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/secrets/persistent_secret_map_value.test b/parser/testdata/corpus/sql/secrets/persistent_secret_map_value.test new file mode 100644 index 0000000..a1ea541 --- /dev/null +++ b/parser/testdata/corpus/sql/secrets/persistent_secret_map_value.test @@ -0,0 +1,17 @@ +# source: test/sql/secrets/persistent_secret_map_value.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +set secret_directory='{TEST_DIR}/persistent_secret_map_value' +-- +ok +== +CREATE PERSISTENT SECRET map_secret (TYPE HTTP, EXTRA_HTTP_HEADERS MAP {'a': 'b'}); +-- +ok +== +SELECT name, type FROM duckdb_secrets() +-- +ok +== diff --git a/parser/testdata/corpus/sql/secrets/secret_autoloading_errors.test b/parser/testdata/corpus/sql/secrets/secret_autoloading_errors.test index 6b157f2..ab4e859 100644 --- a/parser/testdata/corpus/sql/secrets/secret_autoloading_errors.test +++ b/parser/testdata/corpus/sql/secrets/secret_autoloading_errors.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/secret_autoloading_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SECRET (TYPE S3) diff --git a/parser/testdata/corpus/sql/secrets/secret_compatibility_http.test b/parser/testdata/corpus/sql/secrets/secret_compatibility_http.test index 84eed9f..c167187 100644 --- a/parser/testdata/corpus/sql/secrets/secret_compatibility_http.test +++ b/parser/testdata/corpus/sql/secrets/secret_compatibility_http.test @@ -1,6 +1,6 @@ # source: test/sql/secrets/secret_compatibility_http.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set secret_directory='./data/secrets/http' diff --git a/parser/testdata/corpus/sql/secrets/test_secret_type_parameters.test b/parser/testdata/corpus/sql/secrets/test_secret_type_parameters.test new file mode 100644 index 0000000..9b3bc03 --- /dev/null +++ b/parser/testdata/corpus/sql/secrets/test_secret_type_parameters.test @@ -0,0 +1,9 @@ +# source: test/sql/secrets/test_secret_type_parameters.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) > 0 FROM duckdb_secret_type_parameters(); +-- +ok +== diff --git a/parser/testdata/corpus/sql/select/test_multi_column_reference.test b/parser/testdata/corpus/sql/select/test_multi_column_reference.test index 4bd230e..61a408c 100644 --- a/parser/testdata/corpus/sql/select/test_multi_column_reference.test +++ b/parser/testdata/corpus/sql/select/test_multi_column_reference.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_multi_column_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test.tbl(col INTEGER); diff --git a/parser/testdata/corpus/sql/select/test_positional_reference.test b/parser/testdata/corpus/sql/select/test_positional_reference.test index ec13995..e398fcd 100644 --- a/parser/testdata/corpus/sql/select/test_positional_reference.test +++ b/parser/testdata/corpus/sql/select/test_positional_reference.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_positional_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT #1 FROM range(1) @@ -35,3 +35,27 @@ SELECT #-1 FROM range(1) -- error: Parser Error: syntax error at or near "-" == +CREATE TABLE t(a INT, b INT); +-- +ok +== +INSERT INTO t VALUES (1, 2), (3, NULL); +-- +ok +== +SELECT #2 AS x FROM t WHERE (SELECT x) IS NULL +-- +ok +== +SELECT #1 AS x, (SELECT x + 100) AS y FROM t ORDER BY 1 +-- +ok +== +SELECT #2 AS x FROM t ORDER BY (SELECT x) NULLS LAST +-- +ok +== +SELECT 42 AS a, #1 AS x WHERE (SELECT x) IS NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/select/test_projection_names.test b/parser/testdata/corpus/sql/select/test_projection_names.test index 5a6f452..013d50c 100644 --- a/parser/testdata/corpus/sql/select/test_projection_names.test +++ b/parser/testdata/corpus/sql/select/test_projection_names.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_projection_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers("COL1" INTEGER, "COL2" INTEGER) diff --git a/parser/testdata/corpus/sql/select/test_schema_reference.test b/parser/testdata/corpus/sql/select/test_schema_reference.test index 919d31b..bba50b0 100644 --- a/parser/testdata/corpus/sql/select/test_schema_reference.test +++ b/parser/testdata/corpus/sql/select/test_schema_reference.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_schema_reference.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE s1.tbl(i INTEGER) diff --git a/parser/testdata/corpus/sql/select/test_select_alias_prefix_colon.test b/parser/testdata/corpus/sql/select/test_select_alias_prefix_colon.test index 40b656f..0c07785 100644 --- a/parser/testdata/corpus/sql/select/test_select_alias_prefix_colon.test +++ b/parser/testdata/corpus/sql/select/test_select_alias_prefix_colon.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_select_alias_prefix_colon.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT j : 42; diff --git a/parser/testdata/corpus/sql/select/test_select_into.test b/parser/testdata/corpus/sql/select/test_select_into.test index c0d96c2..8fd319f 100644 --- a/parser/testdata/corpus/sql/select/test_select_into.test +++ b/parser/testdata/corpus/sql/select/test_select_into.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_select_into.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (t TEXT); diff --git a/parser/testdata/corpus/sql/select/test_select_locking.test b/parser/testdata/corpus/sql/select/test_select_locking.test index 054aa83..60239a8 100644 --- a/parser/testdata/corpus/sql/select/test_select_locking.test +++ b/parser/testdata/corpus/sql/select/test_select_locking.test @@ -1,6 +1,6 @@ # source: test/sql/select/test_select_locking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM t FOR UPDATE; diff --git a/parser/testdata/corpus/sql/select/test_select_qualified_view.test b/parser/testdata/corpus/sql/select/test_select_qualified_view.test index e6a9a21..1097fa0 100644 --- a/parser/testdata/corpus/sql/select/test_select_qualified_view.test +++ b/parser/testdata/corpus/sql/select/test_select_qualified_view.test @@ -1,12 +1,8 @@ # source: test/sql/select/test_select_qualified_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -CREATE SCHEMA s; --- -ok -== create table s.a as select 'hello' as col1; -- ok diff --git a/parser/testdata/corpus/sql/serialization/logical_operator_serialization.test b/parser/testdata/corpus/sql/serialization/logical_operator_serialization.test new file mode 100644 index 0000000..2bc5018 --- /dev/null +++ b/parser/testdata/corpus/sql/serialization/logical_operator_serialization.test @@ -0,0 +1,100 @@ +# source: test/sql/serialization/logical_operator_serialization.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE operator_vacuum(i INTEGER, j INTEGER); +-- +ok +== +INSERT INTO operator_vacuum VALUES (1,2); +-- +ok +== +VACUUM operator_vacuum(i); +-- +ok +== +CREATE INDEX operator_vacuum_idx ON operator_vacuum((i + j)); +-- +ok +== +CREATE TABLE operator_update(i INTEGER, l INTEGER[]); +-- +ok +== +INSERT INTO operator_update VALUES (1,[1]); +-- +ok +== +UPDATE operator_update SET l=[2] WHERE i=1; +-- +ok +== +SELECT * FROM operator_update; +-- +ok +== +CREATE TABLE operator_merge_target(id INTEGER PRIMARY KEY, v INTEGER); +-- +ok +== +INSERT INTO operator_merge_target VALUES (1,10); +-- +ok +== +CREATE TABLE operator_merge_source(id INTEGER, v INTEGER); +-- +ok +== +INSERT INTO operator_merge_source VALUES (1,20),(2,30); +-- +ok +== +MERGE INTO operator_merge_target t +USING operator_merge_source s ON t.id=s.id +WHEN MATCHED THEN UPDATE SET v=s.v +WHEN NOT MATCHED THEN INSERT VALUES(s.id,s.v); +-- +ok +== +SELECT * FROM operator_merge_target ORDER BY id; +-- +ok +== +ATTACH ':memory:' AS operator_attached; +-- +ok +== +CREATE TABLE operator_attached.t(i INTEGER); +-- +ok +== +DETACH operator_attached; +-- +ok +== +ATTACH ':memory:' AS operator_copy_source; +-- +ok +== +CREATE TABLE operator_copy_source.t(i INTEGER); +-- +ok +== +INSERT INTO operator_copy_source.t VALUES (1); +-- +ok +== +ATTACH ':memory:' AS operator_copy_target; +-- +ok +== +COPY FROM DATABASE operator_copy_source TO operator_copy_target; +-- +ok +== +SELECT * FROM operator_copy_target.t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/setops/ambiguous_order_by.test b/parser/testdata/corpus/sql/setops/ambiguous_order_by.test index 928826f..d186836 100644 --- a/parser/testdata/corpus/sql/setops/ambiguous_order_by.test +++ b/parser/testdata/corpus/sql/setops/ambiguous_order_by.test @@ -1,6 +1,6 @@ # source: test/sql/setops/ambiguous_order_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from (values(42, 84)) s1(c1, c2) union all select * from (values(84, 42)) s2(c2, c3) order by c1; diff --git a/parser/testdata/corpus/sql/setops/except_intersect_collation.test b/parser/testdata/corpus/sql/setops/except_intersect_collation.test new file mode 100644 index 0000000..11428cf --- /dev/null +++ b/parser/testdata/corpus/sql/setops/except_intersect_collation.test @@ -0,0 +1,57 @@ +# source: test/sql/setops/except_intersect_collation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE a(id INT, s VARCHAR); +-- +ok +== +INSERT INTO a VALUES (1, 'a'); +-- +ok +== +CREATE TABLE b(s VARCHAR); +-- +ok +== +INSERT INTO b VALUES ('A'); +-- +ok +== +CREATE TABLE c(s VARCHAR COLLATE NOCASE); +-- +ok +== +INSERT INTO c VALUES ('a'); +-- +ok +== +SELECT count(*) FROM ((SELECT s COLLATE NOCASE AS c FROM a WHERE id > 0) EXCEPT (SELECT s FROM b)); +-- +ok +== +SELECT count(*) FROM ((SELECT s COLLATE NOCASE AS c FROM a WHERE id > 0) INTERSECT (SELECT s FROM b)); +-- +ok +== +SELECT count(*) FROM ((SELECT s COLLATE NOCASE AS c FROM a) EXCEPT (SELECT s FROM b)); +-- +ok +== +SELECT count(*) FROM ((SELECT s COLLATE NOCASE AS c FROM a) EXCEPT ALL (SELECT s FROM b)); +-- +ok +== +SELECT count(*) FROM ((SELECT s COLLATE NOCASE AS c FROM a) INTERSECT ALL (SELECT s FROM b)); +-- +ok +== +SELECT count(*) FROM (SELECT s FROM b EXCEPT SELECT s FROM c); +-- +ok +== +SELECT count(*) FROM (SELECT s FROM a EXCEPT SELECT s FROM b); +-- +ok +== diff --git a/parser/testdata/corpus/sql/setops/setops_pushdown.test b/parser/testdata/corpus/sql/setops/setops_pushdown.test index 1224126..744017f 100644 --- a/parser/testdata/corpus/sql/setops/setops_pushdown.test +++ b/parser/testdata/corpus/sql/setops/setops_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/setops/setops_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42 WHERE 1=0 EXCEPT SELECT 42 diff --git a/parser/testdata/corpus/sql/setops/test_except.test b/parser/testdata/corpus/sql/setops/test_except.test index 66bc61d..ef4ff50 100644 --- a/parser/testdata/corpus/sql/setops/test_except.test +++ b/parser/testdata/corpus/sql/setops/test_except.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_except.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(i INTEGER) diff --git a/parser/testdata/corpus/sql/setops/test_full_outer_join_union.test b/parser/testdata/corpus/sql/setops/test_full_outer_join_union.test index f030030..a54c568 100644 --- a/parser/testdata/corpus/sql/setops/test_full_outer_join_union.test +++ b/parser/testdata/corpus/sql/setops/test_full_outer_join_union.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_full_outer_join_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1), (2); diff --git a/parser/testdata/corpus/sql/setops/test_nested_except.test b/parser/testdata/corpus/sql/setops/test_nested_except.test index c6b9dd1..caae464 100644 --- a/parser/testdata/corpus/sql/setops/test_nested_except.test +++ b/parser/testdata/corpus/sql/setops/test_nested_except.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_nested_except.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table b(i integer) diff --git a/parser/testdata/corpus/sql/setops/test_pg_union.test b/parser/testdata/corpus/sql/setops/test_pg_union.test index ca21ef7..674e8f3 100644 --- a/parser/testdata/corpus/sql/setops/test_pg_union.test +++ b/parser/testdata/corpus/sql/setops/test_pg_union.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_pg_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 AS two UNION SELECT 2 ORDER BY 1; @@ -134,6 +134,14 @@ INSERT INTO VARCHAR_TBL (f1) VALUES -- ok == +CREATE TABLE TEXT_TBL(f1 text); +-- +ok +== +INSERT INTO TEXT_TBL VALUES ('doh!'), ('hi de ho neighbor'); +-- +ok +== SELECT f1 AS five FROM FLOAT8_TBL UNION SELECT f1 FROM FLOAT8_TBL @@ -169,31 +177,31 @@ ORDER BY 1; -- ok == -SELECT CAST(f1 AS char(4)) AS three FROM VARCHAR_TBL +SELECT '[' || CAST(f1 AS char(4)) || ']' AS value FROM VARCHAR_TBL UNION -SELECT f1 FROM CHAR_TBL +SELECT '[' || f1 || ']' FROM CHAR_TBL ORDER BY 1; -- ok == -SELECT f1 AS three FROM VARCHAR_TBL +SELECT '[' || f1 || ']' AS value FROM VARCHAR_TBL UNION -SELECT CAST(f1 AS varchar) FROM CHAR_TBL +SELECT '[' || CAST(f1 AS varchar) || ']' FROM CHAR_TBL ORDER BY 1; -- ok == -SELECT f1 AS eight FROM VARCHAR_TBL +SELECT '[' || f1 || ']' AS value FROM VARCHAR_TBL UNION ALL -SELECT f1 FROM CHAR_TBL; +SELECT '[' || f1 || ']' FROM CHAR_TBL; -- ok == -SELECT f1 AS five FROM TEXT_TBL +SELECT '[' || f1 || ']' AS value FROM TEXT_TBL UNION -SELECT f1 FROM VARCHAR_TBL +SELECT '[' || f1 || ']' FROM VARCHAR_TBL UNION -SELECT TRIM(TRAILING FROM f1) FROM CHAR_TBL +SELECT '[' || TRIM(TRAILING FROM f1) || ']' FROM CHAR_TBL ORDER BY 1; -- ok @@ -291,6 +299,18 @@ SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1; -- ok == +SELECT q1 FROM (VALUES (3), (1), (2)) lhs(q1) +EXCEPT SELECT q2 FROM (VALUES (2)) rhs(q2) +ORDER BY q2 LIMIT 1; +-- +ok +== +SELECT q1 FROM (VALUES (3), (1), (2)) lhs(q1) +EXCEPT SELECT q2 FROM (VALUES (2)) rhs(q2) +ORDER BY q1 DESC LIMIT 1; +-- +ok +== SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY 1; -- ok diff --git a/parser/testdata/corpus/sql/setops/test_setops.test b/parser/testdata/corpus/sql/setops/test_setops.test index e4f5134..cf8a38b 100644 --- a/parser/testdata/corpus/sql/setops/test_setops.test +++ b/parser/testdata/corpus/sql/setops/test_setops.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_setops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 UNION ALL SELECT 2 diff --git a/parser/testdata/corpus/sql/setops/test_union_all_by_name.test b/parser/testdata/corpus/sql/setops/test_union_all_by_name.test index 49c4242..4930f43 100644 --- a/parser/testdata/corpus/sql/setops/test_union_all_by_name.test +++ b/parser/testdata/corpus/sql/setops/test_union_all_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_all_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (x INT, y INT); diff --git a/parser/testdata/corpus/sql/setops/test_union_binding.test b/parser/testdata/corpus/sql/setops/test_union_binding.test index 7ef8692..8f244c4 100644 --- a/parser/testdata/corpus/sql/setops/test_union_binding.test +++ b/parser/testdata/corpus/sql/setops/test_union_binding.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test2(b INTEGER); diff --git a/parser/testdata/corpus/sql/setops/test_union_by_name.test b/parser/testdata/corpus/sql/setops/test_union_by_name.test index 6471f23..aa98b13 100644 --- a/parser/testdata/corpus/sql/setops/test_union_by_name.test +++ b/parser/testdata/corpus/sql/setops/test_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t1 VALUES (3, 3), (3, 3), (1, 1); diff --git a/parser/testdata/corpus/sql/setops/test_union_error.test b/parser/testdata/corpus/sql/setops/test_union_error.test index 71377cf..ec3d60c 100644 --- a/parser/testdata/corpus/sql/setops/test_union_error.test +++ b/parser/testdata/corpus/sql/setops/test_union_error.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT x::INT FROM (SELECT x::VARCHAR x FROM range(10) tbl(x) UNION ALL SELECT 'hello' x) tbl(x); diff --git a/parser/testdata/corpus/sql/setops/test_union_except_empty.test b/parser/testdata/corpus/sql/setops/test_union_except_empty.test index 60c7670..9d4b418 100644 --- a/parser/testdata/corpus/sql/setops/test_union_except_empty.test +++ b/parser/testdata/corpus/sql/setops/test_union_except_empty.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_except_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (i int); diff --git a/parser/testdata/corpus/sql/setops/test_union_order.test b/parser/testdata/corpus/sql/setops/test_union_order.test index fb4752e..5032bd0 100644 --- a/parser/testdata/corpus/sql/setops/test_union_order.test +++ b/parser/testdata/corpus/sql/setops/test_union_order.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT NULL UNION ALL SELECT 3 diff --git a/parser/testdata/corpus/sql/setops/test_union_subquery.test b/parser/testdata/corpus/sql/setops/test_union_subquery.test index 84154df..3e6bb8f 100644 --- a/parser/testdata/corpus/sql/setops/test_union_subquery.test +++ b/parser/testdata/corpus/sql/setops/test_union_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t VALUES (42) diff --git a/parser/testdata/corpus/sql/setops/test_union_type_cast.test b/parser/testdata/corpus/sql/setops/test_union_type_cast.test index d16fe20..53f8333 100644 --- a/parser/testdata/corpus/sql/setops/test_union_type_cast.test +++ b/parser/testdata/corpus/sql/setops/test_union_type_cast.test @@ -1,6 +1,6 @@ # source: test/sql/setops/test_union_type_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 UNION SELECT 1.0 diff --git a/parser/testdata/corpus/sql/setops/union_aggregate.test b/parser/testdata/corpus/sql/setops/union_aggregate.test index fe0107d..6a43e5b 100644 --- a/parser/testdata/corpus/sql/setops/union_aggregate.test +++ b/parser/testdata/corpus/sql/setops/union_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/setops/union_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM range(1) diff --git a/parser/testdata/corpus/sql/setops/union_all_projection_pushdown.test b/parser/testdata/corpus/sql/setops/union_all_projection_pushdown.test index ab873ad..8b41581 100644 --- a/parser/testdata/corpus/sql/setops/union_all_projection_pushdown.test +++ b/parser/testdata/corpus/sql/setops/union_all_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/setops/union_all_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT i, i+1 AS j, i+2 AS k, i+3 AS l FROM range(42,43) t(i) diff --git a/parser/testdata/corpus/sql/setops/union_limit.test b/parser/testdata/corpus/sql/setops/union_limit.test index 91653cf..c0692b7 100644 --- a/parser/testdata/corpus/sql/setops/union_limit.test +++ b/parser/testdata/corpus/sql/setops/union_limit.test @@ -1,6 +1,6 @@ # source: test/sql/setops/union_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 UNION ALL SELECT * FROM range(2, 100) UNION ALL SELECT 999 LIMIT 5; diff --git a/parser/testdata/corpus/sql/setops/union_order_by_expression.test b/parser/testdata/corpus/sql/setops/union_order_by_expression.test new file mode 100644 index 0000000..3cd1e8e --- /dev/null +++ b/parser/testdata/corpus/sql/setops/union_order_by_expression.test @@ -0,0 +1,45 @@ +# source: test/sql/setops/union_order_by_expression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t1 AS SELECT * FROM (VALUES (1, 'a'), (NULL, 'b'), (3, 'c')) t(i, s); +-- +ok +== +CREATE TABLE t2 AS SELECT * FROM (VALUES (2, 'd'), (NULL, 'e'), (3, 'c')) t(i, s); +-- +ok +== +SELECT i, s FROM t1 UNION ALL SELECT i, s FROM t2 ORDER BY i IS NULL, i, s +-- +ok +== +SELECT i, s FROM t1 UNION ALL SELECT i, s FROM t2 ORDER BY CASE WHEN s = 'e' THEN 0 ELSE 1 END, i NULLS FIRST, s LIMIT 3 +-- +ok +== +SELECT i, s FROM t1 UNION SELECT i, s FROM t2 ORDER BY i IS NULL, i DESC, s +-- +ok +== +SELECT s FROM t1 UNION ALL SELECT s FROM t2 ORDER BY s IN (SELECT s FROM t2 WHERE i = 2) DESC, s +-- +ok +== +SELECT i + 1 FROM t1 UNION ALL SELECT i + 1 FROM t2 ORDER BY i + 1 +-- +ok +== +SELECT i, s FROM t1 UNION ALL SELECT i, s FROM t2 ORDER BY 2 DESC, 1 +-- +ok +== +SELECT i, s FROM t1 EXCEPT SELECT i, s FROM t2 ORDER BY ALL +-- +ok +== +SELECT i FROM t1 UNION ALL SELECT i FROM t2 ORDER BY s IS NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/setops/union_pipeline.test b/parser/testdata/corpus/sql/setops/union_pipeline.test index 27eee65..b4697d5 100644 --- a/parser/testdata/corpus/sql/setops/union_pipeline.test +++ b/parser/testdata/corpus/sql/setops/union_pipeline.test @@ -1,6 +1,6 @@ # source: test/sql/setops/union_pipeline.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM (SELECT * FROM range(1000000) tbl(i) UNION ALL SELECT * FROM range(1000000) tbl(i)) tbl(i) diff --git a/parser/testdata/corpus/sql/setops/union_shared_scan.test b/parser/testdata/corpus/sql/setops/union_shared_scan.test index 42fd96d..9bbc5e8 100644 --- a/parser/testdata/corpus/sql/setops/union_shared_scan.test +++ b/parser/testdata/corpus/sql/setops/union_shared_scan.test @@ -1,6 +1,6 @@ # source: test/sql/setops/union_shared_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT * FROM range(10000) tbl(i) UNION ALL SELECT NULL diff --git a/parser/testdata/corpus/sql/setops/union_single_dedup.test b/parser/testdata/corpus/sql/setops/union_single_dedup.test new file mode 100644 index 0000000..6d3b2d8 --- /dev/null +++ b/parser/testdata/corpus/sql/setops/union_single_dedup.test @@ -0,0 +1,49 @@ +# source: test/sql/setops/union_single_dedup.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t1 AS SELECT range AS i FROM range(10); +-- +ok +== +CREATE TABLE t2 AS SELECT range AS i FROM range(5, 15); +-- +ok +== +SELECT count(*) FROM (SELECT i FROM t1 UNION SELECT i FROM t2); +-- +ok +== +SELECT count(*) FROM (SELECT i FROM t1 UNION BY NAME SELECT i FROM t2); +-- +ok +== +CREATE TABLE c1(col1 VARCHAR COLLATE NOCASE); +-- +ok +== +CREATE TABLE c2(col1 VARCHAR COLLATE NOCASE); +-- +ok +== +INSERT INTO c1 VALUES ('a'); +-- +ok +== +INSERT INTO c2 VALUES ('A'); +-- +ok +== +SELECT count(*) FROM (SELECT * FROM c1 UNION SELECT * FROM c2); +-- +ok +== +EXPLAIN SELECT i FROM t1 UNION SELECT i FROM t2; +-- +ok +== +EXPLAIN SELECT i FROM t1 UNION BY NAME SELECT i FROM t2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/setops/value_union.test b/parser/testdata/corpus/sql/setops/value_union.test index 3c3e896..3c0559d 100644 --- a/parser/testdata/corpus/sql/setops/value_union.test +++ b/parser/testdata/corpus/sql/setops/value_union.test @@ -1,6 +1,6 @@ # source: test/sql/setops/value_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW vals AS SELECT * FROM (VALUES (1, 10), (2, 5), (3, 4)) tbl(i, j); diff --git a/parser/testdata/corpus/sql/settings/access_mode.test b/parser/testdata/corpus/sql/settings/access_mode.test index 39bd5df..1baeed3 100644 --- a/parser/testdata/corpus/sql/settings/access_mode.test +++ b/parser/testdata/corpus/sql/settings/access_mode.test @@ -1,6 +1,6 @@ # source: test/sql/settings/access_mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET access_mode='read_only' diff --git a/parser/testdata/corpus/sql/settings/allowed_configs.test b/parser/testdata/corpus/sql/settings/allowed_configs.test index 12b182f..9b525ef 100644 --- a/parser/testdata/corpus/sql/settings/allowed_configs.test +++ b/parser/testdata/corpus/sql/settings/allowed_configs.test @@ -1,6 +1,6 @@ # source: test/sql/settings/allowed_configs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET allowed_configs=['lock_configuration'] @@ -27,10 +27,6 @@ SET allowed_configs=['pivot_limit', 'EXPLAIN_output', 'memory_limit'] -- ok == -SET lock_configuration=true --- -ok -== SET pivot_limit=20000 -- ok @@ -39,10 +35,6 @@ SET explain_output='OPTIMIZED_ONLY' -- ok == -SET memory_limit='2GB' --- -ok -== SET max_memory='2GB' -- ok diff --git a/parser/testdata/corpus/sql/settings/allowed_configs_extensions.test b/parser/testdata/corpus/sql/settings/allowed_configs_extensions.test index ec889d2..36c4612 100644 --- a/parser/testdata/corpus/sql/settings/allowed_configs_extensions.test +++ b/parser/testdata/corpus/sql/settings/allowed_configs_extensions.test @@ -1,6 +1,6 @@ # source: test/sql/settings/allowed_configs_extensions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET TimeZone='America/New_York' diff --git a/parser/testdata/corpus/sql/settings/allowed_directories.test b/parser/testdata/corpus/sql/settings/allowed_directories.test index 4e1ab82..615b773 100644 --- a/parser/testdata/corpus/sql/settings/allowed_directories.test +++ b/parser/testdata/corpus/sql/settings/allowed_directories.test @@ -1,6 +1,6 @@ # source: test/sql/settings/allowed_directories.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET allowed_directories=['{DATA_DIR}/csv/glob'] diff --git a/parser/testdata/corpus/sql/settings/allowed_directories_home_directory.test b/parser/testdata/corpus/sql/settings/allowed_directories_home_directory.test new file mode 100644 index 0000000..4a88880 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/allowed_directories_home_directory.test @@ -0,0 +1,17 @@ +# source: test/sql/settings/allowed_directories_home_directory.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 99 AS col1, 100 AS col2) TO '{TEST_DIR}/outside_home.csv' +-- +ok +== +SET allowed_directories=['~'] +-- +ok +== +SELECT * FROM read_csv({'filename': '~/outside_home.csv'}::VARIANT) +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/allowed_paths.test b/parser/testdata/corpus/sql/settings/allowed_paths.test index 1bc4707..1e46a3c 100644 --- a/parser/testdata/corpus/sql/settings/allowed_paths.test +++ b/parser/testdata/corpus/sql/settings/allowed_paths.test @@ -1,6 +1,6 @@ # source: test/sql/settings/allowed_paths.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET allowed_paths=['{DATA_DIR}/csv/glob/f_1.csv'] diff --git a/parser/testdata/corpus/sql/settings/block_allocator_memory.test b/parser/testdata/corpus/sql/settings/block_allocator_memory.test index 238e929..8a9d8d7 100644 --- a/parser/testdata/corpus/sql/settings/block_allocator_memory.test +++ b/parser/testdata/corpus/sql/settings/block_allocator_memory.test @@ -1,6 +1,6 @@ # source: test/sql/settings/block_allocator_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit RESET block_allocator_memory; diff --git a/parser/testdata/corpus/sql/settings/concurrent_set_disabled_optimizers.test b/parser/testdata/corpus/sql/settings/concurrent_set_disabled_optimizers.test new file mode 100644 index 0000000..9484ea6 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/concurrent_set_disabled_optimizers.test @@ -0,0 +1,33 @@ +# source: test/sql/settings/concurrent_set_disabled_optimizers.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE m AS SELECT range i, range % 100 g FROM range(1000); +-- +ok +== +SET GLOBAL disabled_optimizers='expression_rewriter,filter_pushdown,cte_filter_pusher,join_order'; +-- +ok +== +SELECT count(*) FROM m a WHERE a.i > (SELECT min(b.i) FROM m b WHERE b.g = a.g); +-- +ok +== +SET GLOBAL disabled_optimizers=''; +-- +ok +== +SELECT count(*) FROM m a WHERE EXISTS (SELECT 1 FROM m b WHERE b.g = a.g AND b.i < a.i); +-- +ok +== +RESET GLOBAL disabled_optimizers +-- +ok +== +SELECT current_setting('disabled_optimizers') +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/connection_local_settings.test b/parser/testdata/corpus/sql/settings/connection_local_settings.test index 2f7f7c7..7ede87d 100644 --- a/parser/testdata/corpus/sql/settings/connection_local_settings.test +++ b/parser/testdata/corpus/sql/settings/connection_local_settings.test @@ -1,6 +1,6 @@ # source: test/sql/settings/connection_local_settings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS FROM (VALUES (1), (2), (3), (NULL)) t(i) diff --git a/parser/testdata/corpus/sql/settings/debug_deprecated_settings.test b/parser/testdata/corpus/sql/settings/debug_deprecated_settings.test new file mode 100644 index 0000000..1de4b18 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/debug_deprecated_settings.test @@ -0,0 +1,59 @@ +# source: test/sql/settings/debug_deprecated_settings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list_count( + list_intersect( + (SELECT list(name) FROM duckdb_settings(debug := true)), + (SELECT list(name) FROM duckdb_settings(debug := false)) + ) +); +-- +ok +== +SELECT list_count( + list_intersect( + (SELECT list(name) FROM duckdb_settings(deprecated := true)), + (SELECT list(name) FROM duckdb_settings(deprecated := false)) + ) +); +-- +ok +== +SELECT name FROM duckdb_settings(debug := true) WHERE name = 'debug_enable_caching_operators'; +-- +ok +== +SELECT count(*) != 0 FROM duckdb_settings(debug := true); +-- +ok +== +SELECT count(*) != 0 FROM duckdb_settings(deprecated := true); +-- +ok +== +SELECT (SELECT count(*) FROM duckdb_settings(include_all := true)) = + (SELECT count(*) FROM duckdb_settings()) + + (SELECT count(*) FROM duckdb_settings(debug := true)) + + (SELECT count(*) FROM duckdb_settings(deprecated := true)) + + (SELECT count(*) FROM duckdb_settings(debug := true, deprecated := true)); +-- +ok +== +SELECT count(*) FROM duckdb_settings(include_all := true) WHERE name IN ('threads', 'debug_enable_caching_operators'); +-- +ok +== +SELECT (SELECT count(*) FROM duckdb_settings(include_all := false)) = (SELECT count(*) FROM duckdb_settings()); +-- +ok +== +SELECT * FROM duckdb_settings(include_all := true, debug := true); +-- +ok +== +SELECT * FROM duckdb_settings(include_all := NULL); +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/default_null_order_extended.test b/parser/testdata/corpus/sql/settings/default_null_order_extended.test index e335f57..9b2e9cc 100644 --- a/parser/testdata/corpus/sql/settings/default_null_order_extended.test +++ b/parser/testdata/corpus/sql/settings/default_null_order_extended.test @@ -1,6 +1,6 @@ # source: test/sql/settings/default_null_order_extended.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers ORDER BY i; diff --git a/parser/testdata/corpus/sql/settings/deprecated_settings.test b/parser/testdata/corpus/sql/settings/deprecated_settings.test new file mode 100644 index 0000000..27947e1 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/deprecated_settings.test @@ -0,0 +1,73 @@ +# source: test/sql/settings/deprecated_settings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET warnings_as_errors=true; +-- +ok +== +SET legacy_metrics_format=true; +-- +ok +== +SET experimental_metadata_reuse=false; +-- +ok +== +SET force_column_metadata_reuse=true; +-- +ok +== +SET enable_object_cache=true; +-- +ok +== +SET regex_match_operator_semantics='full'; +-- +ok +== +SET table_function_identifier_conversion='ENABLE_IMPLICIT_STRING'; +-- +ok +== +SET GLOBAL experimental_metadata_reuse=false; +-- +ok +== +RESET delim_join_as_cte; +-- +ok +== +RESET enable_object_cache; +-- +ok +== +RESET regex_match_operator_semantics; +-- +ok +== +SET regex_match_operator_semantics='NOPE'; +-- +ok +== +SET table_function_identifier_conversion=NULL; +-- +ok +== +PRAGMA enable_verification; +-- +ok +== +PRAGMA enable_object_cache; +-- +ok +== +RESET integer_division; +-- +ok +== +SET warnings_as_errors=false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/dialect_compatibility_mode.test b/parser/testdata/corpus/sql/settings/dialect_compatibility_mode.test index 67ec5cb..2d4284d 100644 --- a/parser/testdata/corpus/sql/settings/dialect_compatibility_mode.test +++ b/parser/testdata/corpus/sql/settings/dialect_compatibility_mode.test @@ -1,6 +1,6 @@ # source: test/sql/settings/dialect_compatibility_mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('dialect_compatibility_mode') diff --git a/parser/testdata/corpus/sql/settings/drop_set_schema.test b/parser/testdata/corpus/sql/settings/drop_set_schema.test index 7d08914..ef6e657 100644 --- a/parser/testdata/corpus/sql/settings/drop_set_schema.test +++ b/parser/testdata/corpus/sql/settings/drop_set_schema.test @@ -1,6 +1,6 @@ # source: test/sql/settings/drop_set_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select current_schema(); diff --git a/parser/testdata/corpus/sql/settings/errors_as_json.test b/parser/testdata/corpus/sql/settings/errors_as_json.test index a12dabe..d8d35fc 100644 --- a/parser/testdata/corpus/sql/settings/errors_as_json.test +++ b/parser/testdata/corpus/sql/settings/errors_as_json.test @@ -1,6 +1,6 @@ # source: test/sql/settings/errors_as_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET errors_as_json=true @@ -17,7 +17,7 @@ ok == SECT cbl FROM (VALUES (42)) t(col) -- -error: Parser Error: syntax error at or near "cbl" +error: Parser Error: syntax error at or near "SECT" == select corr('hello'::VARCHAR, 'world'::VARCHAR) -- diff --git a/parser/testdata/corpus/sql/settings/http_client_pool_capacity.test b/parser/testdata/corpus/sql/settings/http_client_pool_capacity.test new file mode 100644 index 0000000..9cd52d7 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/http_client_pool_capacity.test @@ -0,0 +1,41 @@ +# source: test/sql/settings/http_client_pool_capacity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET VARIABLE default_http_capacity = current_setting('http_client_pool_capacity') +-- +ok +== +SET http_client_pool_capacity = {capacity} +-- +error: Parser Error: syntax error at or near "}" +== +SELECT current_setting('http_client_pool_capacity') = {capacity} +-- +error: Parser Error: syntax error at or near "}" +== +SET async_threads = 0 +-- +ok +== +SELECT current_setting('http_client_pool_capacity') +-- +ok +== +RESET http_client_pool_capacity +-- +ok +== +SELECT current_setting('http_client_pool_capacity') >= 1 +-- +ok +== +RESET async_threads +-- +ok +== +SELECT current_setting('http_client_pool_capacity') = getvariable('default_http_capacity') +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/integer_division_setting.test b/parser/testdata/corpus/sql/settings/integer_division_setting.test index dbbabb7..d5033c5 100644 --- a/parser/testdata/corpus/sql/settings/integer_division_setting.test +++ b/parser/testdata/corpus/sql/settings/integer_division_setting.test @@ -1,6 +1,6 @@ # source: test/sql/settings/integer_division_setting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1/2 diff --git a/parser/testdata/corpus/sql/settings/lock_configuration_pragmas.test b/parser/testdata/corpus/sql/settings/lock_configuration_pragmas.test new file mode 100644 index 0000000..212a5f9 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/lock_configuration_pragmas.test @@ -0,0 +1,85 @@ +# source: test/sql/settings/lock_configuration_pragmas.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT current_setting('enable_optimizer'); +-- +ok +== +PRAGMA enable_progress_bar; +-- +ok +== +SELECT current_setting('enable_progress_bar'); +-- +ok +== +PRAGMA disable_progress_bar; +-- +ok +== +PRAGMA disable_print_progress_bar; +-- +ok +== +SELECT current_setting('enable_progress_bar_print'); +-- +ok +== +PRAGMA enable_print_progress_bar; +-- +ok +== +SET enable_profiling='no_output'; +-- +ok +== +SELECT current_setting('enable_profiling') IS NULL; +-- +ok +== +PRAGMA enable_profiling; +-- +ok +== +SELECT current_setting('enable_profiling'); +-- +ok +== +SET enable_logging=false; +-- +ok +== +SET lock_configuration=true; +-- +ok +== +PRAGMA disable_profile; +-- +ok +== +PRAGMA enable_profile; +-- +ok +== +CALL enable_profiling(format='json', save_location='__TEST_DIR__/locked_profile.json'); +-- +ok +== +SELECT current_setting('enable_profiling'), current_setting('profiling_output'); +-- +ok +== +PRAGMA force_checkpoint; +-- +ok +== +CALL enable_logging(storage='file', storage_path='__TEST_DIR__/locked_logs'); +-- +ok +== +SELECT current_setting('enable_logging')::BOOLEAN; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/lock_configuration_schema.test b/parser/testdata/corpus/sql/settings/lock_configuration_schema.test index caf6195..e7873c3 100644 --- a/parser/testdata/corpus/sql/settings/lock_configuration_schema.test +++ b/parser/testdata/corpus/sql/settings/lock_configuration_schema.test @@ -1,6 +1,6 @@ # source: test/sql/settings/lock_configuration_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create schema s2; @@ -15,10 +15,6 @@ use s2; -- ok == -SET lock_configuration=true; --- -ok -== reset schema; -- ok diff --git a/parser/testdata/corpus/sql/settings/max_execution_time.test b/parser/testdata/corpus/sql/settings/max_execution_time.test index 9705149..10bc69f 100644 --- a/parser/testdata/corpus/sql/settings/max_execution_time.test +++ b/parser/testdata/corpus/sql/settings/max_execution_time.test @@ -1,6 +1,6 @@ # source: test/sql/settings/max_execution_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('max_execution_time') @@ -11,15 +11,15 @@ SELECT name, value, input_type FROM duckdb_settings() WHERE name = 'max_executio -- ok == -SET max_execution_time=100 +SET max_execution_time=50 -- ok == -SET max_execution_time=50 +SELECT 1 -- ok == -SELECT 1 +SELECT i, SUM(i) OVER (PARTITION BY i % 1000000 ORDER BY i) FROM range(10000000) t(i) -- ok == @@ -39,3 +39,15 @@ SET GLOBAL max_execution_time=0 -- ok == +SET max_execution_time=9223372036854775807; +-- +ok +== +SET max_execution_time=10000000000000; +-- +ok +== +SET max_execution_time=0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/max_execution_time_nested_expansion.test b/parser/testdata/corpus/sql/settings/max_execution_time_nested_expansion.test new file mode 100644 index 0000000..cc52e34 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/max_execution_time_nested_expansion.test @@ -0,0 +1,21 @@ +# source: test/sql/settings/max_execution_time_nested_expansion.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO d(x) AS x + x; +-- +ok +== +SELECT d(d(d(1))); +-- +ok +== +SET max_execution_time=200 +-- +ok +== +SELECT d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(d(1)))))))))))))))))))))))); +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/max_memory_percentage.test b/parser/testdata/corpus/sql/settings/max_memory_percentage.test new file mode 100644 index 0000000..20162b2 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/max_memory_percentage.test @@ -0,0 +1,49 @@ +# source: test/sql/settings/max_memory_percentage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_memory='100%' +-- +ok +== +CREATE TABLE all_memory AS SELECT current_setting('max_memory') AS v +-- +ok +== +SET max_memory='50%' +-- +ok +== +SELECT (SELECT v FROM all_memory) <> current_setting('max_memory') +-- +ok +== +SET max_memory='0.5%' +-- +ok +== +SELECT current_setting('max_memory') <> '0 bytes' +-- +ok +== +SET max_memory='1GiB' +-- +ok +== +SELECT current_setting('max_memory') +-- +ok +== +SET max_memory='150%' +-- +ok +== +SET max_memory='-3%' +-- +ok +== +SET max_memory='abc%' +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/max_streaming_buffer_size.test b/parser/testdata/corpus/sql/settings/max_streaming_buffer_size.test new file mode 100644 index 0000000..cf910ed --- /dev/null +++ b/parser/testdata/corpus/sql/settings/max_streaming_buffer_size.test @@ -0,0 +1,25 @@ +# source: test/sql/settings/max_streaming_buffer_size.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_streaming_buffer_size='2MiB' +-- +ok +== +SELECT current_setting('max_streaming_buffer_size'), current_setting('streaming_buffer_size') +-- +ok +== +SET streaming_buffer_size='4.0MiB' +-- +ok +== +RESET streaming_buffer_size +-- +ok +== +SELECT current_setting('max_streaming_buffer_size') +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/memory_limit_settings_unlimited.test b/parser/testdata/corpus/sql/settings/memory_limit_settings_unlimited.test new file mode 100644 index 0000000..7c14a26 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/memory_limit_settings_unlimited.test @@ -0,0 +1,53 @@ +# source: test/sql/settings/memory_limit_settings_unlimited.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET operator_memory_limit = '-1'; +-- +ok +== +SELECT current_setting('operator_memory_limit') IS NULL; +-- +ok +== +SET operator_memory_limit = 'none'; +-- +ok +== +SET operator_memory_limit = '-1 GB'; +-- +ok +== +SET write_buffer_row_group_memory_limit = 'null'; +-- +ok +== +SET write_buffer_row_group_memory_limit = '-1'; +-- +ok +== +COPY (SELECT 1) TO '__TEST_DIR__/unlimited.parquet' (ROW_GROUP_SIZE_BYTES '-1'); +-- +ok +== +COPY (SELECT 1) TO '__TEST_DIR__/unlimited.parquet' (ROW_GROUP_SIZE_BYTES 18446744073709551615); +-- +ok +== +COPY (SELECT 1) TO '__TEST_DIR__/unlimited.parquet' (ROW_GROUP_SIZE_BYTES '1MB'); +-- +ok +== +COPY (SELECT 1) TO '__TEST_DIR__/unlimited.parquet' (FILE_SIZE_BYTES 18446744073709551615); +-- +ok +== +COPY (SELECT 1) TO '__TEST_DIR__/unlimited.csv' (FILE_SIZE_BYTES NULL); +-- +ok +== +COPY (SELECT 1) TO '__TEST_DIR__/unlimited.parquet' (ROW_GROUP_SIZE_BYTES NULL); +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/operator_memory_limit.test b/parser/testdata/corpus/sql/settings/operator_memory_limit.test index dcc6019..c6da098 100644 --- a/parser/testdata/corpus/sql/settings/operator_memory_limit.test +++ b/parser/testdata/corpus/sql/settings/operator_memory_limit.test @@ -1,6 +1,6 @@ # source: test/sql/settings/operator_memory_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('operator_memory_limit') @@ -27,19 +27,15 @@ SELECT name, value, input_type FROM duckdb_settings() WHERE name = 'operator_mem -- ok == -PRAGMA temp_directory='' --- -ok -== -PRAGMA max_temp_directory_size='0B' +SET operator_memory_limit='1MB' -- ok == -SET operator_memory_limit='1MB' +SELECT i % 1000000 as g, COUNT(*) FROM range(10000000) t(i) GROUP BY 1; -- ok == -SELECT i % 1000000 as g, COUNT(*) FROM range(10000000) t(i) GROUP BY 1; +SELECT i, SUM(i) OVER (PARTITION BY i % 100000 ORDER BY i) FROM range(5000000) t(i); -- ok == diff --git a/parser/testdata/corpus/sql/settings/pragma_assignment_deprecated.test b/parser/testdata/corpus/sql/settings/pragma_assignment_deprecated.test new file mode 100644 index 0000000..5ffcb9c --- /dev/null +++ b/parser/testdata/corpus/sql/settings/pragma_assignment_deprecated.test @@ -0,0 +1,9 @@ +# source: test/sql/settings/pragma_assignment_deprecated.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA threads=2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/reset/reset_memory_limit.test b/parser/testdata/corpus/sql/settings/reset/reset_memory_limit.test index 1152b60..b2d20c8 100644 --- a/parser/testdata/corpus/sql/settings/reset/reset_memory_limit.test +++ b/parser/testdata/corpus/sql/settings/reset/reset_memory_limit.test @@ -1,6 +1,6 @@ # source: test/sql/settings/reset/reset_memory_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA temp_directory=''; diff --git a/parser/testdata/corpus/sql/settings/reset/reset_threads.test b/parser/testdata/corpus/sql/settings/reset/reset_threads.test index 9a4ac9b..55fa036 100644 --- a/parser/testdata/corpus/sql/settings/reset/reset_threads.test +++ b/parser/testdata/corpus/sql/settings/reset/reset_threads.test @@ -1,6 +1,6 @@ # source: test/sql/settings/reset/reset_threads.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select current_setting('threads') diff --git a/parser/testdata/corpus/sql/settings/set_null_settings.test b/parser/testdata/corpus/sql/settings/set_null_settings.test new file mode 100644 index 0000000..495f609 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/set_null_settings.test @@ -0,0 +1,97 @@ +# source: test/sql/settings/set_null_settings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET allocator_background_threads=NULL; +-- +ok +== +SET allow_community_extensions=NULL; +-- +ok +== +SET allowed_configs=NULL; +-- +ok +== +SET allowed_directories=NULL; +-- +ok +== +SET allowed_paths=NULL; +-- +ok +== +SET allow_extension_repositories=NULL; +-- +ok +== +SET allow_persistent_secrets=NULL; +-- +ok +== +SET allow_unredacted_secrets=NULL; +-- +ok +== +SET allow_unsigned_extensions=NULL; +-- +ok +== +SET default_block_size=NULL; +-- +ok +== +SET enable_external_access=NULL; +-- +ok +== +SET enable_external_file_cache=NULL; +-- +ok +== +SET enable_logging=NULL; +-- +ok +== +SET extension_directories=NULL; +-- +ok +== +SET external_file_cache_local_max_block_size=NULL; +-- +ok +== +SET external_file_cache_remote_max_block_size=NULL; +-- +ok +== +SET external_file_cache_remote_min_block_size=NULL; +-- +ok +== +SET index_scan_percentage=NULL; +-- +ok +== +SET initial_column_segment_size=NULL; +-- +ok +== +SET max_temp_directory_size=NULL; +-- +ok +== +SET progress_bar_time=NULL; +-- +ok +== +SET tracked_metrics=NULL; +-- +ok +== +SET warnings_as_errors=NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/set_schema_temp_main.test b/parser/testdata/corpus/sql/settings/set_schema_temp_main.test index 0bf4160..3a01807 100644 --- a/parser/testdata/corpus/sql/settings/set_schema_temp_main.test +++ b/parser/testdata/corpus/sql/settings/set_schema_temp_main.test @@ -1,6 +1,6 @@ # source: test/sql/settings/set_schema_temp_main.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA temp.s1; diff --git a/parser/testdata/corpus/sql/settings/setting_alias.test b/parser/testdata/corpus/sql/settings/setting_alias.test index 447da21..af40597 100644 --- a/parser/testdata/corpus/sql/settings/setting_alias.test +++ b/parser/testdata/corpus/sql/settings/setting_alias.test @@ -1,6 +1,6 @@ # source: test/sql/settings/setting_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('null_order'), (SELECT value FROM duckdb_settings() WHERE name='null_order') diff --git a/parser/testdata/corpus/sql/settings/setting_collation.test b/parser/testdata/corpus/sql/settings/setting_collation.test index 6021a4c..73bdba2 100644 --- a/parser/testdata/corpus/sql/settings/setting_collation.test +++ b/parser/testdata/corpus/sql/settings/setting_collation.test @@ -1,6 +1,6 @@ # source: test/sql/settings/setting_collation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA default_collation='unknown' diff --git a/parser/testdata/corpus/sql/settings/setting_collection_roundtrip.test b/parser/testdata/corpus/sql/settings/setting_collection_roundtrip.test new file mode 100644 index 0000000..28a275b --- /dev/null +++ b/parser/testdata/corpus/sql/settings/setting_collection_roundtrip.test @@ -0,0 +1,82 @@ +# source: test/sql/settings/setting_collection_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET extension_directories=['first', 'second'] +-- +ok +== +SELECT current_setting('extension_directories') = ['first', 'second'] +-- +ok +== +RESET extension_directories +-- +ok +== +SELECT current_setting('extension_directories') = []::VARCHAR[] +-- +ok +== +SET allowed_configs=['threads', 'memory_limit'] +-- +ok +== +SELECT list_sort(current_setting('allowed_configs')) = ['max_memory', 'threads'] +-- +ok +== +SELECT current_setting('allowed_configs') = []::VARCHAR[] +-- +ok +== +SET profiling_renderer_settings=MAP {'maximum_render_width': 300, 'maximum_render_height': 20} +-- +ok +== +SELECT current_setting('profiling_renderer_settings')['maximum_render_width'] = '300' + AND current_setting('profiling_renderer_settings')['maximum_render_height'] = '20' +-- +ok +== +SELECT map_entries(current_setting('profiling_renderer_settings')) = [] +-- +ok +== +SET active_grammar_extensions=[] +-- +ok +== +SELECT current_setting('active_grammar_extensions') = []::VARCHAR[] +-- +ok +== +SET active_grammar_extensions=NULL +-- +ok +== +SET active_grammar_extensions=['missing', 'missing'] +-- +ok +== +SET active_grammar_extensions=['missing', 'also_missing'] +-- +ok +== +RESET active_grammar_extensions +-- +ok +== +SET current_dialect=NULL +-- +ok +== +SELECT current_setting('current_dialect') IS NULL +-- +ok +== +RESET current_dialect +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/setting_disabled_optimizer.test b/parser/testdata/corpus/sql/settings/setting_disabled_optimizer.test index ed80f0c..c381c19 100644 --- a/parser/testdata/corpus/sql/settings/setting_disabled_optimizer.test +++ b/parser/testdata/corpus/sql/settings/setting_disabled_optimizer.test @@ -1,6 +1,6 @@ # source: test/sql/settings/setting_disabled_optimizer.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET disabled_optimizers TO 'expression_rewriter' diff --git a/parser/testdata/corpus/sql/settings/setting_exhaustive.test b/parser/testdata/corpus/sql/settings/setting_exhaustive.test index 96ae25b..055a57f 100644 --- a/parser/testdata/corpus/sql/settings/setting_exhaustive.test +++ b/parser/testdata/corpus/sql/settings/setting_exhaustive.test @@ -1,6 +1,6 @@ # source: test/sql/settings/setting_exhaustive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_window_mode='unknown'; diff --git a/parser/testdata/corpus/sql/settings/setting_null_order.test b/parser/testdata/corpus/sql/settings/setting_null_order.test index 313f1b2..3e9c548 100644 --- a/parser/testdata/corpus/sql/settings/setting_null_order.test +++ b/parser/testdata/corpus/sql/settings/setting_null_order.test @@ -1,17 +1,17 @@ # source: test/sql/settings/setting_null_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit {statement_type} {null_order_type}='nulls_last' -- -error: Parser Error: syntax error at or near "}" +error: Parser Error: syntax error at or near "{" == {statement_type} {null_order_type}='nulls_first' -- -error: Parser Error: syntax error at or near "}" +error: Parser Error: syntax error at or near "{" == {statement_type} {null_order_type}='unknown_null_order' -- -error: Parser Error: syntax error at or near "}" +error: Parser Error: syntax error at or near "{" == diff --git a/parser/testdata/corpus/sql/settings/setting_order.test b/parser/testdata/corpus/sql/settings/setting_order.test index fcfdc20..c311c5a 100644 --- a/parser/testdata/corpus/sql/settings/setting_order.test +++ b/parser/testdata/corpus/sql/settings/setting_order.test @@ -1,11 +1,11 @@ # source: test/sql/settings/setting_order.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit {statement_type} default_order='desc' -- -error: Parser Error: syntax error at or near "}" +error: Parser Error: syntax error at or near "{" == SELECT * FROM range(3) ORDER BY 1 -- @@ -13,9 +13,9 @@ ok == {statement_type} default_order='asc' -- -error: Parser Error: syntax error at or near "}" +error: Parser Error: syntax error at or near "{" == {statement_type} default_order='unknown_order' -- -error: Parser Error: syntax error at or near "}" +error: Parser Error: syntax error at or near "{" == diff --git a/parser/testdata/corpus/sql/settings/setting_preserve_identifier_case.test b/parser/testdata/corpus/sql/settings/setting_preserve_identifier_case.test index fa762aa..9beddac 100644 --- a/parser/testdata/corpus/sql/settings/setting_preserve_identifier_case.test +++ b/parser/testdata/corpus/sql/settings/setting_preserve_identifier_case.test @@ -1,17 +1,17 @@ # source: test/sql/settings/setting_preserve_identifier_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT value FROM duckdb_settings() WHERE name='preserve_identifier_case' -- ok == -CREATE SCHEMA MYSCHEMA; +CREATE SCHEMA MySchema; -- ok == -CREATE TABLE MYSCHEMA.INTEGERS(I INTEGER); +CREATE TABLE MySchema.Integers(I INTEGER); -- ok == @@ -19,11 +19,59 @@ SELECT duckdb_tables.schema_name, duckdb_tables.table_name, column_name FROM duc -- ok == +DROP SCHEMA MySchema CASCADE +-- +ok +== +DROP SCHEMA myschema CASCADE +-- +ok +== +SET preserve_identifier_case TO 'uppercase'; +-- +ok +== DROP SCHEMA MYSCHEMA CASCADE -- ok == -SET preserve_identifier_case TO false; +CREATE TABLE "QuotedName"("MixedCol" INTEGER); +-- +ok +== +SELECT duckdb_tables.table_name, column_name FROM duckdb_tables JOIN duckdb_columns USING (table_oid); +-- +ok +== +DROP TABLE "QuotedName" +-- +ok +== +SELECT 'MyString'; +-- +ok +== +SELECT * FROM '{TEST_DIR}/NoSuch/Mixed/File.csv'; +-- +ok +== +SET preserve_identifier_case TO 'bogus'; +-- +ok +== +SET preserve_identifier_case TO NULL; +-- +ok +== +SET preserve_identifier_case TO {truthy}; +-- +error: Parser Error: syntax error at or near "}" +== +SET preserve_identifier_case TO {falsy}; +-- +error: Parser Error: syntax error at or near "}" +== +SET preserve_identifier_case TO 'yesnt'; -- ok == diff --git a/parser/testdata/corpus/sql/settings/setting_profiling_mode.test b/parser/testdata/corpus/sql/settings/setting_profiling_mode.test index bbfcdee..48734cc 100644 --- a/parser/testdata/corpus/sql/settings/setting_profiling_mode.test +++ b/parser/testdata/corpus/sql/settings/setting_profiling_mode.test @@ -1,6 +1,6 @@ # source: test/sql/settings/setting_profiling_mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET profiling_mode='detailed'; diff --git a/parser/testdata/corpus/sql/settings/setting_threads.test b/parser/testdata/corpus/sql/settings/setting_threads.test index dbb2d5a..19bbb02 100644 --- a/parser/testdata/corpus/sql/settings/setting_threads.test +++ b/parser/testdata/corpus/sql/settings/setting_threads.test @@ -1,6 +1,6 @@ # source: test/sql/settings/setting_threads.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET {thread_type} TO '3' @@ -15,3 +15,23 @@ SET {thread_type} TO 'blabla' -- error: Parser Error: syntax error at or near "{" == +SET threads = NULL; +-- +ok +== +SET external_threads = NULL; +-- +ok +== +SET async_threads = NULL; +-- +ok +== +SET ordered_aggregate_threshold = NULL; +-- +ok +== +SET perfect_ht_threshold = NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/setting_validation_and_reset.test b/parser/testdata/corpus/sql/settings/setting_validation_and_reset.test new file mode 100644 index 0000000..ae39e94 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/setting_validation_and_reset.test @@ -0,0 +1,121 @@ +# source: test/sql/settings/setting_validation_and_reset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET disabled_compression_methods='rle,dictionary' +-- +ok +== +SELECT current_setting('disabled_compression_methods') = 'RLE,Dictionary' +-- +ok +== +SET disabled_compression_methods='none' +-- +ok +== +SELECT current_setting('disabled_compression_methods') = '' +-- +ok +== +RESET disabled_compression_methods +-- +ok +== +SET external_file_cache_local_max_block_size=3 +-- +ok +== +SET force_variant_shredding='STRUCT(a INTEGER[])' +-- +ok +== +SELECT current_setting('force_variant_shredding') <> 'INVALID' +-- +ok +== +SET force_variant_shredding='MAP(VARCHAR, INTEGER)' +-- +ok +== +RESET force_variant_shredding +-- +ok +== +SELECT current_setting('force_variant_shredding') = 'INVALID' +-- +ok +== +SELECT current_setting('standard_vector_size') > 0 +-- +ok +== +SET standard_vector_size=1024 +-- +ok +== +RESET standard_vector_size +-- +ok +== +SET enable_progress_bar_print=false +-- +ok +== +SELECT current_setting('enable_progress_bar_print') +-- +ok +== +RESET enable_progress_bar_print +-- +ok +== +SET enable_progress_bar=true +-- +ok +== +SELECT current_setting('enable_progress_bar') +-- +ok +== +RESET enable_progress_bar +-- +ok +== +SET progress_bar_time=10 +-- +ok +== +SELECT current_setting('progress_bar_time') +-- +ok +== +RESET progress_bar_time +-- +ok +== +SET debug_order_verification='none' +-- +ok +== +SELECT current_setting('debug_order_verification') = 'none' +-- +ok +== +RESET debug_order_verification +-- +ok +== +SET max_temp_directory_size='90% of available disk space' +-- +ok +== +SELECT current_setting('max_temp_directory_size') = '90% of available disk space' +-- +ok +== +RESET max_temp_directory_size +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/settings_icu.test b/parser/testdata/corpus/sql/settings/settings_icu.test index 4c13b02..156f927 100644 --- a/parser/testdata/corpus/sql/settings/settings_icu.test +++ b/parser/testdata/corpus/sql/settings/settings_icu.test @@ -1,6 +1,6 @@ # source: test/sql/settings/settings_icu.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET TimeZone='pacific/honolulu'; @@ -27,3 +27,11 @@ SET Calendar='muslim'; -- ok == +SET TimeZone = NULL; +-- +ok +== +SET Calendar = NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/test_disabled_file_systems.test b/parser/testdata/corpus/sql/settings/test_disabled_file_systems.test index b9a6cfe..8d3d67b 100644 --- a/parser/testdata/corpus/sql/settings/test_disabled_file_systems.test +++ b/parser/testdata/corpus/sql/settings/test_disabled_file_systems.test @@ -1,6 +1,6 @@ # source: test/sql/settings/test_disabled_file_systems.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('disabled_filesystems') diff --git a/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_metadata.test b/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_metadata.test index fd3b49b..735dfd8 100644 --- a/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_metadata.test +++ b/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_metadata.test @@ -1,6 +1,6 @@ # source: test/sql/settings/test_disabled_local_filesystem_metadata.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET secret_directory='{TEST_DIR}/disabled_fs_secrets'; diff --git a/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_secrets.test b/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_secrets.test index a393b91..e52a9bf 100644 --- a/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_secrets.test +++ b/parser/testdata/corpus/sql/settings/test_disabled_local_filesystem_secrets.test @@ -1,6 +1,6 @@ # source: test/sql/settings/test_disabled_local_filesystem_secrets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE PERSISTENT SECRET my_s (TYPE S3); diff --git a/parser/testdata/corpus/sql/settings/test_external_access_secrets.test b/parser/testdata/corpus/sql/settings/test_external_access_secrets.test index 734f250..81e956e 100644 --- a/parser/testdata/corpus/sql/settings/test_external_access_secrets.test +++ b/parser/testdata/corpus/sql/settings/test_external_access_secrets.test @@ -1,6 +1,6 @@ # source: test/sql/settings/test_external_access_secrets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET secret_directory='{TEST_DIR}/external_access_secrets'; diff --git a/parser/testdata/corpus/sql/settings/test_lock_configuration.test b/parser/testdata/corpus/sql/settings/test_lock_configuration.test index ce96af3..ed4c0c7 100644 --- a/parser/testdata/corpus/sql/settings/test_lock_configuration.test +++ b/parser/testdata/corpus/sql/settings/test_lock_configuration.test @@ -1,6 +1,6 @@ # source: test/sql/settings/test_lock_configuration.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('lock_configuration') diff --git a/parser/testdata/corpus/sql/settings/test_progress_bar_null.test b/parser/testdata/corpus/sql/settings/test_progress_bar_null.test new file mode 100644 index 0000000..91a8743 --- /dev/null +++ b/parser/testdata/corpus/sql/settings/test_progress_bar_null.test @@ -0,0 +1,37 @@ +# source: test/sql/settings/test_progress_bar_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA enable_progress_bar=null; +-- +ok +== +PRAGMA enable_progress_bar_print=null; +-- +ok +== +PRAGMA enable_progress_bar=true; +-- +ok +== +PRAGMA enable_progress_bar=false; +-- +ok +== +PRAGMA enable_progress_bar_print=true; +-- +ok +== +PRAGMA enable_progress_bar_print=false; +-- +ok +== +PRAGMA enable_progress_bar='invalid'; +-- +ok +== +PRAGMA enable_progress_bar_print='invalid'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/settings/user_agent.test b/parser/testdata/corpus/sql/settings/user_agent.test index 3e26ced..33c0f1f 100644 --- a/parser/testdata/corpus/sql/settings/user_agent.test +++ b/parser/testdata/corpus/sql/settings/user_agent.test @@ -1,6 +1,6 @@ # source: test/sql/settings/user_agent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET custom_user_agent='something else' diff --git a/parser/testdata/corpus/sql/show_select/describe_rowid.test b/parser/testdata/corpus/sql/show_select/describe_rowid.test index 0a07e3a..964eb54 100644 --- a/parser/testdata/corpus/sql/show_select/describe_rowid.test +++ b/parser/testdata/corpus/sql/show_select/describe_rowid.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/describe_rowid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table sometable ( diff --git a/parser/testdata/corpus/sql/show_select/describe_subquery.test b/parser/testdata/corpus/sql/show_select/describe_subquery.test index 2c1cdaf..2d7ae6e 100644 --- a/parser/testdata/corpus/sql/show_select/describe_subquery.test +++ b/parser/testdata/corpus/sql/show_select/describe_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/describe_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT column_name FROM (DESCRIBE SELECT 42 AS a) diff --git a/parser/testdata/corpus/sql/show_select/show_quote_identifier.test b/parser/testdata/corpus/sql/show_select/show_quote_identifier.test index f0730d9..9ec6a63 100644 --- a/parser/testdata/corpus/sql/show_select/show_quote_identifier.test +++ b/parser/testdata/corpus/sql/show_select/show_quote_identifier.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/show_quote_identifier.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "s1"".tbl"(i INT); diff --git a/parser/testdata/corpus/sql/show_select/show_select_constraints.test b/parser/testdata/corpus/sql/show_select/show_select_constraints.test index 3672d6d..3787854 100644 --- a/parser/testdata/corpus/sql/show_select/show_select_constraints.test +++ b/parser/testdata/corpus/sql/show_select/show_select_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/show_select_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(c1 INTEGER PRIMARY KEY, c2 INT NOT NULL, c3 INT DEFAULT 42, c4 INT UNIQUE, c5 INT); diff --git a/parser/testdata/corpus/sql/show_select/show_settings.test b/parser/testdata/corpus/sql/show_select/show_settings.test new file mode 100644 index 0000000..7704064 --- /dev/null +++ b/parser/testdata/corpus/sql/show_select/show_settings.test @@ -0,0 +1,85 @@ +# source: test/sql/show_select/show_settings.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE my_table(i INTEGER, j INTEGER); +-- +ok +== +SET threads TO 42; +-- +ok +== +SHOW threads +-- +ok +== +SHOW "threads" +-- +ok +== +SHOW THREADS +-- +ok +== +SHOW my_table +-- +ok +== +SHOW this_does_not_exist +-- +ok +== +DESCRIBE threads +-- +ok +== +SHOW '' +-- +error: Parser Error: Expected a table name, but got an empty string +== +DESCRIBE '' +-- +ok +== +SUMMARIZE '' +-- +ok +== +SHOW DATABASES; +-- +ok +== +SHOW main.threads +-- +ok +== +SHOW main.my_table +-- +ok +== +SHOW (SELECT * FROM my_table) +-- +ok +== +SET show_behavior='setting' +-- +ok +== +SET show_behavior='table' +-- +ok +== +SET show_behavior='bogus' +-- +ok +== +SET show_behavior='auto' +-- +ok +== +CREATE TABLE threads(x INTEGER) +-- +ok +== diff --git a/parser/testdata/corpus/sql/show_select/show_settings_extension.test b/parser/testdata/corpus/sql/show_select/show_settings_extension.test new file mode 100644 index 0000000..05dad9f --- /dev/null +++ b/parser/testdata/corpus/sql/show_select/show_settings_extension.test @@ -0,0 +1,17 @@ +# source: test/sql/show_select/show_settings_extension.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET TimeZone='Europe/Amsterdam'; +-- +ok +== +SHOW timezone +-- +ok +== +SHOW TimeZone +-- +ok +== diff --git a/parser/testdata/corpus/sql/show_select/summarize_subquery.test b/parser/testdata/corpus/sql/show_select/summarize_subquery.test index 1c838d1..dbcdb83 100644 --- a/parser/testdata/corpus/sql/show_select/summarize_subquery.test +++ b/parser/testdata/corpus/sql/show_select/summarize_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/summarize_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT column_name, min FROM (SUMMARIZE SELECT 42 AS a); @@ -15,3 +15,12 @@ SELECT column_name, min FROM (SUMMARIZE tbl); -- ok == +SELECT i, column_name, min, max +FROM range(2) t(i), +LATERAL ( + SUMMARIZE SELECT i + j AS x FROM range(2) u(j) +) +ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/show_select/test_describe_all.test b/parser/testdata/corpus/sql/show_select/test_describe_all.test index 696f61a..f0bdbe3 100644 --- a/parser/testdata/corpus/sql/show_select/test_describe_all.test +++ b/parser/testdata/corpus/sql/show_select/test_describe_all.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/test_describe_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER, j INTEGER, a INTEGER); diff --git a/parser/testdata/corpus/sql/show_select/test_describe_quoted.test b/parser/testdata/corpus/sql/show_select/test_describe_quoted.test index 21ec6c5..8d1b175 100644 --- a/parser/testdata/corpus/sql/show_select/test_describe_quoted.test +++ b/parser/testdata/corpus/sql/show_select/test_describe_quoted.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/test_describe_quoted.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table "a.b.c" (x int); diff --git a/parser/testdata/corpus/sql/show_select/test_show_select.test b/parser/testdata/corpus/sql/show_select/test_show_select.test index a39d05a..e8cc997 100644 --- a/parser/testdata/corpus/sql/show_select/test_show_select.test +++ b/parser/testdata/corpus/sql/show_select/test_show_select.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/test_show_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers2 (i INTEGER, j INTEGER, st VARCHAR, d DATE) diff --git a/parser/testdata/corpus/sql/show_select/test_summarize.test b/parser/testdata/corpus/sql/show_select/test_summarize.test index 2f97b79..76f9b58 100644 --- a/parser/testdata/corpus/sql/show_select/test_summarize.test +++ b/parser/testdata/corpus/sql/show_select/test_summarize.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/test_summarize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE types(i INTEGER, j VARCHAR, k HUGEINT, d DOUBLE, e BLOB); diff --git a/parser/testdata/corpus/sql/show_select/test_summarize_quoted.test b/parser/testdata/corpus/sql/show_select/test_summarize_quoted.test index 1a3e246..f4f702d 100644 --- a/parser/testdata/corpus/sql/show_select/test_summarize_quoted.test +++ b/parser/testdata/corpus/sql/show_select/test_summarize_quoted.test @@ -1,6 +1,6 @@ # source: test/sql/show_select/test_summarize_quoted.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit summarize "a.b.c"; diff --git a/parser/testdata/corpus/sql/sql_export/aggregate_literals.test b/parser/testdata/corpus/sql/sql_export/aggregate_literals.test new file mode 100644 index 0000000..7dfac9f --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/aggregate_literals.test @@ -0,0 +1,47 @@ +# source: test/sql/sql_export/aggregate_literals.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT string_agg(DISTINCT v, '|' ORDER BY length(v), v) +FROM (VALUES ('aa'),('b'),('b'),(NULL)) t(v) +-- +ok +== +SELECT count(r.k), sum(r.k) FROM (VALUES (1),(2)) l(i) +LEFT JOIN (SELECT 7 k, 1 i) r USING(i) +-- +ok +== +SELECT count(k), sum(k) FROM ( + SELECT 7 k FROM (VALUES (1),(2)) t(i) GROUP BY GROUPING SETS ((k),()) +) s +-- +ok +== +SELECT typeof(string_agg(v, '|')), typeof(count(v)), typeof(sum(7)) +FROM (VALUES ('aa'),('b'),('b'),(NULL)) t(v) +-- +ok +== +SELECT avg(v) FROM (VALUES (1::BIGINT),(NULL),(1),(4)) input(v); +-- +ok +== +SELECT sum(v), avg(v) FROM (VALUES (1::BIGINT),(NULL),(1),(4)) input(v); +-- +ok +== +SELECT sum(v + 1) FROM (VALUES (1::BIGINT),(NULL),(1),(4)) input(v); +-- +ok +== +SELECT count(v), approx_count_distinct(v) FROM (VALUES (1::BIGINT),(NULL),(1),(4)) input(v); +-- +ok +== +SELECT count(v), approx_count_distinct(v), avg(v), sum(v), sum(v + 1) +FROM (VALUES (1::BIGINT),(NULL),(1),(4)) input(v) WHERE false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/aggregate_results.test b/parser/testdata/corpus/sql/sql_export/aggregate_results.test new file mode 100644 index 0000000..75b284d --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/aggregate_results.test @@ -0,0 +1,161 @@ +# source: test/sql/sql_export/aggregate_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE decimal_values(i DECIMAL(9,2)); +-- +ok +== +INSERT INTO decimal_values VALUES(1.25),(2.50); +-- +ok +== +CREATE TABLE string_values(x VARCHAR); +-- +ok +== +INSERT INTO string_values VALUES('a'),('b'); +-- +ok +== +CREATE TABLE compatibility_values(i INTEGER); +-- +ok +== +INSERT INTO compatibility_values VALUES(1),(2); +-- +ok +== +CREATE TABLE aggregate_values(i INTEGER); +-- +ok +== +INSERT INTO aggregate_values VALUES(1),(2),(2),(NULL); +-- +ok +== +CREATE TABLE count_values(i INTEGER NOT NULL); +-- +ok +== +INSERT INTO count_values VALUES(1),(2); +-- +ok +== +CREATE TABLE large_sum_values(i BIGINT); +-- +ok +== +INSERT INTO large_sum_values SELECT 4000000000000000000 FROM range(5); +-- +ok +== +SELECT sum(i),typeof(sum(i)) FROM (VALUES (1),(2)) t(i) GROUP BY (); +-- +ok +== +EXPLAIN (SQL) SELECT sum(i) FROM (VALUES (1),(2)) t(i) GROUP BY (); +-- +ok +== +SET debug_verify_serializer={serializer}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT sum(i),typeof(sum(i)) FROM decimal_values; +-- +ok +== +SELECT sum(i),typeof(sum(i)) FROM (VALUES (1.25::DECIMAL(9,2)),(2.50::DECIMAL(9,2))) values_to_sum(i); +-- +ok +== +SELECT sum(i) FROM aggregate_values; +-- +ok +== +SELECT avg(i) FROM aggregate_values; +-- +ok +== +SELECT mean(i) FROM aggregate_values; +-- +ok +== +SELECT sum(i) FROM large_sum_values; +-- +ok +== +SELECT finalize(sum(i) EXPORT_STATE) FROM aggregate_values; +-- +ok +== +SELECT count(*) FROM count_values; +-- +ok +== +SELECT string_agg(x, '&') FROM string_values; +-- +ok +== +SELECT string_agg(x, '&') FILTER (WHERE x IS NOT NULL) FROM string_values; +-- +ok +== +SELECT string_agg(x, '&' ORDER BY x) FROM string_values; +-- +ok +== +SELECT finalize(string_agg(x, '&') EXPORT_STATE) FROM string_values; +-- +ok +== +SELECT finalize(string_agg(x, '&' ORDER BY x) EXPORT_STATE) FROM string_values; +-- +ok +== +SET debug_disable_optimizer={disable_optimizer}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT sum(DISTINCT i) FILTER (WHERE i>1) FROM aggregate_values; +-- +ok +== +SELECT first(i ORDER BY i DESC NULLS LAST), last(i ORDER BY i DESC NULLS LAST) FROM aggregate_values; +-- +ok +== +SELECT list(i ORDER BY i DESC NULLS FIRST) FROM aggregate_values; +-- +ok +== +SELECT quantile_cont(v.exported_0,0.5) FROM (VALUES(1),(2)) v(exported_0); +-- +ok +== +SELECT array_to_string(list_sort(string_split(string_agg(DISTINCT x, '&'), '&')), '&') FROM string_values; +-- +ok +== +SELECT string_agg(DISTINCT x, '&' ORDER BY x) FROM string_values; +-- +ok +== +EXPLAIN (SQL) SELECT count(i) AS n FROM count_values WHERE random()>0.5; +-- +ok +== +SELECT n BETWEEN 0 AND 2 FROM (SELECT count(i) AS n FROM count_values WHERE random()>0.5); +-- +ok +== +SET storage_compatibility_version='v1.5.0'; +-- +ok +== +SELECT abs(-7),log2(8),sum(i),quantile_cont(i,0.5) FROM compatibility_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/aggregate_topn_rewrites.test b/parser/testdata/corpus/sql/sql_export/aggregate_topn_rewrites.test new file mode 100644 index 0000000..df3b7c3 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/aggregate_topn_rewrites.test @@ -0,0 +1,101 @@ +# source: test/sql/sql_export/aggregate_topn_rewrites.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TEMP TABLE reuse_owner AS FROM (VALUES (1,10),(2,20),(3,30),(4,40)) t(k,dim_id); +-- +ok +== +CREATE TEMP TABLE reuse_dim AS FROM (VALUES (10,'x'),(20,'b'),(30,'x'),(40,'d')) t(id,label); +-- +ok +== +CREATE TEMP TABLE reuse_fact AS FROM (VALUES (1,10),(1,20),(2,5),(3,40),(3,50),(4,NULL)) t(k,v); +-- +ok +== +SET disabled_optimizers='grouping_sets'; +-- +ok +== +SELECT i,j,sum(k) FROM (VALUES (1,1,2),(1,2,3),(2,1,4),(2,2,5)) t(i,j,k) GROUP BY ROLLUP(i,j) ORDER BY ALL; +-- +ok +== +EXPLAIN SELECT i,j,sum(k) FROM (VALUES (1,1,2),(1,2,3),(2,1,4),(2,2,5)) t(i,j,k) GROUP BY ROLLUP(i,j) ORDER BY ALL; +-- +ok +== +SELECT i,sum(j) FROM (VALUES (1,2),(1,3),(2,4),(2,5)) t(i,j) GROUP BY GROUPING SETS ((i),()) ORDER BY ALL; +-- +ok +== +EXPLAIN SELECT i,sum(j) FROM (VALUES (1,2),(1,3),(2,4),(2,5)) t(i,j) GROUP BY GROUPING SETS ((i),()) ORDER BY ALL; +-- +ok +== +SET disabled_optimizers='partial_aggregate_pushdown'; +-- +ok +== +SELECT d.a,d.b,d.c,d.d,sum(f.v) FROM (VALUES (0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0)) f(k,v) JOIN (VALUES (0,1,2,3,4),(1,5,6,7,8),(2,9,10,11,12)) d(k,a,b,c,d) USING(k) GROUP BY d.a,d.b,d.c,d.d ORDER BY ALL; +-- +ok +== +EXPLAIN SELECT d.a,d.b,d.c,d.d,sum(f.v) FROM (VALUES (0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0),(0,1),(1,2),(2,3),(0,4),(1,5),(2,6),(0,0),(1,1),(2,2),(0,3),(1,4),(2,5),(0,6),(1,0),(2,1),(0,2),(1,3),(2,4),(0,5),(1,6),(2,0)) f(k,v) JOIN (VALUES (0,1,2,3,4),(1,5,6,7,8),(2,9,10,11,12)) d(k,a,b,c,d) USING(k) GROUP BY d.a,d.b,d.c,d.d ORDER BY ALL; +-- +ok +== +SET disabled_optimizers='top_n_window_elimination'; +-- +ok +== +SELECT i FROM (VALUES (1,1),(1,2),(2,3),(2,4)) t(g,i) QUALIFY row_number() OVER (PARTITION BY g ORDER BY i) <= 1 ORDER BY ALL; +-- +ok +== +EXPLAIN SELECT i FROM (VALUES (1,1),(1,2),(2,3),(2,4)) t(g,i) QUALIFY row_number() OVER (PARTITION BY g ORDER BY i) <= 1 ORDER BY ALL; +-- +ok +== +SET disabled_optimizers='aggregate_reuse'; +-- +ok +== +SELECT o.k,d.label,sum(f.v) FROM reuse_owner o JOIN reuse_dim d ON o.dim_id=d.id JOIN reuse_fact f USING(k) WHERE o.k IN (SELECT k FROM reuse_fact GROUP BY k HAVING sum(v)>25) GROUP BY o.k,d.label ORDER BY ALL; +-- +ok +== +EXPLAIN SELECT o.k,d.label,sum(f.v) FROM reuse_owner o JOIN reuse_dim d ON o.dim_id=d.id JOIN reuse_fact f USING(k) WHERE o.k IN (SELECT k FROM reuse_fact GROUP BY k HAVING sum(v)>25) GROUP BY o.k,d.label ORDER BY ALL; +-- +ok +== +SET disabled_optimizers='join_filter_pushdown'; +-- +ok +== +SELECT f.v FROM reuse_fact f JOIN reuse_owner o USING(k) WHERE o.dim_id>10 ORDER BY ALL; +-- +ok +== +SET disabled_optimizers='unused_columns'; +-- +ok +== +SELECT 42 FROM (SELECT sum(i) FROM (VALUES (1),(2)) t(i)); +-- +ok +== +EXPLAIN SELECT 42 FROM (SELECT sum(i) FROM (VALUES (1),(2)) t(i)); +-- +ok +== +SELECT min(k), max(k) FROM reuse_owner WHERE dim_id>10; +-- +ok +== +SELECT min(k), max(k) FROM reuse_owner WHERE false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/alias.test b/parser/testdata/corpus/sql/sql_export/alias.test new file mode 100644 index 0000000..2fd1bed --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/alias.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/alias.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE names("MiXeD" INTEGER, other INTEGER); +-- +ok +== +INSERT INTO names VALUES (1,2),(NULL,3),(1,2); +-- +ok +== +SELECT alias(mixed), alias(other) AS "explicit name" FROM names +-- +ok +== +SELECT alias(renamed) FROM (SELECT "MiXeD" AS renamed FROM names) +-- +ok +== +SELECT alias(sum("MiXeD")) AS "total" FROM names +-- +ok +== +SELECT alias("MiXeD") FROM names WHERE alias("MiXeD") = 'MiXeD' +-- +ok +== +SELECT alias(error('alias argument')) +-- +ok +== +SELECT alias(i) AS renamed FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +SELECT alias(i+1) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +SELECT upper(alias(i)) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/basic_plan_shapes.test b/parser/testdata/corpus/sql/sql_export/basic_plan_shapes.test new file mode 100644 index 0000000..cde2797 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/basic_plan_shapes.test @@ -0,0 +1,33 @@ +# source: test/sql/sql_export/basic_plan_shapes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE readable_scan("unusual name" INTEGER, column0 INTEGER); +-- +ok +== +INSERT INTO readable_scan VALUES (1,2); +-- +ok +== +CREATE TABLE reserved_scan(rowid INTEGER, rownum INTEGER); +-- +ok +== +INSERT INTO reserved_scan VALUES (3,4); +-- +ok +== +SELECT * FROM readable_scan; +-- +ok +== +SELECT * FROM reserved_scan; +-- +ok +== +WITH RECURSIVE t(i,unused) AS (SELECT 0,int FROM test_all_types() UNION ALL SELECT i+1,unused FROM t WHERE i<2) SELECT i,count(*) FROM t GROUP BY i ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/call_values.test b/parser/testdata/corpus/sql/sql_export/call_values.test new file mode 100644 index 0000000..2df9420 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/call_values.test @@ -0,0 +1,109 @@ +# source: test/sql/sql_export/call_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT abs(-7::INTEGER); +-- +ok +== +SELECT abs(-7); +-- +ok +== +SELECT log2(8); +-- +ok +== +SELECT equi_width_bins(0, 10, 2, true); +-- +ok +== +SELECT quantile_cont(i, 0.5) FROM (VALUES (1), (2)) v(i); +-- +ok +== +SELECT quantile_cont(i, 0.5) OVER () FROM (VALUES (1), (2)) v(i); +-- +ok +== +SELECT log2(8), equi_width_bins(0, 10, 2, true), quantile_cont(i, 0.5) OVER () FROM (VALUES (1), (2)) v(i); +-- +ok +== +INSERT INTO integers VALUES (42), (84); +-- +ok +== +SELECT * FROM histogram_values(integers, i, bin_count := 2); +-- +ok +== +SELECT constant_or_null(42, 1, i) FROM (VALUES (1), (NULL), (1)) t(i); +-- +ok +== +SELECT constant_or_null(42, 1, CAST(i AS INTEGER)) FROM (VALUES ('bad')) t(i); +-- +ok +== +CREATE OR REPLACE TABLE rounding_values(i DECIMAL(4,0)); +-- +ok +== +INSERT INTO rounding_values VALUES (9999); +-- +ok +== +SELECT round(i, -1) FROM rounding_values; +-- +ok +== +SELECT typeof(round(i, -1)) FROM rounding_values; +-- +ok +== +CREATE OR REPLACE TABLE rounding_values(i DECIMAL(9,0)); +-- +ok +== +INSERT INTO rounding_values VALUES (999999999); +-- +ok +== +CREATE OR REPLACE TABLE rounding_values(i DECIMAL(18,0)); +-- +ok +== +INSERT INTO rounding_values VALUES (999999999999999999); +-- +ok +== +CREATE OR REPLACE TABLE rounding_values(i DECIMAL(37,0)); +-- +ok +== +INSERT INTO rounding_values VALUES (9999999999999999999999999999999999999); +-- +ok +== +SELECT hash(i) FROM rounding_values; +-- +ok +== +CREATE SEQUENCE alias_effect; +-- +ok +== +EXPLAIN (SQL) SELECT alias(nextval('alias_effect')); +-- +ok +== +SELECT nextval('alias_effect'); +-- +ok +== +SELECT alias(nextval('alias_effect')); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/catalog_invocations.test b/parser/testdata/corpus/sql/sql_export/catalog_invocations.test new file mode 100644 index 0000000..15e3baa --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/catalog_invocations.test @@ -0,0 +1,65 @@ +# source: test/sql/sql_export/catalog_invocations.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH ':memory:' AS attached; +-- +ok +== +CREATE SCHEMA attached.outer_schema; +-- +ok +== +CREATE SCHEMA attached.outer_schema."inner.schema"; +-- +ok +== +CREATE TABLE attached.outer_schema."inner.schema".scan_rows(i INTEGER, rowid VARCHAR,g INTEGER GENERATED ALWAYS AS (i+1)); +-- +ok +== +INSERT INTO attached.outer_schema."inner.schema".scan_rows VALUES (1,'one'),(2,NULL); +-- +ok +== +CREATE TEMP TABLE scan_rows(i INTEGER); +-- +ok +== +INSERT INTO scan_rows VALUES (99); +-- +ok +== +SELECT * FROM attached.outer_schema."inner.schema".scan_rows; +-- +ok +== +SELECT q.x,q.z,q.x FROM attached.outer_schema."inner.schema".scan_rows q(x,y,z) WHERE x>=1; +-- +ok +== +SELECT count(*) FROM attached.outer_schema."inner.schema".scan_rows WHERE i=1; +-- +ok +== +SELECT * FROM temp.main.scan_rows; +-- +ok +== +SET debug_verify_statement='{mode}'; +-- +ok +== +SELECT * FROM pragma_version(); +-- +ok +== +SELECT source_id,codename FROM pragma_version(); +-- +ok +== +SELECT platform FROM pragma_platform(); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/ci_reconstruction.test b/parser/testdata/corpus/sql/sql_export/ci_reconstruction.test new file mode 100644 index 0000000..8d61cda --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/ci_reconstruction.test @@ -0,0 +1,37 @@ +# source: test/sql/sql_export/ci_reconstruction.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE ci_structs(s STRUCT(c1 VARCHAR, c2 INTEGER)); +-- +ok +== +INSERT INTO ci_structs VALUES ({'c1': 'unused', 'c2': 2}), ({'c1': 'unused', 'c2': NULL}), ({'c1': 'unused', 'c2': 2}); +-- +ok +== +SELECT pack.v2 FROM (SELECT {'a': 42, 'v2': s.c2, 'b': 21} AS pack FROM ci_structs) sub; +-- +ok +== +CREATE TABLE ci_collated(s VARCHAR COLLATE NOACCENT); +-- +ok +== +INSERT INTO ci_collated VALUES ('résumé'), ('é'), ('resume'), (NULL); +-- +ok +== +SELECT s FROM ci_collated ORDER BY s COLLATE C NULLS LAST; +-- +ok +== +SELECT string_agg(s, ',' ORDER BY s COLLATE C) FROM ci_collated; +-- +ok +== +SELECT s, row_number() OVER (ORDER BY s COLLATE C NULLS LAST) FROM ci_collated ORDER BY 2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/collated_aggregate_state.test b/parser/testdata/corpus/sql/sql_export/collated_aggregate_state.test new file mode 100644 index 0000000..a9b7e5a --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/collated_aggregate_state.test @@ -0,0 +1,133 @@ +# source: test/sql/sql_export/collated_aggregate_state.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE collated_state_input(g INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO collated_state_input VALUES (0, 'a'), (0, 'B'), (0, 'Z'), (0, NULL), (1, 'b'), (1, 'y'), (2, NULL); +-- +ok +== +SET VARIABLE collated_max_state=(SELECT max(s COLLATE NOCASE) EXPORT_STATE FROM collated_state_input); +-- +ok +== +SET VARIABLE collated_empty_state=(SELECT max(s COLLATE NOCASE) EXPORT_STATE FROM collated_state_input WHERE false); +-- +ok +== +SET VARIABLE canonical_count_state=(SELECT count(s) EXPORT_STATE FROM collated_state_input); +-- +ok +== +SET VARIABLE count_star_state=(SELECT count(*) EXPORT_STATE FROM collated_state_input); +-- +ok +== +SET VARIABLE ordered_collated_state=(SELECT first(s COLLATE NOCASE ORDER BY s COLLATE NOCASE NULLS LAST) EXPORT_STATE FROM collated_state_input); +-- +ok +== +SELECT g, max(s COLLATE NOCASE) EXPORT_STATE FROM collated_state_input GROUP BY g; +-- +ok +== +SELECT finalize(lo), finalize(hi), finalize(hi)='z' +FROM (SELECT min(s COLLATE NOCASE) EXPORT_STATE lo, max(s COLLATE NOCASE) EXPORT_STATE hi FROM collated_state_input); +-- +ok +== +SELECT finalize(combine_aggr(state)), finalize(combine_aggr(state))='z' +FROM (SELECT g, max(s COLLATE NOCASE) EXPORT_STATE state FROM collated_state_input GROUP BY g); +-- +ok +== +SELECT finalize(combine_aggr(state)), finalize(combine_aggr(state))='y' +FROM (SELECT g, max(s COLLATE NOCASE) FILTER (WHERE s <> 'Z') EXPORT_STATE state FROM collated_state_input GROUP BY g); +-- +ok +== +SELECT finalize(state) IS NULL, finalize(combine(state, state)) IS NULL +FROM (SELECT max(s COLLATE NOCASE) EXPORT_STATE state FROM collated_state_input WHERE false); +-- +ok +== +SELECT getvariable('collated_max_state'); +-- +ok +== +SELECT getvariable('collated_empty_state'); +-- +ok +== +SELECT finalize(getvariable('collated_max_state')), finalize(getvariable('collated_max_state'))='z'; +-- +ok +== +SELECT finalize(state), finalize(state)='z' +FROM (SELECT cast_to_type(struct_pack(arg := s, by := lower(s)), getvariable('collated_max_state')) state + FROM collated_state_input WHERE s='Z'); +-- +ok +== +SELECT get_type(state) = get_type(to_aggregate_state(state, 'arg_max', + [get_type(NULL::VARCHAR COLLATE NOCASE), get_type(NULL::VARCHAR COLLATE NOCASE)])) +FROM (SELECT max(s COLLATE NOCASE) EXPORT_STATE state FROM collated_state_input); +-- +ok +== +SELECT finalize(combine(state, rebound)), finalize(combine(state, rebound))='z' +FROM (SELECT state, to_aggregate_state(state, 'arg_max', + [get_type(NULL::VARCHAR COLLATE NOCASE), get_type(NULL::VARCHAR COLLATE NOCASE)]) rebound + FROM (SELECT max(s COLLATE NOCASE) EXPORT_STATE state FROM collated_state_input)); +-- +ok +== +SELECT finalize(combine(state, getvariable('collated_max_state'))), + finalize(combine(state, getvariable('collated_max_state')))='z' +FROM (SELECT max(s COLLATE NOCASE) EXPORT_STATE state FROM collated_state_input); +-- +ok +== +SELECT min(s COLLATE NOCASE), max(s COLLATE NOCASE), max(s COLLATE NOCASE)='z' FROM collated_state_input; +-- +ok +== +SELECT finalize(state), finalize(state)='Z' +FROM (SELECT max(s) EXPORT_STATE state FROM collated_state_input); +-- +ok +== +SELECT finalize(combine_aggr(state)) +FROM (SELECT g, count(s) EXPORT_STATE state FROM collated_state_input GROUP BY g); +-- +ok +== +SELECT getvariable('canonical_count_state'); +-- +ok +== +SELECT getvariable('count_star_state'); +-- +ok +== +SELECT getvariable('ordered_collated_state'); +-- +ok +== +SELECT finalize(getvariable('canonical_count_state')), finalize(getvariable('count_star_state')), + finalize(getvariable('ordered_collated_state')); +-- +ok +== +SELECT finalize(getvariable('ordered_collated_state'))='A'; +-- +ok +== +RESET debug_verify_statement; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/collation_results.test b/parser/testdata/corpus/sql/sql_export/collation_results.test new file mode 100644 index 0000000..ab7553f --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/collation_results.test @@ -0,0 +1,85 @@ +# source: test/sql/sql_export/collation_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE collated_values(v VARCHAR); INSERT INTO collated_values VALUES ('A'),('a'),(NULL); +-- +ok +== +SET default_collation={collation}; +-- +error: Parser Error: syntax error at or near "collation" +== +SELECT v FROM collated_values; +-- +ok +== +SELECT v COLLATE nocase FROM collated_values; +-- +ok +== +SELECT (v COLLATE nocase)='a' FROM collated_values; +-- +ok +== +SELECT 'A' COLLATE nocase FROM collated_values; +-- +ok +== +SELECT ('A' COLLATE nocase)='a' FROM collated_values; +-- +ok +== +SELECT NULL::VARCHAR COLLATE nocase FROM collated_values; +-- +ok +== +SELECT (NULL::VARCHAR COLLATE nocase)='a' FROM collated_values; +-- +ok +== +SELECT concat(v,'') COLLATE nocase FROM collated_values; +-- +ok +== +SELECT (concat(v,'') COLLATE nocase)='a' FROM collated_values; +-- +ok +== +SELECT upper(v COLLATE nocase) FROM collated_values; +-- +ok +== +SELECT (upper(v COLLATE nocase))='a' FROM collated_values; +-- +ok +== +SELECT CASE WHEN v IS NULL THEN NULL ELSE v END COLLATE nocase FROM collated_values; +-- +ok +== +SELECT (CASE WHEN v IS NULL THEN NULL ELSE v END COLLATE nocase)='a' FROM collated_values; +-- +ok +== +SELECT CASE WHEN v IS NULL THEN v ELSE v COLLATE nocase END FROM collated_values; +-- +ok +== +SELECT (CASE WHEN v IS NULL THEN v ELSE v COLLATE nocase END)='a' FROM collated_values; +-- +ok +== +SELECT v COLLATE "binary" FROM collated_values; +-- +ok +== +SELECT (v COLLATE "binary")='a' FROM collated_values; +-- +ok +== +SELECT (v)='a' FROM collated_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/composition_plan.test b/parser/testdata/corpus/sql/sql_export/composition_plan.test new file mode 100644 index 0000000..bfed8f7 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/composition_plan.test @@ -0,0 +1,105 @@ +# source: test/sql/sql_export/composition_plan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE composition_input(i INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO composition_input VALUES (1,'a'),(2,'A'),(2,'b'),(NULL,NULL); +-- +ok +== +CREATE SEQUENCE composition_sequence; +-- +ok +== +CREATE TABLE composition_overflow(i HUGEINT); +-- +ok +== +INSERT INTO composition_overflow VALUES (170141183460469231731687303715884105727),(1); +-- +ok +== +EXPLAIN (SQL) SELECT upper(x) FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT min(x) FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT CASE WHEN i=0 THEN x ELSE 1 END FROM (SELECT CAST(s AS INTEGER) x,i FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT TRY(x+1) FROM (SELECT CAST(s AS INTEGER) x FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,x FROM (SELECT nextval('composition_sequence') x FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT nextval('composition_sequence'),x FROM (SELECT CAST(s AS INTEGER) x FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT n FROM (SELECT sum(i) s,count(*) n FROM composition_overflow) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,count(*) FROM (SELECT lower(lower(lower(s))) x FROM composition_input) q GROUP BY x; +-- +ok +== +EXPLAIN (SQL) SELECT TRY(s) FROM (SELECT sum(i) s FROM composition_overflow) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,x FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT x FROM (SELECT CAST(s AS INTEGER) x FROM composition_input) q ORDER BY x LIMIT 1; +-- +ok +== +EXPLAIN (SQL) SELECT k,count(*) FROM (SELECT 1 k FROM composition_input) q GROUP BY k; +-- +ok +== +EXPLAIN (SQL) SELECT i,k FROM (SELECT i,1 k FROM composition_input) q ORDER BY k,i; +-- +ok +== +EXPLAIN (SQL) SELECT k,count(*) FROM (SELECT NULL k FROM composition_input) q GROUP BY k; +-- +ok +== +EXPLAIN (SQL) SELECT i,k FROM (SELECT i,NULL k FROM composition_input) q ORDER BY k,i; +-- +ok +== +EXPLAIN (SQL) SELECT n+1 FROM (SELECT i,count(*) n FROM composition_input GROUP BY i HAVING count(*)>1) q; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM (SELECT i,row_number() OVER (ORDER BY i) r FROM composition_input QUALIFY r % 2 = 1) q; +-- +ok +== +EXPLAIN (SQL) SELECT * FROM (SELECT DISTINCT i FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT n+n+n FROM (SELECT count(*) n FROM composition_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT n+n+n FROM (SELECT sum(length(lower(lower(lower(lower(lower(s))))))) n FROM composition_input) q; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/composition_q1.test b/parser/testdata/corpus/sql/sql_export/composition_q1.test new file mode 100644 index 0000000..a316d8c --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/composition_q1.test @@ -0,0 +1,21 @@ +# source: test/sql/sql_export/composition_q1.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE lineitem(l_orderkey BIGINT,l_partkey BIGINT,l_suppkey BIGINT,l_linenumber BIGINT,l_quantity DECIMAL(15,2),l_extendedprice DECIMAL(15,2),l_discount DECIMAL(15,2),l_tax DECIMAL(15,2),l_returnflag VARCHAR,l_linestatus VARCHAR,l_shipdate DATE,l_commitdate DATE,l_receiptdate DATE,l_shipinstruct VARCHAR,l_shipmode VARCHAR,l_comment VARCHAR); +-- +ok +== +INSERT INTO lineitem SELECT i,i%17,i%7,1,i%50+1,100+i,i%10/100.0,i%8/100.0,CASE WHEN i%3=0 THEN 'R' ELSE 'N' END,CASE WHEN i%2=0 THEN 'O' ELSE 'F' END,DATE '1998-08-01'+(i%60)::INTEGER,DATE '1998-08-02',DATE '1998-08-03','DELIVER IN PERSON','AIR','synthetic' FROM range(200) t(i); +-- +ok +== +SET debug_verify_statement='explain_sql_strict'; +-- +ok +== +UPDATE lineitem SET l_quantity=NULL, l_discount=NULL WHERE l_orderkey%5=0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/composition_q1_plan.test b/parser/testdata/corpus/sql/sql_export/composition_q1_plan.test new file mode 100644 index 0000000..fee7b48 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/composition_q1_plan.test @@ -0,0 +1,29 @@ +# source: test/sql/sql_export/composition_q1_plan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT + l_returnflag, + l_linestatus, + sum(l_quantity) AS sum_qty, + sum(l_extendedprice) AS sum_base_price, + sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price, + sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge, + avg(l_quantity) AS avg_qty, + avg(l_extendedprice) AS avg_price, + avg(l_discount) AS avg_disc, + count(*) AS count_order +FROM + lineitem +WHERE + l_shipdate <= CAST('1998-09-02' AS date) +GROUP BY + l_returnflag, + l_linestatus +ORDER BY + l_returnflag, + l_linestatus; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/composition_results.test b/parser/testdata/corpus/sql/sql_export/composition_results.test new file mode 100644 index 0000000..6030e9f --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/composition_results.test @@ -0,0 +1,141 @@ +# source: test/sql/sql_export/composition_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_disable_optimizer={optimizer}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT upper(x) FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +SELECT count(*) FROM (SELECT lower(s) x FROM composition_input) q WHERE x='a'; +-- +ok +== +SELECT min(x) FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +SELECT n,n+1 FROM (SELECT count(*) n FROM composition_input) q; +-- +ok +== +SELECT 42 FROM (SELECT count(*) n FROM composition_input WHERE false) q; +-- +ok +== +SELECT n,n+1 FROM (SELECT count(*) n FROM composition_input WHERE false) q; +-- +ok +== +SELECT lower(s),count(*) FROM composition_input GROUP BY GROUPING SETS ((lower(s)),(lower(s)),()); +-- +ok +== +SELECT lower(s),count(*),grouping(lower(s)) FROM composition_input GROUP BY ROLLUP(lower(s)); +-- +ok +== +SELECT i AS s,length(s) AS i FROM composition_input WHERE i IS NOT NULL ORDER BY i,s; +-- +ok +== +SELECT count(x) FILTER (WHERE x='a') FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +WITH c AS MATERIALIZED (SELECT lower(s) x,i FROM composition_input) SELECT x,count(*) FROM c GROUP BY x; +-- +ok +== +WITH c AS NOT MATERIALIZED (SELECT lower(s) x,i FROM composition_input) SELECT x,count(*) FROM c GROUP BY x; +-- +ok +== +SELECT lower(l.s),r.i FROM composition_input l LEFT JOIN composition_input r ON l.i=r.i WHERE l.i=1; +-- +ok +== +SELECT CASE WHEN i=1 THEN x END FROM (SELECT lower(s) x,i FROM composition_input) q; +-- +ok +== +SELECT coalesce(x,'missing') FROM (SELECT lower(s) x FROM composition_input) q; +-- +ok +== +SELECT k,count(*) FROM (SELECT 1 k FROM composition_input) q GROUP BY k; +-- +ok +== +SELECT i,k FROM (SELECT i,1 k FROM composition_input) q ORDER BY k,i; +-- +ok +== +SELECT k,count(*) FROM (SELECT NULL k FROM composition_input) q GROUP BY k; +-- +ok +== +SET order_by_non_integer_literal={allow_constant_order}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT i,k FROM (SELECT i,NULL k FROM composition_input) q ORDER BY k,i; +-- +ok +== +SELECT i,k FROM (SELECT i,NULL k FROM composition_input) q ORDER BY k,i LIMIT 1; +-- +ok +== +SET order_by_non_integer_literal=false; +-- +ok +== +SELECT n+1 FROM (SELECT i,count(*) n FROM composition_input GROUP BY i HAVING count(*)>1) q; +-- +ok +== +SELECT i FROM (SELECT i,row_number() OVER (ORDER BY i) r FROM composition_input QUALIFY r % 2 = 1) q; +-- +ok +== +SELECT * FROM (SELECT DISTINCT i FROM composition_input) q; +-- +ok +== +SELECT n+n+n FROM (SELECT count(*) n FROM composition_input) q; +-- +ok +== +SELECT n+n+n FROM (SELECT sum(length(lower(lower(lower(lower(lower(s))))))) n FROM composition_input) q; +-- +ok +== +SET debug_verify_statement='none'; +-- +ok +== +CREATE TABLE composition_one_row(i INTEGER); +-- +ok +== +INSERT INTO composition_one_row VALUES (1); +-- +ok +== +CREATE OR REPLACE SEQUENCE composition_order_sequence; +-- +ok +== +SELECT nextval('composition_order_sequence') y,x FROM (SELECT nextval('composition_order_sequence') x FROM composition_one_row) q; +-- +ok +== +SELECT n FROM (SELECT sum(i) s,count(*) n FROM composition_overflow) q; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/compressed_materialization_sql_export.test b/parser/testdata/corpus/sql/sql_export/compressed_materialization_sql_export.test new file mode 100644 index 0000000..9206b2a --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/compressed_materialization_sql_export.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/compressed_materialization_sql_export.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE compressed_values(i BIGINT); +-- +ok +== +INSERT INTO compressed_values SELECT i FROM range(100) t(i); +-- +ok +== +SELECT sum(i) FROM (SELECT i FROM compressed_values ORDER BY i) +-- +ok +== +CREATE TABLE offset_values AS SELECT (i + 300)::INTEGER AS i FROM range(10) t(i); +-- +ok +== +SELECT sum(i) FROM (SELECT i FROM offset_values ORDER BY i) +-- +ok +== +CREATE TABLE compressed_strings(s VARCHAR, v INTEGER); +-- +ok +== +INSERT INTO compressed_strings VALUES ('a', 1), ('é', 2), ('abc', 4), ('a', 3), (NULL, 5); +-- +ok +== +SELECT s, sum(v) FROM compressed_strings GROUP BY s ORDER BY s NULLS LAST +-- +ok +== +CREATE TABLE null_strings AS SELECT NULL::VARCHAR AS s FROM range(2); +-- +ok +== +SELECT s, count(*) FROM null_strings GROUP BY s +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/compression_fallbacks.test b/parser/testdata/corpus/sql/sql_export/compression_fallbacks.test new file mode 100644 index 0000000..e0fd585 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/compression_fallbacks.test @@ -0,0 +1,61 @@ +# source: test/sql/sql_export/compression_fallbacks.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE materialized_source AS SELECT (i+100000)::INTEGER id, printf('v%02d', i) s, printf('POINT(%d %d)', i, i)::GEOMETRY g FROM range(100)t(i); +-- +ok +== +ANALYZE materialized_source; +-- +ok +== +CREATE TABLE cast_source AS SELECT i::INTEGER id FROM range(100)t(i); +-- +ok +== +ANALYZE cast_source; +-- +ok +== +SELECT id FROM materialized_source ORDER BY id; +-- +ok +== +SELECT s,id FROM materialized_source WHERE id<100010 ORDER BY id; +-- +ok +== +SELECT g,id FROM materialized_source WHERE id<100010 ORDER BY id; +-- +ok +== +SELECT id FROM cast_source ORDER BY id; +-- +ok +== +INSERT INTO cast_source VALUES (1000000); +-- +ok +== +CREATE TABLE computed_groups(i INTEGER); +-- +ok +== +INSERT INTO computed_groups VALUES (3),(4),(4),(NULL); +-- +ok +== +SELECT i*2 FROM computed_groups GROUP BY i*2 ORDER BY 1; +-- +ok +== +SELECT CAST(i AS SMALLINT),count(*) FROM computed_groups GROUP BY CAST(i AS SMALLINT) ORDER BY 1; +-- +ok +== +SELECT string_agg(DISTINCT v, '|' ORDER BY length(v), v) FROM (VALUES ('aa'),('b'),('b'),(NULL)) t(v); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/compression_fallbacks_plan.test b/parser/testdata/corpus/sql/sql_export/compression_fallbacks_plan.test new file mode 100644 index 0000000..e0b06bc --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/compression_fallbacks_plan.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/compression_fallbacks_plan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN SELECT id FROM materialized_source ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id FROM materialized_source ORDER BY id; +-- +ok +== +EXPLAIN SELECT s,id FROM materialized_source WHERE id<100010 ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT s,id FROM materialized_source WHERE id<100010 ORDER BY id; +-- +ok +== +EXPLAIN SELECT g,id FROM materialized_source WHERE id<100010 ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT g,id FROM materialized_source WHERE id<100010 ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id FROM cast_source ORDER BY id; +-- +ok +== +EXPLAIN SELECT id FROM cast_source ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT i*2 FROM computed_groups GROUP BY i*2 ORDER BY 1; +-- +ok +== +EXPLAIN (SQL) SELECT CAST(i AS SMALLINT),count(*) FROM computed_groups GROUP BY CAST(i AS SMALLINT) ORDER BY 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/constant_values.test b/parser/testdata/corpus/sql/sql_export/constant_values.test new file mode 100644 index 0000000..aeea981 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/constant_values.test @@ -0,0 +1,135 @@ +# source: test/sql/sql_export/constant_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT + NULL, + typeof(NULL), + NULL::SMALLINT, + typeof(NULL::SMALLINT), + -12::TINYINT, + typeof(-12::TINYINT), + 250::UTINYINT, + typeof(250::UTINYINT), + -9000000000::BIGINT, + typeof(-9000000000::BIGINT), + 18000000000000000000::UBIGINT, + typeof(18000000000000000000::UBIGINT), + 42::HUGEINT, + typeof(42::HUGEINT), + 84::UHUGEINT, + typeof(84::UHUGEINT), + 1.25::FLOAT, + typeof(1.25::FLOAT), + -3.5::DOUBLE, + typeof(-3.5::DOUBLE); +-- +ok +== +SELECT + '-0.0'::FLOAT, + typeof('-0.0'::FLOAT), + '-0.0'::DOUBLE, + typeof('-0.0'::DOUBLE), + 12.345::DECIMAL(9,3), + typeof(12.345::DECIMAL(9,3)), + to_months(-2147483648)+to_days(-2147483648)+to_microseconds(-9223372036854775808), + typeof(to_months(-2147483648)+to_days(-2147483648)+to_microseconds(-9223372036854775808)), + [1::SMALLINT,2::SMALLINT], + typeof([1::SMALLINT,2::SMALLINT]), + {'n': 7, 'items': ['x','y']}, + typeof({'n': 7, 'items': ['x','y']}), + {'n': 7::SMALLINT, 'items': [1::TINYINT, NULL]}::VARIANT, + typeof({'n': 7::SMALLINT, 'items': [1::TINYINT, NULL]}::VARIANT), + 'POINT ZM(1.25 -2.5 3.75 4.5)'::GEOMETRY('OGC:CRS84'), + typeof('POINT ZM(1.25 -2.5 3.75 4.5)'::GEOMETRY('OGC:CRS84')); +-- +ok +== +SELECT signbit(x) FROM (VALUES ('-0.0'::FLOAT)) t(x); +-- +ok +== +EXPLAIN (SQL) SELECT '-0.0'::FLOAT; +-- +ok +== +SELECT signbit(x) FROM (VALUES ('-0.0'::DOUBLE)) t(x); +-- +ok +== +EXPLAIN (SQL) SELECT '-0.0'::DOUBLE; +-- +ok +== +SELECT date_part('year',i)::BIGINT*12+date_part('month',i),date_part('day',i),date_part('hour',i)::HUGEINT*3600000000+date_part('minute',i)::HUGEINT*60000000+date_part('microsecond',i) FROM (VALUES (to_months(-2147483648)+to_days(-2147483648)+to_microseconds(-9223372036854775808)))t(i); +-- +ok +== +SELECT variant_typeof(v.n),variant_typeof(v.items[1]) FROM (VALUES ({'n': 7::SMALLINT, 'items': [1::TINYINT, NULL]}::VARIANT)) t(v); +-- +ok +== +SELECT hex(ST_AsWKB(g)) FROM (VALUES ('POINT ZM(1.25 -2.5 3.75 4.5)'::GEOMETRY('OGC:CRS84')))t(g); +-- +ok +== +SELECT variant_typeof(v.a[1].b), variant_typeof(v.a[1].c) FROM (VALUES ({'a': [{'b': 1::SMALLINT, 'c': 2::TINYINT, 'a': 3}], 'b': 4, 'c': 5}::VARIANT)) t(v); +-- +ok +== +SELECT variant_extract_string(v, ''), variant_typeof(v.a[1]), variant_typeof(v.a[2].b) FROM (VALUES ({'a': [7::SMALLINT::VARIANT, {'b': 2::TINYINT, 'a': 3}::VARIANT]}::VARIANT)) t(v); +-- +ok +== +WITH literals AS MATERIALIZED ( + SELECT + 'hello'::VARIANT v0, + NULL::VARIANT v1, + 7::SMALLINT::VARIANT v2, + 12.34::DECIMAL(9,2)::VARIANT v3, + 'a''b'::BLOB::VARIANT v4, + {'slash\key': {'🦆': 12.34::DECIMAL(9,2)}}::VARIANT v5, + {'quoted''key': [1::SMALLINT::VARIANT, 'x'::VARIANT, NULL::VARIANT]}::VARIANT v6, + [7::SMALLINT::VARIANT, 'x'::VARIANT] v7, + {'v': 7::SMALLINT::VARIANT} v8, + [7::SMALLINT::VARIANT]::VARIANT[1] v9 +) +SELECT *,variant_typeof(v3),variant_typeof(v5."slash\key"."🦆") FROM literals; +-- +ok +== +WITH zeros AS MATERIALIZED ( + SELECT '-0.0'::{floating_type}::VARIANT v +) +SELECT 1.0/v::DOUBLE FROM zeros; +-- +error: Parser Error: syntax error at or near "{" +== +CREATE MACRO list_value(a, b) AS 99; +-- +ok +== +SELECT system.main.list_value(1, 2); +-- +ok +== +DROP MACRO list_value; +-- +ok +== +WITH literals AS MATERIALIZED ( + SELECT [to_months(-2147483648)+to_days(-2147483648)+to_microseconds(-9223372036854775808)] payload +) +SELECT date_part('year',payload[1])::BIGINT*12+date_part('month',payload[1]), + date_part('day',payload[1]), + date_part('hour',payload[1])::HUGEINT*3600000000+date_part('minute',payload[1])::HUGEINT*60000000+date_part('microsecond',payload[1]) +FROM literals; +-- +ok +== +SELECT equi_width_bins('a'::VARCHAR,'z'::VARCHAR,2,true); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/correlated_metadata.test b/parser/testdata/corpus/sql/sql_export/correlated_metadata.test new file mode 100644 index 0000000..47ff5ee --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/correlated_metadata.test @@ -0,0 +1,133 @@ +# source: test/sql/sql_export/correlated_metadata.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT i, (WITH c AS MATERIALIZED (SELECT i x) SELECT count(*) FROM c) FROM range(3) t(i); +-- +ok +== +SELECT i, (WITH c AS MATERIALIZED (SELECT i x) SELECT x FROM c) FROM range(3) t(i); +-- +ok +== +SELECT i, (WITH c AS MATERIALIZED (SELECT i x) SELECT a.x FROM c a, c b WHERE a.x=b.x) FROM range(3) t(i); +-- +ok +== +SELECT i, (WITH RECURSIVE c(x) AS (SELECT i UNION ALL SELECT x+1 FROM c WHERE xALL(SELECT r.y FROM rhs r WHERE r.k=o.k) FROM lhs o; +-- +ok +== +SELECT o.k,o.x,o.x<>ALL(SELECT r.y FROM rhs r WHERE r.k=o.k) FROM lhs o; +-- +ok +== +CREATE TABLE union_l(g INTEGER,x UNION(i INTEGER,s VARCHAR)); +-- +ok +== +CREATE TABLE union_r(g INTEGER,y UNION(i INTEGER,s VARCHAR)); +-- +ok +== +INSERT INTO union_l VALUES (1,union_value(i:=NULL)); +-- +ok +== +INSERT INTO union_r VALUES (1,union_value(i:=NULL)); +-- +ok +== +EXPLAIN (SQL) SELECT x=ANY(SELECT y FROM union_r r WHERE r.g=l.g) FROM union_l l; +-- +ok +== +CREATE TABLE list_l(g INTEGER,x INTEGER[]); +-- +ok +== +CREATE TABLE list_r(g INTEGER,y INTEGER[]); +-- +ok +== +INSERT INTO list_l VALUES (1,[10,NULL]); +-- +ok +== +INSERT INTO list_r VALUES (1,NULL); +-- +ok +== +SELECT x=ANY(SELECT y FROM list_r r WHERE r.g=l.g) FROM list_l l; +-- +ok +== +SELECT xALL(SELECT y FROM r WHERE r.k=l.k),x=ALL(SELECT y FROM r WHERE r.k=l.k) FROM l; +-- +ok +== +SELECT id,x=ANY(SELECT y FROM r WHERE r.k IS NOT DISTINCT FROM l.k) FROM l; +-- +ok +== +SELECT id FROM l WHERE x<>ALL(SELECT y FROM r WHERE r.k=l.k); +-- +ok +== +DELETE FROM r; +-- +ok +== +SELECT id,x=ANY(SELECT y FROM r WHERE r.k=l.k),x=ALL(SELECT y FROM r WHERE r.k=l.k) FROM l; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/cte_names.test b/parser/testdata/corpus/sql/sql_export/cte_names.test new file mode 100644 index 0000000..dc83c69 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/cte_names.test @@ -0,0 +1,29 @@ +# source: test/sql/sql_export/cte_names.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH r0(x) AS MATERIALIZED (VALUES (1)), r1(y) AS MATERIALIZED (VALUES (2)) +SELECT x,y FROM r0,r1; +-- +ok +== +WITH r0(x) AS MATERIALIZED (VALUES (1)) +SELECT x,y FROM r0, +(WITH R0(y) AS MATERIALIZED (VALUES (2)) SELECT y FROM R0) q; +-- +ok +== +WITH RECURSIVE "quoted cte"(x) AS ( +VALUES (1) UNION ALL SELECT x+1 FROM "quoted cte" WHERE x<3) +SELECT sum(x) FROM "quoted cte"; +-- +ok +== +WITH RECURSIVE r0(x) AS (VALUES (1) UNION ALL SELECT x+1 FROM r0 WHERE x<3) +SELECT x,y FROM r0, +(WITH RECURSIVE r0(y) AS (VALUES (10) UNION ALL SELECT y+10 FROM r0 WHERE y<20) + SELECT y FROM r0) q ORDER BY x,y; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/cte_result_matrices.test b/parser/testdata/corpus/sql/sql_export/cte_result_matrices.test new file mode 100644 index 0000000..e30d0a9 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/cte_result_matrices.test @@ -0,0 +1,169 @@ +# source: test/sql/sql_export/cte_result_matrices.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET disabled_optimizers='compressed_materialization'; +-- +ok +== +CREATE TABLE cte_input(x INTEGER, y DECIMAL(9,2), z INTEGER[]); +-- +ok +== +INSERT INTO cte_input VALUES (1,1.25,[1,NULL]),(2,NULL,[]),(2,2.50,[2]),(NULL,3.75,NULL); +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM cte_input) SELECT x,y,z FROM c; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM cte_input) SELECT z,x,z FROM c; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM cte_input WHERE x>10) SELECT * FROM c; +-- +ok +== +WITH c AS MATERIALIZED (SELECT x FROM cte_input) SELECT a.x,b.x FROM c a JOIN c b USING(x); +-- +ok +== +WITH c AS MATERIALIZED (SELECT x,y FROM cte_input) SELECT a.x,a.y,b.y FROM c a LEFT JOIN c b ON a.x=b.x; +-- +ok +== +WITH c AS MATERIALIZED (SELECT x FROM cte_input) SELECT x FROM c UNION ALL SELECT x FROM c; +-- +ok +== +WITH c AS MATERIALIZED (SELECT x,y FROM cte_input) SELECT x,count(*),sum(y) FROM c GROUP BY x; +-- +ok +== +WITH c AS MATERIALIZED (SELECT x FROM cte_input) SELECT x,row_number() OVER (ORDER BY x) FROM c; +-- +ok +== +WITH c AS MATERIALIZED (SELECT x,z FROM cte_input) SELECT x,unnest(z) FROM c; +-- +ok +== +WITH a AS MATERIALIZED (SELECT x,y FROM cte_input), b AS MATERIALIZED (SELECT x,y FROM a WHERE x>1) SELECT a.x,b.y FROM a JOIN b USING(x); +-- +ok +== +WITH c AS MATERIALIZED (SELECT x FROM cte_input) SELECT a.x,b.x FROM c a CROSS JOIN (WITH c AS MATERIALIZED (SELECT 9 x) SELECT x FROM c) b; +-- +ok +== +WITH r0(c0,c1) AS MATERIALIZED (SELECT x,y FROM cte_input) SELECT c1,c0,c1 FROM r0; +-- +ok +== +WITH c AS MATERIALIZED (SELECT x,y FROM cte_input) SELECT y,x FROM c ORDER BY y NULLS LAST,x LIMIT 3 OFFSET 1; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM c WHERE x<5) SELECT x FROM c ORDER BY ALL; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION SELECT x FROM c) SELECT x FROM c ORDER BY ALL; +-- +ok +== +WITH RECURSIVE c(x) AS (VALUES (1),(1) UNION ALL SELECT x+1 FROM c WHERE x<3) SELECT x FROM c ORDER BY ALL; +-- +ok +== +WITH RECURSIVE c(x) AS (VALUES (1),(NULL) UNION SELECT x+1 FROM c WHERE x<3) SELECT x FROM c ORDER BY ALL; +-- +ok +== +WITH RECURSIVE c(x,y) AS (SELECT 1,1.25::DECIMAL(9,2) UNION ALL SELECT x+1,y FROM c WHERE x<3) SELECT y,x,y FROM c ORDER BY ALL; +-- +ok +== +WITH RECURSIVE c(x,y) AS (SELECT 1,[1,NULL]::INTEGER[] UNION ALL SELECT x+1,y FROM c WHERE x<3) SELECT x,y FROM c ORDER BY ALL; +-- +ok +== +WITH RECURSIVE r0(c0) AS (SELECT 1 UNION ALL SELECT c0+1 FROM r0 WHERE c0<3) SELECT c0 FROM r0 ORDER BY ALL; +-- +ok +== +WITH RECURSIVE a AS MATERIALIZED (SELECT 3 n),c(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM c,a WHERE x= 0 AS has_row; +-- +ok +== +DELETE FROM main.dml_target +WHERE (rowid = ANY ( + SELECT r0.rowid AS c1 + FROM main.dml_target AS r0(column0, column1) + WHERE (r0.column0 = CAST(20 AS INTEGER)) + )) +RETURNING a AS a, b AS b, (rowid >= CAST(0 AS BIGINT)) AS has_row +-- +ok +== +CREATE TABLE dml_source(a INTEGER, b TEXT); +-- +ok +== +INSERT INTO dml_source VALUES (10,'aa'),(11,'bb'); +-- +ok +== +EXPLAIN (SQL) UPDATE dml_target SET b = s.b FROM dml_source s WHERE dml_target.a = s.a; +-- +ok +== +EXPLAIN (SQL) DELETE FROM dml_target USING dml_source u WHERE dml_target.a = u.a; +-- +ok +== +EXPLAIN (SQL) DELETE FROM dml_target WHERE a = (SELECT min(a) FROM dml_target); +-- +ok +== +EXPLAIN (SQL) UPDATE dml_target SET a = (SELECT count(*) FROM dml_source) WHERE b = 'z'; +-- +ok +== +CREATE TABLE dml_generated(a INTEGER, d AS (a * 2), b TEXT DEFAULT 'z'); +-- +ok +== +EXPLAIN (SQL) INSERT INTO dml_generated(a) VALUES (5); +-- +ok +== +EXPLAIN (SQL) INSERT INTO dml_generated(a) VALUES (5) RETURNING d; +-- +ok +== +CREATE TABLE dml_merge_target(k INTEGER, v TEXT); +-- +ok +== +INSERT INTO dml_merge_target VALUES (1,'a'),(2,'b'); +-- +ok +== +CREATE TABLE dml_merge_source(k INTEGER, v TEXT); +-- +ok +== +INSERT INTO dml_merge_source VALUES (2,'B'),(3,'C'); +-- +ok +== +EXPLAIN (SQL) MERGE INTO dml_merge_target USING dml_merge_source ON dml_merge_target.k = dml_merge_source.k WHEN MATCHED THEN UPDATE SET v = dml_merge_source.v WHEN NOT MATCHED THEN INSERT VALUES (dml_merge_source.k, dml_merge_source.v); +-- +ok +== +MERGE INTO main.dml_merge_target USING ( + SELECT r2.column0 AS c0, r2.column1 AS c1, r2.column1 AS c2, r0.rowid AS c3 + FROM (main.dml_merge_target AS r0(column0, column1) + RIGHT JOIN main.dml_merge_source AS r2( + column0, + column1) ON ((r0.column0 = r2.column0)) + ) + ) AS r5(c0, c1, c2, c3) ON (dml_merge_target.rowid = r5.c3) WHEN MATCHED THEN +UPDATE +SET v = r5.c2 WHEN NOT MATCHED THEN +INSERT (k, v) +VALUES (r5.c0, r5.c1) +-- +ok +== +SELECT * FROM dml_merge_target; +-- +ok +== +EXPLAIN (SQL) MERGE INTO dml_merge_target USING dml_merge_source ON dml_merge_target.k = dml_merge_source.k WHEN MATCHED THEN DELETE RETURNING merge_action, k; +-- +ok +== +MERGE INTO main.dml_merge_target USING ( + SELECT r2.column0 AS c0, r1.c1 AS c1, r1.c2 AS c2 + FROM (( + SELECT r0.column0 AS c0, r0.column1 AS c1, r0.rowid AS c2 + FROM main.dml_merge_target AS r0(column0, column1) + WHERE (r0.column0 >= CAST(2 AS INTEGER)) + ) AS r1(c0, c1, c2) + INNER JOIN main.dml_merge_source AS r2( + column0, + column1) ON ((r1.c0 = r2.column0)) + ) + ) AS r5(c0, c1, c2) ON (dml_merge_target.rowid = r5.c2) WHEN MATCHED THEN +DELETE +RETURNING merge_action AS merge_action, k AS k +-- +ok +== +EXPLAIN (SQL) MERGE INTO dml_merge_target USING dml_merge_source ON dml_merge_target.k = dml_merge_source.k WHEN NOT MATCHED BY SOURCE THEN DELETE; +-- +ok +== +CREATE TABLE dml_keyed(a INTEGER PRIMARY KEY, b TEXT); +-- +ok +== +INSERT INTO dml_keyed VALUES (1,'p'),(2,'q'); +-- +ok +== +EXPLAIN (SQL) INSERT INTO dml_keyed VALUES (2,'x'),(9,'y') ON CONFLICT DO UPDATE SET b = excluded.b; +-- +ok +== +EXPLAIN (SQL) INSERT OR REPLACE INTO dml_keyed VALUES (1,'z'); +-- +ok +== +SELECT * FROM dml_keyed; +-- +ok +== +CREATE TABLE dml_shadowed(rowid INTEGER, v TEXT); +-- +ok +== +EXPLAIN (SQL) DELETE FROM dml_shadowed WHERE v = 'a'; +-- +ok +== +EXPLAIN (SQL) UPDATE dml_shadowed SET v = 'b'; +-- +ok +== +EXPLAIN (SQL) INSERT INTO dml_shadowed VALUES (1, 'a'); +-- +ok +== +CREATE TABLE dml_cte_target(a INTEGER); +-- +ok +== +INSERT INTO dml_cte_target VALUES (1),(2),(3); +-- +ok +== +EXPLAIN (SQL) WITH d AS (DELETE FROM dml_cte_target WHERE a < 3 RETURNING a) SELECT sum(a) AS deleted_sum FROM d; +-- +ok +== +WITH d(c0) AS MATERIALIZED ( + DELETE FROM main.dml_cte_target + WHERE (rowid = ANY ( + SELECT r0.rowid AS c1 + FROM main.dml_cte_target AS r0(column0) + WHERE (r0.column0 < CAST(3 AS INTEGER)) + )) + RETURNING a AS a + ) +SELECT r6.c0 AS deleted_sum +FROM ( + SELECT "system".main.sum(r3.c0) AS c0 + FROM d AS r3(c0) + ) AS r6(c0) +-- +ok +== +EXPLAIN (SQL) WITH x AS MATERIALIZED (SELECT 3 AS v) DELETE FROM dml_cte_target WHERE a IN (SELECT v FROM x); +-- +ok +== +WITH x(c0) AS MATERIALIZED ( + SELECT CAST(3 AS INTEGER) AS c0 + ) +DELETE FROM main.dml_cte_target +WHERE (rowid = ANY ( + SELECT r3.c1 AS c1 + FROM (( + SELECT r2.column0 AS c0, r2.rowid AS c1 + FROM main.dml_cte_target AS r2(column0) + WHERE (r2.column0 >= CAST(3 AS INTEGER)) + ) AS r3(c0, c1) SEMI + JOIN x AS r4(c0) ON ((r3.c0 = r4.c0)) + ) + )) +-- +ok +== +SELECT count(*) FROM dml_cte_target; +-- +ok +== +EXPLAIN (SQL) WITH d AS (DELETE FROM dml_target WHERE a = 1 RETURNING a) SELECT 42; +-- +ok +== +EXPLAIN (SQL) CREATE TABLE dml_unexpected(i INTEGER); +-- +ok +== +CREATE TABLE dml_cte_multi(a INTEGER); +-- +ok +== +CREATE TABLE dml_cte_aux(a INTEGER); +-- +ok +== +WITH i1 AS (INSERT INTO dml_cte_multi VALUES (1) RETURNING a), + i2 AS (INSERT INTO dml_cte_aux VALUES (2) RETURNING a) +SELECT * FROM i1 UNION ALL SELECT * FROM i2; +-- +ok +== +WITH d1 AS (DELETE FROM dml_cte_multi RETURNING a), + s AS (SELECT a + 10 AS b FROM d1), + d2 AS (DELETE FROM dml_cte_aux WHERE a IN (SELECT b - 9 FROM s) RETURNING a) +SELECT * FROM d2; +-- +ok +== +SELECT (SELECT count(*) FROM dml_cte_multi), (SELECT count(*) FROM dml_cte_aux); +-- +ok +== +WITH d AS (INSERT INTO dml_cte_multi VALUES (5), (6), (7) RETURNING a) +SELECT a FROM d ORDER BY a LIMIT 1; +-- +ok +== +EXPLAIN (SQL) WITH ups AS (INSERT INTO dml_keyed VALUES (1,'x') ON CONFLICT DO NOTHING RETURNING a) SELECT * FROM ups; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/empty_aggregate_state.test b/parser/testdata/corpus/sql/sql_export/empty_aggregate_state.test new file mode 100644 index 0000000..652e9a6 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/empty_aggregate_state.test @@ -0,0 +1,77 @@ +# source: test/sql/sql_export/empty_aggregate_state.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE states AS SELECT avg(i) EXPORT_STATE a, sum(i) EXPORT_STATE s, + count(*) EXPORT_STATE c, approx_quantile(i, 0.5) EXPORT_STATE q FROM range(10) t(i); +-- +ok +== +CREATE TABLE nested_states AS SELECT [s] l, {'state': s} t FROM states; +-- +ok +== +SELECT finalize(combine_aggr(a)), finalize(combine_aggr(s)), + finalize(combine_aggr(c)), finalize(combine_aggr(q)) FROM states WHERE false +-- +ok +== +SELECT a, s, c, q FROM states WHERE false +-- +ok +== +SELECT typeof(finalize(combine_aggr(a))), typeof(finalize(combine_aggr(s))), + typeof(finalize(combine_aggr(c))), typeof(finalize(combine_aggr(q))) FROM states WHERE false +-- +ok +== +SELECT l, t FROM nested_states WHERE false +-- +ok +== +SELECT finalize(l[1]), finalize(t.state) FROM nested_states +-- +ok +== +CREATE TABLE any_states AS SELECT count(v) EXPORT_STATE c, approx_count_distinct(v) EXPORT_STATE a, + string_agg(s, '|' ORDER BY v DESC NULLS LAST) EXPORT_STATE o, + approx_quantile(v, 0.5) EXPORT_STATE q +FROM (VALUES (1::BIGINT,'a'),(NULL,NULL),(1,'a'),(2,'b')) input(v,s); +-- +ok +== +SELECT finalize(combine_aggr(c)), finalize(combine_aggr(a)), + finalize(combine_aggr(o)), finalize(combine_aggr(q)) FROM any_states WHERE false; +-- +ok +== +SELECT typeof(finalize(combine_aggr(c))), typeof(finalize(combine_aggr(a))), + typeof(finalize(combine_aggr(o))), typeof(finalize(combine_aggr(q))) FROM any_states WHERE false; +-- +ok +== +SELECT c, a, o, q FROM any_states WHERE false; +-- +ok +== +SELECT finalize(c), finalize(a), finalize(o) FROM any_states; +-- +ok +== +CREATE TABLE nested_any_states AS SELECT [c] l, {'state': a, 'ordered': o} t FROM any_states; +-- +ok +== +SELECT l, t FROM nested_any_states WHERE false; +-- +ok +== +SELECT finalize(l[1]), finalize(t.state), finalize(t.ordered) FROM nested_any_states; +-- +ok +== +SELECT finalize(combine_aggr(l[1])), finalize(combine_aggr(t.state)) FROM nested_any_states WHERE false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/empty_enum.test b/parser/testdata/corpus/sql/sql_export/empty_enum.test new file mode 100644 index 0000000..917e17c --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/empty_enum.test @@ -0,0 +1,41 @@ +# source: test/sql/sql_export/empty_enum.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE nonempty_enum AS ENUM ('a', 'b'); +-- +ok +== +CREATE TABLE empty_enum_values AS SELECT NULL::empty_enum AS e; +-- +ok +== +SELECT NULL::empty_enum, []::empty_enum[], {'e': NULL::empty_enum}, map([1], [NULL::empty_enum]); +-- +ok +== +EXPLAIN (SQL) SELECT NULL::empty_enum; +-- +ok +== +EXPLAIN (SQL) SELECT []::empty_enum[]; +-- +ok +== +EXPLAIN (SQL) SELECT {'e': NULL::empty_enum}; +-- +ok +== +EXPLAIN (SQL) SELECT get_type(NULL::empty_enum); +-- +ok +== +SELECT e FROM empty_enum_values; +-- +ok +== +SELECT NULL::nonempty_enum, 'a'::nonempty_enum, ['a', NULL]::nonempty_enum[]; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/execution_once.test b/parser/testdata/corpus/sql/sql_export/execution_once.test new file mode 100644 index 0000000..2d13a57 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/execution_once.test @@ -0,0 +1,41 @@ +# source: test/sql/sql_export/execution_once.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SEQUENCE exported_calls; +-- +ok +== +SELECT x,x FROM (SELECT nextval('exported_calls') AS x FROM (VALUES (1),(2),(2)) t(i)) q +-- +ok +== +SELECT nextval('exported_calls') +-- +ok +== +SELECT CASE WHEN nextval('exported_calls')=5 THEN error('generated execution failed') ELSE 0 END +-- +ok +== +SELECT count(*) FROM range(10) WHERE random() BETWEEN 0 AND 1 +-- +ok +== +CREATE TABLE hinted_values AS SELECT i, i%7 v FROM range(100)t(i) +-- +ok +== +CREATE SEQUENCE hinted_calls +-- +ok +== +SELECT count(*),sum(i) FROM hinted_values WHERE i>v AND nextval('hinted_calls')>0 +-- +ok +== +SELECT currval('hinted_calls') +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/explain_sql.test b/parser/testdata/corpus/sql/sql_export/explain_sql.test new file mode 100644 index 0000000..800fbd3 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/explain_sql.test @@ -0,0 +1,102 @@ +# source: test/sql/sql_export/explain_sql.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT 1 + 2 AS answer; +-- +ok +== +SET explain_output='all'; +-- +ok +== +EXPLAIN (SQL) VALUES (42); +-- +ok +== +EXPLAIN (SQL, SQL) SELECT 1; +-- +ok +== +EXPLAIN (SQL true) SELECT 1; +-- +ok +== +EXPLAIN (SQL, ANALYZE) SELECT 1; +-- +ok +== +EXPLAIN ANALYZE (SQL) SELECT 1; +-- +ok +== +EXPLAIN (FORMAT JSON, SQL) SELECT 1; +-- +ok +== +CREATE TABLE explain_target(i INTEGER); +-- +ok +== +EXPLAIN (SQL) INSERT INTO explain_target VALUES (1); +-- +ok +== +EXPLAIN (SQL) CREATE TABLE unexpected(i INTEGER); +-- +ok +== +EXPLAIN (SQL) CALL range(3); +-- +ok +== +PREPARE query_to_explain AS SELECT 1; +-- +ok +== +EXPLAIN (SQL) EXECUTE query_to_explain; +-- +ok +== +SELECT count(*) FROM explain_target; +-- +ok +== +CREATE SEQUENCE explain_sequence; +-- +ok +== +EXPLAIN (SQL) SELECT nextval('explain_sequence'); +-- +ok +== +EXPLAIN (SQL) SELECT error('execution only'); +-- +ok +== +EXPLAIN (SQL) PIVOT (SELECT nextval('explain_sequence') AS i) ON i; +-- +error: Parser Error: PIVOT statements with pivot elements extracted from the data cannot be used in EXPLAIN (SQL) statements. +== +SELECT last_value IS NULL FROM duckdb_sequences() WHERE sequence_name='explain_sequence'; +-- +ok +== +EXPLAIN (SQL) PIVOT (VALUES ('a', 1)) t(k,v) ON k IN ('a') USING sum(v); +-- +ok +== +EXPLAIN (SQL) SELECT * FROM missing_explain_source; +-- +ok +== +EXPLAIN (SQL) SELECT __mark_join_marker FROM (VALUES (1,1)) l(a,c) +JOIN BY (TYPE MARK) (VALUES (1,NULL::INTEGER)) r(b,d) ON a IS NOT DISTINCT FROM b AND c=d; +-- +ok +== +EXPLAIN (SQL) SELECT * FROM duckdb_views(); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/explain_sql_formatting.test b/parser/testdata/corpus/sql/sql_export/explain_sql_formatting.test new file mode 100644 index 0000000..ada1f12 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/explain_sql_formatting.test @@ -0,0 +1,49 @@ +# source: test/sql/sql_export/explain_sql_formatting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET autoload_known_extensions=false; +-- +ok +== +SET autoinstall_known_extensions=false; +-- +ok +== +SELECT count(*) FROM duckdb_extensions() WHERE extension_name='autocomplete' AND loaded; +-- +ok +== +CREATE SEQUENCE formatted_explain_sequence; +-- +ok +== +EXPLAIN (SQL) SELECT nextval('formatted_explain_sequence') FROM range(2); +-- +ok +== +SELECT last_value IS NULL FROM duckdb_sequences() WHERE sequence_name='formatted_explain_sequence'; +-- +ok +== +WITH t AS MATERIALIZED (SELECT * FROM (VALUES (1), (1), (NULL), (2)) v(i)) +SELECT l.i, r.i FROM t l LEFT JOIN t r ON l.i=r.i ORDER BY l.i, r.i; +-- +ok +== +SELECT "select" AS "same name", "select"::BIGINT AS "same name" +FROM (VALUES (1), (NULL), (1)) t("select") ORDER BY 1; +-- +ok +== +SELECT s, i FROM (VALUES ('first +FROM literal +last', 1), ('it''s a duck 🦆', 2)) t(s,i) ORDER BY i; +-- +ok +== +SELECT [i, NULL] AS l, {'number': i, 'text': 'a,b FROM x'} AS s FROM range(3) t(i) ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/explain_sql_roundtrip.test b/parser/testdata/corpus/sql/sql_export/explain_sql_roundtrip.test new file mode 100644 index 0000000..e1fe711 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/explain_sql_roundtrip.test @@ -0,0 +1,111 @@ +# source: test/sql/sql_export/explain_sql_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE explain_data(i INTEGER, g VARCHAR); +-- +ok +== +INSERT INTO explain_data VALUES (1,'a'), (1,'a'), (2,'b'), (NULL,'b'); +-- +ok +== +SELECT i,count(*) FROM explain_data GROUP BY i; +-- +ok +== +SELECT a.i,b.i FROM explain_data a JOIN explain_data b ON a.i=b.i; +-- +ok +== +SELECT i,row_number() OVER (ORDER BY i NULLS LAST) FROM explain_data ORDER BY 2; +-- +ok +== +SELECT i FROM explain_data ORDER BY i NULLS LAST LIMIT 2 OFFSET 1; +-- +ok +== +WITH c AS MATERIALIZED (SELECT i FROM explain_data) +SELECT a.i,b.i FROM c a JOIN c b ON a.i=b.i WHERE a.i=2; +-- +ok +== +WITH RECURSIVE c(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM c WHERE i<3) +SELECT i FROM c ORDER BY i; +-- +ok +== +SELECT i FROM explain_data UNION ALL SELECT 3; +-- +ok +== +SELECT i,(SELECT count(*) FROM explain_data b WHERE b.i=a.i) FROM explain_data a ORDER BY i NULLS LAST; +-- +ok +== +SELECT x,count(*) FROM explain_data, LATERAL (VALUES(i),(i)) v(x) GROUP BY x; +-- +ok +== +SELECT count(*),sum(i) FROM explain_data WHERE false; +-- +ok +== +SELECT count(*) FROM (DESCRIBE SELECT 1 AS n); +-- +ok +== +PIVOT (VALUES ('a',1),('a',2),('b',4)) t(k,v) ON k IN ('a','b') USING sum(v); +-- +ok +== +SELECT list_transform([1,NULL,3], lambda x: coalesce(x,0)+1); +-- +ok +== +SELECT {'items': [1,NULL], 'label': 'hello'}; +-- +ok +== +SELECT count(*) FROM range(1000) TABLESAMPLE BERNOULLI(50 PERCENT) REPEATABLE(42); +-- +ok +== +SELECT count(*) > 0 FROM duckdb_tables(); +-- +ok +== +COPY explain_data TO '{TEST_DIR}/explain_source.csv' (HEADER); +-- +ok +== +SELECT count(*),sum(i) FROM read_csv('{TEST_DIR}/explain_source.csv', header=true, delim=','); +-- +ok +== +SELECT count(*),sum(i) FROM read_csv('{TEST_DIR}/explain_source*.csv', header=true); +-- +ok +== +CREATE SEQUENCE explain_once; +-- +ok +== +SELECT nextval('explain_once'); +-- +ok +== +SELECT last_value FROM duckdb_sequences() WHERE sequence_name='explain_once'; +-- +ok +== +SELECT random() >= 0 AND random() < 1; +-- +ok +== +SELECT error('generated execution reached'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/explain_sql_scopes.test b/parser/testdata/corpus/sql/sql_export/explain_sql_scopes.test new file mode 100644 index 0000000..ae9b4ed --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/explain_sql_scopes.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/explain_sql_scopes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT 1; +-- +ok +== +EXPLAIN (SQL) SELECT NULL::INTEGER AS "null value", 2::BIGINT AS "two"; +-- +ok +== +SELECT 1 AS same, 2::BIGINT AS same; +-- +ok +== +SELECT i AS c1, j AS c0 FROM (VALUES (1, 30), (2, 10), (2, 10), (NULL, 20)) t(i,j) ORDER BY c0, c1 NULLS LAST LIMIT 3; +-- +ok +== +WITH RECURSIVE r(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM r WHERE i<3) SELECT i FROM r ORDER BY i; +-- +ok +== +SELECT i FROM (VALUES (1)) t(i) WHERE false; +-- +ok +== +CREATE SEQUENCE fromless_sequence; +-- +ok +== +SELECT nextval('fromless_sequence'), nextval('fromless_sequence'); +-- +ok +== +SELECT currval('fromless_sequence'); +-- +ok +== +SELECT 1 AS result UNION ALL SELECT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/expression_results.test b/parser/testdata/corpus/sql/sql_export/expression_results.test new file mode 100644 index 0000000..3acf9c9 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/expression_results.test @@ -0,0 +1,100 @@ +# source: test/sql/sql_export/expression_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT + to_base(42, 16), + to_base(42, 16, 5), + to_base(42, 16, NULL); +-- +ok +== +CREATE TABLE dates(ts TIMESTAMP); +-- +ok +== +INSERT INTO dates VALUES (TIMESTAMP '2024-02-29 12:34:56'), (NULL); +-- +ok +== +SELECT + date_part('year', ts), + date_part('dayofweek', ts), + date_part('microseconds', ts), + date_part('epoch', ts), + date_part('julian', ts) +FROM dates; +-- +ok +== +SELECT date_part(part, ts), datepart(part := part, ts := ts), date_part(ts := ts, part := 'year') +FROM dates, (VALUES ('year'), ('month')) parts(part); +-- +ok +== +EXPLAIN (SQL) SELECT date_part('year', ts) FROM dates; +-- +ok +== +EXPLAIN (SQL) SELECT date_part('dayofweek', ts) FROM dates; +-- +ok +== +EXPLAIN (SQL) SELECT date_part('microseconds', ts) FROM dates; +-- +ok +== +EXPLAIN (SQL) SELECT date_part('epoch', ts) FROM dates; +-- +ok +== +EXPLAIN (SQL) SELECT date_part('julian', ts) FROM dates; +-- +ok +== +SELECT alias(1) AS wanted; +-- +ok +== +SELECT alias(NULL) AS wanted; +-- +ok +== +SELECT alias(nextval('alias_effect')) AS wanted; +-- +ok +== +SELECT currval('alias_effect'); +-- +ok +== +SELECT + list_aggr(['a',NULL,'a'], 'string_agg', ' / '), + list_aggr([]::VARCHAR[], 'string_agg', ' / '), + list_aggr([1,2,2,NULL,4], 'quantile_disc', 0.25), + list_aggr([1,2,2,NULL,4], 'quantile_cont', [0.25,0.75]), + list_aggr([4,1,NULL,1,2], 'min', 2); +-- +ok +== +SELECT constant_or_null(42, i) FROM (VALUES (1), (NULL)) t(i); +-- +ok +== +CREATE TABLE lists(l INTEGER[], c INTEGER); +-- +ok +== +INSERT INTO lists VALUES ([10, 9, 8, 7, 6], 5); +-- +ok +== +SELECT list_transform(l, lambda x: list_transform(l, lambda y: x + y + c)) FROM lists; +-- +ok +== +SELECT list_transform(l, lambda x, i: x + c + CAST(i AS INTEGER)) FROM lists; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/function_result_types.test b/parser/testdata/corpus/sql/sql_export/function_result_types.test new file mode 100644 index 0000000..749a8e6 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/function_result_types.test @@ -0,0 +1,62 @@ +# source: test/sql/sql_export/function_result_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT abs(i) FROM (VALUES (-7), (NULL), (2), (-7)) t(i); +-- +ok +== +SELECT sum(i) FROM (VALUES (1), (NULL), (2), (2)) t(i); +-- +ok +== +SELECT + sum(i), + typeof(sum(i)) +FROM (VALUES (1.25::DECIMAL(9,2)), (2.50::DECIMAL(9,2)), (NULL::DECIMAL(9,2))) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT sum(i) FROM (VALUES (1.25::DECIMAL(9,2)), (2.50::DECIMAL(9,2)), (NULL::DECIMAL(9,2))) t(i); +-- +ok +== +VALUES ( + 1::UTINYINT, 2::UBIGINT, 3::DECIMAL(7,2), NULL::INTEGER, + [1,NULL,2]::INTEGER[], {'a': 1, 'b': 'x'}, + 'a''b', '2020-01-02'::DATE +); +-- +ok +== +DELETE FROM strings; +-- +ok +== +SELECT + (SELECT s FROM strings) COLLATE nocase, + (SELECT s FROM strings) COLLATE nocase = 'xxx'; +-- +ok +== +INSERT INTO strings VALUES ('XXX'); +-- +ok +== +INSERT INTO strings VALUES (NULL); +-- +ok +== +INSERT INTO strings VALUES ('a'); +-- +ok +== +SELECT (SELECT s FROM strings) COLLATE nocase; +-- +ok +== +SELECT quantile_cont(x, [0.0] ORDER BY x DESC), quantile_disc(x, [0.0] ORDER BY x DESC) FROM (VALUES (1), (2), (2), (NULL)) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/geometry_values.test b/parser/testdata/corpus/sql/sql_export/geometry_values.test new file mode 100644 index 0000000..6569180 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/geometry_values.test @@ -0,0 +1,68 @@ +# source: test/sql/sql_export/geometry_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT + ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS'), + typeof(ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')), + ST_SetCRS(NULL::GEOMETRY, 'GEäDCRS'), + typeof(ST_SetCRS(NULL::GEOMETRY, 'GEäDCRS')), + ST_SetCRS('POINT(0 1)'::GEOMETRY, 'unknown''crs'), + typeof(ST_SetCRS('POINT(0 1)'::GEOMETRY, 'unknown''crs')), + ST_SetCRS(NULL::GEOMETRY, 'unknown''crs'), + typeof(ST_SetCRS(NULL::GEOMETRY, 'unknown''crs')), + ST_SetCRS('POINT(0 1)'::GEOMETRY, 'EPSG:4326'), + typeof(ST_SetCRS('POINT(0 1)'::GEOMETRY, 'EPSG:4326')), + ST_SetCRS(NULL::GEOMETRY, 'EPSG:4326'), + typeof(ST_SetCRS(NULL::GEOMETRY, 'EPSG:4326')), + ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS'), + typeof(ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')), + [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS'),NULL], + typeof([ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS'),NULL]), + {'g': ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')}, + typeof({'g': ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')}), + map([1], [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')]), + typeof(map([1], [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')])); +-- +ok +== +SELECT + array_value(ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS'),NULL), + typeof(array_value(ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS'),NULL)), + list_slice([ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')],1,0), + typeof(list_slice([ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')],1,0)), + CASE WHEN false THEN [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')] ELSE NULL END, + typeof(CASE WHEN false THEN [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')] ELSE NULL END), + CASE WHEN false THEN ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') ELSE NULL END, + typeof(CASE WHEN false THEN ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') ELSE NULL END), + get_type([ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')]), + typeof(get_type([ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')])), + {'m': map([1], [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')])}, + typeof({'m': map([1], [ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS')])}); +-- +ok +== +SELECT first(g ORDER BY i), list(g ORDER BY i) FROM (SELECT i, ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') g FROM range(2) t(i)) q; +-- +ok +== +SELECT TRY_CAST(NULL::VARCHAR AS GEOMETRY('OGC:CRS84')), TRY_CAST('POINT(0 1)' AS GEOMETRY('OGC:CRS84')); +-- +ok +== +SELECT {window_function}(g) OVER () FROM (SELECT ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') g FROM range(2)) t; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT i, first_value(g) OVER w, last_value(g) OVER w, lag(g) OVER w, lead(g) OVER w, nth_value(g,2) OVER w +FROM (SELECT i, CASE WHEN i<2 THEN ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') END g FROM range(3) t(i)) q +WINDOW w AS (ORDER BY i) +ORDER BY i; +-- +ok +== +SELECT first_value([g]) OVER () FROM (SELECT ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') g FROM range(2)) t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/grouped_mark_roundtrip.test b/parser/testdata/corpus/sql/sql_export/grouped_mark_roundtrip.test new file mode 100644 index 0000000..e8b5688 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/grouped_mark_roundtrip.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/grouped_mark_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE probes(id INTEGER,g VARCHAR COLLATE nocase,h INTEGER[],v INTEGER); +-- +ok +== +INSERT INTO probes VALUES (0,'missing',[0],NULL),(1,'A',[1,NULL],NULL),(2,'a',[1,NULL],2),(3,'b',NULL,4),(4,NULL,[2],3),(5,'empty',[3],NULL); +-- +ok +== +CREATE TABLE candidates(g VARCHAR COLLATE nocase,h INTEGER[],v INTEGER); +-- +ok +== +INSERT INTO candidates VALUES ('a',[1,NULL],2),('a',[1,NULL],NULL),('B',NULL,4),(NULL,[2],3),(NULL,[2],3); +-- +ok +== +SELECT id,v IN (SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) FROM probes p ORDER BY id; +-- +ok +== +SELECT id,v NOT IN (SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) FROM probes p ORDER BY id; +-- +ok +== +WITH actual AS (SELECT id,v {comparison} ANY(SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM probes p), expected AS (SELECT id,(SELECT CASE WHEN bool_or(p.v {comparison} c.v) THEN true WHEN bool_or((p.v {comparison} c.v) IS NULL) THEN NULL ELSE false END FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM probes p) SELECT count(*) FROM actual a JOIN expected e USING(id) WHERE a.m IS DISTINCT FROM e.m; +-- +error: Parser Error: syntax error at or near "{" +== +WITH actual AS (SELECT id,v {comparison} ALL(SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM probes p), expected AS (SELECT id,(SELECT CASE WHEN bool_or(NOT (p.v {comparison} c.v)) THEN false WHEN bool_or((p.v {comparison} c.v) IS NULL) THEN NULL ELSE true END FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) m FROM probes p) SELECT count(*) FROM actual a JOIN expected e USING(id) WHERE a.m IS DISTINCT FROM e.m; +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO candidates SELECT 'a',[1,NULL],CASE WHEN i%3=0 THEN NULL ELSE 2 END FROM range(8192) t(i); +-- +ok +== +SELECT id,v=ANY(SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g AND p.h IS NOT DISTINCT FROM c.h) FROM probes p ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/icu_datepart_roundtrip.test b/parser/testdata/corpus/sql/sql_export/icu_datepart_roundtrip.test new file mode 100644 index 0000000..a6e9538 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/icu_datepart_roundtrip.test @@ -0,0 +1,180 @@ +# source: test/sql/sql_export/icu_datepart_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE export_dates(id INTEGER, part VARCHAR, ts TIMESTAMPTZ); +-- +ok +== +INSERT INTO export_dates VALUES (0,'hour','1969-12-31 23:59:59.125+00'), + (1,'epoch','2000-02-29 12:34:56.125+00'), + (2,NULL,NULL); +-- +ok +== +EXPLAIN (SQL) SELECT date_part('hour',ts) FROM export_dates; +-- +ok +== +EXPLAIN (SQL) SELECT datepart('epoch',ts) FROM export_dates; +-- +ok +== +EXPLAIN (SQL) SELECT date_part('dow',ts) FROM export_dates; +-- +ok +== +EXPLAIN (SQL) SELECT date_part(part,ts) FROM export_dates; +-- +ok +== +SELECT date_part('hour',to_timestamp(i)) FROM range(2) t(i); +-- +ok +== +SELECT date_part('hour',ts),datepart('microseconds',ts),extract(doy FROM ts) +FROM export_dates ORDER BY id; +-- +ok +== +SELECT date_part('epoch',ts),date_part(part,ts) FROM export_dates ORDER BY id; +-- +ok +== +SELECT typeof(date_part('hour',ts)),typeof(date_part('epoch',ts)) FROM export_dates LIMIT 1; +-- +ok +== +SELECT date_part(NULL::VARCHAR,ts) FROM export_dates ORDER BY id; +-- +ok +== +SET TimeZone='{timezone}'; +-- +ok +== +SELECT count(*) FROM export_dates WHERE +date_part('hour',ts) IS DISTINCT FROM hour(ts) +OR date_part('dow',ts) IS DISTINCT FROM dayofweek(ts) +OR datepart('doy',ts) IS DISTINCT FROM dayofyear(ts) +OR date_part('milliseconds',ts) IS DISTINCT FROM millisecond(ts) +OR date_part('microseconds',ts) IS DISTINCT FROM microsecond(ts) +OR date_part('julian',ts) IS DISTINCT FROM julian(ts) +OR date_part('epoch',ts) IS DISTINCT FROM epoch(ts); +-- +ok +== +SELECT count(*) FROM export_dates WHERE +datepart(ts := ts, part := 'hour') IS DISTINCT FROM hour(ts) +OR date_part(part := part, ts := ts) IS DISTINCT FROM + CASE part WHEN 'hour' THEN hour(ts)::DOUBLE WHEN 'epoch' THEN epoch(ts) END; +-- +ok +== +SELECT count(*) FROM export_dates WHERE +date_part(['year','hour'],ts).hour IS DISTINCT FROM hour(ts); +-- +ok +== +SET Calendar='{calendar}'; +-- +ok +== +SET debug_verify_serializer={serialize}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM export_dates WHERE +date_part('year',ts) IS DISTINCT FROM year(ts) +OR date_part('epoch',ts) IS DISTINCT FROM epoch(ts); +-- +ok +== +RESET Calendar; +-- +ok +== +CREATE MACRO hour(ts) AS 999; +-- +ok +== +SELECT date_part('hour',ts) FROM export_dates ORDER BY id; +-- +ok +== +DROP MACRO hour; +-- +ok +== +PREPARE exported_part AS SELECT date_part($1,ts) FROM export_dates ORDER BY id; +-- +ok +== +EXECUTE exported_part('hour'); +-- +ok +== +EXECUTE exported_part('epoch'); +-- +ok +== +CREATE TABLE boundary_dates AS +SELECT i AS id, TIMESTAMPTZ '1999-12-20 00:00:00+00' + i * INTERVAL 1 DAY AS ts FROM range(800) t(i); +-- +ok +== +INSERT INTO boundary_dates VALUES (800,NULL),(801,'infinity'),(802,'-infinity'); +-- +ok +== +SELECT count(*) FROM boundary_dates +WHERE date_part('ho' || 'ur',ts) IS DISTINCT FROM hour(ts) +OR date_part('epoch',ts) IS DISTINCT FROM epoch(ts); +-- +ok +== +SELECT typeof(date_part('hour',NULL::TIMESTAMPTZ)), + typeof(date_part('hour',TIMESTAMPTZ 'infinity')), + typeof(date_part('epoch',TIMESTAMPTZ '-infinity')); +-- +ok +== +CREATE TEMP TABLE expected_parts AS +SELECT 'isoyear' AS part,id FROM boundary_dates WHERE isoyear(ts)=2000 +UNION ALL SELECT 'yearweek',id FROM boundary_dates WHERE yearweek(ts)=199952 +UNION ALL SELECT 'century',id FROM boundary_dates WHERE century(ts)=20 +UNION ALL SELECT 'millennium',id FROM boundary_dates WHERE millennium(ts)=2 +UNION ALL SELECT 'era',id FROM boundary_dates WHERE era(ts)=1; +-- +ok +== +CREATE TEMP TABLE actual_parts AS +SELECT 'isoyear' AS part,id FROM boundary_dates WHERE date_part('isoyear',ts)=2000 +UNION ALL SELECT 'yearweek',id FROM boundary_dates WHERE date_part('yearweek',ts)=199952 +UNION ALL SELECT 'century',id FROM boundary_dates WHERE date_part('century',ts)=20 +UNION ALL SELECT 'millennium',id FROM boundary_dates WHERE date_part('millennium',ts)=2 +UNION ALL SELECT 'era',id FROM boundary_dates WHERE date_part('era',ts)=1; +-- +ok +== +SELECT count(DISTINCT part) FROM expected_parts; +-- +ok +== +SELECT count(*) FROM ( + (SELECT * FROM actual_parts EXCEPT ALL SELECT * FROM expected_parts) + UNION ALL + (SELECT * FROM expected_parts EXCEPT ALL SELECT * FROM actual_parts) +); +-- +ok +== +DROP TABLE actual_parts; +-- +ok +== +DROP TABLE expected_parts; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/join_multiplicities.test b/parser/testdata/corpus/sql/sql_export/join_multiplicities.test new file mode 100644 index 0000000..ec70e5e --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/join_multiplicities.test @@ -0,0 +1,125 @@ +# source: test/sql/sql_export/join_multiplicities.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) CROSS JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y); +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) POSITIONAL JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y); +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) INNER JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) LEFT JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) RIGHT JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) FULL JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) SEMI JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) ANTI JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) JOIN BY (TYPE right_semi) (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) JOIN BY (TYPE right_anti) (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) JOIN BY (TYPE mark) (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) JOIN BY (TYPE single) (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) ASOF LEFT JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a>=b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,20),(NULL,30)) l(a,x) INNER JOIN (VALUES (2,20),(3,30),(NULL,40)) r(b,y) ON a IS NOT DISTINCT FROM b; +-- +ok +== +SELECT * FROM (VALUES (1,10),(2,20),(2,20),(NULL,30)) l(a,x) INNER JOIN (VALUES (2,20),(3,30),(NULL,40)) r(b,y) ON a=b AND x=4096 THEN CAST(error('grouped mark stream') AS BIGINT) ELSE nextval('seq') END,x=ANY(SELECT y FROM r WHERE r.g=l.g) m FROM l; +-- +ok +== +EXPLAIN (SQL) SELECT i,CASE WHEN i>=4096 THEN CAST(error('grouped mark stream') AS BIGINT) ELSE nextval('seq') END,x=ANY(SELECT y FROM r WHERE r.g=l.g) m FROM l LIMIT 1; +-- +ok +== +CREATE OR REPLACE SEQUENCE mark_copy_guard; +-- +ok +== +EXPLAIN (SQL) SELECT nextval('mark_copy_guard'),x=ANY(SELECT y FROM list_r r WHERE r.g=l.g) FROM list_l l; +-- +ok +== +SELECT last_value FROM duckdb_sequences() WHERE sequence_name='mark_copy_guard'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/mark_nested_comparison_roundtrip.test b/parser/testdata/corpus/sql/sql_export/mark_nested_comparison_roundtrip.test new file mode 100644 index 0000000..1c1e4f6 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/mark_nested_comparison_roundtrip.test @@ -0,0 +1,185 @@ +# source: test/sql/sql_export/mark_nested_comparison_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k = b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k < b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k <= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k > b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k >= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k IS DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2)),(2,row(2,1)),(3,row(1,2)),(4,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (VALUES (row(1,2)),(row(1,2)),(row(1,NULL::INTEGER))) b(k) ON p.k IS NOT DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k = b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k < b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k <= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k > b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k >= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k IS DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k IS NOT DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k = b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k < b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k <= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k > b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k >= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k IS DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k IS NOT DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k = b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k < b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k <= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k > b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k >= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k IS DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1),(2,2),(3,1),(4,NULL::INTEGER)) p(id,k) JOIN BY(TYPE MARK) (VALUES (1),(1),(NULL::INTEGER)) b(k) ON p.k IS NOT DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k = b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k < b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k <= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k > b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k >= b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k IS DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k IS NOT DISTINCT FROM b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1)) p(id,k) JOIN BY(TYPE MARK) (VALUES (2),(2)) b(k) ON p.k IS DISTINCT FROM 2; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1)) p(id,k) JOIN BY(TYPE MARK) (VALUES (2),(2)) b(k) ON p.k IS DISTINCT FROM NULL::INTEGER; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER),(1,1)) p(id,k) JOIN BY(TYPE MARK) (VALUES (2),(2)) b(k) ON 2 IS DISTINCT FROM p.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2))) p(id,k) JOIN BY(TYPE MARK) (VALUES (2),(2)) b(k) ON p.k < row(1,NULL::INTEGER); +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,2))) p(id,k) JOIN BY(TYPE MARK) (VALUES (2),(2)) b(k) ON row(1,NULL::INTEGER) > p.k; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/mark_results.test b/parser/testdata/corpus/sql/sql_export/mark_results.test new file mode 100644 index 0000000..ddab65d --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/mark_results.test @@ -0,0 +1,177 @@ +# source: test/sql/sql_export/mark_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1 = ANY(SELECT 2); +-- +ok +== +SELECT 'ABC' COLLATE nocase IN (SELECT 'aBc'); +-- +ok +== +SELECT 1 = ANY(SELECT 1 WHERE false); +-- +ok +== +SELECT 1 = ANY(SELECT NULL::INTEGER); +-- +ok +== +SELECT 1 NOT IN (VALUES (2),(NULL)); +-- +ok +== +SELECT 1 WHERE (1,2) IN (SELECT 1,2); +-- +ok +== +SELECT 1 WHERE (1,2) IN (VALUES (1,2),(1,2),(NULL,2)); +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (NULL::INTEGER)) l(a) JOIN BY (TYPE MARK) (VALUES (2)) r(b) ON a IS DISTINCT FROM 2; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (NULL::INTEGER)) l(a) JOIN BY (TYPE MARK) (VALUES (2)) r(b) ON a IS DISTINCT FROM NULL::INTEGER; +-- +ok +== +CREATE TABLE mark_probe(id INTEGER,label VARCHAR,a INTEGER,c INTEGER); +-- +ok +== +INSERT INTO mark_probe VALUES (0,'null',NULL,NULL),(1,'one',1,NULL),(2,'two',2,2); +-- +ok +== +CREATE TABLE mark_build(b INTEGER,d INTEGER); +-- +ok +== +INSERT INTO mark_build VALUES (1,NULL); +-- +ok +== +SELECT label,id,a IN (SELECT b FROM mark_build WHERE c+d>0) FROM mark_probe; +-- +ok +== +DELETE FROM mark_build; +-- +ok +== +DROP TABLE IF EXISTS l; +-- +ok +== +DROP TABLE IF EXISTS r; +-- +ok +== +CREATE TABLE l(g DOUBLE,k INTEGER,x INTEGER); +-- +ok +== +CREATE TABLE r(g DOUBLE,k INTEGER,y INTEGER); +-- +ok +== +INSERT INTO l SELECT g,k,v FROM (VALUES (1,1,10),(1,1,10),(1,1,20),(1,1,NULL),(1,2,10),(1,2,NULL),(1,3,NULL),(2,1,20),(NULL,1,10),(NULL,1,NULL),(1,NULL,20),(NULL,NULL,NULL)) t(g,k,v); +-- +ok +== +INSERT INTO r SELECT g,k,v FROM (VALUES (1,1,10),(1,1,10),(1,1,NULL),(1,2,NULL),(2,1,10),(NULL,1,10),(1,NULL,NULL)) t(g,k,v); +-- +ok +== +SELECT o.g,o.k,o.x,o.x=ANY(SELECT r.y FROM r WHERE r.g=o.g AND r.k=o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x=ANY(SELECT r.y FROM r WHERE r.g IS NOT DISTINCT FROM o.g AND r.k IS NOT DISTINCT FROM o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x<>ANY(SELECT r.y FROM r WHERE r.g=o.g AND r.k=o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x<>ANY(SELECT r.y FROM r WHERE r.g IS NOT DISTINCT FROM o.g AND r.k IS NOT DISTINCT FROM o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x=ALL(SELECT r.y FROM r WHERE r.g=o.g AND r.k=o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x=ALL(SELECT r.y FROM r WHERE r.g IS NOT DISTINCT FROM o.g AND r.k IS NOT DISTINCT FROM o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x<>ALL(SELECT r.y FROM r WHERE r.g=o.g AND r.k=o.k) m FROM l o; +-- +ok +== +SELECT o.g,o.k,o.x,o.x<>ALL(SELECT r.y FROM r WHERE r.g IS NOT DISTINCT FROM o.g AND r.k IS NOT DISTINCT FROM o.k) m FROM l o; +-- +ok +== +CREATE TABLE l(g DOUBLE,k INTEGER,x DECIMAL(9,2)); +-- +ok +== +CREATE TABLE r(g DOUBLE,k INTEGER,y DECIMAL(9,2)); +-- +ok +== +CREATE TABLE l(g DOUBLE,k INTEGER,x INTEGER[]); +-- +ok +== +CREATE TABLE r(g DOUBLE,k INTEGER,y INTEGER[]); +-- +ok +== +INSERT INTO l SELECT g,k,CASE WHEN v IS NULL THEN NULL ELSE [v,NULL] END FROM (VALUES (1,1,10),(1,1,10),(1,1,20),(1,1,NULL),(1,2,10),(1,2,NULL),(1,3,NULL),(2,1,20),(NULL,1,10),(NULL,1,NULL),(1,NULL,20),(NULL,NULL,NULL)) t(g,k,v); +-- +ok +== +INSERT INTO r SELECT g,k,CASE WHEN v IS NULL THEN NULL ELSE [v,NULL] END FROM (VALUES (1,1,10),(1,1,10),(1,1,NULL),(1,2,NULL),(2,1,10),(NULL,1,10),(1,NULL,NULL)) t(g,k,v); +-- +ok +== +CREATE TABLE l(g DOUBLE,k INTEGER,x STRUCT(v INTEGER)); +-- +ok +== +CREATE TABLE r(g DOUBLE,k INTEGER,y STRUCT(v INTEGER)); +-- +ok +== +INSERT INTO l SELECT g,k,CASE WHEN v IS NULL THEN NULL ELSE {'v':v} END FROM (VALUES (1,1,10),(1,1,10),(1,1,20),(1,1,NULL),(1,2,10),(1,2,NULL),(1,3,NULL),(2,1,20),(NULL,1,10),(NULL,1,NULL),(1,NULL,20),(NULL,NULL,NULL)) t(g,k,v); +-- +ok +== +INSERT INTO r SELECT g,k,CASE WHEN v IS NULL THEN NULL ELSE {'v':v} END FROM (VALUES (1,1,10),(1,1,10),(1,1,NULL),(1,2,NULL),(2,1,10),(NULL,1,10),(1,NULL,NULL)) t(g,k,v); +-- +ok +== +CREATE TABLE l(g DOUBLE,k INTEGER,x VARCHAR COLLATE nocase); +-- +ok +== +CREATE TABLE r(g DOUBLE,k INTEGER,y VARCHAR COLLATE nocase); +-- +ok +== +INSERT INTO l SELECT g,k,CASE v WHEN 10 THEN 'a' WHEN 20 THEN 'B' ELSE NULL END FROM (VALUES (1,1,10),(1,1,10),(1,1,20),(1,1,NULL),(1,2,10),(1,2,NULL),(1,3,NULL),(2,1,20),(NULL,1,10),(NULL,1,NULL),(1,NULL,20),(NULL,NULL,NULL)) t(g,k,v); +-- +ok +== +INSERT INTO r SELECT g,k,CASE v WHEN 10 THEN 'a' WHEN 20 THEN 'B' ELSE NULL END FROM (VALUES (1,1,10),(1,1,10),(1,1,NULL),(1,2,NULL),(2,1,10),(NULL,1,10),(1,NULL,NULL)) t(g,k,v); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/mark_strategies.test b/parser/testdata/corpus/sql/sql_export/mark_strategies.test new file mode 100644 index 0000000..2f0e745 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/mark_strategies.test @@ -0,0 +1,97 @@ +# source: test/sql/sql_export/mark_strategies.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET merge_join_threshold=0; +-- +ok +== +SET prefer_range_joins=true; +-- +ok +== +EXPLAIN SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a=b ORDER BY a NULLS LAST; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a=b ORDER BY a NULLS LAST; +-- +ok +== +EXPLAIN SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a IS NOT DISTINCT FROM b ORDER BY a NULLS LAST; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a IS NOT DISTINCT FROM b ORDER BY a NULLS LAST; +-- +ok +== +EXPLAIN SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a=b AND c=d ORDER BY a NULLS LAST; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a=b AND c=d ORDER BY a NULLS LAST; +-- +ok +== +EXPLAIN SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a IS NOT DISTINCT FROM b AND c IS NOT DISTINCT FROM d ORDER BY a NULLS LAST; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a IS NOT DISTINCT FROM b AND c IS NOT DISTINCT FROM d ORDER BY a NULLS LAST; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a IS NOT DISTINCT FROM b AND c=d ORDER BY a NULLS LAST; +-- +ok +== +SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a IS NOT DISTINCT FROM b AND cr.y ORDER BY l.g; +-- +ok +== +CREATE OR REPLACE TABLE nested_l(g INTEGER,x STRUCT(v INTEGER)); +-- +ok +== +CREATE OR REPLACE TABLE nested_r(g INTEGER,y STRUCT(v INTEGER)); +-- +ok +== +SELECT a,c,b,d FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON ad; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/named_scalar_arguments.test b/parser/testdata/corpus/sql/sql_export/named_scalar_arguments.test new file mode 100644 index 0000000..f5a69bb --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/named_scalar_arguments.test @@ -0,0 +1,25 @@ +# source: test/sql/sql_export/named_scalar_arguments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT struct_insert(s, "named column" := j, "constant field" := 7, "list field" := l, "nested field" := n) FROM (VALUES ({'a': 1, 'MiXeD': [2]}, 2, [2, NULL]::INTEGER[], {'items': [2, NULL]::INTEGER[]}), ({'a': 1, 'MiXeD': [2]}, 2, [2, NULL]::INTEGER[], {'items': [2, NULL]::INTEGER[]}), ({'a': NULL, 'MiXeD': NULL::INTEGER[]}, NULL, NULL::INTEGER[], {'items': NULL::INTEGER[]})) src(s, j, l, n); +-- +ok +== +EXPLAIN (SQL) SELECT struct_insert(s, "named column" := j, "constant field" := 7, "list field" := l, "nested field" := n) FROM (VALUES ({'a': 1, 'MiXeD': [2]}, 2, [2, NULL]::INTEGER[], {'items': [2, NULL]::INTEGER[]}), ({'a': 1, 'MiXeD': [2]}, 2, [2, NULL]::INTEGER[], {'items': [2, NULL]::INTEGER[]}), ({'a': NULL, 'MiXeD': NULL::INTEGER[]}, NULL, NULL::INTEGER[], {'items': NULL::INTEGER[]})) src(s, j, l, n); +-- +ok +== +SELECT struct_pack("named field" := 1, null_field := NULL::INTEGER), row(1, NULL::INTEGER), struct_update({'old': 1}, old := 2, "new field" := NULL::INTEGER), write_log('ignored', disable_logging := true, return_value := 42); +-- +ok +== +EXPLAIN (SQL) SELECT struct_pack("named field" := 1, null_field := NULL::INTEGER), row(1, NULL::INTEGER), struct_update({'old': 1}, old := 2, "new field" := NULL::INTEGER), write_log('ignored', disable_logging := true, return_value := 42); +-- +ok +== +EXPLAIN (SQL) SELECT struct_insert({'a':1}, "A" := 2); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/nested_collated_nulls.test b/parser/testdata/corpus/sql/sql_export/nested_collated_nulls.test new file mode 100644 index 0000000..48ecf36 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/nested_collated_nulls.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/nested_collated_nulls.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CASE WHEN false THEN ['x' COLLATE nocase] ELSE NULL END AS v; +-- +ok +== +EXPLAIN (SQL) SELECT CASE WHEN false THEN ['x' COLLATE nocase] ELSE NULL END AS v; +-- +ok +== +SELECT CASE WHEN false THEN array_value('x' COLLATE nocase,'y' COLLATE nocase) ELSE NULL END AS v; +-- +ok +== +EXPLAIN (SQL) SELECT CASE WHEN false THEN array_value('x' COLLATE nocase,'y' COLLATE nocase) ELSE NULL END AS v; +-- +ok +== +SELECT CASE WHEN false THEN [['x' COLLATE nocase]] ELSE NULL END AS v; +-- +ok +== +EXPLAIN (SQL) SELECT CASE WHEN false THEN [['x' COLLATE nocase]] ELSE NULL END AS v; +-- +ok +== +SELECT CASE WHEN false THEN {'s': 'x' COLLATE nocase} ELSE NULL END AS v; +-- +ok +== +EXPLAIN (SQL) SELECT CASE WHEN false THEN {'s': 'x' COLLATE nocase} ELSE NULL END AS v; +-- +ok +== +SELECT CASE WHEN false THEN map([1],['x' COLLATE nocase]) ELSE NULL END AS v; +-- +ok +== +EXPLAIN (SQL) SELECT CASE WHEN false THEN map([1],['x' COLLATE nocase]) ELSE NULL END AS v; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/nested_collations.test b/parser/testdata/corpus/sql/sql_export/nested_collations.test new file mode 100644 index 0000000..2a012b9 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/nested_collations.test @@ -0,0 +1,57 @@ +# source: test/sql/sql_export/nested_collations.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE nested_input(id INTEGER, l VARCHAR[], needle VARCHAR COLLATE nocase); +-- +ok +== +INSERT INTO nested_input VALUES (1, ['Apple','Banana'], 'banana'), + (2, ['Cherry','date'], 'DATE'), (3, [NULL,'Egg'], NULL); +-- +ok +== +CREATE SEQUENCE collation_seq; +-- +ok +== +SELECT id, list_contains(l, needle), list_position(l, needle) FROM nested_input ORDER BY id +-- +ok +== +SELECT list_contains([needle], 'BANANA'), list_position([needle], 'BANANA') FROM nested_input WHERE id=1 +-- +ok +== +SELECT ['A' COLLATE nocase, NULL], array_value('A' COLLATE nocase), {'v': 'A' COLLATE nocase} +-- +ok +== +SELECT CASE WHEN false THEN ['A' COLLATE nocase] ELSE NULL END, + CASE WHEN false THEN ['A' COLLATE nocase] ELSE [] END +-- +ok +== +WITH RECURSIVE t(k,v) USING KEY(k,min(v)) AS ( + SELECT array_value('a' COLLATE nocase), 2 + UNION + SELECT array_value('A' COLLATE nocase), v-1 FROM t WHERE v>0 +) +SELECT count(*),min(v),min(k[1]) FROM t +-- +ok +== +SELECT cast_to_type(['A'], array_value('x' COLLATE nocase))[1]='a', + (array_value('A' COLLATE nocase)::VARCHAR[])[1]='a' +-- +ok +== +SELECT list_transform([1,2], lambda x: CAST(nextval('collation_seq') AS VARCHAR) COLLATE nocase) +-- +ok +== +SELECT currval('collation_seq') +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/nested_result_collation.test b/parser/testdata/corpus/sql/sql_export/nested_result_collation.test new file mode 100644 index 0000000..9efafed --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/nested_result_collation.test @@ -0,0 +1,149 @@ +# source: test/sql/sql_export/nested_result_collation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT i,CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +SELECT i,CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +EXPLAIN (SQL) SELECT min(v),max(v) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +SELECT min(v),max(v) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +EXPLAIN (SQL) SELECT i,CASE WHEN i=4 THEN NULL ELSE row(s COLLATE NOCASE,i % 2) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +SELECT i,CASE WHEN i=4 THEN NULL ELSE row(s COLLATE NOCASE,i % 2) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE row(s COLLATE NOCASE,i % 2) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE row(s COLLATE NOCASE,i % 2) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +EXPLAIN (SQL) SELECT i,CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +SELECT i,CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +EXPLAIN (SQL) SELECT min(v),max(v) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +SELECT min(v),max(v) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +EXPLAIN (SQL) SELECT i,CASE WHEN i=4 THEN NULL ELSE array_value(s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +SELECT i,CASE WHEN i=4 THEN NULL ELSE array_value(s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE array_value(s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE array_value(s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +EXPLAIN (SQL) SELECT min(v),max(v) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE array_value(s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +SELECT min(v),max(v) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE array_value(s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +EXPLAIN (SQL) SELECT i,CASE WHEN i=4 THEN NULL ELSE map(['v'],[s COLLATE NOCASE]) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +SELECT i,CASE WHEN i=4 THEN NULL ELSE map(['v'],[s COLLATE NOCASE]) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE map(['v'],[s COLLATE NOCASE]) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +SELECT v,count(*) FROM (SELECT CASE WHEN i=4 THEN NULL ELSE map(['v'],[s COLLATE NOCASE]) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) GROUP BY v ORDER BY v; +-- +ok +== +EXPLAIN (SQL) SELECT count(v.v), count(*) FILTER (WHERE v.v='a') FROM (SELECT CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +SELECT count(v.v), count(*) FILTER (WHERE v.v='a') FROM (SELECT CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +EXPLAIN (SQL) SELECT count(v[1]), count(*) FILTER (WHERE v[1]='a') FROM (SELECT CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +SELECT count(v[1]), count(*) FILTER (WHERE v[1]='a') FROM (SELECT CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)); +-- +ok +== +EXPLAIN (SQL) SELECT unnest([CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END]) FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY ALL; +-- +ok +== +SELECT unnest([CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END]) FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY ALL; +-- +ok +== +EXPLAIN (SQL) SELECT first_value(v) OVER (ORDER BY i), last_value(v) OVER (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM (SELECT i, CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) ORDER BY i; +-- +ok +== +SELECT first_value(v) OVER (ORDER BY i), last_value(v) OVER (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM (SELECT i, CASE WHEN i=4 THEN NULL ELSE struct_pack(v := s COLLATE NOCASE) END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s)) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT cast_to_type(['A'], array_value('x' COLLATE nocase))[1]='a', (array_value('A' COLLATE nocase)::VARCHAR[])[1]='a'; +-- +ok +== +SELECT cast_to_type(['A'], array_value('x' COLLATE nocase))[1]='a', (array_value('A' COLLATE nocase)::VARCHAR[])[1]='a'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/nested_values.test b/parser/testdata/corpus/sql/sql_export/nested_values.test new file mode 100644 index 0000000..c2f7464 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/nested_values.test @@ -0,0 +1,29 @@ +# source: test/sql/sql_export/nested_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE struct_insert_input AS SELECT * FROM (VALUES + (0, {'a': 1, 'MiXeD': [2]}, 2, [2, NULL]::INTEGER[], {'items': [2, NULL]::INTEGER[]}), + (1, {'a': 1, 'MiXeD': [2]}, 2, [2, NULL]::INTEGER[], {'items': [2, NULL]::INTEGER[]}), + (2, {'a': NULL, 'MiXeD': NULL::INTEGER[]}, NULL, NULL::INTEGER[], {'items': NULL::INTEGER[]}) +) src(id, s, j, l, n); +-- +ok +== +SELECT row(i, s), list_zip([i, NULL], [s, NULL]), row(i, s) = row(j, t) AS equal +FROM (VALUES (1, 'a', 1, 'a'), (2, NULL, 2, NULL), (NULL, 'b', NULL, 'b'), (1, 'a', 2, 'a')) v(i, s, j, t) +ORDER BY i NULLS LAST, s NULLS LAST, j NULLS LAST +-- +ok +== +SELECT id, struct_insert(s, "constant field" := 7) FROM struct_insert_input ORDER BY id +-- +ok +== +SELECT id, struct_insert(s, "named column" := j, "constant field" := 7, + "list field" := l, "nested field" := n) +FROM struct_insert_input ORDER BY id +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/null_safe_mark_roundtrip.test b/parser/testdata/corpus/sql/sql_export/null_safe_mark_roundtrip.test new file mode 100644 index 0000000..20d1283 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/null_safe_mark_roundtrip.test @@ -0,0 +1,78 @@ +# source: test/sql/sql_export/null_safe_mark_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT i AS order_key, (i * 7 + j) % 13 AS supplier_key, (i + j) % 5 AS receipt, 2 AS committed + FROM range(200) r(i), range(3) m(j)) TO '{TEST_DIR}/lines.parquet' (FORMAT parquet); +-- +ok +== +COPY (SELECT i AS supplier_key, 'supplier_' || i AS name FROM range(13) r(i)) +TO '{TEST_DIR}/suppliers.parquet' (FORMAT parquet); +-- +ok +== +CREATE VIEW lines AS FROM read_parquet('{TEST_DIR}/lines.parquet'); +-- +ok +== +CREATE VIEW suppliers AS FROM read_parquet('{TEST_DIR}/suppliers.parquet'); +-- +ok +== +SELECT s.name, count(*) AS waiting +FROM suppliers s, lines l1 +WHERE s.supplier_key = l1.supplier_key AND l1.receipt > l1.committed + AND EXISTS (SELECT * FROM lines l2 WHERE l2.order_key = l1.order_key AND l2.supplier_key <> l1.supplier_key) + AND NOT EXISTS (SELECT * FROM lines l3 WHERE l3.order_key >= l1.order_key + 190 + AND l3.supplier_key <> l1.supplier_key AND l3.receipt > l3.committed) +GROUP BY s.name ORDER BY waiting DESC, s.name LIMIT 5; +-- +ok +== +CREATE TABLE probes(id INTEGER, g VARCHAR COLLATE nocase, v INTEGER[], w INTEGER); +-- +ok +== +INSERT INTO probes VALUES (0,'A',[1,NULL],0),(1,'a',NULL,NULL),(2,NULL,[2],1), + (3,'missing',NULL,0),(4,'b',[3],2),(5,'A',[1,NULL],0); +-- +ok +== +CREATE TABLE candidates(g VARCHAR COLLATE nocase, v INTEGER[], w INTEGER); +-- +ok +== +INSERT INTO candidates VALUES ('a',[1,NULL],0),('A',NULL,1),(NULL,NULL,2), + ('B',[3],2),('a',[1,NULL],0); +-- +ok +== +SELECT id,__mark_join_marker FROM probes p JOIN BY(TYPE MARK) candidates c +ON p.g IS NOT DISTINCT FROM c.g AND p.v IS DISTINCT FROM c.v ORDER BY id; +-- +ok +== +SELECT id,__mark_join_marker FROM probes p JOIN BY(TYPE MARK) candidates c +ON p.v IS DISTINCT FROM c.v AND p.w IS DISTINCT FROM c.w +AND p.g IS NOT DISTINCT FROM c.g ORDER BY id; +-- +ok +== +SELECT id,__mark_join_marker FROM probes p +JOIN BY(TYPE MARK) (SELECT * FROM candidates WHERE false) c +ON p.g IS NOT DISTINCT FROM c.g AND p.v IS DISTINCT FROM c.v ORDER BY id; +-- +ok +== +SELECT __mark_join_marker FROM probes p JOIN BY(TYPE MARK) candidates c +ON p.g=c.g AND p.v IS DISTINCT FROM c.v; +-- +ok +== +SELECT __mark_join_marker FROM probes p JOIN BY(TYPE MARK) candidates c +ON p.g IS DISTINCT FROM c.g AND p.v IS DISTINCT FROM c.v; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/numbered_scan_results.test b/parser/testdata/corpus/sql/sql_export/numbered_scan_results.test new file mode 100644 index 0000000..246ac4a --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/numbered_scan_results.test @@ -0,0 +1,85 @@ +# source: test/sql/sql_export/numbered_scan_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +DROP TABLE IF EXISTS numbered_scan; +-- +ok +== +CREATE TABLE numbered_scan AS SELECT i, (i%7)::INTEGER v, {'x':i,'y':i::VARCHAR} s FROM range(300000)t(i); +-- +ok +== +DELETE FROM numbered_scan WHERE i%5=1; +-- +ok +== +INSERT INTO numbered_scan SELECT i,(i%7)::INTEGER,{'x':i,'y':i::VARCHAR} FROM range(300000,300017)t(i); +-- +ok +== +SELECT * FROM (SELECT i,v,row_number() OVER () n FROM numbered_scan) WHERE i<10 ORDER BY i; +-- +ok +== +SELECT * FROM (SELECT i,v,row_number() OVER () n FROM numbered_scan) WHERE i>=299990 ORDER BY i; +-- +ok +== +SELECT * FROM (SELECT i,rowid,row_number() OVER () n FROM numbered_scan) WHERE i>=299990 ORDER BY i; +-- +ok +== +SELECT * FROM (SELECT s.x,row_number() OVER () n FROM numbered_scan) LIMIT 4097; +-- +ok +== +SELECT row_number() OVER () n FROM numbered_scan LIMIT 1; +-- +ok +== +SELECT i,n,n FROM (SELECT i,row_number() OVER () n FROM numbered_scan) LIMIT 3; +-- +ok +== +CREATE TABLE offset_rows AS SELECT i::INTEGER AS i FROM range(245760) t(i); +-- +ok +== +INSERT INTO offset_rows VALUES (-1); +-- +ok +== +SELECT i FROM offset_rows ORDER BY i LIMIT 1 OFFSET 1; +-- +ok +== +SELECT i FROM offset_rows ORDER BY i LIMIT 1 OFFSET 122880; +-- +ok +== +SELECT i FROM offset_rows ORDER BY i OFFSET 200000; +-- +ok +== +CREATE TABLE hinted_scan AS SELECT i,i%7 v FROM range(100)t(i); +-- +ok +== +SELECT i,v FROM hinted_scan WHERE i>50; +-- +ok +== +SELECT first(n) FROM (SELECT i,row_number() OVER () n FROM hinted_scan) WHERE i>50; +-- +ok +== +CREATE TABLE hint_groups AS SELECT i,CASE WHEN i<122880 THEN i+1 ELSE i-1 END v FROM range(300000)t(i); +-- +ok +== +SELECT i,v FROM hint_groups WHERE i>v LIMIT 5; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/pivot_list_results.test b/parser/testdata/corpus/sql/sql_export/pivot_list_results.test new file mode 100644 index 0000000..107b5d4 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/pivot_list_results.test @@ -0,0 +1,73 @@ +# source: test/sql/sql_export/pivot_list_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET pivot_filter_threshold=0; +-- +ok +== +SET pivot_filter_threshold={threshold}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT * FROM (VALUES ('g','a',10),('g','a',NULL),('g','b',20),('h','a',NULL)) t(g,k,v) PIVOT (sum(v) AS s,count(v) AS c FOR k IN ('a','b','z')) ORDER BY g; +-- +ok +== +FROM (VALUES ('a',1),('b',2)) t(k,v) PIVOT (sum(v) FOR k IN ('a','b','z')); +-- +ok +== +EXPLAIN SELECT a_ok FROM (VALUES ('a',1),('b',2)) t(k,v) PIVOT (sum(v) AS ok,sum(CASE WHEN v=2 THEN error('pivot export error')::INTEGER ELSE v END) AS effect FOR k IN ('a','b','z')); +-- +ok +== +SELECT a_ok FROM (VALUES ('a',1),('b',2)) t(k,v) PIVOT (sum(v) AS ok,sum(CASE WHEN v=2 THEN error('pivot export error')::INTEGER ELSE v END) AS effect FOR k IN ('a','b','z')); +-- +ok +== +SELECT list_sort(x) FROM (VALUES (['b','B']::VARCHAR[]))t(x); +-- +ok +== +SELECT array_sort(x) FROM (VALUES (['b','B']::VARCHAR[]))t(x); +-- +ok +== +SELECT list_grade_up(x) FROM (VALUES (['b','B']::VARCHAR[]))t(x); +-- +ok +== +SELECT array_grade_up(x) FROM (VALUES (['b','B']::VARCHAR[]))t(x); +-- +ok +== +SELECT grade_up(x) FROM (VALUES (['b','B']::VARCHAR[]))t(x); +-- +ok +== +SELECT list_reverse_sort(x) FROM (VALUES (['B','b']::VARCHAR[]))t(x); +-- +ok +== +SELECT array_reverse_sort(x) FROM (VALUES (['B','b']::VARCHAR[]))t(x); +-- +ok +== +SELECT list_sort(list(x)) FROM (VALUES ('b',0),('B',1))t(x,r); +-- +ok +== +SET pivot_limit=3; +-- +ok +== +EXPLAIN (SQL) FROM (VALUES ('a',1),('b',2)) t(k,v) PIVOT (sum(v) FOR k IN ('a','b','z')); +-- +ok +== +RESET pivot_limit; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/pivot_sql_export.test b/parser/testdata/corpus/sql/sql_export/pivot_sql_export.test new file mode 100644 index 0000000..7da796b --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/pivot_sql_export.test @@ -0,0 +1,87 @@ +# source: test/sql/sql_export/pivot_sql_export.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * +FROM (VALUES ('g','a',10),('g','a',NULL),('g','b',20),('h','a',NULL)) t(g,k,v) +PIVOT (sum(v) AS s, count(v) AS c FOR k IN ('a','b','z')); +-- +ok +== +FROM (SELECT NULL::INTEGER v, 'a' k WHERE false) t +PIVOT (sum(v) AS s, count(v) AS c, count(*) AS cs FOR k IN ('a','b')); +-- +ok +== +FROM (VALUES ('a',1),('a',2),('b',NULL)) t(k,v) +PIVOT (array_agg(v) FOR k IN ('a','b','z')); +-- +ok +== +FROM (VALUES ('a',1),('a',2),('b',NULL)) t(k,v) +PIVOT (list(v) FOR k IN ('a','b','z')); +-- +ok +== +FROM (VALUES ('a',1),('a',NULL),('b',4)) t(k,v) +PIVOT (min(v) AS lo, max(v) AS hi FOR k IN ('a','b','z')); +-- +ok +== +SELECT * +FROM (SELECT NULL::VARCHAR g, NULL::VARCHAR k, NULL::INTEGER v WHERE false) t +PIVOT (sum(v) FOR k IN ('a','b')); +-- +ok +== +FROM (VALUES (1,'a_b','c',10),(2,'a','b_c',20)) t(g,k1,k2,v) +PIVOT (sum(v) FOR (k1,k2) IN (('a_b','c'),('a','b_c'))); +-- +ok +== +CREATE SEQUENCE pivot_export_sequence; +-- +ok +== +SELECT a_s +FROM (VALUES ('a',1),('b',2),('a',3)) t(k,v) +PIVOT (sum(v) AS s, max(nextval('pivot_export_sequence')) AS effect FOR k IN ('a','b','z')) +LIMIT 1; +-- +ok +== +SELECT currval('pivot_export_sequence'); +-- +ok +== +CREATE SEQUENCE pivot_count_sequence; +-- +ok +== +SELECT count(*) +FROM (FROM (VALUES ('a',1),('b',2),('a',3)) t(k,v) + PIVOT (sum(v) AS s, max(nextval('pivot_count_sequence')) AS effect FOR k IN ('a','b','z'))); +-- +ok +== +SELECT currval('pivot_count_sequence'); +-- +ok +== +SELECT lower(g), * EXCLUDE (g) +FROM (VALUES ('g' COLLATE nocase,'a',1),('G','a',2),('h','b',NULL)) t(g,k,v) +PIVOT (sum(v) AS s, count(v) AS c FOR k IN ('a','b','z')); +-- +ok +== +FROM (VALUES ('a',2),('a',6),('a',NULL)) t(k,v) +PIVOT (quantile_cont(v,0.25) AS q, string_agg(v::VARCHAR,'|' ORDER BY v) AS s, + list(v ORDER BY v) AS l FOR k IN ('a','z')); +-- +ok +== +RESET pivot_filter_threshold; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/plain_scope_results.test b/parser/testdata/corpus/sql/sql_export/plain_scope_results.test new file mode 100644 index 0000000..8b52ed8 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/plain_scope_results.test @@ -0,0 +1,85 @@ +# source: test/sql/sql_export/plain_scope_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE scope_rows(id INTEGER, i INTEGER, label VARCHAR COLLATE nocase, xs INTEGER[], ys INTEGER[], payload VARCHAR); +-- +ok +== +INSERT INTO scope_rows VALUES (1,2,'B',[2,NULL],[10],'2'),(2,1,'a',[1,3],[],'1'),(3,1,'A',[],[30,40],'bad'),(4,NULL,'c',NULL,NULL,'4'),(5,2,'b',[2],[50,60],'5'); +-- +ok +== +SELECT id AS i,i AS id FROM scope_rows WHERE id<>3 ORDER BY id NULLS LAST,i DESC LIMIT 3 OFFSET 1; +-- +ok +== +SELECT id,id AS id FROM scope_rows WHERE i IS NOT NULL ORDER BY i,id DESC; +-- +ok +== +SELECT id,row_number() OVER(ORDER BY i NULLS LAST,id),sum(i) OVER(PARTITION BY label),count(*) OVER() FROM scope_rows WHERE id<>3 ORDER BY id; +-- +ok +== +SELECT id,unnest(xs),unnest(ys) FROM scope_rows WHERE id<>3; +-- +ok +== +SELECT id,sum(CAST(payload AS INTEGER)) OVER() FROM scope_rows WHERE id<>3 ORDER BY id; +-- +ok +== +SELECT id,unnest([CAST(payload AS INTEGER)]) FROM scope_rows WHERE id<>3; +-- +ok +== +SELECT id,row_number() OVER(ORDER BY id DESC) FROM (SELECT id FROM scope_rows ORDER BY id LIMIT 2) q ORDER BY id; +-- +ok +== +SELECT i,sum(n) OVER(ORDER BY i NULLS LAST) FROM (SELECT i,count(*) n FROM scope_rows GROUP BY i) q ORDER BY i NULLS LAST; +-- +ok +== +SELECT id,sum(n) OVER() FROM (SELECT id,row_number() OVER(ORDER BY id) n FROM scope_rows) q ORDER BY id; +-- +ok +== +WITH c AS MATERIALIZED (SELECT xs FROM scope_rows WHERE id IN (1,2)) SELECT unnest(xs) FROM c; +-- +ok +== +SELECT r.id,row_number() OVER(ORDER BY r.id),sum(b.id) OVER() FROM scope_rows r LEFT JOIN (VALUES (1),(2)) b(id) ON r.id=b.id ORDER BY r.id; +-- +ok +== +SELECT r.id,unnest(r.xs),b.id FROM scope_rows r LEFT JOIN (VALUES (1),(2)) b(id) ON r.id=b.id; +-- +ok +== +SELECT id,count(*) OVER(PARTITION BY id),x FROM (SELECT id,unnest(xs) x FROM scope_rows) q; +-- +ok +== +SELECT id,unnest([n,n+1]) FROM (SELECT id,row_number() OVER(ORDER BY id) n FROM scope_rows) q; +-- +ok +== +CREATE OR REPLACE SEQUENCE scope_sequence; +-- +ok +== +SELECT sum(v) OVER() FROM (SELECT nextval('scope_sequence') v FROM range(2)) q; +-- +ok +== +SELECT currval('scope_sequence'); +-- +ok +== +SELECT unnest([nextval('scope_sequence'),nextval('scope_sequence')]) FROM range(2); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/plan_reconstruction_coverage.test b/parser/testdata/corpus/sql/sql_export/plan_reconstruction_coverage.test new file mode 100644 index 0000000..17b4811 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/plan_reconstruction_coverage.test @@ -0,0 +1,32 @@ +# source: test/sql/sql_export/plan_reconstruction_coverage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH RECURSIVE c(x) AS ( + SELECT 1 + UNION ALL + SELECT count(*)::INTEGER FROM c WHERE false +) +SELECT x FROM c LIMIT 4; +-- +ok +== +SELECT x, + sum(DISTINCT x) FILTER (WHERE x > 1) OVER (), + first_value(x ORDER BY x DESC NULLS LAST) OVER () +FROM (VALUES (1),(2),(3)) t(x) +ORDER BY x; +-- +ok +== +SELECT list_transform([1,2], lambda x: x + y) +FROM (VALUES (10)) t(y); +-- +ok +== +SELECT x +FROM (VALUES (10)) t(i), LATERAL (VALUES (i)) v(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/pruned_offset.test b/parser/testdata/corpus/sql/sql_export/pruned_offset.test new file mode 100644 index 0000000..328076a --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/pruned_offset.test @@ -0,0 +1,21 @@ +# source: test/sql/sql_export/pruned_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE offset_rows AS SELECT i::INTEGER AS i FROM range(245760) t(i) +-- +ok +== +INSERT INTO offset_rows VALUES (-1) +-- +ok +== +SELECT i FROM offset_rows ORDER BY i LIMIT 1 OFFSET 122880 +-- +ok +== +SELECT count(*) FROM (SELECT i FROM offset_rows ORDER BY i OFFSET 200000) +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/pure_values_input.test b/parser/testdata/corpus/sql/sql_export/pure_values_input.test new file mode 100644 index 0000000..983bacd --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/pure_values_input.test @@ -0,0 +1,37 @@ +# source: test/sql/sql_export/pure_values_input.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE pure_values_input(i INTEGER); +-- +ok +== +INSERT INTO pure_values_input VALUES (1),(1),(2),(NULL); +-- +ok +== +SELECT x,count(*) FROM pure_values_input, LATERAL (VALUES (i),(i),(NULL)) v(x) +GROUP BY x ORDER BY x NULLS LAST; +-- +ok +== +SELECT x FROM pure_values_input, LATERAL (VALUES (i),(-1)) v(x) +ORDER BY x NULLS LAST LIMIT 3; +-- +ok +== +SELECT count(*) FROM (SELECT * FROM pure_values_input WHERE false) t, +LATERAL (VALUES (i),(i)) v(x); +-- +ok +== +SELECT list(x ORDER BY x NULLS LAST) FROM pure_values_input, LATERAL (VALUES (i),(-1)) v(x); +-- +ok +== +WITH v AS MATERIALIZED (SELECT x FROM pure_values_input, LATERAL (VALUES (i),(i)) v(x)) +SELECT x,count(*) FROM v GROUP BY x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/pushed_column_paths.test b/parser/testdata/corpus/sql/sql_export/pushed_column_paths.test new file mode 100644 index 0000000..33e314f --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/pushed_column_paths.test @@ -0,0 +1,57 @@ +# source: test/sql/sql_export/pushed_column_paths.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE column_paths(s STRUCT("a'b" INTEGER, y STRUCT(z BIGINT)), v VARIANT);INSERT INTO column_paths VALUES ({'a''b':1,'y':{'z':2}},{'x':{'y':'3'}}::VARIANT),(NULL,NULL),({'a''b':NULL,'y':NULL},{'x':{'y':4}}::VARIANT); +-- +ok +== +SELECT s."a'b",s.y.z FROM column_paths; +-- +ok +== +EXPLAIN SELECT s."a'b",s.y.z FROM column_paths; +-- +ok +== +SELECT v.x.y::INTEGER FROM column_paths; +-- +ok +== +EXPLAIN SELECT v.x.y::INTEGER FROM column_paths; +-- +ok +== +SELECT s.y.z,s.y.z::VARCHAR FROM column_paths WHERE s."a'b" IS NULL; +-- +ok +== +EXPLAIN SELECT s.y.z,s.y.z::VARCHAR FROM column_paths WHERE s."a'b" IS NULL; +-- +ok +== +COPY column_paths TO '__TEST_DIR__/sql_export_migration_paths.parquet' (FORMAT parquet); +-- +ok +== +SELECT s."a'b",s.y.z,file_index FROM read_parquet('__TEST_DIR__/sql_export_migration_paths.parquet'); +-- +ok +== +EXPLAIN SELECT s."a'b",s.y.z,file_index FROM read_parquet('__TEST_DIR__/sql_export_migration_paths.parquet'); +-- +ok +== +SELECT s.y::STRUCT(z VARCHAR) FROM read_parquet('__TEST_DIR__/sql_export_migration_paths.parquet'); +-- +ok +== +EXPLAIN SELECT s.y::STRUCT(z VARCHAR) FROM read_parquet('__TEST_DIR__/sql_export_migration_paths.parquet'); +-- +ok +== +EXPLAIN (SQL) SELECT s."a'b",s.y.z,file_index FROM read_parquet('__TEST_DIR__/sql_export_migration_paths.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/pushed_projection_rejection.test b/parser/testdata/corpus/sql/sql_export/pushed_projection_rejection.test new file mode 100644 index 0000000..997090b --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/pushed_projection_rejection.test @@ -0,0 +1,25 @@ +# source: test/sql/sql_export/pushed_projection_rejection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT * FROM (VALUES ('abc'), ('x'), (NULL)) t(s)) TO '{TEST_DIR}/pushed_projection.parquet'; +-- +ok +== +SET storage_compatibility_version='v2.0.0'; +-- +ok +== +EXPLAIN (SQL) SELECT strlen(s) FROM read_parquet('{TEST_DIR}/pushed_projection.parquet'); +-- +ok +== +SELECT strlen(s) FROM read_parquet('{TEST_DIR}/pushed_projection.parquet'); +-- +ok +== +SELECT s FROM read_parquet('{TEST_DIR}/pushed_projection.parquet'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/range_folded_offset.test b/parser/testdata/corpus/sql/sql_export/range_folded_offset.test new file mode 100644 index 0000000..efc9204 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/range_folded_offset.test @@ -0,0 +1,20 @@ +# source: test/sql/sql_export/range_folded_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN 1 + 1 PRECEDING AND CURRENT ROW) +FROM (VALUES (1),(2),(4)) t(x) ORDER BY x; +-- +ok +== +SELECT x, count(*) OVER (ORDER BY x RANGE BETWEEN INTERVAL 1 DAY PRECEDING AND CURRENT ROW) +FROM (VALUES (DATE '2024-02-27'),(DATE '2024-02-28'),(DATE '2024-03-01')) t(x) ORDER BY x; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN 1 + 1 PRECEDING AND CURRENT ROW) +FROM (VALUES (1::BIGINT),(2),(4)) t(x) ORDER BY x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/range_frames.test b/parser/testdata/corpus/sql/sql_export/range_frames.test new file mode 100644 index 0000000..5502147 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/range_frames.test @@ -0,0 +1,147 @@ +# source: test/sql/sql_export/range_frames.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE frame_values(id INTEGER,k INTEGER,d DATE,v INTEGER); +-- +ok +== +INSERT INTO frame_values VALUES (1,1,'2024-02-28',10),(2,1,'2024-02-29',20), + (3,2,'2024-03-01',NULL),(4,4,'2024-03-03',40),(5,NULL,NULL,50); +-- +ok +== +CREATE SEQUENCE range_seq; +-- +ok +== +SELECT id,sum(v) OVER (ORDER BY k RANGE BETWEEN 0 PRECEDING AND 0 FOLLOWING) +FROM frame_values ORDER BY id +-- +ok +== +SELECT id,sum(v) OVER (ORDER BY d RANGE BETWEEN INTERVAL 1 DAY PRECEDING AND CURRENT ROW) +FROM frame_values ORDER BY id +-- +ok +== +SELECT id,sum(v) OVER (ORDER BY d DESC RANGE BETWEEN INTERVAL 1 DAY PRECEDING AND CURRENT ROW) +FROM frame_values ORDER BY id +-- +ok +== +SELECT id,sum(v) OVER (ORDER BY d RANGE BETWEEN INTERVAL 1 DAY FOLLOWING AND INTERVAL 2 DAY FOLLOWING) +FROM frame_values ORDER BY id +-- +ok +== +SELECT count(*) OVER (ORDER BY id RANGE BETWEEN (nextval('range_seq') + 1000) PRECEDING AND CURRENT ROW) +FROM frame_values ORDER BY id +-- +ok +== +SELECT currval('range_seq') +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN 2 PRECEDING AND 1 PRECEDING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN 2 PRECEDING AND 1 PRECEDING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN 1 FOLLOWING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN 1 FOLLOWING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN d PRECEDING AND d FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x ASC NULLS FIRST RANGE BETWEEN d PRECEDING AND d FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 2 PRECEDING AND 1 PRECEDING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 2 PRECEDING AND 1 PRECEDING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 1 FOLLOWING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 1 FOLLOWING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN d PRECEDING AND d FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +EXPLAIN (SQL) SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN d PRECEDING AND d FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2; +-- +ok +== +SELECT sum(x) OVER (ORDER BY x RANGE BETWEEN 0.25 PRECEDING AND 0.5 FOLLOWING) FROM (VALUES (1.00::DECIMAL(9,2)),(1.25),(NULL),(1.25),(2.00)) t(x); +-- +ok +== +SELECT count(*) OVER (ORDER BY x RANGE BETWEEN INTERVAL '1 month' PRECEDING AND INTERVAL '1 day' FOLLOWING) FROM (VALUES (TIMESTAMP '2024-02-29'),(TIMESTAMP '2024-03-30'),(NULL),(TIMESTAMP '2024-03-30')) t(x); +-- +ok +== +SELECT sum(x) OVER (ORDER BY x RANGE BETWEEN -1 PRECEDING AND CURRENT ROW) FROM (VALUES (1),(2)) t(x); +-- +ok +== +SELECT sum(x) OVER (ORDER BY x DESC RANGE BETWEEN CURRENT ROW AND -1 FOLLOWING) FROM (VALUES (1),(2)) t(x); +-- +ok +== +SELECT sum(x) OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM (VALUES (2147483647::INTEGER),(2147483646)) t(x); +-- +ok +== +SELECT count(*) OVER (ORDER BY x RANGE BETWEEN 0 PRECEDING AND CURRENT ROW) FROM (VALUES (1),(2)) t(x); +-- +ok +== +SELECT count(*) OVER (ORDER BY x RANGE BETWEEN INTERVAL 1 DAY PRECEDING AND CURRENT ROW) FROM (VALUES (DATE '2024-02-28'),(DATE '2024-02-29')) t(x); +-- +ok +== +SELECT count(*) OVER (ORDER BY CAST(x AS TIMESTAMP) RANGE BETWEEN INTERVAL 1 DAY PRECEDING AND CURRENT ROW) FROM (VALUES (DATE '2024-02-28'),(DATE '2024-02-29')) t(x); +-- +ok +== +SELECT count(*) OVER (ORDER BY x RANGE BETWEEN 1 PRECEDING AND CURRENT ROW) FROM (VALUES (1),(2)) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/range_origin_inputs.test b/parser/testdata/corpus/sql/sql_export/range_origin_inputs.test new file mode 100644 index 0000000..d4920e2 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/range_origin_inputs.test @@ -0,0 +1,48 @@ +# source: test/sql/sql_export/range_origin_inputs.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN (SELECT 1) PRECEDING AND CURRENT ROW) +FROM (VALUES (1),(2),(3)) t(x) ORDER BY x; +-- +ok +== +CREATE OR REPLACE SEQUENCE range_origin_calls; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN (SELECT nextval('range_origin_calls')) PRECEDING AND CURRENT ROW) +FROM (VALUES (1::BIGINT),(2),(3)) t(x) ORDER BY x; +-- +ok +== +SELECT currval('range_origin_calls'); +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN (SELECT NULL::INTEGER) PRECEDING AND CURRENT ROW) +FROM (VALUES (1),(2),(3)) t(x) ORDER BY x; +-- +ok +== +CREATE OR REPLACE TABLE range_origin_structs AS +SELECT {'unused': 99, 'k': x, 'delta': 1} AS s FROM (VALUES (1),(2),(3)) t(x); +-- +ok +== +SELECT s.k, sum(s.k) OVER (ORDER BY s.k RANGE BETWEEN s.delta PRECEDING AND CURRENT ROW) +FROM range_origin_structs ORDER BY s.k; +-- +ok +== +SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN 1::INTEGER PRECEDING AND CURRENT ROW) +FROM (VALUES (1::BIGINT),(2),(3)) t(x) ORDER BY x; +-- +ok +== +SELECT x::INTEGER, count(*) OVER (ORDER BY x DESC RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING) +FROM (VALUES (1::DECIMAL(38,1)),(2),(3)) t(x) ORDER BY x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/recursive_payload_results.test b/parser/testdata/corpus/sql/sql_export/recursive_payload_results.test new file mode 100644 index 0000000..e333d10 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/recursive_payload_results.test @@ -0,0 +1,49 @@ +# source: test/sql/sql_export/recursive_payload_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE nested_payload AS SELECT ['A' COLLATE nocase] v UNION ALL SELECT ['a' COLLATE nocase]; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(v)) AS (SELECT 1,v FROM nested_payload UNION ALL SELECT k+1,v FROM r WHERE k<3) SELECT k,v FROM r ORDER BY k; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,max(v)) AS (SELECT 1,v FROM nested_payload UNION ALL SELECT k+1,v FROM r WHERE k<3) SELECT k,v FROM r ORDER BY k; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(nextval('seq')) AS v) AS (VALUES(1,1) UNION SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(CASE WHEN k=3 THEN error('payload call failure') ELSE nextval('seq') END) AS v) AS (VALUES(1,1) UNION SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(nextval('seq')) AS v) AS (VALUES(1,1) UNION SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r LIMIT 1; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(CASE WHEN k=3 THEN error('payload call failure') ELSE nextval('seq') END) AS v) AS (VALUES(1,1) UNION SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r LIMIT 1; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(nextval('seq')) AS v) AS (VALUES(1,1) UNION ALL SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(CASE WHEN k=3 THEN error('payload call failure') ELSE nextval('seq') END) AS v) AS (VALUES(1,1) UNION ALL SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(nextval('seq')) AS v) AS (VALUES(1,1) UNION ALL SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r LIMIT 1; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(CASE WHEN k=3 THEN error('payload call failure') ELSE nextval('seq') END) AS v) AS (VALUES(1,1) UNION ALL SELECT k+1,v FROM r WHERE k<4) SELECT k,v FROM r LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/recursive_payload_types.test b/parser/testdata/corpus/sql/sql_export/recursive_payload_types.test new file mode 100644 index 0000000..9319d97 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/recursive_payload_types.test @@ -0,0 +1,69 @@ +# source: test/sql/sql_export/recursive_payload_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT (x) COLLATE nocase FROM (VALUES ('A'),('a'),(NULL))v(x) UNION SELECT x FROM c WHERE false) SELECT x FROM c ORDER BY x NULLS LAST; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT (x || '') COLLATE nocase FROM (VALUES ('A'),('a'),(NULL))v(x) UNION SELECT x FROM c WHERE false) SELECT x FROM c ORDER BY x NULLS LAST; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT (CASE WHEN true THEN x ELSE NULL END) COLLATE nocase FROM (VALUES ('A'),('a'),(NULL))v(x) UNION SELECT x FROM c WHERE false) SELECT x FROM c ORDER BY x NULLS LAST; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT (replace(x,'z','z')) COLLATE nocase FROM (VALUES ('A'),('a'),(NULL))v(x) UNION SELECT x FROM c WHERE false) SELECT x FROM c ORDER BY x NULLS LAST; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,3::INTEGER UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,3.25::DECIMAL(9,2) UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,'a'::VARCHAR UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,'a' COLLATE "binary" UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,[3,NULL]::INTEGER[] UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,{'n':3}::STRUCT(n INTEGER) UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,DATE '2001-02-03' UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,system.main.{aggregate}(v)) AS (SELECT 1,[3]::INTEGER[1] UNION {quantifier} SELECT k+1,v FROM r WHERE k<3) SELECT v,k,v FROM r ORDER BY k; +-- +error: Parser Error: syntax error at or near "{" +== +WITH RECURSIVE r(k,v) USING KEY(k,last(v)) AS (SELECT 1,'a' COLLATE nocase UNION ALL SELECT k+1,v FROM r WHERE k<3) SELECT k,v='A' FROM r ORDER BY k; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,max(v+1) AS v) AS (VALUES(1,3),(1,1),(1,NULL) UNION ALL SELECT k+1,v FROM r WHERE k<3) SELECT k,v FROM r ORDER BY k; +-- +ok +== +WITH RECURSIVE r(k,v) USING KEY(k,last(v)) AS MATERIALIZED (VALUES(1,3),(1,NULL),(NULL,4) UNION SELECT d.k+1,d.v FROM r d,recurring.r a WHERE d.k=a.k AND d.k<3) SELECT * FROM r ORDER BY ALL; +-- +ok +== +WITH RECURSIVE r(a,b,c) USING KEY(c,a,max(b+1) AS b) AS (VALUES(1,3,1),(1,1,1) UNION ALL SELECT a+1,b,c FROM r WHERE a<3) SELECT c,b,a FROM r ORDER BY a; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/recursive_state.test b/parser/testdata/corpus/sql/sql_export/recursive_state.test new file mode 100644 index 0000000..a8f9e2a --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/recursive_state.test @@ -0,0 +1,201 @@ +# source: test/sql/sql_export/recursive_state.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_execution_time=60000; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT count(*)::INTEGER FROM c WHERE false) SELECT x FROM c LIMIT 4; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT count(*) FROM c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 WHERE false UNION ALL SELECT count(*) FROM c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS (VALUES (1),(1) UNION ALL SELECT count(*) FROM c WHERE false) SELECT x FROM c LIMIT 4; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT count(*) FROM c WHERE false GROUP BY x) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 1 UNION SELECT count(*) FROM c WHERE false) SELECT x FROM c ORDER BY x; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION SELECT x+1 FROM recurring.c WHERE x<3) SELECT x FROM c ORDER BY x; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION SELECT r.x+1 FROM c d,recurring.c r WHERE d.x=r.x AND r.x<3) SELECT x FROM c ORDER BY x; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION SELECT x+1 FROM recurring.c WHERE false) SELECT x FROM c; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM recurring.c WHERE x<3) SELECT x FROM c LIMIT 5; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 WHERE false UNION ALL SELECT count(*) FROM recurring.c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (VALUES (1),(1),(NULL) UNION SELECT x+1 FROM c WHERE x<3) SELECT x FROM c ORDER BY x; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM c WHERE x<3) SELECT x FROM c ORDER BY x; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT [1,NULL] UNION SELECT x FROM c WHERE false) SELECT x FROM c; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,sum(v)) AS (SELECT 1,2 UNION SELECT k+1,v FROM c WHERE k<3) SELECT v,k,v FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,sum(v)) AS (SELECT 1,2 UNION ALL SELECT d.k+1,d.v FROM c d,recurring.c r WHERE d.k=r.k AND d.k<3) SELECT k,v FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,list(v)) AS (SELECT 1,1 UNION SELECT k+1,len(v)::INTEGER FROM c WHERE k<3) SELECT k,v FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,count(v) AS v) AS (SELECT 1,2 UNION SELECT k+1,v FROM c WHERE k<3) SELECT k,v FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(a,b,c) USING KEY(c,a,sum(b+0) AS b) AS (SELECT 1,2,3 UNION SELECT a+1,b+1,c FROM c WHERE a<3) SELECT c,b,a FROM c ORDER BY a; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 1 UNION SELECT x+1 FROM recurring.c WHERE x<3) SELECT a.x,b.x FROM c a JOIN c b ON a.x=b.x ORDER BY a.x; +-- +ok +== +WITH RECURSIVE r0(c0) AS (SELECT 1 UNION SELECT c0+1 FROM recurring.r0 WHERE c0<2) SELECT a.c0,b.c0 FROM r0 a CROSS JOIN (WITH RECURSIVE r0(c0) AS (SELECT 10 UNION SELECT c0+1 FROM recurring.r0 WHERE c0<11) SELECT c0 FROM r0) b ORDER BY ALL; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT x FROM (VALUES (['A' COLLATE nocase]),(['a']),([NULL]))v(x) UNION SELECT x FROM c WHERE false) SELECT x FROM c; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT [x COLLATE nocase] FROM (VALUES ('A'),('a'),(NULL))v(x) UNION SELECT x FROM c WHERE false) SELECT x FROM c; +-- +ok +== +SELECT 'A' COLLATE nocase WHERE false; +-- +ok +== +SELECT NULL::VARCHAR COLLATE nocase WHERE false; +-- +ok +== +SELECT 'A' COLLATE "binary" WHERE false; +-- +ok +== +SELECT 'A' COLLATE nocase.noaccent WHERE false; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT CASE WHEN x=2 THEN error('recursive step')::INTEGER ELSE x+1 END FROM c WHERE x<3) SELECT x FROM c LIMIT 1; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 1 UNION ALL SELECT CASE WHEN x=2 THEN error('recursive step')::INTEGER ELSE x+1 END FROM c WHERE x<3) SELECT x FROM c LIMIT 1; +-- +ok +== +WITH RECURSIVE c(x) AS NOT MATERIALIZED (SELECT 1 UNION ALL SELECT CASE WHEN x=2 THEN error('recursive step')::INTEGER ELSE x+1 END FROM c WHERE x<3) SELECT x FROM c LIMIT 1; +-- +ok +== +WITH RECURSIVE c(k) USING KEY(k) AS (SELECT 1 UNION SELECT k FROM c WHERE nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k) USING KEY(k) AS MATERIALIZED (SELECT 1 UNION SELECT k FROM c WHERE nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,list(v)) AS (SELECT 1,1 UNION SELECT 2,count(*)::INTEGER FROM recurring.c WHERE false HAVING nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,list(v)) AS MATERIALIZED (SELECT 1,1 UNION SELECT 2,count(*)::INTEGER FROM recurring.c WHERE false HAVING nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k) USING KEY(k) AS (SELECT 1 UNION ALL SELECT k FROM c WHERE nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k) USING KEY(k) AS MATERIALIZED (SELECT 1 UNION ALL SELECT k FROM c WHERE nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,list(v)) AS (SELECT 1,1 UNION ALL SELECT 2,count(*)::INTEGER FROM recurring.c WHERE false HAVING nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(k,v) USING KEY(k,list(v)) AS MATERIALIZED (SELECT 1,1 UNION ALL SELECT 2,count(*)::INTEGER FROM recurring.c WHERE false HAVING nextval('seq')<3) SELECT * FROM c ORDER BY k; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT 'A' COLLATE nocase WHERE false UNION ALL (SELECT x FROM (VALUES ('A'),('a'))v(x) WHERE nextval('seq')<3 UNION ALL SELECT x FROM recurring.c WHERE false)) SELECT x FROM c; +-- +ok +== +WITH RECURSIVE c(x) USING KEY(x) AS (SELECT ['A' COLLATE nocase] WHERE false UNION ALL (SELECT x FROM (VALUES (['A']),(['a']))v(x) WHERE nextval('seq')<3 UNION ALL SELECT x FROM recurring.c WHERE false)) SELECT x FROM c; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 0::BIGINT UNION SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 0::BIGINT UNION SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 4; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 0::BIGINT UNION SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 0::BIGINT UNION SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 4; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 0::BIGINT UNION ALL SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS (SELECT 0::BIGINT UNION ALL SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 4; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 0::BIGINT UNION ALL SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 3; +-- +ok +== +WITH RECURSIVE c(x) AS MATERIALIZED (SELECT 0::BIGINT UNION ALL SELECT count(*)+CASE WHEN nextval('seq')<3 THEN currval('seq') ELSE error('recursive iteration') END FROM c WHERE false) SELECT x FROM c LIMIT 4; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/regex_range_filter_export.test b/parser/testdata/corpus/sql/sql_export/regex_range_filter_export.test new file mode 100644 index 0000000..cb1f3a1 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/regex_range_filter_export.test @@ -0,0 +1,21 @@ +# source: test/sql/sql_export/regex_range_filter_export.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT 'goose' AS v UNION ALL SELECT 'gooxe' UNION ALL SELECT 'duck' UNION ALL SELECT 'goo\x5Ce'; +-- +ok +== +SET disabled_optimizers='filter_pushdown'; +-- +ok +== +SELECT * FROM t WHERE regexp_full_match(v, 'goo.e') ORDER BY v; +-- +ok +== +SELECT * FROM (VALUES ('v1'), ('w2'), ('v\x5C')) t(s) WHERE s SIMILAR TO 'v.*' ORDER BY s; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/result_modifiers.test b/parser/testdata/corpus/sql/sql_export/result_modifiers.test new file mode 100644 index 0000000..4d26e10 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/result_modifiers.test @@ -0,0 +1,129 @@ +# source: test/sql/sql_export/result_modifiers.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT x FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY x DESC NULLS LAST, y; +-- +ok +== +EXPLAIN (SQL) SELECT x FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY x DESC NULLS LAST, y; +-- +ok +== +SELECT x,y FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY y DESC LIMIT 2 OFFSET 1; +-- +ok +== +EXPLAIN (SQL) SELECT x,y FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY y DESC LIMIT 2 OFFSET 1; +-- +ok +== +SELECT x,y FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY y LIMIT 60% OFFSET 1; +-- +ok +== +EXPLAIN (SQL) SELECT x,y FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY y LIMIT 60% OFFSET 1; +-- +ok +== +SELECT y FROM (SELECT x,y FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY y LIMIT 4) q LIMIT 2 OFFSET 1; +-- +ok +== +SELECT DISTINCT x FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y); +-- +ok +== +SELECT DISTINCT ON (x) x,y FROM (VALUES (3,30), (1,10), (NULL,40), (3,20), (NULL,50)) t(x,y) ORDER BY x NULLS FIRST,y DESC; +-- +ok +== +SELECT x,sum(y) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY x; +-- +ok +== +EXPLAIN (SQL) SELECT x,sum(y) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY x; +-- +ok +== +SET disabled_optimizers='grouping_sets,common_subplan'; +-- +ok +== +SELECT x,y,grouping(x,y),sum(y) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY GROUPING SETS ((x),(y),(),(x)); +-- +ok +== +SELECT x,x+0,grouping(x,x+0),count(*) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY GROUPING SETS ((x),(x+0),(),(x)); +-- +ok +== +SELECT x,x*1,grouping(x,x*1),count(*) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY GROUPING SETS ((x),(x*1),(),(x)); +-- +ok +== +SELECT x,x::INTEGER,grouping(x,x::INTEGER),count(*) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY GROUPING SETS ((x),(x::INTEGER),(),(x)); +-- +ok +== +SET disabled_optimizers='grouping_sets,compressed_materialization'; +-- +ok +== +SELECT grouping(1+1,2+0),count(*) FROM (VALUES(1),(2))t(x) GROUP BY GROUPING SETS ((1+1),(2+0),()); +-- +ok +== +SELECT x,sum(DISTINCT y) FILTER (WHERE y>5), list(y ORDER BY y DESC NULLS FIRST) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY x; +-- +ok +== +SELECT x,sum(y) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) WHERE false GROUP BY x; +-- +ok +== +SELECT NULL::DECIMAL(9,2) a, [1,NULL] b, {'x': 2} c WHERE false; +-- +ok +== +EXPLAIN (SQL) SELECT NULL::DECIMAL(9,2) a, [1,NULL] b, {'x': 2} c WHERE false; +-- +ok +== +SELECT * FROM (SELECT count(x) EXPORT_STATE s FROM (VALUES(1))t(x))t WHERE false; +-- +ok +== +EXPLAIN (SQL) SELECT * FROM (SELECT count(x) EXPORT_STATE s FROM (VALUES(1))t(x))t WHERE false; +-- +ok +== +(VALUES (1),(1),(1),(NULL),(NULL),(2)) UNION (VALUES (1),(1),(NULL),(3)); +-- +ok +== +(VALUES (1),(1),(1),(NULL),(NULL),(2)) UNION ALL (VALUES (1),(1),(NULL),(3)); +-- +ok +== +(VALUES (1),(1),(1),(NULL),(NULL),(2)) EXCEPT (VALUES (1),(1),(NULL),(3)); +-- +ok +== +(VALUES (1),(1),(1),(NULL),(NULL),(2)) EXCEPT ALL (VALUES (1),(1),(NULL),(3)); +-- +ok +== +(VALUES (1),(1),(1),(NULL),(NULL),(2)) INTERSECT (VALUES (1),(1),(NULL),(3)); +-- +ok +== +(VALUES (1),(1),(1),(NULL),(NULL),(2)) INTERSECT ALL (VALUES (1),(1),(NULL),(3)); +-- +ok +== +SELECT * FROM (SELECT sum(x) EXPORT_STATE s FROM (VALUES(1))t(x))t WHERE false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/rewrite_qualification.test b/parser/testdata/corpus/sql/sql_export/rewrite_qualification.test new file mode 100644 index 0000000..43b900d --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/rewrite_qualification.test @@ -0,0 +1,185 @@ +# source: test/sql/sql_export/rewrite_qualification.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO shadow.prefix(a,b) AS false; +-- +ok +== +CREATE MACRO shadow.suffix(a,b) AS false; +-- +ok +== +CREATE MACRO shadow.contains(a,b) AS false; +-- +ok +== +CREATE MACRO shadow.count(a) AS 999::BIGINT; +-- +ok +== +SET search_path='shadow,main'; +-- +ok +== +SELECT s LIKE 'a%' FROM (VALUES ('abc'),('cab'),(NULL)) v(s); +-- +ok +== +EXPLAIN (SQL) SELECT s LIKE 'a%' FROM (VALUES ('abc'),('cab'),(NULL)) v(s); +-- +ok +== +SELECT system.main.prefix(s, 'a') FROM (VALUES ('abc'),('cab'),(NULL)) v(s); +-- +ok +== +SELECT prefix(s, 'a') FROM (VALUES ('abc'),('cab'),(NULL)) v(s); +-- +ok +== +SELECT s LIKE '%a' FROM (VALUES ('bca'),('abc'),(NULL)) v(s); +-- +ok +== +EXPLAIN (SQL) SELECT s LIKE '%a' FROM (VALUES ('bca'),('abc'),(NULL)) v(s); +-- +ok +== +SELECT system.main.suffix(s, 'a') FROM (VALUES ('bca'),('abc'),(NULL)) v(s); +-- +ok +== +SELECT suffix(s, 'a') FROM (VALUES ('bca'),('abc'),(NULL)) v(s); +-- +ok +== +SELECT s LIKE '%a%' FROM (VALUES ('abc'),('bbb'),(NULL)) v(s); +-- +ok +== +EXPLAIN (SQL) SELECT s LIKE '%a%' FROM (VALUES ('abc'),('bbb'),(NULL)) v(s); +-- +ok +== +SELECT system.main.contains(s, 'a') FROM (VALUES ('abc'),('bbb'),(NULL)) v(s); +-- +ok +== +SELECT contains(s, 'a') FROM (VALUES ('abc'),('bbb'),(NULL)) v(s); +-- +ok +== +SELECT avg(i) FROM (VALUES (1),(2),(NULL)) v(i); +-- +ok +== +EXPLAIN (SQL) SELECT avg(i) FROM (VALUES (1),(2),(NULL)) v(i); +-- +ok +== +SELECT system.main.count(i) FROM (VALUES (1),(2),(NULL)) v(i); +-- +ok +== +SELECT count(i) FROM (VALUES (1),(2),(NULL)) v(i); +-- +ok +== +SET search_path='main'; +-- +ok +== +SELECT avg(i) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT avg(i) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +SELECT sum(i + 1) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT sum(i + 1) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +SELECT count(i) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT count(i) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +SELECT count(*) FROM (VALUES (1),(2)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT count(*) FROM (VALUES (1),(2)) t(i); +-- +ok +== +SELECT sum(i), avg(i), count(DISTINCT i) FROM (VALUES (1),(2),(2),(NULL)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT sum(i), avg(i), count(DISTINCT i) FROM (VALUES (1),(2),(2),(NULL)) t(i); +-- +ok +== +SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s LIKE 'a%'; +-- +ok +== +EXPLAIN (SQL) SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s LIKE 'a%'; +-- +ok +== +SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s LIKE '%a'; +-- +ok +== +EXPLAIN (SQL) SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s LIKE '%a'; +-- +ok +== +SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s LIKE '%a%'; +-- +ok +== +EXPLAIN (SQL) SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s LIKE '%a%'; +-- +ok +== +SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s NOT LIKE 'a%'; +-- +ok +== +EXPLAIN (SQL) SELECT s FROM (VALUES ('abc'),('cab'),('bca'),(NULL)) t(s) WHERE s NOT LIKE 'a%'; +-- +ok +== +SELECT histogram(i) FROM (VALUES (1), (2), (2)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT histogram(i) FROM (VALUES (1), (2), (2)) t(i); +-- +ok +== +SELECT entropy(i) FROM (VALUES (1), (2), (2)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT entropy(i) FROM (VALUES (1), (2), (2)) t(i); +-- +ok +== +EXPLAIN (SQL) SELECT mode(i) FROM (VALUES (1), (2), (2)) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/rewritten_functions.test b/parser/testdata/corpus/sql/sql_export/rewritten_functions.test new file mode 100644 index 0000000..4c9bfc0 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/rewritten_functions.test @@ -0,0 +1,91 @@ +# source: test/sql/sql_export/rewritten_functions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE bounded_values(i INTEGER); +-- +ok +== +INSERT INTO bounded_values VALUES (1), (NULL), (2), (1); +-- +ok +== +ANALYZE bounded_values; +-- +ok +== +SELECT i > 100, i < 100 FROM bounded_values; +-- +ok +== +EXPLAIN (SQL) SELECT i > 100, i < 100 FROM bounded_values; +-- +ok +== +CREATE TABLE measurements(x DOUBLE, y DOUBLE); +-- +ok +== +INSERT INTO measurements VALUES (1, 10), (1, 10), (NULL, 5), (2, NULL); +-- +ok +== +SELECT * FROM summary((SELECT x AS first_value, y AS second_value FROM measurements)); +-- +ok +== +SELECT * FROM summary((SELECT x, y FROM measurements WHERE false)); +-- +ok +== +SELECT * FROM summary((SELECT x, sum(y) FROM measurements GROUP BY x)); +-- +ok +== +SELECT to_aggregate_state(12::HUGEINT, 'sum', ['INTEGER']); +-- +ok +== +SELECT to_aggregate_state(NULL::HUGEINT, 'sum', ['INTEGER']); +-- +ok +== +SELECT finalize(to_aggregate_state(12::HUGEINT, 'sum', ['INTEGER'])); +-- +ok +== +SELECT finalize(combine_aggr(s)) FROM (SELECT approx_quantile(i, 0.5) EXPORT_STATE s FROM range(10) t(i) UNION ALL SELECT approx_quantile(NULL, 0.5) EXPORT_STATE s WHERE false); +-- +ok +== +SELECT finalize(s) FROM (SELECT string_agg(s, '|' ORDER BY i DESC) EXPORT_STATE s FROM (VALUES (1, 'a'), (2, NULL), (3, 'a'), (4, 'b')) t(i,s)); +-- +ok +== +SELECT min(s COLLATE nocase), max(s COLLATE nocase) FROM (VALUES ('a'), ('B'), (NULL), ('B')) t(s); +-- +ok +== +SELECT min(s COLLATE nocase) FROM (VALUES (NULL::VARCHAR), (NULL)) t(s); +-- +ok +== +SELECT min(s), max(s) FROM (VALUES ('1'::BIT), ('01'::BIT), (NULL), ('01'::BIT)) t(s); +-- +ok +== +SELECT min(v), max(v), min(v, 2), max(v, 2) FROM (VALUES (2::VARIANT), (1::VARIANT), (NULL), (2::VARIANT)) t(v); +-- +ok +== +SELECT finalize(min(s) EXPORT_STATE) FROM (VALUES ('1'::BIT), ('01'::BIT), (NULL)) t(s); +-- +ok +== +SELECT min(DISTINCT s COLLATE nocase ORDER BY s COLLATE nocase) FILTER (WHERE keep), + max(s COLLATE nocase ORDER BY s DESC) FILTER (WHERE NOT keep) +FROM (VALUES ('z', false), ('a', true), ('B', true), (NULL, true), ('a', true)) t(s, keep); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/sampling_values.test b/parser/testdata/corpus/sql/sql_export/sampling_values.test new file mode 100644 index 0000000..89dfbb0 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/sampling_values.test @@ -0,0 +1,137 @@ +# source: test/sql/sql_export/sampling_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 31 (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,nextval('seq') v FROM range(10000)t(i)) USING SAMPLE 31 (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,i v FROM range(0)t(i)) USING SAMPLE 31 (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 20% (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,nextval('seq') v FROM range(10000)t(i)) USING SAMPLE 20% (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,i v FROM range(0)t(i)) USING SAMPLE 20% (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 50% (bernoulli,42); +-- +ok +== +SELECT * FROM (SELECT i,nextval('seq') v FROM range(10000)t(i)) USING SAMPLE 50% (bernoulli,42); +-- +ok +== +SELECT * FROM (SELECT i,i v FROM range(0)t(i)) USING SAMPLE 50% (bernoulli,42); +-- +ok +== +SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 50% (system,42); +-- +ok +== +SELECT * FROM (SELECT i,nextval('seq') v FROM range(10000)t(i)) USING SAMPLE 50% (system,42); +-- +ok +== +SELECT * FROM (SELECT i,i v FROM range(0)t(i)) USING SAMPLE 50% (system,42); +-- +ok +== +SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 80% (system,1); +-- +ok +== +SELECT * FROM (SELECT i,nextval('seq') v FROM range(10000)t(i)) USING SAMPLE 80% (system,1); +-- +ok +== +SELECT * FROM (SELECT i,i v FROM range(0)t(i)) USING SAMPLE 80% (system,1); +-- +ok +== +SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 0 (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,nextval('seq') v FROM range(10000)t(i)) USING SAMPLE 0 (reservoir,42); +-- +ok +== +SELECT * FROM (SELECT i,i v FROM range(0)t(i)) USING SAMPLE 0 (reservoir,42); +-- +ok +== +SELECT * FROM range(10000) USING SAMPLE 31 (system,42); +-- +ok +== +SELECT * FROM range(10000) USING SAMPLE 31 (bernoulli,42); +-- +error: Parser Error: Sample method Bernoulli cannot be used with a discrete sample count, either switch to reservoir sampling or use a sample_size +== +EXPLAIN (SQL) SELECT * FROM range(10000) USING SAMPLE 31 (bernoulli,42); +-- +ok +== +CREATE TABLE sample_source AS SELECT i FROM range(10000) t(i); +-- +ok +== +SELECT * FROM sample_source USING SAMPLE 31 (system,42) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT * FROM sample_source USING SAMPLE 31 (system,42) ORDER BY i; +-- +ok +== +SELECT * FROM sample_source USING SAMPLE 25% (system,42) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT * FROM sample_source USING SAMPLE 25% (system,42) ORDER BY i; +-- +ok +== +SELECT * FROM sample_source USING SAMPLE 31 (system) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT * FROM sample_source USING SAMPLE 31 (system) ORDER BY i; +-- +ok +== +SELECT count(*),count(DISTINCT x),count(*) FILTER (WHERE x>=0 AND x<10000) FROM (SELECT * FROM sample_source USING SAMPLE 31 (system) ORDER BY i) t(x); +-- +ok +== +SELECT * FROM range(10000) USING SAMPLE 31 (reservoir); +-- +ok +== +EXPLAIN (SQL) SELECT * FROM range(10000) USING SAMPLE 31 (reservoir); +-- +ok +== +SELECT count(*),count(DISTINCT x),count(*) FILTER (WHERE x>=0 AND x<10000) FROM (SELECT * FROM range(10000) USING SAMPLE 31 (reservoir)) t(x); +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(10000) USING SAMPLE 31 (system,42)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/sampling_values.test.metadata.json b/parser/testdata/corpus/sql/sql_export/sampling_values.test.metadata.json new file mode 100644 index 0000000..2e4daf9 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/sampling_values.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "8d5240365282cfb2": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/sql_export/scalar_limit.test b/parser/testdata/corpus/sql/sql_export/scalar_limit.test new file mode 100644 index 0000000..33a1c97 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/scalar_limit.test @@ -0,0 +1,88 @@ +# source: test/sql/sql_export/scalar_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SEQUENCE limit_calls; +-- +ok +== +CREATE SEQUENCE offset_calls; +-- +ok +== +SELECT i FROM range(10) t(i) ORDER BY i +LIMIT (SELECT nextval('limit_calls')+2) OFFSET (SELECT nextval('offset_calls')+1) +-- +ok +== +SELECT currval('limit_calls'), currval('offset_calls') +-- +ok +== +CREATE SEQUENCE row_calls; +-- +ok +== +SELECT nextval('row_calls') FROM (SELECT i FROM range(100000) t(i) LIMIT (SELECT 2)) t +-- +ok +== +SELECT currval('row_calls') +-- +ok +== +CREATE TABLE empty_limit_input(i INTEGER); +-- +ok +== +SELECT i FROM empty_limit_input LIMIT ((SELECT '-2147483648'::INTEGER)-1) +-- +ok +== +SELECT i FROM range(1) t(i) LIMIT ((SELECT '-2147483648'::INTEGER)-1) +-- +ok +== +SELECT i FROM empty_limit_input LIMIT (SELECT 'bad') +-- +ok +== +SELECT i FROM range(1) t(i) LIMIT (SELECT 'bad') +-- +ok +== +SELECT i FROM empty_limit_input LIMIT (SELECT 1 UNION ALL SELECT 2) +-- +ok +== +SELECT i FROM (VALUES (1),(1),(NULL)) t(i) LIMIT (SELECT NULL) OFFSET (SELECT NULL) +-- +ok +== +SELECT i FROM (SELECT i FROM range(10) t(i) ORDER BY i LIMIT (SELECT 7)) t +ORDER BY i LIMIT (SELECT 2) OFFSET (SELECT 3) +-- +ok +== +CREATE SEQUENCE nested_limit_calls; +-- +ok +== +SELECT i FROM ( + SELECT i FROM range(20) t(i) ORDER BY i + LIMIT (SELECT nextval('nested_limit_calls') * 0 + 7) +) t ORDER BY i +LIMIT (SELECT nextval('nested_limit_calls') * 0 + 2) +OFFSET (SELECT nextval('nested_limit_calls') * 0 + 3) +-- +ok +== +SELECT currval('nested_limit_calls'); +-- +ok +== +DROP SEQUENCE nested_limit_calls; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/scope_reuse.test b/parser/testdata/corpus/sql/sql_export/scope_reuse.test new file mode 100644 index 0000000..a4c5268 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/scope_reuse.test @@ -0,0 +1,105 @@ +# source: test/sql/sql_export/scope_reuse.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(i INTEGER, s VARCHAR); +-- +ok +== +CREATE TABLE u(i INTEGER, v INTEGER); +-- +ok +== +INSERT INTO t VALUES (0,'first'),(1,'a'),(1,'a'),(2,'b'),(4,'last'),(NULL,'n'); +-- +ok +== +INSERT INTO u VALUES (0,0),(1,10),(1,NULL),(3,30),(4,40),(NULL,50); +-- +ok +== +SELECT t.i,t.s,u.v FROM t JOIN u USING (i) ORDER BY ALL; +-- +ok +== +SELECT t.i,t.s,u.v FROM t LEFT JOIN u USING (i) ORDER BY ALL; +-- +ok +== +SELECT t.i,t.s,u.v FROM t FULL JOIN u USING (i) ORDER BY ALL; +-- +ok +== +SELECT l.range,r.range FROM range(2) l CROSS JOIN range(2) r ORDER BY ALL; +-- +ok +== +SELECT sum(x) FROM (SELECT i+1 AS x FROM (VALUES (1),(2),(4),(NULL)) t(i)) q WHERE x>2; +-- +ok +== +SELECT sum(i) FROM (VALUES (1),(2),(4),(NULL)) t(i) WHERE i+1>2; +-- +ok +== +SELECT i+2 FROM (VALUES (1),(2),(4),(NULL)) t(i) WHERE i+1>2; +-- +ok +== +SELECT i FROM (SELECT i FROM (VALUES (1),(2),(3),(4),(NULL)) t(i) WHERE i>1) q WHERE i<4; +-- +ok +== +SELECT i FROM (SELECT i FROM (VALUES (1),(2),(3),(4),(NULL)) t(i) WHERE i+1>1) q WHERE i<4; +-- +ok +== +SELECT i FROM (SELECT i FROM (VALUES (1),(2),(3),(4),(NULL)) t(i) WHERE random()>=0) q WHERE i>1; +-- +ok +== +SELECT s FROM (SELECT s FROM (VALUES ('1'),('bad')) t(s) WHERE s!='bad') q WHERE CAST(s AS INTEGER)>0; +-- +ok +== +SELECT CAST(s AS INTEGER) FROM (VALUES ('1'),('bad')) t(s) WHERE s!='bad'; +-- +ok +== +SELECT i+1 FROM (VALUES (1),(2),(NULL)) t(i) WHERE random()>=0; +-- +ok +== +SELECT sum(i) FROM (VALUES (1),(2),(NULL)) t(i) WHERE random()>=0; +-- +ok +== +SELECT x,x FROM (SELECT i+1 AS x FROM (VALUES (1),(2),(2),(NULL)) t(i)) q; +-- +ok +== +SELECT x,x FROM (SELECT random() AS x FROM (VALUES (1),(2),(2)) t(i)) q; +-- +ok +== +SELECT x IS NOT DISTINCT FROM y FROM (SELECT x,x FROM (SELECT random() AS x FROM (VALUES (1),(2),(2)) t(i)) q) compared(x,y); +-- +ok +== +CREATE SEQUENCE export_sequence; +-- +ok +== +SELECT x,x FROM (SELECT nextval('export_sequence') AS x FROM (VALUES (1),(2),(2)) t(i)) q; +-- +ok +== +SELECT currval('export_sequence'); +-- +ok +== +SELECT x,x FROM (SELECT CAST(s AS INTEGER) AS x FROM (VALUES ('1'),('bad')) t(s)) q; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/scope_reuse_plan.test b/parser/testdata/corpus/sql/sql_export/scope_reuse_plan.test new file mode 100644 index 0000000..c3e5899 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/scope_reuse_plan.test @@ -0,0 +1,137 @@ +# source: test/sql/sql_export/scope_reuse_plan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT t.i,t.s,u.v FROM t JOIN u USING (i); +-- +ok +== +EXPLAIN (SQL) SELECT t.i,t.s,u.v FROM t LEFT JOIN u USING (i); +-- +ok +== +EXPLAIN (SQL) SELECT t.i,t.s,u.v FROM t FULL JOIN u USING (i); +-- +ok +== +EXPLAIN (SQL) SELECT l.range,r.range FROM range(2) l CROSS JOIN range(2) r; +-- +ok +== +EXPLAIN (SQL) SELECT sum(x) FROM (SELECT i+1 AS x FROM (VALUES (1),(2),(4),(NULL)) t(i)) q WHERE x>2; +-- +ok +== +EXPLAIN (SQL) SELECT sum(i) FROM (VALUES (1),(2),(4),(NULL)) t(i) WHERE i+1>2; +-- +ok +== +EXPLAIN (SQL) SELECT i+2 FROM (VALUES (1),(2),(4),(NULL)) t(i) WHERE i+1>2; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM (SELECT i FROM (VALUES (1),(2),(3),(4),(NULL)) t(i) WHERE i>1) q WHERE i<4; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM (SELECT i FROM (VALUES (1),(2),(3),(4),(NULL)) t(i) WHERE i+1>1) q WHERE i<4; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM (SELECT i FROM (VALUES (1),(2),(3),(4),(NULL)) t(i) WHERE random()>=0) q WHERE i>1; +-- +ok +== +EXPLAIN (SQL) SELECT s FROM (SELECT s FROM (VALUES ('1'),('bad')) t(s) WHERE s!='bad') q WHERE CAST(s AS INTEGER)>0; +-- +ok +== +EXPLAIN (SQL) SELECT CAST(s AS INTEGER) FROM (VALUES ('1'),('bad')) t(s) WHERE s!='bad'; +-- +ok +== +EXPLAIN (SQL) SELECT i+1 FROM (VALUES (1),(2),(NULL)) t(i) WHERE random()>=0; +-- +ok +== +EXPLAIN (SQL) SELECT sum(i) FROM (VALUES (1),(2),(NULL)) t(i) WHERE random()>=0; +-- +ok +== +EXPLAIN (SQL) SELECT x,x FROM (SELECT i+1 AS x FROM (VALUES (1),(2),(2),(NULL)) t(i)) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,x FROM (SELECT random() AS x FROM (VALUES (1),(2),(2)) t(i)) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,x FROM (SELECT nextval('export_sequence') AS x FROM (VALUES (1),(2),(2)) t(i)) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,x FROM (SELECT CAST(s AS INTEGER) AS x FROM (VALUES ('1'),('bad')) t(s)) q; +-- +ok +== +CREATE TABLE scope_input(i INTEGER,xs INTEGER[]); +-- +ok +== +INSERT INTO scope_input VALUES (1,[1,2]),(2,[3]),(NULL,NULL); +-- +ok +== +EXPLAIN (SQL) SELECT i FROM scope_input ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM scope_input WHERE i>0 ORDER BY i LIMIT 1 OFFSET 1; +-- +ok +== +EXPLAIN (SQL) SELECT i,row_number() OVER(ORDER BY i) FROM scope_input WHERE i>0; +-- +ok +== +EXPLAIN (SQL) SELECT i,unnest(xs) FROM scope_input WHERE i>0; +-- +ok +== +EXPLAIN (SQL) SELECT i+1 FROM scope_input ORDER BY 1; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM (SELECT i FROM scope_input LIMIT 1) q ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT v,row_number() OVER(ORDER BY v) FROM (SELECT i+1 v FROM scope_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT x,unnest(x) FROM (SELECT list_value(i,i+1) x FROM scope_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT DISTINCT i FROM scope_input ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT i FROM scope_input USING SAMPLE 100% ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT sum(n) OVER() FROM (SELECT i,count(*) n FROM scope_input GROUP BY i) q; +-- +ok +== +EXPLAIN (SQL) SELECT sum(n) OVER() FROM (SELECT row_number() OVER(ORDER BY i) n FROM scope_input) q; +-- +ok +== +EXPLAIN (SQL) SELECT unnest(v) FROM (SELECT unnest([[i],[i+1]]) v FROM scope_input) q; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/secure_view_predicates.test b/parser/testdata/corpus/sql/sql_export/secure_view_predicates.test new file mode 100644 index 0000000..72a15c1 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/secure_view_predicates.test @@ -0,0 +1,113 @@ +# source: test/sql/sql_export/secure_view_predicates.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE private_rows(i INTEGER, p VARCHAR); +-- +ok +== +INSERT INTO private_rows VALUES (1,'a'),(2,'b'),(NULL,'n'),(1,'a'); +-- +ok +== +CREATE SECURE VIEW public_rows AS SELECT * FROM private_rows; +-- +ok +== +CREATE SECURE VIEW nested_rows AS SELECT * FROM public_rows; +-- +ok +== +SELECT p FROM {view} WHERE i=1 ORDER BY p; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT p FROM {view} WHERE i IS NOT NULL AND p<>'b' ORDER BY p; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT p FROM {view} WHERE i IS NULL; +-- +error: Parser Error: syntax error at or near "{" +== +WITH c AS MATERIALIZED (SELECT * FROM nested_rows) SELECT p FROM c WHERE i=1 ORDER BY p; +-- +ok +== +WITH c AS NOT MATERIALIZED (SELECT * FROM nested_rows) SELECT p FROM c WHERE i=1 ORDER BY p; +-- +ok +== +CREATE TABLE private_text(i INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO private_text VALUES (1,'7'),(2,'bad'),(1,'7'),(1,NULL); +-- +ok +== +CREATE SECURE VIEW public_text AS SELECT s FROM private_text WHERE i=1; +-- +ok +== +SELECT s::INTEGER FROM public_text WHERE s::INTEGER=7 ORDER BY 1; +-- +ok +== +SELECT count(*), count(s) FROM public_text; +-- +ok +== +EXPLAIN (SQL) SELECT p FROM public_rows WHERE i=1; +-- +ok +== +CREATE TABLE barrier_rows(i INTEGER, s VARCHAR); +-- +ok +== +INSERT INTO barrier_rows VALUES (1,'hidden'),(2,'42'); +-- +ok +== +CREATE TABLE visible_ids AS SELECT 2 AS i; +-- +ok +== +SELECT r.s FROM barrier_rows r JOIN visible_ids v USING(i) WHERE __internal_barrier(r.s::INTEGER=42); +-- +ok +== +CREATE SECURE VIEW barrier_view AS SELECT r.* FROM barrier_rows r JOIN visible_ids v USING(i); +-- +ok +== +SELECT * FROM barrier_view WHERE s::INTEGER=42; +-- +ok +== +CREATE SEQUENCE barrier_sequence; +-- +ok +== +SELECT count(*) FROM barrier_view WHERE nextval('barrier_sequence') > 0; +-- +ok +== +SELECT currval('barrier_sequence'); +-- +ok +== +CREATE SEQUENCE limit_sequence; +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(10) LIMIT 3) WHERE __internal_barrier(nextval('limit_sequence') > 0); +-- +ok +== +SELECT currval('limit_sequence'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/secure_view_sql_export.test b/parser/testdata/corpus/sql/sql_export/secure_view_sql_export.test new file mode 100644 index 0000000..b37d4d4 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/secure_view_sql_export.test @@ -0,0 +1,178 @@ +# source: test/sql/sql_export/secure_view_sql_export.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA secret; +-- +ok +== +CREATE TABLE secret.path_data(s STRUCT(a INTEGER, b STRUCT(c VARCHAR, d VARCHAR)), t INTEGER); +-- +ok +== +INSERT INTO secret.path_data VALUES ({'a':1,'b':{'c':'bad','d':'2'}},10), ({'a':NULL,'b':{'c':'3','d':NULL}},20), (NULL,30); +-- +ok +== +CREATE SECURE VIEW secret.paths(first, second) AS SELECT s,t FROM secret.path_data; +-- +ok +== +CREATE SECURE VIEW secret.paths_twice AS SELECT * FROM secret.paths; +-- +ok +== +CREATE SECURE VIEW unused_values AS SELECT error('unused secure value') AS bad FROM range(3); +-- +ok +== +CREATE SECURE VIEW union_values AS SELECT 11 AS value UNION ALL SELECT 22; +-- +ok +== +CREATE SECURE VIEW union_struct AS SELECT {'a':1} AS unused, {'a':2} AS s UNION ALL SELECT {'a':3}, {'a':4}; +-- +ok +== +CREATE SECURE VIEW distinct_union_struct AS SELECT {'a':1} AS unused, {'a':2} AS s UNION SELECT {'a':3}, {'a':4}; +-- +ok +== +CREATE SECURE VIEW computed_struct AS SELECT 99 AS unused, {'a':i,'b':i+1} AS s FROM range(3)t(i); +-- +ok +== +CREATE TABLE filtered_data(i INTEGER, txt VARCHAR); +-- +ok +== +INSERT INTO filtered_data VALUES (0,'1'), (1,'bad'); +-- +ok +== +CREATE SECURE VIEW filtered_values AS SELECT i, CAST(txt AS INTEGER) AS value FROM filtered_data; +-- +ok +== +SELECT second,first.a,first.b.d::BIGINT,second FROM secret.paths ORDER BY second; +-- +ok +== +SELECT count(*) FROM unused_values; +-- +ok +== +SELECT count(*) FROM union_values; +-- +ok +== +SELECT s.a FROM union_struct ORDER BY s.a; +-- +ok +== +SELECT s.a FROM distinct_union_struct ORDER BY s.a; +-- +ok +== +SELECT s.a FROM computed_struct ORDER BY s.a; +-- +ok +== +SELECT value FROM filtered_values WHERE i=0; +-- +ok +== +SELECT first.a,first.b.d::BIGINT,second FROM secret.paths_twice ORDER BY second; +-- +ok +== +SELECT first,first.a,first.b,first.b.d::BIGINT,first.b.d::VARCHAR FROM secret.paths_twice ORDER BY second; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM secret.paths_twice) +SELECT a.second,b.second FROM c a CROSS JOIN c b; +-- +ok +== +WITH c AS NOT MATERIALIZED (SELECT * FROM secret.paths_twice) +SELECT a.second,b.second FROM c a CROSS JOIN c b; +-- +ok +== +SELECT first.b.d::BIGINT FROM secret.paths_twice ORDER BY second; +-- +ok +== +SELECT (first.b::STRUCT(c BIGINT,d BIGINT)).d FROM secret.paths_twice ORDER BY second; +-- +ok +== +CREATE SEQUENCE unused_secure_sequence; +-- +ok +== +CREATE SECURE VIEW unused_secure_values AS SELECT nextval('unused_secure_sequence') AS x, +CAST(CASE WHEN i=2047 THEN 'bad' ELSE '1' END AS INTEGER) AS y FROM range(4096) t(i); +-- +ok +== +SELECT count(*) FROM unused_secure_values; +-- +ok +== +SELECT last_value FROM duckdb_sequences() WHERE sequence_name='unused_secure_sequence'; +-- +ok +== +CREATE SEQUENCE retained_secure_sequence; +-- +ok +== +CREATE SECURE VIEW retained_secure_values AS SELECT nextval('retained_secure_sequence') AS x +UNION ALL SELECT nextval('retained_secure_sequence'); +-- +ok +== +SELECT count(*) FROM retained_secure_values; +-- +ok +== +SELECT last_value FROM duckdb_sequences() WHERE sequence_name='retained_secure_sequence'; +-- +ok +== +CREATE SECURE VIEW collated_inner(s) AS SELECT {'k': v COLLATE nocase, 'j': {'z': v COLLATE noaccent}} +FROM (VALUES ('A'),('a'),(NULL)) t(v); +-- +ok +== +CREATE SECURE VIEW collated_outer AS SELECT * FROM collated_inner; +-- +ok +== +SELECT s.k,s.j.z FROM collated_outer ORDER BY s.k,s.j.z; +-- +ok +== +CREATE TABLE source_data(a INTEGER, b INTEGER); +-- +ok +== +INSERT INTO source_data VALUES (1,10), (2,20), (3,30); +-- +ok +== +CREATE SECURE VIEW secure_data(left_value, right_value) AS SELECT a,b FROM source_data; +-- +ok +== +SELECT right_value,left_value FROM secure_data WHERE right_value >= 20 ORDER BY right_value; +-- +ok +== +EXPLAIN (SQL) SELECT right_value,left_value FROM secure_data WHERE right_value >= 20 ORDER BY right_value; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/single_child_union.test b/parser/testdata/corpus/sql/sql_export/single_child_union.test new file mode 100644 index 0000000..a143c97 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/single_child_union.test @@ -0,0 +1,45 @@ +# source: test/sql/sql_export/single_child_union.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 1 x UNION ALL SELECT 2 x WHERE false; +-- +ok +== +SELECT 2 x WHERE false UNION ALL SELECT 1 x; +-- +ok +== +SELECT * FROM (VALUES (1),(1),(NULL),(NULL)) t(x) UNION ALL SELECT 2 WHERE false; +-- +ok +== +SELECT * FROM (VALUES (1),(1),(NULL),(NULL)) t(x) UNION SELECT 2 WHERE false; +-- +ok +== +SELECT 'abc' x UNION ALL SELECT 'def' x WHERE false; +-- +ok +== +SELECT [1,NULL] x UNION ALL SELECT [2,3] x WHERE false; +-- +ok +== +SELECT * FROM (VALUES (1,2),(1,2),(NULL,3)) t(x,y) UNION SELECT 2,3 WHERE false; +-- +ok +== +SELECT x,nextval('seq') y FROM (SELECT nextval('seq') x FROM range(2) UNION ALL SELECT 0 WHERE false LIMIT 1)t; +-- +ok +== +WITH c AS MATERIALIZED (SELECT nextval('seq') x FROM range(2) UNION ALL SELECT 0 WHERE false LIMIT 1) SELECT x,nextval('seq') y FROM c; +-- +ok +== +SELECT CAST(CASE WHEN i=1 THEN 'bad' ELSE '0' END AS BIGINT) x FROM range(2)t(i) UNION ALL SELECT 0 WHERE false LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/slices_and_limits.test b/parser/testdata/corpus/sql/sql_export/slices_and_limits.test new file mode 100644 index 0000000..ba7c20e --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/slices_and_limits.test @@ -0,0 +1,117 @@ +# source: test/sql/sql_export/slices_and_limits.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE slice_input(id INTEGER, b INTEGER[][], s VARCHAR); +-- +ok +== +INSERT INTO slice_input VALUES (1, [[1,2],[3,NULL]], 'abcdef'), (2, []::INTEGER[][], ''), (3, NULL, NULL); +-- +ok +== +SELECT id,b[:],s[:] FROM slice_input ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id,b[:],s[:] FROM slice_input ORDER BY id; +-- +ok +== +SELECT id,b[:2],s[:3] FROM slice_input ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id,b[:2],s[:3] FROM slice_input ORDER BY id; +-- +ok +== +SELECT id,b[2:],s[2:] FROM slice_input ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id,b[2:],s[2:] FROM slice_input ORDER BY id; +-- +ok +== +SELECT id,b[1:-:2] FROM slice_input ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id,b[1:-:2] FROM slice_input ORDER BY id; +-- +ok +== +SELECT id,b[:id+1],s[:id+1] FROM slice_input ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT id,b[:id+1],s[:id+1] FROM slice_input ORDER BY id; +-- +ok +== +SELECT ([1,2,3])[:]; +-- +ok +== +SELECT array_slice([1,2,3], 1, 2); +-- +ok +== +EXPLAIN (SQL) SELECT ([1,2,3])[:]; +-- +ok +== +EXPLAIN (SQL) SELECT b[CASE WHEN id=1 THEN error('slice bound')::BIGINT ELSE 1 END:] FROM slice_input ORDER BY id; +-- +ok +== +SELECT b[CASE WHEN id=1 THEN error('slice bound')::BIGINT ELSE 1 END:] FROM slice_input ORDER BY id; +-- +ok +== +SELECT i FROM range(10) t(i) ORDER BY i LIMIT (SELECT max(j) FROM range(4) t(j)) OFFSET (SELECT min(j)+2 FROM range(4) t(j)); +-- +ok +== +CREATE TABLE filter_join_input AS SELECT i::INTEGER i,CASE WHEN i%4=0 THEN NULL ELSE (i%7)::INTEGER END v FROM range(12)t(i); +-- +ok +== +CREATE TABLE filter_lists AS SELECT * FROM (VALUES(0,[1,NULL,3]::INTEGER[]),(2,[]::INTEGER[]),(4,[4]::INTEGER[]),(30,[5]::INTEGER[]))t(i,a); +-- +ok +== +SELECT l.i,a FROM filter_lists l LEFT JOIN filter_join_input USING(i) WHERE v IS NULL ORDER BY ALL; +-- +ok +== +SELECT l.i,unnest(a) FROM filter_lists l LEFT JOIN filter_join_input USING(i) WHERE v IS NULL ORDER BY ALL; +-- +ok +== +SELECT l.i,row_number() OVER () FROM filter_lists l LEFT JOIN filter_join_input USING(i) WHERE v IS NULL ORDER BY ALL; +-- +ok +== +CREATE SCHEMA slice_shadow; +-- +ok +== +CREATE MACRO slice_shadow.array_slice(a,b,c) AS [99]; +-- +ok +== +SET search_path='slice_shadow,main'; +-- +ok +== +SELECT b[:] FROM slice_input ORDER BY id; +-- +ok +== +EXPLAIN (SQL) SELECT b[:] FROM slice_input ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/source_arguments.test b/parser/testdata/corpus/sql/sql_export/source_arguments.test new file mode 100644 index 0000000..aeaecd5 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/source_arguments.test @@ -0,0 +1,73 @@ +# source: test/sql/sql_export/source_arguments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT name,value,typed_value FROM system.main.duckdb_settings() WHERE name IN ('threads','default_collation') ORDER BY name; +-- +ok +== +SELECT bigint,varchar FROM test_all_types(use_large_enum := true,use_large_bignum := true) ORDER BY bigint NULLS LAST; +-- +ok +== +EXPLAIN (SQL) SELECT bigint,varchar FROM test_all_types(use_large_enum := true,use_large_bignum := true) ORDER BY bigint NULLS LAST; +-- +ok +== +SELECT * FROM repeat('a''b',3); +-- +ok +== +SELECT * FROM repeat(NULL::DECIMAL(9,2),2); +-- +ok +== +SELECT * FROM repeat([1,NULL,2],2); +-- +ok +== +SELECT * FROM repeat(42::BIGINT,0); +-- +ok +== +SELECT * FROM repeat_row(1::SMALLINT,NULL::VARCHAR,{'a''b':[1,NULL]},num_rows=3); +-- +ok +== +SELECT c,a,c FROM repeat_row(NULL::INTEGER,'text',4.50::DECIMAL(8,2),num_rows=2) t(a,b,c); +-- +ok +== +SELECT * FROM repeat_row(NULL::INTEGER,1::BIGINT,num_rows=0); +-- +ok +== +SELECT * FROM unnest([1,NULL,2,2]); +-- +ok +== +SELECT * FROM unnest([]::INTEGER[]); +-- +ok +== +SELECT * FROM unnest(NULL::INTEGER[]); +-- +ok +== +SELECT * FROM unnest([1,NULL]::INTEGER[2]); +-- +ok +== +SELECT * FROM unnest([{'x':1},{'x':NULL}]); +-- +ok +== +SELECT i,j FROM range(4) t(i), range(i) u(j) ORDER BY i,j; +-- +ok +== +SELECT i,j FROM range(3) t(i), generate_series(0,i) u(j) ORDER BY i,j; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/source_invocation_results.test b/parser/testdata/corpus/sql/sql_export/source_invocation_results.test new file mode 100644 index 0000000..3bced84 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/source_invocation_results.test @@ -0,0 +1,89 @@ +# source: test/sql/sql_export/source_invocation_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT a.s+b.s FROM (SELECT sum(x) s FROM range(10) t(x)) a, (SELECT sum(x) s FROM range(10) u(x)) b; +-- +ok +== +SELECT a.s+b.s FROM (SELECT sum(x) s FROM range(10) t(x)) a, (SELECT sum(x) s FROM range(11) u(x)) b; +-- +ok +== +EXPLAIN SELECT a.s+b.s FROM (SELECT sum(x) s FROM range(10) t(x)) a, (SELECT sum(x) s FROM range(10) u(x)) b; +-- +ok +== +CREATE TABLE csv_source(i INTEGER,s VARCHAR); +-- +ok +== +INSERT INTO csv_source VALUES(1,'a'),(2,NULL); +-- +ok +== +COPY csv_source TO '__TEST_DIR__/generic_source.csv' (HEADER,DELIMITER '|'); +-- +ok +== +SELECT * FROM read_csv('__TEST_DIR__/generic_source.csv', header := true, delim := '|', auto_detect := true) ORDER BY i; +-- +ok +== +SELECT count(*) FROM read_csv('__TEST_DIR__/generic_source.csv', header := true, delim := '|', auto_detect := true); +-- +ok +== +SELECT i,filename FROM read_csv('__TEST_DIR__/generic_source.csv', header := true, delim := '|', auto_detect := true,filename := true) ORDER BY i; +-- +ok +== +COPY (SELECT * FROM (VALUES (10,1),(10,1),(NULL,1),(20,2),(30,NULL)) t(i,p)) TO '__TEST_DIR__/retained_predicates_CSV' (FORMAT CSV,PARTITION_BY(p),HEADER); +-- +ok +== +SELECT i FROM read_csv('__TEST_DIR__/retained_predicates_CSV/*/*.csv',hive_partitioning := true) WHERE p=1 ORDER BY i; +-- +ok +== +SELECT i FROM read_csv('__TEST_DIR__/retained_predicates_CSV/*/*.csv',hive_partitioning := true) WHERE p IS NULL ORDER BY i; +-- +ok +== +SELECT i FROM read_csv('__TEST_DIR__/retained_predicates_CSV/*/*.csv',hive_partitioning := true) WHERE p IN (1,2) AND i>15 ORDER BY i; +-- +ok +== +SELECT i FROM read_csv('__TEST_DIR__/retained_predicates_CSV/*/*.csv',hive_partitioning := true) WHERE p>=1 OR p IS NULL ORDER BY i; +-- +ok +== +SELECT i FROM read_csv('__TEST_DIR__/retained_predicates_CSV/*/*.csv',hive_partitioning := true) WHERE array_to_string([p::VARCHAR, 'x'], '/') = '1/x' ORDER BY i; +-- +ok +== +COPY (SELECT * FROM (VALUES (10,1),(10,1),(NULL,1),(20,2),(30,NULL)) t(i,p)) TO '__TEST_DIR__/retained_predicates_parquet' (FORMAT parquet,PARTITION_BY(p)); +-- +ok +== +SELECT i FROM read_parquet('__TEST_DIR__/retained_predicates_parquet/*/*.parquet',hive_partitioning := true) WHERE p=1 ORDER BY i; +-- +ok +== +SELECT i FROM read_parquet('__TEST_DIR__/retained_predicates_parquet/*/*.parquet',hive_partitioning := true) WHERE p IS NULL ORDER BY i; +-- +ok +== +SELECT i FROM read_parquet('__TEST_DIR__/retained_predicates_parquet/*/*.parquet',hive_partitioning := true) WHERE p IN (1,2) AND i>15 ORDER BY i; +-- +ok +== +SELECT i FROM read_parquet('__TEST_DIR__/retained_predicates_parquet/*/*.parquet',hive_partitioning := true) WHERE p>=1 OR p IS NULL ORDER BY i; +-- +ok +== +SELECT i FROM read_parquet('__TEST_DIR__/retained_predicates_parquet/*/*.parquet',hive_partitioning := true) WHERE array_to_string([p::VARCHAR, 'x'], '/') = '1/x' ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/source_names.test b/parser/testdata/corpus/sql/sql_export/source_names.test new file mode 100644 index 0000000..daeb8e9 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/source_names.test @@ -0,0 +1,25 @@ +# source: test/sql/sql_export/source_names.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA "_3_schema" +-- +ok +== +CREATE TABLE "_3_schema"."_4_table"("_0_a" INTEGER, "_1_b" VARCHAR, "__2_c" INTEGER, _a3 INTEGER) +-- +ok +== +INSERT INTO "_3_schema"."_4_table" VALUES (1,'a',2,3),(1,'a',2,3),(NULL,'n',NULL,4) +-- +ok +== +SELECT "_0_a", "_1_b", "__2_c", _a3 FROM "_3_schema"."_4_table" +-- +ok +== +SELECT count(*) FROM "_3_schema"."_4_table" l JOIN "_3_schema"."_4_table" r ON l."_0_a"=r."_0_a" +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/source_results.test b/parser/testdata/corpus/sql/sql_export/source_results.test new file mode 100644 index 0000000..60c37c8 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/source_results.test @@ -0,0 +1,85 @@ +# source: test/sql/sql_export/source_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*)>0 FROM duckdb_functions(); +-- +ok +== +SELECT count(*) FROM range(4); +-- +ok +== +SELECT * FROM range(NULL::BIGINT); +-- +ok +== +SELECT x,x FROM range(5) t(x) WHERE x>=2 ORDER BY x DESC; +-- +ok +== +SELECT * FROM duckdb_keywords() ORDER BY ALL; +-- +ok +== +SELECT * FROM duckdb_optimizers() ORDER BY ALL; +-- +ok +== +SELECT database_name,schema_name,table_name FROM system.main.duckdb_tables() ORDER BY ALL; +-- +ok +== +SELECT * FROM pragma_user_agent(); +-- +ok +== +CREATE TABLE scan_rows(i INTEGER, j INTEGER, "text value" VARCHAR, n DECIMAL(12,3), xs INTEGER[]); +-- +ok +== +INSERT INTO scan_rows VALUES (1,3,'first',1.125,[1,NULL]),(2,2,NULL,NULL,[]),(2,2,'duplicate',2.250,[2]),(2,2,'duplicate',2.250,[2]),(NULL,4,'null',4.500,NULL); +-- +ok +== +SELECT * FROM scan_rows; +-- +ok +== +SELECT "text value",i,"text value" FROM scan_rows WHERE i>=2; +-- +ok +== +SELECT n,xs FROM scan_rows WHERE i IS NULL OR i=1; +-- +ok +== +SELECT rowid,i FROM scan_rows WHERE j=2; +-- +ok +== +SELECT "text value" FROM scan_rows WHERE j=2; +-- +ok +== +SELECT n FROM scan_rows WHERE i 10 +-- +ok +== +SELECT typeof(quantile_cont(x, 0.0 ORDER BY x DESC)), typeof(quantile_disc(x, 0.0 ORDER BY x DESC)), typeof(quantile_cont(x, [0.0] ORDER BY x DESC)), typeof(quantile_disc(x, [0.0] ORDER BY x DESC)) FROM (VALUES (1), (2), (2), (NULL)) t(x) +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/statement_verification.test b/parser/testdata/corpus/sql/sql_export/statement_verification.test new file mode 100644 index 0000000..512acbe --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/statement_verification.test @@ -0,0 +1,177 @@ +# source: test/sql/sql_export/statement_verification.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM system.main.duckdb_tables(); +-- +ok +== +SELECT * FROM test_all_types(); +-- +ok +== +SELECT test_vector FROM test_vector_types(NULL::INTEGER); +-- +ok +== +SELECT * FROM test_vector_types(NULL::VARCHAR, NULL::INTEGER[], all_flat=true); +-- +ok +== +WITH t AS NOT MATERIALIZED (SELECT * FROM test_all_types()) SELECT count(*) FROM t a, t b; +-- +ok +== +WITH t AS MATERIALIZED (SELECT * FROM test_vector_types(NULL::INTEGER)) SELECT count(*) FROM t a, t b; +-- +ok +== +CREATE SEQUENCE type_source_calls; +-- +ok +== +SELECT nextval('type_source_calls') FROM test_all_types(); +-- +ok +== +SELECT currval('type_source_calls'); +-- +ok +== +SELECT random() FROM test_all_types(); +-- +ok +== +SELECT sum(i) AS "quoted total" FROM (VALUES (1),(2),(2),(4)) t(i) WHERE i>1; +-- +ok +== +SELECT typeof(sum(i)) FROM (VALUES (1),(2),(2),(4)) t(i) WHERE i>1; +-- +ok +== +SELECT b AS "same",a AS "same",b AS "a""b" FROM (VALUES (1,'x'),(1,'x'),(NULL,NULL)) t(a,b); +-- +ok +== +SELECT b AS same,a AS same,b AS same FROM (VALUES (10,20)) t(a,b); +-- +ok +== +CREATE TABLE lhs(i INTEGER); +-- +ok +== +CREATE TABLE rhs(s VARCHAR); +-- +ok +== +INSERT INTO lhs VALUES (1); +-- +ok +== +INSERT INTO rhs VALUES ('x'); +-- +ok +== +SELECT * FROM lhs RIGHT JOIN rhs ON lhs.i=CAST(rhs.s AS INTEGER); +-- +ok +== +SELECT i,o FROM range(100000) WITH ORDINALITY t(i,o) WHERE o>99995 ORDER BY o; +-- +ok +== +CREATE SEQUENCE sql_export_sequence; +-- +ok +== +SELECT x,x FROM (SELECT nextval('sql_export_sequence') AS x FROM (VALUES (1),(2),(2)) t(i)) q; +-- +ok +== +VALUES (nextval('sql_export_sequence')); +-- +ok +== +SELECT write_log('not emitted', disable_logging := true, return_value := 42::INTEGER); +-- +ok +== +SELECT abs(i),sum(i) OVER () FROM (VALUES (-2),(2)) t(i); +-- +ok +== +SELECT sum(abs(i)) FROM (VALUES (-2),(2)) t(i); +-- +ok +== +SELECT avg(i),count(i),count(*) FROM (VALUES (1),(2),(NULL)) t(i); +-- +ok +== +SELECT s LIKE 'a%' FROM (VALUES ('abc'),('xyz')) t(s); +-- +ok +== +CREATE TABLE t AS SELECT * FROM (VALUES (-3,-1),(-2,2),(1,-3),(2,2)) v(i,j); +-- +ok +== +SELECT i FROM t WHERE abs(i)=2; +-- +ok +== +SELECT i FROM t WHERE abs(i)+abs(j)=4; +-- +ok +== +SELECT i FROM t WHERE i 2; +-- +ok +== +SELECT 1 <= 2; +-- +ok +== +SELECT 1 >= 2; +-- +ok +== +SELECT 1 IS NOT DISTINCT FROM 2; +-- +ok +== +SELECT 2 BETWEEN 1 AND 3; +-- +ok +== +SELECT (1=1) AND ((2=2) AND (3=3)); +-- +ok +== +SELECT CASE WHEN false THEN 10 WHEN true THEN 20 ELSE 30 END; +-- +ok +== +SELECT NOT true; +-- +ok +== +SELECT NULL::INTEGER IS NULL; +-- +ok +== +SELECT NULL::INTEGER IS NOT NULL; +-- +ok +== +SELECT 1 IN (2,3); +-- +ok +== +SELECT 1 NOT IN (2,3); +-- +ok +== +SELECT coalesce(NULL::INTEGER,4); +-- +ok +== +SELECT TRY(5); +-- +ok +== +SELECT TRY(CAST('not an integer' AS INTEGER)); +-- +ok +== +SELECT value FROM (SELECT row(42) AS value); +-- +ok +== +SELECT r >= 0 AND r < 1 FROM (SELECT random() AS r); +-- +ok +== +CREATE TABLE scalar_values(i INTEGER,s VARCHAR); +-- +ok +== +INSERT INTO scalar_values VALUES (-7,'AbC'),(7,'Def'); +-- +ok +== +SELECT abs(i), i + 2, struct_pack(value := i), NOT (i = 7) FROM scalar_values ORDER BY i; +-- +ok +== +SELECT log2(CAST(exported_0 AS DOUBLE)) FROM (VALUES (1),(2)) v(exported_0) ORDER BY exported_0; +-- +ok +== +SELECT power(CAST(exported_0 AS DOUBLE),2.0) FROM (VALUES (1),(2)) v(exported_0) ORDER BY exported_0; +-- +ok +== +SELECT alias(i % 2) AS p FROM scalar_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/table_row_number_sql_export.test b/parser/testdata/corpus/sql/sql_export/table_row_number_sql_export.test new file mode 100644 index 0000000..3b5950c --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/table_row_number_sql_export.test @@ -0,0 +1,49 @@ +# source: test/sql/sql_export/table_row_number_sql_export.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE SCHEMA "number space"; +-- +ok +== +CREATE TABLE "number space".numbers AS SELECT * FROM (VALUES (10,'a',{'x':1}),(20,NULL,{'x':2}),(30,'c',{'x':NULL}),(40,'d',{'x':4})) t(rowid,column0,s); +-- +ok +== +DELETE FROM "number space".numbers WHERE rowid=20; +-- +ok +== +INSERT INTO "number space".numbers VALUES (50,'e',{'x':5}); +-- +ok +== +SELECT rowid,n,column0,s.x FROM (SELECT *,row_number() OVER () n FROM "number space".numbers) t ORDER BY rowid; +-- +ok +== +SELECT n,n FROM (SELECT row_number() OVER () n FROM "number space".numbers) t LIMIT 3; +-- +ok +== +SELECT rowid,n FROM (SELECT rowid,row_number() OVER () n FROM "number space".numbers) t WHERE rowid>=40 ORDER BY rowid; +-- +ok +== +SELECT row_number() OVER () FROM "number space".numbers LIMIT 1; +-- +ok +== +SET disabled_optimizers='window_rewriter'; +-- +ok +== +DELETE FROM "number space".numbers; +-- +ok +== +SELECT row_number() OVER () FROM "number space".numbers; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/tuple_type_constants.test b/parser/testdata/corpus/sql/sql_export/tuple_type_constants.test new file mode 100644 index 0000000..1d926e6 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/tuple_type_constants.test @@ -0,0 +1,97 @@ +# source: test/sql/sql_export/tuple_type_constants.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT + row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR), + typeof(row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR)), + NULL::TUPLE(SMALLINT,VARCHAR), + typeof(NULL::TUPLE(SMALLINT,VARCHAR)), + row(), + typeof(row()), + row(4::TINYINT)::TUPLE(TINYINT), + typeof(row(4::TINYINT)::TUPLE(TINYINT)), + [row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR),NULL::TUPLE(SMALLINT,VARCHAR),row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR)], + typeof([row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR),NULL::TUPLE(SMALLINT,VARCHAR),row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR)]), + []::TUPLE(SMALLINT,VARCHAR)[], + typeof([]::TUPLE(SMALLINT,VARCHAR)[]), + NULL::TUPLE(SMALLINT,VARCHAR)[], + typeof(NULL::TUPLE(SMALLINT,VARCHAR)[]), + [row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR),NULL::TUPLE(SMALLINT,VARCHAR)]::TUPLE(SMALLINT,VARCHAR)[2], + typeof([row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR),NULL::TUPLE(SMALLINT,VARCHAR)]::TUPLE(SMALLINT,VARCHAR)[2]), + {'quoted field': row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR), 'n': 2::TINYINT}, + typeof({'quoted field': row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR), 'n': 2::TINYINT}), + map([1],[row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR)]), + typeof(map([1],[row(7::SMALLINT, 'a''b')::TUPLE(SMALLINT,VARCHAR)])); +-- +ok +== +SELECT + map([]::INTEGER[],[]::TUPLE(SMALLINT,VARCHAR)[]), + typeof(map([]::INTEGER[],[]::TUPLE(SMALLINT,VARCHAR)[])), + get_type(NULL::DECIMAL(13,4)), + typeof(get_type(NULL::DECIMAL(13,4))), + get_type(NULL::TUPLE(SMALLINT,VARCHAR)), + typeof(get_type(NULL::TUPLE(SMALLINT,VARCHAR))), + get_type(NULL::TYPE), + typeof(get_type(NULL::TYPE)), + NULL::TYPE, + typeof(NULL::TYPE), + [get_type(NULL::SMALLINT),NULL::TYPE], + typeof([get_type(NULL::SMALLINT),NULL::TYPE]), + []::TYPE[], + typeof([]::TYPE[]), + {'type': get_type(NULL::TUPLE(SMALLINT,VARCHAR)[])}, + typeof({'type': get_type(NULL::TUPLE(SMALLINT,VARCHAR)[])}); +-- +ok +== +SELECT CAST(row('7')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +SELECT TRY_CAST(row('7')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +SELECT CAST(row('bad')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +SELECT TRY_CAST(row('bad')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +SELECT CAST(NULL::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +SELECT TRY_CAST(NULL::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +EXPLAIN (SQL) SELECT CAST(row('7')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +EXPLAIN (SQL) SELECT TRY_CAST(row('7')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +EXPLAIN (SQL) SELECT CAST(row('bad')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +EXPLAIN (SQL) SELECT TRY_CAST(row('bad')::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +EXPLAIN (SQL) SELECT CAST(NULL::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== +EXPLAIN (SQL) SELECT TRY_CAST(NULL::TUPLE(VARCHAR) AS TUPLE(SMALLINT)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/union_type_witness.test b/parser/testdata/corpus/sql/sql_export/union_type_witness.test new file mode 100644 index 0000000..d7090dc --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/union_type_witness.test @@ -0,0 +1,97 @@ +# source: test/sql/sql_export/union_type_witness.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT union_tag(u),union_extract(u,'v'),union_extract(u,'v')='a',u IS NULL FROM (SELECT union_value(v := 'A' COLLATE NOCASE) u); +-- +ok +== +SELECT union_tag(u),union_extract(u,'v'),union_extract(u,'v')='a',u IS NULL FROM (SELECT union_value(v := 'A' COLLATE NOCASE) u); +-- +ok +== +EXPLAIN (SQL) SELECT union_tag(u),union_extract(u,'v'),u IS NULL FROM (SELECT union_value(v := NULL::VARCHAR COLLATE NOCASE) u); +-- +ok +== +SELECT union_tag(u),union_extract(u,'v'),u IS NULL FROM (SELECT union_value(v := NULL::VARCHAR COLLATE NOCASE) u); +-- +ok +== +EXPLAIN (SQL) SELECT union_tag(u),union_extract(u,'v'),u IS NULL FROM (SELECT CASE WHEN false THEN union_value(v := 'A' COLLATE NOCASE) ELSE NULL END u); +-- +ok +== +SELECT union_tag(u),union_extract(u,'v'),u IS NULL FROM (SELECT CASE WHEN false THEN union_value(v := 'A' COLLATE NOCASE) ELSE NULL END u); +-- +ok +== +EXPLAIN (SQL) SELECT i,union_tag(u),union_extract(u,'v'),u IS NULL FROM (SELECT i, CASE WHEN i=2 THEN NULL ELSE union_value(v := CASE WHEN i=1 THEN NULL ELSE 'A' COLLATE NOCASE END) END u FROM range(3)t(i)) ORDER BY i; +-- +ok +== +SELECT i,union_tag(u),union_extract(u,'v'),u IS NULL FROM (SELECT i, CASE WHEN i=2 THEN NULL ELSE union_value(v := CASE WHEN i=1 THEN NULL ELSE 'A' COLLATE NOCASE END) END u FROM range(3)t(i)) ORDER BY i; +-- +ok +== +EXPLAIN (SQL) SELECT union_tag(u),union_extract(u,'v'),union_extract(u,'v')[1]='a' FROM (SELECT union_value(v := ['A' COLLATE NOCASE,NULL]) u); +-- +ok +== +SELECT union_tag(u),union_extract(u,'v'),union_extract(u,'v')[1]='a' FROM (SELECT union_value(v := ['A' COLLATE NOCASE,NULL]) u); +-- +ok +== +EXPLAIN (SQL) SELECT union_tag(u),union_extract(u,'v').s,union_extract(u,'v').s='a' FROM (SELECT union_value(v := struct_pack(s := 'A' COLLATE NOCASE)) u); +-- +ok +== +SELECT union_tag(u),union_extract(u,'v').s,union_extract(u,'v').s='a' FROM (SELECT union_value(v := struct_pack(s := 'A' COLLATE NOCASE)) u); +-- +ok +== +EXPLAIN (SQL) SELECT [union_value(v := 'A' COLLATE NOCASE),union_value(v := NULL::VARCHAR COLLATE NOCASE),NULL]; +-- +ok +== +SELECT [union_value(v := 'A' COLLATE NOCASE),union_value(v := NULL::VARCHAR COLLATE NOCASE),NULL]; +-- +ok +== +EXPLAIN (SQL) SELECT i%2,union_extract(min(union_value(v := s COLLATE NOCASE)), 'v') FROM (VALUES (0,'A'),(1,'b'),(2,NULL))t(i,s) GROUP BY ROLLUP(i%2) ORDER BY ALL; +-- +ok +== +SELECT i%2,union_extract(min(union_value(v := s COLLATE NOCASE)), 'v') FROM (VALUES (0,'A'),(1,'b'),(2,NULL))t(i,s) GROUP BY ROLLUP(i%2) ORDER BY ALL; +-- +ok +== +EXPLAIN (SQL) SELECT i%2,union_extract(min(union_value(v := s COLLATE NOCASE)), 'v') FROM (VALUES (0,'A'),(1,'b'),(2,NULL))t(i,s) WHERE s='missing' GROUP BY ROLLUP(i%2) ORDER BY ALL; +-- +ok +== +SELECT i%2,union_extract(min(union_value(v := s COLLATE NOCASE)), 'v') FROM (VALUES (0,'A'),(1,'b'),(2,NULL))t(i,s) WHERE s='missing' GROUP BY ROLLUP(i%2) ORDER BY ALL; +-- +ok +== +EXPLAIN (SQL) SELECT union_tag(u),union_extract(u,'v') FROM (SELECT union_value(v := 'A')::UNION(v VARCHAR,n INTEGER) u); +-- +ok +== +SELECT union_tag(u),union_extract(u,'v') FROM (SELECT union_value(v := 'A')::UNION(v VARCHAR,n INTEGER) u); +-- +ok +== +CREATE TYPE alias_union AS UNION(v GEOMETRY('OGC:CRS84')); +-- +ok +== +EXPLAIN (SQL) SELECT union_tag(u),ST_AsText(union_extract(u,'v')) FROM (SELECT union_value(v := 'POINT(1 2)'::GEOMETRY('OGC:CRS84'))::alias_union u); +-- +ok +== +SELECT union_tag(u),ST_AsText(union_extract(u,'v')) FROM (SELECT union_value(v := 'POINT(1 2)'::GEOMETRY('OGC:CRS84'))::alias_union u); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/union_value.test b/parser/testdata/corpus/sql/sql_export/union_value.test new file mode 100644 index 0000000..671a54f --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/union_value.test @@ -0,0 +1,55 @@ +# source: test/sql/sql_export/union_value.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE union_export_input(i INTEGER); +-- +ok +== +INSERT INTO union_export_input VALUES (42), (NULL), (42), (-7); +-- +ok +== +SELECT union_tag(u), union_extract(u, 'Member') +FROM (SELECT union_value("Member" := i) AS different_output_alias FROM union_export_input) t(u); +-- +ok +== +SELECT union_tag(u), union_extract(u, 'a"b') +FROM (SELECT union_value("a""b" := i + 1) u FROM union_export_input); +-- +ok +== +SELECT union_tag(u), union_extract(u, 'Member'), typeof(u) +FROM (SELECT union_value("Member" := i)::UNION("Member" INTEGER, other VARCHAR) u FROM union_export_input); +-- +ok +== +SELECT union_tag(u), union_tag(union_extract(u, 'outer member')), + union_extract(union_extract(u, 'outer member'), 'inner member') +FROM (SELECT union_value("outer member" := union_value("inner member" := i)) u FROM union_export_input); +-- +ok +== +SELECT union_tag(u), union_extract(u, 'items')[1] +FROM (SELECT union_value(items := [i, i + 1]) u FROM union_export_input); +-- +ok +== +SELECT count(*) FROM (SELECT union_value(empty_member := i) u FROM union_export_input WHERE false); +-- +ok +== +PREPARE union_export_parameter AS SELECT union_extract(union_value(parameter_member := i + $1::INTEGER), 'parameter_member') FROM union_export_input ORDER BY i NULLS LAST; +-- +ok +== +EXECUTE union_export_parameter(2); +-- +ok +== +EXECUTE union_export_parameter(3); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/values_consumers.test b/parser/testdata/corpus/sql/sql_export/values_consumers.test new file mode 100644 index 0000000..147c408 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/values_consumers.test @@ -0,0 +1,48 @@ +# source: test/sql/sql_export/values_consumers.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE values_input(v INTEGER); +-- +ok +== +INSERT INTO values_input VALUES (1),(1),(2),(NULL); +-- +ok +== +SELECT count(*) FROM values_input a, +values_input b JOIN LATERAL (VALUES (a.v),(-1)) ss(x) ON b.v=ss.x; +-- +ok +== +SELECT count(*) FROM values_input a, +values_input b JOIN LATERAL (VALUES (a.v),(a.v),(NULL)) ss(x) ON b.v=ss.x; +-- +ok +== +SELECT count(*) FROM values_input a, +values_input b LEFT JOIN LATERAL (VALUES (a.v),(a.v)) ss(x) ON b.v=ss.x; +-- +ok +== +SELECT ss.x,count(*) FROM values_input a, +values_input b JOIN LATERAL (VALUES (a.v),(-1),(NULL)) ss(x) ON b.v IS NOT DISTINCT FROM ss.x +GROUP BY ss.x; +-- +ok +== +CREATE SEQUENCE values_input_sequence; +-- +ok +== +WITH src AS MATERIALIZED (SELECT nextval('values_input_sequence') v FROM range(4)) +SELECT count(*) FROM src a, +src b JOIN LATERAL (VALUES (a.v),(-1)) ss(x) ON b.v=ss.x; +-- +ok +== +SELECT currval('values_input_sequence'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/values_effect_rejection.test b/parser/testdata/corpus/sql/sql_export/values_effect_rejection.test new file mode 100644 index 0000000..47e083b --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/values_effect_rejection.test @@ -0,0 +1,21 @@ +# source: test/sql/sql_export/values_effect_rejection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO values_input VALUES (1),(2); +-- +ok +== +CREATE SEQUENCE values_guard; +-- +ok +== +EXPLAIN (SQL) SELECT count(*) FROM values_input a, values_input b JOIN LATERAL (VALUES (a.v+nextval('values_guard')),(-1)) ss(x) ON b.v=ss.x; +-- +ok +== +SELECT currval('values_guard'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/variant_key_order.test b/parser/testdata/corpus/sql/sql_export/variant_key_order.test new file mode 100644 index 0000000..7cc196b --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/variant_key_order.test @@ -0,0 +1,9 @@ +# source: test/sql/sql_export/variant_key_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT variant_extract_string(v, '') FROM (VALUES ({'a': [{'b': 1::SMALLINT, 'c': 2::TINYINT, 'a': 3}], 'b': 4, 'c': 5}::VARIANT)) t(v); +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/variant_key_rejection.test b/parser/testdata/corpus/sql/sql_export/variant_key_rejection.test new file mode 100644 index 0000000..5fca3dd --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/variant_key_rejection.test @@ -0,0 +1,17 @@ +# source: test/sql/sql_export/variant_key_rejection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +EXPLAIN (SQL) SELECT '{payload}'::JSON::VARIANT; +-- +ok +== +CREATE MACRO bad_key() AS '{"":1}'::JSON::VARIANT; +-- +ok +== +EXPLAIN (SQL) SELECT {wrapper}; +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/sql_export/window_unnest_results.test b/parser/testdata/corpus/sql/sql_export/window_unnest_results.test new file mode 100644 index 0000000..9e0a583 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/window_unnest_results.test @@ -0,0 +1,101 @@ +# source: test/sql/sql_export/window_unnest_results.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET disabled_optimizers='window_self_join,top_n_window_elimination'; +-- +ok +== +SELECT x,y,row_number() OVER () FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,rank() OVER (ORDER BY x),dense_rank() OVER (ORDER BY x),cume_dist() OVER (ORDER BY x),percent_rank() OVER (ORDER BY x),ntile(2) OVER (ORDER BY x) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,lag(y,1,0) OVER (ORDER BY x,y),lead(y) OVER (ORDER BY x,y) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,first_value(y IGNORE NULLS) OVER (ORDER BY x,y),last_value(y) OVER (ORDER BY x,y),nth_value(y,2) OVER (ORDER BY x,y) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,first_value(y IGNORE NULLS) OVER (ORDER BY x),last_value(y) OVER (ORDER BY x),nth_value(y,3) OVER (ORDER BY x) FROM (VALUES (1,10),(2,20),(2,20),(3,NULL),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,sum(y) OVER (PARTITION BY x) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,count(*) OVER (ORDER BY x ROWS BETWEEN 1 PRECEDING AND CURRENT ROW EXCLUDE TIES) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,sum(y) OVER (ORDER BY x GROUPS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE GROUP) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,sum(y) OVER (ORDER BY x RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,sum(DISTINCT y) FILTER (WHERE y>10) OVER (ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,y,first_value(y ORDER BY y DESC NULLS FIRST) OVER (PARTITION BY x ORDER BY y) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y); +-- +ok +== +SELECT x,row_number() OVER (PARTITION BY x ORDER BY y) AS n FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y) WHERE y IS NOT NULL QUALIFY n=1 ORDER BY x; +-- +ok +== +SELECT row_number() OVER () FROM (SELECT 1 WHERE false); +-- +ok +== +SELECT unnest(x),y FROM (VALUES([1,NULL,2],10),([]::INTEGER[],20),(NULL,30))t(x,y); +-- +ok +== +SELECT unnest(x),unnest(y),z FROM (VALUES([1,2],[10],1),([3],[20,30],2),([]::INTEGER[],[]::INTEGER[],3),(NULL,[40],4))t(x,y,z); +-- +ok +== +SELECT unnest(x),x FROM (VALUES([1,2]),([1,2]),(NULL),([]::INTEGER[]))t(x); +-- +ok +== +SELECT unnest(x,recursive:=true) FROM (VALUES([[1,NULL],[2]]),([[3]]))t(x); +-- +ok +== +SELECT unnest(x) FROM (VALUES([{'a':1},{'a':NULL}]),([]::STRUCT(a INTEGER)[]))t(x); +-- +ok +== +SELECT * FROM (SELECT unnest(x) AS y FROM (VALUES([1,2,3]),([4,5]))t(x)) WHERE y>1 LIMIT 2; +-- +ok +== +SELECT * FROM range(5) WITH ORDINALITY WHERE range % 2 = 0 ORDER BY ordinality; +-- +ok +== +SELECT r, o FROM range((SELECT 10)) WITH ORDINALITY t(r,o) WHERE o > 4 ORDER BY r, o; +-- +ok +== +SELECT * FROM unnest([4, NULL, 4, 7]) WITH ORDINALITY ORDER BY ordinality; +-- +ok +== +SELECT * FROM generate_series(5, 1, -2) WITH ORDINALITY ORDER BY ordinality; +-- +ok +== diff --git a/parser/testdata/corpus/sql/sql_export/zero_column_relations.test b/parser/testdata/corpus/sql/sql_export/zero_column_relations.test new file mode 100644 index 0000000..55c49a0 --- /dev/null +++ b/parser/testdata/corpus/sql/sql_export/zero_column_relations.test @@ -0,0 +1,91 @@ +# source: test/sql/sql_export/zero_column_relations.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE wide_description AS FROM query( + 'SELECT ' || array_to_string(['NULL::BIGINT AS c' || i FOR i IN range(2050)], ', ')); +-- +ok +== +SELECT count(*) FROM (DESCRIBE SELECT 1 AS a, 2 AS b, 3 AS c); +-- +ok +== +SELECT count(*) FROM (DESCRIBE SELECT * FROM wide_description); +-- +ok +== +SELECT 42 AS x FROM range(2) r, (DESCRIBE SELECT 1 AS n) d; +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS n) LIMIT 1); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b, 3 AS c) LIMIT 1 OFFSET 1); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b) LIMIT 1 OFFSET 2); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT * FROM wide_description) LIMIT 2 OFFSET 2047); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b, 3 AS c) LIMIT 2) LIMIT 1); +-- +ok +== +SELECT EXISTS(SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b)); +-- +ok +== +SELECT (SELECT 42 FROM (DESCRIBE SELECT 1 AS a, 2 AS b) LIMIT 1); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM range(2) r, (DESCRIBE SELECT 1 AS a, 2 AS b) d LIMIT 3); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b) WHERE column_name='b' LIMIT 1); +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM (DESCRIBE SELECT 1 AS a, 2 AS b)) +SELECT count(*) FROM (SELECT 1 FROM c l,c r LIMIT 3); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b) UNION ALL SELECT 1 FROM (DESCRIBE SELECT 1 AS c)); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b) UNION ALL SELECT 1 WHERE false); +-- +ok +== +SELECT count(*) FROM (SELECT DISTINCT 1 FROM (DESCRIBE SELECT 1 AS a, 2 AS b)); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS n) LIMIT 0); +-- +ok +== +SELECT count(*) FROM (SELECT 1 FROM (DESCRIBE SELECT 1 AS n) WHERE false LIMIT 1); +-- +ok +== +SELECT column_name FROM (DESCRIBE SELECT 1 AS a, NULL::INTEGER AS b) ORDER BY column_name; +-- +ok +== +EXPLAIN (SQL) SELECT count(*) FROM (DESCRIBE SELECT 1 AS a, 2 AS b); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/adaptive_segment_allocation.test b/parser/testdata/corpus/sql/storage/adaptive_segment_allocation.test index c90af66..515514d 100644 --- a/parser/testdata/corpus/sql/storage/adaptive_segment_allocation.test +++ b/parser/testdata/corpus/sql/storage/adaptive_segment_allocation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/adaptive_segment_allocation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET initial_column_segment_size = 7 @@ -173,3 +173,24 @@ DROP TABLE post_checkpoint_mem -- ok == +CREATE TABLE persistent_suballocation AS SELECT range::FLOAT AS value FROM range(1_000_000) +-- +ok +== +SELECT CASE WHEN memory_usage_bytes < 8_000_000 + THEN 'ok' + ELSE error(concat('expected < 8000000 bytes, got ', memory_usage_bytes)) + END +FROM duckdb_memory() +WHERE tag = 'IN_MEMORY_TABLE' +-- +ok +== +SELECT COUNT(*), SUM(value)::BIGINT FROM persistent_suballocation +-- +ok +== +DROP TABLE persistent_suballocation +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/adaptive_segment_lifecycle.test b/parser/testdata/corpus/sql/storage/adaptive_segment_lifecycle.test new file mode 100644 index 0000000..ed3f83a --- /dev/null +++ b/parser/testdata/corpus/sql/storage/adaptive_segment_lifecycle.test @@ -0,0 +1,78 @@ +# source: test/sql/storage/adaptive_segment_lifecycle.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET initial_column_segment_size = {segment_size} +-- +error: Parser Error: syntax error at or near "}" +== +ATTACH '{TEST_DIR}/adaptive_segment_lifecycle_{segment_size}.db' AS adaptive (ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE MACRO adaptive.source_rows(first_row, last_row) AS TABLE +SELECT i, + (i % 127)::TINYINT AS tiny, + CASE WHEN i % 7 = 0 THEN NULL ELSE i::FLOAT END AS f, + CASE WHEN i % 11 = 0 THEN NULL ELSE repeat('x', 40) || i END AS s, + {'items': [i, NULL, i + 1], 'array': [i, NULL]::BIGINT[2]} AS nested +FROM range(first_row, last_row) r(i) +-- +ok +== +CREATE TABLE adaptive.t AS FROM adaptive.source_rows(0, 1000) +-- +ok +== +INSERT INTO adaptive.t FROM adaptive.source_rows({batch} * 1000, ({batch} + 1) * 1000) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT COUNT(*) FROM ( + (FROM adaptive.t EXCEPT ALL FROM adaptive.source_rows(0, 7000)) + UNION ALL + (FROM adaptive.source_rows(0, 7000) EXCEPT ALL FROM adaptive.t) +) +-- +ok +== +DELETE FROM adaptive.t WHERE i % 3 = 0 +-- +ok +== +ALTER TABLE adaptive.t ADD COLUMN extra INTEGER DEFAULT 42 +-- +ok +== +ALTER TABLE adaptive.t DROP COLUMN extra +-- +ok +== +INSERT INTO adaptive.t FROM adaptive.source_rows(7000, 10000) +-- +ok +== +WITH expected AS ( + FROM adaptive.source_rows(0, 10000) WHERE i >= 7000 OR i % 3 != 0 +) +SELECT COUNT(*) FROM ( + (FROM adaptive.t EXCEPT ALL FROM expected) + UNION ALL + (FROM expected EXCEPT ALL FROM adaptive.t) +) +-- +ok +== +CHECKPOINT adaptive +-- +ok +== +DETACH adaptive +-- +ok +== +ATTACH '{TEST_DIR}/adaptive_segment_lifecycle_{segment_size}.db' AS adaptive +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/adaptive_segment_rollback.test b/parser/testdata/corpus/sql/storage/adaptive_segment_rollback.test new file mode 100644 index 0000000..7d0de09 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/adaptive_segment_rollback.test @@ -0,0 +1,97 @@ +# source: test/sql/storage/adaptive_segment_rollback.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE rollback_segments AS SELECT range::FLOAT AS value FROM range(100) +-- +ok +== +SET debug_force_commit_failure = true +-- +ok +== +INSERT INTO rollback_segments SELECT range::FLOAT FROM range(100, 60_000) +-- +ok +== +SET debug_force_commit_failure = false +-- +ok +== +SELECT COUNT(*), SUM(value)::BIGINT FROM rollback_segments +-- +ok +== +SELECT memory_usage_bytes < 8192 +FROM duckdb_memory() +WHERE tag = 'IN_MEMORY_TABLE' +-- +ok +== +SELECT COUNT(DISTINCT row_group_id) FROM pragma_storage_info('rollback_segments') +-- +ok +== +SELECT COUNT(*) FROM ( + (SELECT value FROM rollback_segments) + EXCEPT ALL + (SELECT range::FLOAT FROM range(60_000)) +) +-- +ok +== +INSERT INTO rollback_segments SELECT range::FLOAT FROM range(60_000, 150_000) +-- +ok +== +DROP TABLE rollback_segments +-- +ok +== +ATTACH ':memory:' AS mixed_db (ROW_GROUP_SIZE 2048) +-- +ok +== +CREATE MACRO mixed_rows(first_row, last_row) AS TABLE +SELECT i, + CASE WHEN i % 7 = 0 THEN NULL ELSE i::FLOAT END AS f, + CASE WHEN i % 11 = 0 THEN NULL ELSE repeat('x', 40) || i END AS s, + [i, NULL, i + 1] AS items, + {'a': [i, NULL]::BIGINT[2]} AS nested +FROM range(first_row, last_row) r(i) +-- +ok +== +CREATE TABLE mixed_db.mixed_rollback AS FROM mixed_rows(0, 1000) +-- +ok +== +INSERT INTO mixed_db.mixed_rollback FROM mixed_rows(1000, 2500) +-- +ok +== +SELECT COUNT(*) FROM ( + (FROM mixed_db.mixed_rollback EXCEPT ALL FROM mixed_rows(0, 1000)) + UNION ALL + (FROM mixed_rows(0, 1000) EXCEPT ALL FROM mixed_db.mixed_rollback) +) +-- +ok +== +SELECT COUNT(*) FROM ( + (FROM mixed_db.mixed_rollback EXCEPT ALL FROM mixed_rows(0, 2500)) + UNION ALL + (FROM mixed_rows(0, 2500) EXCEPT ALL FROM mixed_db.mixed_rollback) +) +-- +ok +== +CHECKPOINT mixed_db +-- +ok +== +DETACH mixed_db +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/alter/alter_add_col_defaultexpr_sequence.test b/parser/testdata/corpus/sql/storage/alter/alter_add_col_defaultexpr_sequence.test index 7dbd655..3d084ea 100644 --- a/parser/testdata/corpus/sql/storage/alter/alter_add_col_defaultexpr_sequence.test +++ b/parser/testdata/corpus/sql/storage/alter/alter_add_col_defaultexpr_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/storage/alter/alter_add_col_defaultexpr_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE db1.tbl (id INTEGER DEFAULT nextval('seq'), s VARCHAR); diff --git a/parser/testdata/corpus/sql/storage/alter/alter_based_on_unfinished_insert_fails.test b/parser/testdata/corpus/sql/storage/alter/alter_based_on_unfinished_insert_fails.test index ef12b90..63e2396 100644 --- a/parser/testdata/corpus/sql/storage/alter/alter_based_on_unfinished_insert_fails.test +++ b/parser/testdata/corpus/sql/storage/alter/alter_based_on_unfinished_insert_fails.test @@ -1,6 +1,6 @@ # source: test/sql/storage/alter/alter_based_on_unfinished_insert_fails.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t AS SELECT @@ -29,7 +29,3 @@ FROM range(10); -- ok == -SELECT count(*) FROM t --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/alter/alter_column_constraint.test b/parser/testdata/corpus/sql/storage/alter/alter_column_constraint.test index 2ba5d8e..83cd369 100644 --- a/parser/testdata/corpus/sql/storage/alter/alter_column_constraint.test +++ b/parser/testdata/corpus/sql/storage/alter/alter_column_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/alter/alter_column_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS a(id INT PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/storage/alter/alter_lazy_metadata_load.test b/parser/testdata/corpus/sql/storage/alter/alter_lazy_metadata_load.test index 3d14d69..af83901 100644 --- a/parser/testdata/corpus/sql/storage/alter/alter_lazy_metadata_load.test +++ b/parser/testdata/corpus/sql/storage/alter/alter_lazy_metadata_load.test @@ -1,6 +1,6 @@ # source: test/sql/storage/alter/alter_lazy_metadata_load.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t as select i, i // 2 as j, i // 4 as k from range(1_000_000) t(i); diff --git a/parser/testdata/corpus/sql/storage/append_strings_to_persistent.test b/parser/testdata/corpus/sql/storage/append_strings_to_persistent.test index dfc3413..f3b2b09 100644 --- a/parser/testdata/corpus/sql/storage/append_strings_to_persistent.test +++ b/parser/testdata/corpus/sql/storage/append_strings_to_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/storage/append_strings_to_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE vals(i INTEGER, v VARCHAR) diff --git a/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_in_memory.test b/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_in_memory.test index 113267d..ee7a41a 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_in_memory.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_in_memory.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach/attach_autocheckpoint_in_memory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET auto_checkpoint_skip_wal_threshold = 9999999999; diff --git a/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_no_wal_writes.test b/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_no_wal_writes.test index 1064d4d..122f409 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_no_wal_writes.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_no_wal_writes.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach/attach_autocheckpoint_no_wal_writes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_autockpt_no_wal.db' AS nw (RECOVERY_MODE NO_WAL_WRITES); diff --git a/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_propagation.test b/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_propagation.test index b93f09c..85b298c 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_propagation.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_autocheckpoint_propagation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach/attach_autocheckpoint_propagation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_autockpt_prop.db' AS a; @@ -23,7 +23,3 @@ SELECT COUNT(*) FROM a.tbl; -- ok == -DETACH a; --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/attach/attach_invalidation.test b/parser/testdata/corpus/sql/storage/attach/attach_invalidation.test index 88a27f5..7219749 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_invalidation.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_invalidation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach/attach_invalidation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_invalidation_a_{abort_mode}.db' AS a; diff --git a/parser/testdata/corpus/sql/storage/attach/attach_invalidation_default_db.test b/parser/testdata/corpus/sql/storage/attach/attach_invalidation_default_db.test index e7e3a3f..83c4a9e 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_invalidation_default_db.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_invalidation_default_db.test @@ -1,16 +1,12 @@ # source: test/sql/storage/attach/attach_invalidation_default_db.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA wal_autocheckpoint = '1TB'; -- ok == -INSERT INTO t VALUES (1); --- -ok -== ATTACH '{TEST_DIR}/attach_inval_default_sib_{abort_mode}.db' AS sib; -- ok diff --git a/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_commit.test b/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_commit.test index e27db3a..2b966cd 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_commit.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_commit.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach/attach_invalidation_sibling_commit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_invalidation_sibling_commit_a.db' AS a; diff --git a/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_rollback.test b/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_rollback.test index 4e24e9f..5f001d7 100644 --- a/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_rollback.test +++ b/parser/testdata/corpus/sql/storage/attach/attach_invalidation_sibling_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach/attach_invalidation_sibling_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_invalidation_sibling_rollback_a.db' AS a; diff --git a/parser/testdata/corpus/sql/storage/attach_mmap.test b/parser/testdata/corpus/sql/storage/attach_mmap.test index 6faeb58..ed3bbfb 100644 --- a/parser/testdata/corpus/sql/storage/attach_mmap.test +++ b/parser/testdata/corpus/sql/storage/attach_mmap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/attach_mmap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/bogus.duckdb' AS bogus (IO_MODE 'NOPE') @@ -15,34 +15,6 @@ DETACH buffered_db -- ok == -SELECT current_setting('default_io_mode') --- -ok -== -SET default_io_mode = 'MMAP' --- -ok -== -ATTACH '{TEST_DIR}/default_io_mode_mmap.duckdb' AS dim_db --- -ok -== -CREATE TABLE dim_db.t (a INTEGER) --- -ok -== -INSERT INTO dim_db.t VALUES (1), (2), (3) --- -ok -== -SELECT a FROM dim_db.t ORDER BY a --- -ok -== -DETACH dim_db --- -ok -== ATTACH '{TEST_DIR}/mmap_reserve_size.duckdb' AS rsize_db (IO_MODE 'MMAP', MMAP_RESERVE_SIZE '1GB') -- ok @@ -63,14 +35,6 @@ ATTACH '{TEST_DIR}/mmap_reserve_size_bad.duckdb' AS rsize_bad (IO_MODE 'MMAP', M -- error: Parser Error: Memory must have a number (e.g. 1GB) == -RESET default_io_mode --- -ok -== -SET default_io_mode = 'NOPE' --- -ok -== ATTACH '{TEST_DIR}/mmap_attach.duckdb' AS mmap_db (IO_MODE 'MMAP') -- ok diff --git a/parser/testdata/corpus/sql/storage/bc/internal_schemas_0102.test b/parser/testdata/corpus/sql/storage/bc/internal_schemas_0102.test index bcd6215..f85b5fa 100644 --- a/parser/testdata/corpus/sql/storage/bc/internal_schemas_0102.test +++ b/parser/testdata/corpus/sql/storage/bc/internal_schemas_0102.test @@ -1,6 +1,6 @@ # source: test/sql/storage/bc/internal_schemas_0102.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT database_name, schema_name FROM duckdb_schemas WHERE NOT internal diff --git a/parser/testdata/corpus/sql/storage/bc/test_broken_view_v092.test b/parser/testdata/corpus/sql/storage/bc/test_broken_view_v092.test index 3cbc217..63365b6 100644 --- a/parser/testdata/corpus/sql/storage/bc/test_broken_view_v092.test +++ b/parser/testdata/corpus/sql/storage/bc/test_broken_view_v092.test @@ -1,6 +1,6 @@ # source: test/sql/storage/bc/test_broken_view_v092.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM duckdb_columns(); diff --git a/parser/testdata/corpus/sql/storage/bc/test_slice_bounds_storage_version.test b/parser/testdata/corpus/sql/storage/bc/test_slice_bounds_storage_version.test new file mode 100644 index 0000000..f674c5b --- /dev/null +++ b/parser/testdata/corpus/sql/storage/bc/test_slice_bounds_storage_version.test @@ -0,0 +1,89 @@ +# source: test/sql/storage/bc/test_slice_bounds_storage_version.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/slice_bounds_{storage_version}.db' AS db (STORAGE_VERSION '{storage_version}') +-- +ok +== +CREATE VIEW db.v_slice AS SELECT [1, 2, 3][2:] AS a, [1, 2, 3][:2] AS b, 'abcdef'[2:] AS c, 'abcdef'[:3] AS d, [1, 2, 3, 4, 5][:-:2] AS e, [1, 2, 3, 4, 5][2:-:2] AS f, [1, 2, 3][:] AS g +-- +ok +== +CREATE VIEW db.v_lambda AS SELECT list_transform([[1, 2, 3], [4, 5, 6]], lambda x: x[2:]) AS a +-- +ok +== +CREATE VIEW db.v_explicit AS SELECT [1, 2, 3][1:2] AS a, []::INTEGER[] AS b, [1, 2, 3][list_value():2] AS c +-- +ok +== +CREATE MACRO db.m_tail(l) AS l[2:] +-- +ok +== +CREATE MACRO db.m_head(l) AS TABLE SELECT l[:2] AS r +-- +ok +== +CREATE TABLE db.t (a VARCHAR, d VARCHAR DEFAULT ('abcdef'[2:]), g VARCHAR GENERATED ALWAYS AS (a[2:]), CHECK (a[:1] <> 'x')) +-- +ok +== +DETACH db +-- +ok +== +ATTACH '{TEST_DIR}/slice_bounds_{storage_version}.db' AS db +-- +ok +== +FROM db.v_slice +-- +ok +== +FROM db.v_lambda +-- +ok +== +FROM db.v_explicit +-- +ok +== +SELECT db.m_tail([1, 2, 3]) +-- +ok +== +FROM db.m_head([1, 2, 3]) +-- +ok +== +INSERT INTO db.t (a) VALUES ('hello') +-- +ok +== +INSERT INTO db.t (a) VALUES ('xyz') +-- +ok +== +FROM db.t +-- +ok +== +CREATE TABLE t_slice (l INTEGER[], s VARCHAR, g VARCHAR GENERATED ALWAYS AS (s[2:])) +-- +ok +== +INSERT INTO t_slice VALUES ([1, 2, 3], 'abcdef') +-- +ok +== +CREATE VIEW v_slice AS SELECT l[2:] AS a, l[:2] AS b, s[:3] AS c, l[:-:2] AS d, list_transform([l], lambda x: x[2:]) AS e FROM t_slice +-- +ok +== +FROM v_slice +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/bc/test_slice_bounds_v1_5.test b/parser/testdata/corpus/sql/storage/bc/test_slice_bounds_v1_5.test new file mode 100644 index 0000000..6bebaa9 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/bc/test_slice_bounds_v1_5.test @@ -0,0 +1,73 @@ +# source: test/sql/storage/bc/test_slice_bounds_v1_5.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/slice_bounds_v1_5.db' AS old +-- +ok +== +FROM old.v_slice +-- +ok +== +FROM old.v_slice_tbl +-- +ok +== +FROM old.v_lambda_arrow +-- +ok +== +FROM old.v_lambda_python +-- +ok +== +FROM old.v_empty_list +-- +ok +== +SELECT old.m_tail([1, 2, 3]) +-- +ok +== +FROM old.m_head([1, 2, 3]) +-- +ok +== +INSERT INTO old.t_default (b) VALUES (1) +-- +ok +== +FROM old.t_default +-- +ok +== +INSERT INTO old.t_generated VALUES ('hello') +-- +ok +== +FROM old.t_generated +-- +ok +== +INSERT INTO old.t_check VALUES ('abc') +-- +ok +== +INSERT INTO old.t_check VALUES ('xyz') +-- +ok +== +FROM old.t_check +-- +ok +== +DETACH old +-- +ok +== +SELECT old.m_tail('abcdef') +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/bc/test_view_v092.test b/parser/testdata/corpus/sql/storage/bc/test_view_v092.test index f89e888..c6aec92 100644 --- a/parser/testdata/corpus/sql/storage/bc/test_view_v092.test +++ b/parser/testdata/corpus/sql/storage/bc/test_view_v092.test @@ -1,6 +1,6 @@ # source: test/sql/storage/bc/test_view_v092.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM v3 diff --git a/parser/testdata/corpus/sql/storage/buffer_manager_temp_dir.test b/parser/testdata/corpus/sql/storage/buffer_manager_temp_dir.test index 944bd12..01d1282 100644 --- a/parser/testdata/corpus/sql/storage/buffer_manager_temp_dir.test +++ b/parser/testdata/corpus/sql/storage/buffer_manager_temp_dir.test @@ -1,6 +1,6 @@ # source: test/sql/storage/buffer_manager_temp_dir.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA memory_limit='2MB' diff --git a/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/basic.test b/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/basic.test index f21744d..9d57613 100644 --- a/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/basic.test +++ b/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/basic.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/generated_columns/virtual/basic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/constraints.test b/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/constraints.test index ec09999..ef2d9f1 100644 --- a/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/constraints.test +++ b/parser/testdata/corpus/sql/storage/catalog/generated_columns/virtual/constraints.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/generated_columns/virtual/constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/storage/catalog/test_check_constraint.test b/parser/testdata/corpus/sql/storage/catalog/test_check_constraint.test index 554f048..08d24a9 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_check_constraint.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_check_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_check_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a INTEGER CHECK (a<10), b INTEGER CHECK(CASE WHEN b < 10 THEN a < b ELSE a + b < 100 END)); diff --git a/parser/testdata/corpus/sql/storage/catalog/test_drop_table.test b/parser/testdata/corpus/sql/storage/catalog/test_drop_table.test index 860e5fa..02a1b72 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_drop_table.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_drop_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_drop_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test.test (a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/storage/catalog/test_macro_storage.test b/parser/testdata/corpus/sql/storage/catalog/test_macro_storage.test index c85ea87..bf9e7ee 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_macro_storage.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_macro_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_macro_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO plus1(a) AS a+1 diff --git a/parser/testdata/corpus/sql/storage/catalog/test_not_distinct_from_default.test b/parser/testdata/corpus/sql/storage/catalog/test_not_distinct_from_default.test index afea96a..bc5852f 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_not_distinct_from_default.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_not_distinct_from_default.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_not_distinct_from_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_default (a BOOL DEFAULT nextval('seq') is not distinct from nextval('seq'), b INTEGER); diff --git a/parser/testdata/corpus/sql/storage/catalog/test_not_null_constraint.test b/parser/testdata/corpus/sql/storage/catalog/test_not_null_constraint.test index 1e2eddc..8ac9de1 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_not_null_constraint.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_not_null_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_not_null_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a INTEGER NOT NULL); diff --git a/parser/testdata/corpus/sql/storage/catalog/test_prepared_storage.test b/parser/testdata/corpus/sql/storage/catalog/test_prepared_storage.test index 228f9cc..f0226f6 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_prepared_storage.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_prepared_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_prepared_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (a INTEGER) diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_add_column.test b/parser/testdata/corpus/sql/storage/catalog/test_store_add_column.test index db5e4e5..83b8302 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_add_column.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_add_column.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_add_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT k FROM test ORDER BY k diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_alter_type.test b/parser/testdata/corpus/sql/storage/catalog/test_store_alter_type.test index 92f2379..8bdd418 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_alter_type.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_alter_type.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_alter_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test ALTER b TYPE VARCHAR diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_default_sequence.test b/parser/testdata/corpus/sql/storage/catalog/test_store_default_sequence.test index 09daafe..28ec9cb 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_default_sequence.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_default_sequence.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_default_sequence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER DEFAULT nextval('seq'), b INTEGER, c INTEGER DEFAULT currval('seq')); diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_defaults.test b/parser/testdata/corpus/sql/storage/catalog/test_store_defaults.test index 5844926..ca35bd5 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_defaults.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_defaults.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_defaults.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test (b) VALUES (12), (13) diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_remove_column.test b/parser/testdata/corpus/sql/storage/catalog/test_store_remove_column.test index 1e1fe88..d79a066 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_remove_column.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_remove_column.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_remove_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test DROP COLUMN b diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_rename_column.test b/parser/testdata/corpus/sql/storage/catalog/test_store_rename_column.test index 22d3b1d..5853f05 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_rename_column.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_rename_column.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_rename_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME COLUMN a TO k diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_rename_table.test b/parser/testdata/corpus/sql/storage/catalog/test_store_rename_table.test index d9f9ca1..aeee95a 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_rename_table.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_rename_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_rename_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE test RENAME TO new_name diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_rename_view.test b/parser/testdata/corpus/sql/storage/catalog/test_store_rename_view.test index 564491d..2f4bd00 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_rename_view.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_rename_view.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_rename_view.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW vtest AS SELECT * FROM test diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_sequences.test b/parser/testdata/corpus/sql/storage/catalog/test_store_sequences.test index b8a5c75..985a4a1 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_sequences.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_sequences.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_sequences.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SEQUENCE seq_cycle INCREMENT 1 MAXVALUE 3 START 2 CYCLE; diff --git a/parser/testdata/corpus/sql/storage/catalog/test_store_temporary.test b/parser/testdata/corpus/sql/storage/catalog/test_store_temporary.test index 0e36fc4..65992dc 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_store_temporary.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_store_temporary.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_store_temporary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE persistent (i INTEGER) diff --git a/parser/testdata/corpus/sql/storage/catalog/test_table_macro_storage.test b/parser/testdata/corpus/sql/storage/catalog/test_table_macro_storage.test index 03012b6..c29ef9d 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_table_macro_storage.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_table_macro_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_table_macro_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_tbl (id INT, name string, height double); diff --git a/parser/testdata/corpus/sql/storage/catalog/test_view_explicit_aliases.test b/parser/testdata/corpus/sql/storage/catalog/test_view_explicit_aliases.test index 0d9d2f0..62a3e58 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_view_explicit_aliases.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_view_explicit_aliases.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_view_explicit_aliases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW test.v (b,c) AS SELECT * FROM test.t; diff --git a/parser/testdata/corpus/sql/storage/catalog/test_view_storage.test b/parser/testdata/corpus/sql/storage/catalog/test_view_storage.test index 2ca16ff..f1a8588 100644 --- a/parser/testdata/corpus/sql/storage/catalog/test_view_storage.test +++ b/parser/testdata/corpus/sql/storage/catalog/test_view_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/catalog/test_view_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW test.v AS SELECT * FROM test.t; diff --git a/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_in_transaction.test b/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_in_transaction.test index 39b6a91..e4b0987 100644 --- a/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_in_transaction.test +++ b/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_in_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpoint/checkpoint_in_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET wal_autocheckpoint='100GB' diff --git a/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_with_outstanding_insertions.test b/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_with_outstanding_insertions.test index bec465a..5a336d8 100644 --- a/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_with_outstanding_insertions.test +++ b/parser/testdata/corpus/sql/storage/checkpoint/checkpoint_with_outstanding_insertions.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpoint/checkpoint_with_outstanding_insertions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table z(id integer); diff --git a/parser/testdata/corpus/sql/storage/checkpoint/indexed_table_delete_insert_fragmentation.test b/parser/testdata/corpus/sql/storage/checkpoint/indexed_table_delete_insert_fragmentation.test index 190c547..88b5f39 100644 --- a/parser/testdata/corpus/sql/storage/checkpoint/indexed_table_delete_insert_fragmentation.test +++ b/parser/testdata/corpus/sql/storage/checkpoint/indexed_table_delete_insert_fragmentation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpoint/indexed_table_delete_insert_fragmentation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_rowgroup_append_mode_on_fragmented_tables.db' as snap (READ_WRITE, STORAGE_VERSION 'v1.5.0', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/checkpoint/initial_database_autocheckpoint_failure.test b/parser/testdata/corpus/sql/storage/checkpoint/initial_database_autocheckpoint_failure.test index 500d895..b4dc40f 100644 --- a/parser/testdata/corpus/sql/storage/checkpoint/initial_database_autocheckpoint_failure.test +++ b/parser/testdata/corpus/sql/storage/checkpoint/initial_database_autocheckpoint_failure.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpoint/initial_database_autocheckpoint_failure.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA debug_checkpoint_abort = 'before_header'; diff --git a/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_abort_truncate.test b/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_abort_truncate.test new file mode 100644 index 0000000..d650a30 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_abort_truncate.test @@ -0,0 +1,27 @@ +# source: test/sql/storage/checkpoint/test_checkpoint_abort_truncate.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA debug_checkpoint_abort='AFTER_FREE_LIST_WRITE'; +-- +ok +== +CREATE TABLE t AS SELECT repeat('a', 100) FROM range(50000); +-- +ok +== +PRAGMA debug_checkpoint_abort='none'; +-- +ok +== +SELECT total_blocks +FROM pragma_database_size(); +-- +ok +== +SELECT size = (SELECT total_blocks * block_size + 12288 FROM pragma_database_size()) +FROM read_blob('{TEST_DIR}/checkpoint_abort_truncate.db'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_delayed_commit.test b/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_delayed_commit.test index f44d147..805e62b 100644 --- a/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_delayed_commit.test +++ b/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_delayed_commit.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpoint/test_checkpoint_failure_delayed_commit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/fail_detach_delayed' AS db; diff --git a/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_on_detach.test b/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_on_detach.test index b5492b5..b57f3fc 100644 --- a/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_on_detach.test +++ b/parser/testdata/corpus/sql/storage/checkpoint/test_checkpoint_failure_on_detach.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpoint/test_checkpoint_failure_on_detach.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/fail_detach'; diff --git a/parser/testdata/corpus/sql/storage/checkpointed_self_append.test b/parser/testdata/corpus/sql/storage/checkpointed_self_append.test index 738df23..e09e34c 100644 --- a/parser/testdata/corpus/sql/storage/checkpointed_self_append.test +++ b/parser/testdata/corpus/sql/storage/checkpointed_self_append.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpointed_self_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE vals(i INTEGER) diff --git a/parser/testdata/corpus/sql/storage/checkpointed_self_append_tinyint.test b/parser/testdata/corpus/sql/storage/checkpointed_self_append_tinyint.test index 2a80dde..ff14e39 100644 --- a/parser/testdata/corpus/sql/storage/checkpointed_self_append_tinyint.test +++ b/parser/testdata/corpus/sql/storage/checkpointed_self_append_tinyint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/checkpointed_self_append_tinyint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE vals(i TINYINT) diff --git a/parser/testdata/corpus/sql/storage/commit_abort.test b/parser/testdata/corpus/sql/storage/commit_abort.test index 076f00b..b193e37 100644 --- a/parser/testdata/corpus/sql/storage/commit_abort.test +++ b/parser/testdata/corpus/sql/storage/commit_abort.test @@ -1,6 +1,6 @@ # source: test/sql/storage/commit_abort.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER PRIMARY KEY, b INTEGER, c VARCHAR); diff --git a/parser/testdata/corpus/sql/storage/commit_abort_medium.test b/parser/testdata/corpus/sql/storage/commit_abort_medium.test index 0ebcefe..6f7526a 100644 --- a/parser/testdata/corpus/sql/storage/commit_abort_medium.test +++ b/parser/testdata/corpus/sql/storage/commit_abort_medium.test @@ -1,6 +1,6 @@ # source: test/sql/storage/commit_abort_medium.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT i, NULL, NULL FROM range(15, 10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/commit_index_deletes.test b/parser/testdata/corpus/sql/storage/commit_index_deletes.test index 2f8a733..8958fac 100644 --- a/parser/testdata/corpus/sql/storage/commit_index_deletes.test +++ b/parser/testdata/corpus/sql/storage/commit_index_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/storage/commit_index_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM test WHERE a=14 diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/block_size_with_rollback.test b/parser/testdata/corpus/sql/storage/compact_block_size/block_size_with_rollback.test index 015e9a5..9a5816f 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/block_size_with_rollback.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/block_size_with_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/block_size_with_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rollback.db' (BLOCK_SIZE 16384); diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/compact_block_size.test b/parser/testdata/corpus/sql/storage/compact_block_size/compact_block_size.test index 639b228..30b2b28 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/compact_block_size.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/compact_block_size.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/compact_block_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{DATA_DIR}/storage/index_0-9-1.db' (TYPE DUCKDB, READONLY); diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/compact_vector_size.test b/parser/testdata/corpus/sql/storage/compact_block_size/compact_vector_size.test index 76efd2a..7f90208 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/compact_vector_size.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/compact_vector_size.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/compact_vector_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{DATA_DIR}/storage/vector_size_512.db' (TYPE DUCKDB, READONLY); diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/create_table_compression.test b/parser/testdata/corpus/sql/storage/compact_block_size/create_table_compression.test index fc43581..3e608de 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/create_table_compression.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/create_table_compression.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/create_table_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) > 0 FROM pragma_storage_info('T') diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/default_block_size.test b/parser/testdata/corpus/sql/storage/compact_block_size/default_block_size.test index 412e701..c55cc24 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/default_block_size.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/default_block_size.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/default_block_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{DATA_DIR}/storage/block_size_16kb.db' (TYPE DUCKDB, READONLY) diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/ensure_bitpacking.test b/parser/testdata/corpus/sql/storage/compact_block_size/ensure_bitpacking.test index faed8b1..fe4188b 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/ensure_bitpacking.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/ensure_bitpacking.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/ensure_bitpacking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/smaller_block_size.db' (BLOCK_SIZE 16384); diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/ensure_no_bitpacking.test b/parser/testdata/corpus/sql/storage/compact_block_size/ensure_no_bitpacking.test index baadb0b..600dcb8 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/ensure_no_bitpacking.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/ensure_no_bitpacking.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/ensure_no_bitpacking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/no_bitpacking.db' (BLOCK_SIZE 16384); diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/insertion_order_odd_batches.test b/parser/testdata/corpus/sql/storage/compact_block_size/insertion_order_odd_batches.test index 09ad0ea..ee18260 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/insertion_order_odd_batches.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/insertion_order_odd_batches.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/insertion_order_odd_batches.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM range(100000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compact_block_size/mixed_block_sizes.test b/parser/testdata/corpus/sql/storage/compact_block_size/mixed_block_sizes.test index 53fcdc3..679df38 100644 --- a/parser/testdata/corpus/sql/storage/compact_block_size/mixed_block_sizes.test +++ b/parser/testdata/corpus/sql/storage/compact_block_size/mixed_block_sizes.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compact_block_size/mixed_block_sizes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/small.db' (BLOCK_SIZE 16384); diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_count.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_count.test new file mode 100644 index 0000000..ab7e46a --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_count.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alp_corrupt_count +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='a' AND compression='ALP'; +-- +ok +== +SELECT sum(a) FROM t; +-- +ok +== +SET debug_force_fetch_row=true; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_exception_position.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_exception_position.test similarity index 60% rename from parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_exception_position.test rename to parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_exception_position.test index 74cdcb8..6d141b9 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_exception_position.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_exception_position.test @@ -1,6 +1,6 @@ -# source: test/sql/storage/compression/alp/alp_corrupted_exception_position.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# source: test/sql/storage/compression/alp/alp_corrupt_exception_position.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/alp_corrupt_exception_position.db' AS db2 diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_exponent.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_exponent.test new file mode 100644 index 0000000..ec1c53a --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_exponent.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_exponent.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alp_corrupt_exponent +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_file.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_file.test new file mode 100644 index 0000000..773a668 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_file.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_file.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/alp_corrupt_file.db' AS db2 +-- +ok +== +SELECT compression FROM pragma_storage_info('alp') WHERE compression='ALP'; +-- +ok +== +SELECT * FROM alp LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_header_undercount.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_header_undercount.test new file mode 100644 index 0000000..41dfa3d --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_header_undercount.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_header_undercount.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alp_corrupt_header_undercount +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_metadata_offset.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_metadata_offset.test new file mode 100644 index 0000000..2fa0fdc --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_metadata_offset.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_metadata_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alp_corrupt_metadata_offset +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offset.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offset.test new file mode 100644 index 0000000..b93ff62 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offset.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alp_corrupt_offset +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='b' AND compression='ALP'; +-- +ok +== +SELECT sum(b) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offset_unordered.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offset_unordered.test new file mode 100644 index 0000000..9c02d98 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offset_unordered.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_offset_unordered.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alp_corrupt_offset_unordered +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_offsets.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offsets.test similarity index 50% rename from parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_offsets.test rename to parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offsets.test index 36c83ff..c71540a 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_offsets.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_offsets.test @@ -1,9 +1,9 @@ -# source: test/sql/storage/compression/alp/alp_corrupted_offsets.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# source: test/sql/storage/compression/alp/alp_corrupt_offsets.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -ATTACH '{TEST_DIR}/alp_corrupted_offsets.db' AS db2 +ATTACH '{TEST_DIR}/alp_corrupt_offsets.db' AS db2 -- ok == diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_vector_size.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_vector_size.test new file mode 100644 index 0000000..026914b --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupt_vector_size.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alp/alp_corrupt_vector_size.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/alp_corrupt_vector_size.db' AS db2 +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_file.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_file.test deleted file mode 100644 index 4b62fe0..0000000 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_file.test +++ /dev/null @@ -1,17 +0,0 @@ -# source: test/sql/storage/compression/alp/alp_corrupted_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -ATTACH '{TEST_DIR}/alp_corrupted.db' AS db2 --- -ok -== -SELECT compression FROM pragma_storage_info('alp') WHERE compression='ALP'; --- -ok -== -SELECT * FROM alp LIMIT 1; --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_vector_size.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_vector_size.test deleted file mode 100644 index bd84a5f..0000000 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_corrupted_vector_size.test +++ /dev/null @@ -1,9 +0,0 @@ -# source: test/sql/storage/compression/alp/alp_corrupted_vector_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -ATTACH '{TEST_DIR}/alp_corrupt_vector_size.db' AS db2 --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_inf_null_nan.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_inf_null_nan.test index c311a1d..f809263 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_inf_null_nan.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_inf_null_nan.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_inf_null_nan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='{compression}' diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_list_skip.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_list_skip.test index 6470ad0..0321fc5 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_list_skip.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_list_skip.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_list_skip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_compression='{comp}' diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_min_max.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_min_max.test index afac455..eb4516f 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_min_max.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_min_max.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_min_max.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='alp'; diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_negative_numbers.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_negative_numbers.test index 419a4b5..268ff23 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_negative_numbers.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_negative_numbers.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_negative_numbers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='uncompressed' diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_null_min_regression.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_null_min_regression.test new file mode 100644 index 0000000..9c67c57 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_null_min_regression.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/compression/alp/alp_null_min_regression.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA force_compression='{compression}'; +-- +ok +== +CREATE OR REPLACE TABLE t(x {type}); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO t VALUES (NULL), (42.5); +-- +ok +== +SELECT MIN(x) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_nulls.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_nulls.test index 458fd3b..0e5a46e 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_nulls.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into tbl1_{compression}(d,f) VALUES diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_out_of_range.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_out_of_range.test index 59425ab..bbefca9 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_out_of_range.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_out_of_range.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_out_of_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(v DOUBLE); diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_simple.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_simple.test index c053470..e6c9b26 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table random_double as select round(random(), 6)::DOUBLE as data from range(1024) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_simple_float.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_simple_float.test index 36dbc37..af21b65 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_simple_float.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_simple_float.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_simple_float.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table random_float as select round(random(), 6)::FLOAT as data from range(1024) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_storage_version.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_storage_version.test index e89952f..8d962dc 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_storage_version.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_storage_version.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_storage_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/alp-v1_4_0-16k.db' AS alp_v1_4_0 (STORAGE_VERSION 'v1.4.0', BLOCK_SIZE 16384); diff --git a/parser/testdata/corpus/sql/storage/compression/alp/alp_zeros.test b/parser/testdata/corpus/sql/storage/compression/alp/alp_zeros.test index bab1f2c..49871a5 100644 --- a/parser/testdata/corpus/sql/storage/compression/alp/alp_zeros.test +++ b/parser/testdata/corpus/sql/storage/compression/alp/alp_zeros.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alp/alp_zeros.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table random_double as select 0::DOUBLE as data from range(1024) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_count.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_count.test new file mode 100644 index 0000000..1f1078d --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_count.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_count +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='a' AND compression='ALPRD' LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_dictionary_count.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_dictionary_count.test new file mode 100644 index 0000000..f96f597 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_dictionary_count.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_dictionary_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_dictionary_count +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_dictionary_count_zero.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_dictionary_count_zero.test new file mode 100644 index 0000000..436a476 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_dictionary_count_zero.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_dictionary_count_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_dictionary_count_zero +-- +ok +== +SELECT sum(a) IS NOT NULL FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_exception_count.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_exception_count.test new file mode 100644 index 0000000..8de2237 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_exception_count.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_exception_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_exception_count +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE segment_type = 'DOUBLE' AND compression != 'ALPRD'; +-- +ok +== +SELECT * FROM t LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_exception_position.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_exception_position.test new file mode 100644 index 0000000..0bd758b --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_exception_position.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_exception_position.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_exception_position +-- +ok +== +SELECT compression FROM pragma_storage_info('two_alp') WHERE compression='ALPRD'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_header_undercount.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_header_undercount.test new file mode 100644 index 0000000..009a2af --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_header_undercount.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_header_undercount.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_header_undercount +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_left_bit_width.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_left_bit_width.test new file mode 100644 index 0000000..31b09e0 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_left_bit_width.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_left_bit_width.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_left_bit_width +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_metadata_underflow.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_metadata_underflow.test new file mode 100644 index 0000000..895c60f --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_metadata_underflow.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_metadata_underflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_metadata_underflow +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_offset.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_offset.test new file mode 100644 index 0000000..b10a30e --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_offset.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_offset +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='b' AND compression='ALPRD' LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_offset_unordered.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_offset_unordered.test new file mode 100644 index 0000000..e1a8a52 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_offset_unordered.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_offset_unordered.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_offset_unordered +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_right_bit_width.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_right_bit_width.test new file mode 100644 index 0000000..867c611 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupt_right_bit_width.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/alprd/alprd_corrupt_right_bit_width.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE alprd_corrupt_right_bit_width +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupted_dict_size.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupted_dict_size.test deleted file mode 100644 index acd3fbf..0000000 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupted_dict_size.test +++ /dev/null @@ -1,17 +0,0 @@ -# source: test/sql/storage/compression/alprd/alprd_corrupted_dict_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -ATTACH '{TEST_DIR}/alprd_corrupted_dict_size.db' AS db2 --- -ok -== -SELECT compression FROM pragma_storage_info('t') WHERE segment_type = 'DOUBLE' AND compression != 'ALPRD'; --- -ok -== -SELECT * FROM t LIMIT 1; --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupted_exception_position.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupted_exception_position.test deleted file mode 100644 index 50176ea..0000000 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_corrupted_exception_position.test +++ /dev/null @@ -1,13 +0,0 @@ -# source: test/sql/storage/compression/alprd/alprd_corrupted_exception_position.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 -# generated by cmd/regenerate - do not edit - -ATTACH '{TEST_DIR}/alprd_corrupt_exception_position.db' AS db2 --- -ok -== -SELECT compression FROM pragma_storage_info('two_alp') WHERE compression='ALPRD'; --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_inf_null_nan.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_inf_null_nan.test index 6728446..d68cb4e 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_inf_null_nan.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_inf_null_nan.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_inf_null_nan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select d, f from tbl1_alprd; diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_min_max.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_min_max.test index cd923fe..2382980 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_min_max.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_min_max.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_min_max.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='alprd'; diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_negative_numbers.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_negative_numbers.test index 2755720..e680092 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_negative_numbers.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_negative_numbers.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_negative_numbers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table random_double as select round(cos(1 / (random() + 0.001)), 15)::DOUBLE * -1 as data from range(1024) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_nulls.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_nulls.test index 7066158..d0acd87 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_nulls.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into tbl3_{compression}(d,f) VALUES diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple.test index 1423edc..9603911 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table random_double as select random()::DOUBLE as data from range(1024) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple_float.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple_float.test index 798d783..b412548 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple_float.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_simple_float.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_simple_float.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table random_float as select random()::FLOAT as data from range(1024) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_storage_version.test b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_storage_version.test index 528a9b6..27e3db2 100644 --- a/parser/testdata/corpus/sql/storage/compression/alprd/alprd_storage_version.test +++ b/parser/testdata/corpus/sql/storage/compression/alprd/alprd_storage_version.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/alprd/alprd_storage_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/alprd-v1_4_0-16k.db' AS alprd_v1_4_0 (STORAGE_VERSION 'v1.4.0', BLOCK_SIZE 16384); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_bool_modes.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_bool_modes.test new file mode 100644 index 0000000..fe29df0 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_bool_modes.test @@ -0,0 +1,25 @@ +# source: test/sql/storage/compression/bitpacking/bitpacking_bool_modes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET force_compression = 'bitpacking' +-- +ok +== +SET force_bitpacking_mode='{mode}' +-- +ok +== +CREATE OR REPLACE TABLE t AS SELECT i, CASE WHEN i % 7 = 0 THEN NULL ELSE i % 3 = 0 END b, i < 3000 c, NULL::BOOL n, (i // 2) % 2 = 0 d FROM range(10000) r(i) +-- +ok +== +SELECT count(b), sum(b::INT), sum(c::INT), count(n), sum(d::INT), bool_or(b) FROM t +-- +ok +== +SELECT b, c, d FROM t WHERE i IN (0, 1, 3, 7, 9999) ORDER BY i +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_constant_delta.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_constant_delta.test index 95942ab..5fcb7e3 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_constant_delta.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_constant_delta.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_constant_delta.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'bitpacking' diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_count.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_count.test new file mode 100644 index 0000000..27f2aab --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_count.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/bitpacking/bitpacking_corrupt_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE bitpacking_corrupt_count +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='a' AND compression='BitPacking'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_group_offset.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_group_offset.test new file mode 100644 index 0000000..8348097 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_group_offset.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/bitpacking/bitpacking_corrupt_group_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE bitpacking_corrupt_group_offset +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_metadata_underflow.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_metadata_underflow.test new file mode 100644 index 0000000..7408e0e --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_metadata_underflow.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/bitpacking/bitpacking_corrupt_metadata_underflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE bitpacking_corrupt_metadata_underflow +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_width.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_width.test new file mode 100644 index 0000000..63e1a27 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_corrupt_width.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/bitpacking/bitpacking_corrupt_width.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE bitpacking_corrupt_width +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_delta_for.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_delta_for.test index 8c7e279..70a2357 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_delta_for.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_delta_for.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_delta_for.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='bitpacking' diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_filter_pushdown.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_filter_pushdown.test index 9e33e69..ede6ab1 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_filter_pushdown.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id VARCHAR, col INTEGER) diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_hugeint.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_hugeint.test index 134e017..133527c 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_hugeint.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_hugeint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_bitpacking_mode='constant' diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_mode.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_mode.test index 4dd88b4..b6db2ee 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_mode.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_mode.test @@ -1,12 +1,8 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_mode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET force_compression = 'bitpacking' --- -ok -== SELECT current_setting('force_bitpacking_mode') -- ok @@ -15,10 +11,6 @@ SET force_bitpacking_mode='xxx' -- ok == -SET force_bitpacking_mode='{mode}' --- -ok -== SELECT current_setting('force_bitpacking_mode')='{mode}' -- ok diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_nulls.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_nulls.test index 54cd4dd..b27455d 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_nulls.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a BIGINT); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple.test index 3ed18d2..acb1527 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id VARCHAR, a BIGINT); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple_hugeint.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple_hugeint.test index 579fc2c..4facc95 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple_hugeint.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_simple_hugeint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_simple_hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT i::VARCHAR, -i::HUGEINT + -1234567891011121314151617180000::HUGEINT FROM range(0, 10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_size_calculation.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_size_calculation.test index a267ba9..e5d0c3b 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_size_calculation.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_size_calculation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_size_calculation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='bitpacking' diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_storage_info.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_storage_info.test index b060b2b..436578d 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_storage_info.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_storage_info.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_storage_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (11, 22), (12, 21), (NULL, NULL) diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_table_copy.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_table_copy.test index c154f28..b429311 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_table_copy.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_table_copy.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_table_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a integer); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_uhugeint.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_uhugeint.test index 9319208..edcdbe7 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_uhugeint.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/bitpacking_uhugeint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/bitpacking_uhugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id VARCHAR, a UHUGEINT); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/force_bitpacking.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/force_bitpacking.test index b2dec23..fc4285d 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/force_bitpacking.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/force_bitpacking.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/force_bitpacking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_bp (a INTEGER); diff --git a/parser/testdata/corpus/sql/storage/compression/bitpacking/struct_bitpacking.test b/parser/testdata/corpus/sql/storage/compression/bitpacking/struct_bitpacking.test index c20a0ee..9668e80 100644 --- a/parser/testdata/corpus/sql/storage/compression/bitpacking/struct_bitpacking.test +++ b/parser/testdata/corpus/sql/storage/compression/bitpacking/struct_bitpacking.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/bitpacking/struct_bitpacking.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (s ROW(a INTEGER)); diff --git a/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_group_count.test b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_group_count.test new file mode 100644 index 0000000..518b0be --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_group_count.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/chimp/chimp_corrupt_group_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE chimp_corrupt_group_count; +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE segment_type='DOUBLE' LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_leading_zero_block_count.test b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_leading_zero_block_count.test new file mode 100644 index 0000000..7432919 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_leading_zero_block_count.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/chimp/chimp_corrupt_leading_zero_block_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE chimp_corrupt_leading_zero_block_count; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_metadata_offset.test b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_metadata_offset.test new file mode 100644 index 0000000..9f02d5f --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_corrupt_metadata_offset.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/chimp/chimp_corrupt_metadata_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE chimp_corrupt_metadata_offset; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/chimp/chimp_fetch_row.test b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_fetch_row.test new file mode 100644 index 0000000..13b825c --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/chimp/chimp_fetch_row.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/chimp/chimp_fetch_row.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT temperature::VARCHAR FROM temperatures_double LIMIT 3; +-- +ok +== +SELECT temperature::VARCHAR FROM temperatures_float LIMIT 3; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/compression_count_sentinel.test b/parser/testdata/corpus/sql/storage/compression/compression_count_sentinel.test new file mode 100644 index 0000000..d73269f --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/compression_count_sentinel.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/compression_count_sentinel.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t (i INTEGER USING COMPRESSION compression_count); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/compression_selection.test b/parser/testdata/corpus/sql/storage/compression/compression_selection.test index 1648719..6501bd9 100644 --- a/parser/testdata/corpus/sql/storage/compression/compression_selection.test +++ b/parser/testdata/corpus/sql/storage/compression/compression_selection.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/compression_selection.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_rle (a INTEGER); diff --git a/parser/testdata/corpus/sql/storage/compression/constant/constant_negative_zero.test b/parser/testdata/corpus/sql/storage/compression/constant/constant_negative_zero.test new file mode 100644 index 0000000..6d0c289 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/constant/constant_negative_zero.test @@ -0,0 +1,45 @@ +# source: test/sql/storage/compression/constant/constant_negative_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE mixed_zero(id INTEGER, v DOUBLE, vf FLOAT); +-- +ok +== +INSERT INTO mixed_zero VALUES (1, '-0.0', '-0.0'), (2, '0.0', '0.0'); +-- +ok +== +CREATE TABLE neg_zero AS SELECT '-0.0'::DOUBLE AS v, '-0.0'::FLOAT AS vf FROM range(3); +-- +ok +== +CREATE TABLE pos_zero AS SELECT '0.0'::DOUBLE AS v, '0.0'::FLOAT AS vf FROM range(3); +-- +ok +== +SELECT DISTINCT compression = 'Constant' FROM pragma_storage_info('mixed_zero') WHERE column_name IN ('v', 'vf') AND segment_type IN ('DOUBLE', 'FLOAT'); +-- +ok +== +SELECT DISTINCT compression FROM pragma_storage_info('neg_zero') WHERE segment_type IN ('DOUBLE', 'FLOAT'); +-- +ok +== +SELECT DISTINCT compression FROM pragma_storage_info('pos_zero') WHERE segment_type IN ('DOUBLE', 'FLOAT'); +-- +ok +== +SELECT id, signbit(v), signbit(vf) FROM mixed_zero ORDER BY id; +-- +ok +== +SELECT DISTINCT signbit(v), signbit(vf) FROM neg_zero; +-- +ok +== +SELECT DISTINCT signbit(v), signbit(vf) FROM pos_zero; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/constant/constant_numeric_types.test b/parser/testdata/corpus/sql/storage/compression/constant/constant_numeric_types.test new file mode 100644 index 0000000..fe3b740 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/constant/constant_numeric_types.test @@ -0,0 +1,37 @@ +# source: test/sql/storage/compression/constant/constant_numeric_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE constant_numbers AS +SELECT i::INTEGER AS id, + 1::TINYINT AS i8, + 2::SMALLINT AS i16, + 3::UTINYINT AS u8, + 4::USMALLINT AS u16, + 5::UINTEGER AS u32, + 6::UBIGINT AS u64, + 7::HUGEINT AS i128, + 8::UHUGEINT AS u128, + 1.5::FLOAT AS f32, + 2.5::DOUBLE AS f64 +FROM range(4096) r(i) +-- +ok +== +SELECT DISTINCT compression +FROM pragma_storage_info('constant_numbers') +WHERE column_name <> 'id' AND segment_type <> 'VALIDITY' +-- +ok +== +CREATE UNIQUE INDEX constant_numbers_id ON constant_numbers(id) +-- +ok +== +SELECT i8, i16, u8, u16, u32, u64, i128, u128, f32, f64 +FROM constant_numbers +WHERE id = 42 +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/default_storage_dict_fsst.test b/parser/testdata/corpus/sql/storage/compression/default_storage_dict_fsst.test index 6c0777c..603f291 100644 --- a/parser/testdata/corpus/sql/storage/compression/default_storage_dict_fsst.test +++ b/parser/testdata/corpus/sql/storage/compression/default_storage_dict_fsst.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/default_storage_dict_fsst.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_expression_filter.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_expression_filter.test index ffac65a..5e41530 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_expression_filter.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_expression_filter.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/dict_fsst_expression_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE partial_segment AS diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_test.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_test.test index e27062d..e5f1430 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_test.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dict_fsst_test.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/dict_fsst_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='uncompressed'; diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_covers_validity.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_covers_validity.test index 8b723de..18134ce 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_covers_validity.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_covers_validity.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/dictionary_covers_validity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set checkpoint_threshold='10mb'; diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_storage_info.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_storage_info.test index 6cd8af6..8195d44 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_storage_info.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/dictionary_storage_info.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/dictionary_storage_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'dict_fsst' diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/fetch_row.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/fetch_row.test index 42de63c..10751c7 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/fetch_row.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/fetch_row.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/fetch_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'dict_fsst'; diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/force_dictionary.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/force_dictionary.test index 1f9bc6d..4603691 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/force_dictionary.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/force_dictionary.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/force_dictionary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test_dict SELECT i::VARCHAR FROM range(0, 2000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/invalid_symbol_table.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/invalid_symbol_table.test index cbc1f43..9c2d86c 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/invalid_symbol_table.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/invalid_symbol_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/invalid_symbol_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/dict_fsst_invalid_symbol_table.db' AS db2 diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675.test index 06f7465..055e90d 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/issue_5675.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma threads=1 diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675_followup.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675_followup.test index 8a36b6a..5c12f23 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675_followup.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5675_followup.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/issue_5675_followup.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO TEST SELECT CASE WHEN i%2==0 diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5759.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5759.test index 68ce275..14f98a4 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5759.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/issue_5759.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/issue_5759.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='dict_fsst' diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/repeated_string_stats.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/repeated_string_stats.test index e5fb928..6d4c1d2 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/repeated_string_stats.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/repeated_string_stats.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/repeated_string_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE repeated AS diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_dict_fsst_with_smaller_block_size.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_dict_fsst_with_smaller_block_size.test index ea0a4cd..d1b691b 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_dict_fsst_with_smaller_block_size.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_dict_fsst_with_smaller_block_size.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/test_dict_fsst_with_smaller_block_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version='latest'; diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_filter_pushdown.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_filter_pushdown.test index 5a50f23..ac716b2 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_filter_pushdown.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/test_null_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='DICT_FSST'; diff --git a/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_update.test b/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_update.test index dbb0558..d2eb0f2 100644 --- a/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_update.test +++ b/parser/testdata/corpus/sql/storage/compression/dict_fsst/test_null_update.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dict_fsst/test_null_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t( diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/dict_corrupted_offset.test b/parser/testdata/corpus/sql/storage/compression/dictionary/dict_corrupted_offset.test index 733f6a6..dc86e71 100644 --- a/parser/testdata/corpus/sql/storage/compression/dictionary/dict_corrupted_offset.test +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/dict_corrupted_offset.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dictionary/dict_corrupted_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/dict_corrupted_offset.db' AS db2 diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_count.test b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_count.test new file mode 100644 index 0000000..82cc591 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_count.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/dictionary/dictionary_corrupt_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE dictionary_corrupt_count; +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='s' AND compression='Dictionary' LIMIT 1; +-- +ok +== +SELECT max(s) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_count_consistent.test b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_count_consistent.test new file mode 100644 index 0000000..4a07ddf --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_count_consistent.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/dictionary/dictionary_corrupt_count_consistent.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE dictionary_corrupt_count_consistent; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_null_index.test b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_null_index.test new file mode 100644 index 0000000..5ffc334 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_corrupt_null_index.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/compression/dictionary/dictionary_corrupt_null_index.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE dictionary_corrupt_null_index; +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='s' AND segment_type='VARCHAR' LIMIT 1; +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='s' AND segment_type='VALIDITY' LIMIT 1; +-- +ok +== +SELECT count(s), sum(length(s)) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_empty_segment.test b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_empty_segment.test new file mode 100644 index 0000000..fd55df8 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_empty_segment.test @@ -0,0 +1,25 @@ +# source: test/sql/storage/compression/dictionary/dictionary_empty_segment.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/dictionary_empty_segment.db' AS d (STORAGE_VERSION 'v1.1.0'); +-- +ok +== +USE d; +-- +ok +== +SET force_compression='dictionary'; +-- +ok +== +CREATE TABLE t AS SELECT []::VARCHAR[] ls UNION ALL SELECT NULL::VARCHAR[]; +-- +ok +== +SELECT ls FROM t ORDER BY ls NULLS LAST +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_storage_info.test b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_storage_info.test index dd73105..d45f4b4 100644 --- a/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_storage_info.test +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/dictionary_storage_info.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dictionary/dictionary_storage_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'dictionary' diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/fetch_row.test b/parser/testdata/corpus/sql/storage/compression/dictionary/fetch_row.test index 7aae443..eace97e 100644 --- a/parser/testdata/corpus/sql/storage/compression/dictionary/fetch_row.test +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/fetch_row.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dictionary/fetch_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( @@ -13,18 +13,32 @@ ok INSERT INTO test (a, b) SELECT x AS a, - CASE x % 5 + CASE x % 7 WHEN 0 THEN 'aaaa' WHEN 1 THEN 'bbbb' WHEN 2 THEN 'cccc' WHEN 3 THEN 'dddd' WHEN 4 THEN NULL + WHEN 5 THEN '' + WHEN 6 THEN 'a string longer than twelve bytes' END AS b -FROM range(10_000) t(x); +FROM range(10_003) t(x); -- ok == -select distinct b from test order by a % 5; +SET debug_force_fetch_row={force_fetch}; +-- +error: Parser Error: syntax error at or near "}" +== +select distinct b from test order by a % 7; +-- +ok +== +SELECT b, count(*) FROM test GROUP BY b ORDER BY b NULLS LAST; +-- +ok +== +SELECT a, b FROM test WHERE a IN (0, 4, 5, 6, 31, 32, 33, 2047, 2048, 2049, 10002) ORDER BY a; -- ok == diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/invalid_dictionary_metadata.test b/parser/testdata/corpus/sql/storage/compression/dictionary/invalid_dictionary_metadata.test index 96f0a81..4c0bbca 100644 --- a/parser/testdata/corpus/sql/storage/compression/dictionary/invalid_dictionary_metadata.test +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/invalid_dictionary_metadata.test @@ -1,77 +1,41 @@ # source: test/sql/storage/compression/dictionary/invalid_dictionary_metadata.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -ATTACH '{TEST_DIR}/dictionary_invalid_offset.db' AS offset_db +USE dictionary_invalid_offset; -- ok == -SELECT count(*) FROM pragma_storage_info('offset_db.tbl') WHERE compression='Dictionary' +SELECT count(*) FROM pragma_storage_info('tbl') WHERE compression='Dictionary' -- ok == -SELECT sum(length(STREET)) FROM offset_db.tbl +SELECT sum(length(STREET)) FROM tbl -- ok == -ATTACH '{TEST_DIR}/dictionary_invalid_index.db' AS index_db +USE dictionary_invalid_index; -- ok == -SELECT count(*) FROM pragma_storage_info('index_db.tbl') WHERE compression='Dictionary' +USE dictionary_invalid_dict_end; -- ok == -SELECT sum(length(STREET)) FROM index_db.tbl +USE dictionary_invalid_bitpacking_width; -- ok == -ATTACH '{TEST_DIR}/dictionary_invalid_dict_end.db' AS dict_end_db +USE dictionary_invalid_selection_buffer; -- ok == -SELECT count(*) FROM pragma_storage_info('dict_end_db.tbl') WHERE compression='Dictionary' +USE dictionary_invalid_segment_end; -- ok == -SELECT sum(length(STREET)) FROM dict_end_db.tbl --- -ok -== -ATTACH '{TEST_DIR}/dictionary_invalid_bitpacking_width.db' AS bitpacking_width_db --- -ok -== -SELECT count(*) FROM pragma_storage_info('bitpacking_width_db.tbl') WHERE compression='Dictionary' --- -ok -== -SELECT sum(length(STREET)) FROM bitpacking_width_db.tbl --- -ok -== -ATTACH '{TEST_DIR}/dictionary_invalid_selection_buffer.db' AS selection_buffer_db --- -ok -== -SELECT count(*) FROM pragma_storage_info('selection_buffer_db.tbl') WHERE compression='Dictionary' --- -ok -== -SELECT sum(length(STREET)) FROM selection_buffer_db.tbl --- -ok -== -ATTACH '{TEST_DIR}/dictionary_invalid_segment_end.db' AS segment_end_db --- -ok -== -SELECT block_offset FROM pragma_storage_info('segment_end_db.tbl') WHERE compression='Dictionary' AND column_name='street' --- -ok -== -SELECT sum(length(STREET)) FROM segment_end_db.tbl +SELECT block_offset FROM pragma_storage_info('tbl') WHERE compression='Dictionary' AND column_name='street' -- ok == diff --git a/parser/testdata/corpus/sql/storage/compression/dictionary/total_string_length_dictionary.test b/parser/testdata/corpus/sql/storage/compression/dictionary/total_string_length_dictionary.test index fd3c17f..3ff5fdc 100644 --- a/parser/testdata/corpus/sql/storage/compression/dictionary/total_string_length_dictionary.test +++ b/parser/testdata/corpus/sql/storage/compression/dictionary/total_string_length_dictionary.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/dictionary/total_string_length_dictionary.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (s VARCHAR); diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_corrupt_decoded_length.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_corrupt_decoded_length.test new file mode 100644 index 0000000..3f5e28d --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_corrupt_decoded_length.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/fsst/fsst_corrupt_decoded_length.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE fsst_corrupt_decoded_length +-- +ok +== +SET enable_fsst_vectors = true +-- +ok +== +SELECT array_value(a) FROM t +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_corrupt_escape_symbol_index.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_corrupt_escape_symbol_index.test new file mode 100644 index 0000000..cdb31e9 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_corrupt_escape_symbol_index.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/fsst/fsst_corrupt_escape_symbol_index.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE fsst_corrupt_escape_symbol_index +-- +ok +== +SET enable_fsst_vectors = false +-- +ok +== +SET debug_force_fetch_row = true +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_disable_compression.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_disable_compression.test index de34e56..4995139 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_disable_compression.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_disable_compression.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/fsst_disable_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT concat('longprefix', i) FROM range(30000) t(i); diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_greedy_long_strings.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_greedy_long_strings.test index d156145..31d4162 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_greedy_long_strings.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_greedy_long_strings.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/fsst_greedy_long_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_compression = 'fsst'; @@ -18,10 +18,20 @@ FROM range(3500) t(i); -- ok == -SELECT count(*) +SELECT count(*) > 0 FROM pragma_storage_info('db.t') WHERE column_name = 's' AND compression = 'FSST'; -- ok == +ATTACH '{TEST_DIR}/fsst_greedy.db' AS db (READ_ONLY); +-- +ok +== +SELECT count(*), count(*) FILTER ( + WHERE s = repeat('x', 510) || 'abcdefghij' || lpad(i::VARCHAR, 8, '0')) +FROM (SELECT row_number() OVER (ORDER BY s) - 1 AS i, s FROM db.t); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_select_across_segments.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_select_across_segments.test new file mode 100644 index 0000000..edd0f9a --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_select_across_segments.test @@ -0,0 +1,41 @@ +# source: test/sql/storage/compression/fsst/fsst_select_across_segments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/fsst_select_across_segments.db' AS db (BLOCK_SIZE 16384, STORAGE_VERSION 'v1.0.0'); +-- +ok +== +CREATE MACRO expected_string(i) AS CASE WHEN i%13=0 THEN NULL ELSE repeat(md5((i//127)::VARCHAR),8) END; +-- +ok +== +CREATE TABLE db.strings(id INTEGER, value VARCHAR USING COMPRESSION fsst); +-- +ok +== +INSERT INTO db.strings SELECT i, expected_string(i) FROM range(20000) t(i); +-- +ok +== +SELECT count(*)>1 AND bool_and(compression='FSST') AND bool_or(start%2048 != 0) FROM pragma_storage_info('db.strings') WHERE segment_type='VARCHAR'; +-- +ok +== +ATTACH '{TEST_DIR}/fsst_select_across_segments.db' AS db; +-- +ok +== +CREATE TEMP TABLE retained AS SELECT * FROM db.strings WHERE id%2048<70 OR id%2048>=2046; +-- +ok +== +SELECT count(*), bool_and(value IS NOT DISTINCT FROM expected_string(id)) FROM db.strings WHERE id%2048=0; +-- +ok +== +SELECT count(*), bool_and(value IS NOT DISTINCT FROM expected_string(id)) FROM retained; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_small_symbol_table.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_small_symbol_table.test index f600095..d7de3ad 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_small_symbol_table.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_small_symbol_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/fsst_small_symbol_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/fsst_small_symbol_table.db' AS db1 (BLOCK_SIZE 16384, STORAGE_VERSION 'v1.0.0') diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_storage_info.test b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_storage_info.test index 2ad0928..db260c9 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/fsst_storage_info.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/fsst_storage_info.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/fsst_storage_info.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'fsst' diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/invalid_fsst_bitpacking_width.test b/parser/testdata/corpus/sql/storage/compression/fsst/invalid_fsst_bitpacking_width.test index 21d1beb..c372e5e 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/invalid_fsst_bitpacking_width.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/invalid_fsst_bitpacking_width.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/invalid_fsst_bitpacking_width.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/fsst_invalid_bitpacking_width.db' AS invalid_fsst_db @@ -11,7 +11,3 @@ USE invalid_fsst_db -- ok == -SELECT sum(length(STREET)) FROM tbl --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/issue_5675.test b/parser/testdata/corpus/sql/storage/compression/fsst/issue_5675.test index d57c49d..5fc84ba 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/issue_5675.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/issue_5675.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/issue_5675.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='fsst'; diff --git a/parser/testdata/corpus/sql/storage/compression/fsst/issue_5759.test b/parser/testdata/corpus/sql/storage/compression/fsst/issue_5759.test index 9766767..6bdc69d 100644 --- a/parser/testdata/corpus/sql/storage/compression/fsst/issue_5759.test +++ b/parser/testdata/corpus/sql/storage/compression/fsst/issue_5759.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/fsst/issue_5759.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='fsst' diff --git a/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_data_offset_high.test b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_data_offset_high.test new file mode 100644 index 0000000..99f250a --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_data_offset_high.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/patas/patas_corrupt_data_offset_high.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE patas_corrupt_data_offset_high; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_group_count.test b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_group_count.test new file mode 100644 index 0000000..dd2a202 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_group_count.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/patas/patas_corrupt_group_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE patas_corrupt_group_count; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_metadata_offset_low.test b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_metadata_offset_low.test new file mode 100644 index 0000000..e6bd9ad --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupt_metadata_offset_low.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/patas/patas_corrupt_metadata_offset_low.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE patas_corrupt_metadata_offset_low; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupted_file.test b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupted_file.test index 8444f59..3821e21 100644 --- a/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupted_file.test +++ b/parser/testdata/corpus/sql/storage/compression/patas/patas_corrupted_file.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/patas/patas_corrupted_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT compression FROM pragma_storage_info('temperatures_double') WHERE compression='Patas'; diff --git a/parser/testdata/corpus/sql/storage/compression/rle/force_rle.test b/parser/testdata/corpus/sql/storage/compression/rle/force_rle.test index c743a3c..4235c63 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/force_rle.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/force_rle.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/force_rle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'rle' diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_bool.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_bool.test index 8de0144..8679b23 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_bool.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_bool.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a BOOLEAN); diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_constant.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_constant.test index 114251a..330b426 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_constant.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_constant.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test select 0 from range(4096); diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupt_run_undercount.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupt_run_undercount.test new file mode 100644 index 0000000..5b97464 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupt_run_undercount.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/compression/rle/rle_corrupt_run_undercount.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE rle_corrupt_run_undercount +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='a' AND compression='RLE'; +-- +ok +== +SET debug_force_fetch_row=false; +-- +ok +== +SELECT sum(a) FROM t WHERE rowid%2=1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupt_value_capacity.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupt_value_capacity.test new file mode 100644 index 0000000..9e8806c --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupt_value_capacity.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/rle/rle_corrupt_value_capacity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE rle_corrupt_value_capacity +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupted_count_offset.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupted_count_offset.test index 39a03a7..6538cb1 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupted_count_offset.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_corrupted_count_offset.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_corrupted_count_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT compression FROM pragma_storage_info('t') WHERE compression='RLE'; diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_filter.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_filter.test index 09e9780..45c7c45 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_filter.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_filter.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i id, i // 50 rle_val, case when i%8=0 then null else i // 50 end rle_val_null FROM range(100000) t(i); diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_filter_pushdown.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_filter_pushdown.test index a86132f..bdd0403 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_filter_pushdown.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id VARCHAR, col INTEGER); diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_index_fetch.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_index_fetch.test index 7f8e4e9..4d9af31 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_index_fetch.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_index_fetch.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_index_fetch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(id INTEGER PRIMARY KEY, col INTEGER); diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_medium.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_medium.test index aa643df..8615391 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_medium.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_medium.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_medium.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT * FROM repeat(1, 1000); diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_nulls_edge_case.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_nulls_edge_case.test index 8880657..69e6493 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_nulls_edge_case.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_nulls_edge_case.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_nulls_edge_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='RLE'; diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_select.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_select.test index 3ab058b..e643b07 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_select.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_select.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_select.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM tbl WHERE id >= 75 and id <= 125 and id%4=0 diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_select_force_fetch_row.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_select_force_fetch_row.test new file mode 100644 index 0000000..81757b9 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_select_force_fetch_row.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/compression/rle/rle_select_force_fetch_row.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT i, i::BIGINT AS x FROM range(100000) r(i); +-- +ok +== +SELECT count(*) > 1 FROM pragma_storage_info('t') WHERE column_name = 'x' AND segment_type = 'BIGINT'; +-- +ok +== +SET debug_force_fetch_row = true; +-- +ok +== +SELECT count(*), sum(x) FROM t WHERE i BETWEEN 60000 AND 60010; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_select_list.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_select_list.test index 3b2dc6b..061c61c 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/rle_select_list.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_select_list.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/rle_select_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='rle'; diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_select_run_boundaries.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_select_run_boundaries.test new file mode 100644 index 0000000..a4649a3 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_select_run_boundaries.test @@ -0,0 +1,33 @@ +# source: test/sql/storage/compression/rle/rle_select_run_boundaries.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/rle_select_run_boundaries.db' AS db (BLOCK_SIZE 16384); +-- +ok +== +CREATE TABLE db.runs_{run_length}(id INTEGER, value BIGINT USING COMPRESSION rle, nullable BIGINT USING COMPRESSION rle); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO db.runs_{run_length} SELECT i, (i//{run_length})%100, CASE WHEN i%13=0 THEN NULL ELSE (i//{run_length})%100 END FROM range(131077) t(i); +-- +error: Parser Error: syntax error at or near "{" +== +ATTACH '{TEST_DIR}/rle_select_run_boundaries.db' AS db; +-- +ok +== +SELECT bool_and(compression='RLE') FROM pragma_storage_info('db.runs_{run_length}') WHERE column_name IN ('value', 'nullable') AND segment_type='BIGINT'; +-- +ok +== +SELECT count(*)=131077//{stride}, bool_and(value=(id//{run_length})%100), bool_and(nullable IS NOT DISTINCT FROM CASE WHEN id%13=0 THEN NULL ELSE (id//{run_length})%100 END) FROM db.runs_{run_length} WHERE id%{stride}={stride}-1; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*), bool_and(value=(id//{run_length})%100), bool_and(nullable IS NOT DISTINCT FROM CASE WHEN id%13=0 THEN NULL ELSE (id//{run_length})%100 END) FROM db.runs_{run_length} WHERE id%8192>=4096 AND (id%2048=0 OR id%2048=2047); +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/storage/compression/rle/rle_signed_zero.test b/parser/testdata/corpus/sql/storage/compression/rle/rle_signed_zero.test new file mode 100644 index 0000000..bd654b2 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/rle/rle_signed_zero.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/rle/rle_signed_zero.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA force_compression='rle' +-- +ok +== +CREATE TABLE t AS SELECT * FROM (VALUES (-0e0::DOUBLE), (0e0::DOUBLE), (1.0)) tbl(x); +-- +ok +== +SELECT signbit(x) FROM t WHERE x = 0 ORDER BY signbit(x) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/rle/struct_rle.test b/parser/testdata/corpus/sql/storage/compression/rle/struct_rle.test index ce90adb..7f11ca2 100644 --- a/parser/testdata/corpus/sql/storage/compression/rle/struct_rle.test +++ b/parser/testdata/corpus/sql/storage/compression/rle/struct_rle.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/rle/struct_rle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT {'a': i} s FROM repeat(1, 1000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_array.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_array.test index 55cfcb1..8d5949d 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_array.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_array.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_analyze_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set variable dataset_size = 122880; diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_bitset.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_bitset.test index b8df7ef..330e285 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_bitset.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_bitset.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_analyze_bitset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_uncompressed AS SELECT diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_run.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_run.test index a4a7fdb..f39d340 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_run.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_analyze_run.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_analyze_run.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_uncompressed AS SELECT diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_array_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_array_simple.test index 02111e4..ea43ebe 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_array_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_array_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_array_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT case when i%25=0 then 1337 else null end FROM range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bitset_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bitset_simple.test index 5c3db4b..ffb56d6 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bitset_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bitset_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bitset_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT CASE WHEN i % 3 = 0 THEN 1337 ELSE NULL END FROM range(0, 10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_array.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_array.test index e0fd087..70fdda1 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_array.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_array.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_analyze_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='BitPacking' diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_bitset.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_bitset.test index 4b346d9..2e3ae94 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_bitset.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_bitset.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_analyze_bitset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_uncompressed AS SELECT diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_run.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_run.test index 71dbef3..d06c5d1 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_run.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_analyze_run.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_analyze_run.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_uncompressed AS SELECT diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple.test index dc4abe3..8729a4e 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_array_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a BOOL); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple_w_null.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple_w_null.test index 9d64293..7eea956 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple_w_null.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_array_simple_w_null.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_array_simple_w_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple.test index e6a9a25..f816d93 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_bitset_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT CASE WHEN i % 3 = 0 THEN true ELSE false END FROM range(0, 10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple_w_null.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple_w_null.test index 64715db..cdf022d 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple_w_null.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_bitset_simple_w_null.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_bitset_simple_w_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_fetch_row.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_fetch_row.test index 4768c14..89da0e6 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_fetch_row.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_fetch_row.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_fetch_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_first_is_null.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_first_is_null.test index e3d52ef..c924efb 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_first_is_null.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_first_is_null.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_first_is_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='roaring'; diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_array_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_array_simple.test index a7eee27..14f55c2 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_array_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_array_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_inverted_array_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT case when i%25=0 then false else true end FROM range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_run_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_run_simple.test index 0a301a4..d94bb2e 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_run_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_inverted_run_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_inverted_run_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT case when i = 0 or (i % 512 != 0 and (i % 512) < 350 or (i % 512) > 450) then true else false end FROM range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple.test index 93dd378..ed7a500 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_run_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with intermediates as ( diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple_w_null.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple_w_null.test index 0c7830f..96799bf 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple_w_null.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_run_simple_w_null.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_run_simple_w_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_smaller_than_vector.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_smaller_than_vector.test index 90c48c7..70cbfaa 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_smaller_than_vector.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_smaller_than_vector.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_smaller_than_vector.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set checkpoint_threshold = '10mb'; diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_uncompressed_under_v1_5_0.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_uncompressed_under_v1_5_0.test index 5fb73c8..ce165be 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_uncompressed_under_v1_5_0.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_bool_uncompressed_under_v1_5_0.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_bool_uncompressed_under_v1_5_0.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT compression FROM pragma_storage_info('test') WHERE segment_type ILIKE 'BOOLEAN' and compression != 'Uncompressed'; diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_corrupted_file.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_corrupted_file.test index 0dd47c4..9fb5938 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_corrupted_file.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_corrupted_file.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_corrupted_file.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/roaring_corrupt.db' AS db2 diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_fetch_row.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_fetch_row.test index b3e3a90..1711673 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_fetch_row.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_fetch_row.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_fetch_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test ( diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_array_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_array_simple.test index e5c8cce..ebc5f13 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_array_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_array_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_inverted_array_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT case when i%25=0 then null else 1337 end FROM range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_run_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_run_simple.test index ab16d8e..b860d54 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_run_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_inverted_run_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_inverted_run_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT case when i = 0 or (i % 512 != 0 and (i % 512) < 350 or (i % 512) > 450) then 1337 else null end FROM range(0,10000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_run_simple.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_run_simple.test index fc1c245..d8c523b 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_run_simple.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_run_simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_run_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit with intermediates as ( diff --git a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_smaller_than_vector.test b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_smaller_than_vector.test index 33ec49c..49b5706 100644 --- a/parser/testdata/corpus/sql/storage/compression/roaring/roaring_smaller_than_vector.test +++ b/parser/testdata/corpus/sql/storage/compression/roaring/roaring_smaller_than_vector.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/roaring/roaring_smaller_than_vector.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT case when i%25=0 then 1337 else null end FROM range(0,1025) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/select_across_segments.test b/parser/testdata/corpus/sql/storage/compression/select_across_segments.test new file mode 100644 index 0000000..48e62d3 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/select_across_segments.test @@ -0,0 +1,65 @@ +# source: test/sql/storage/compression/select_across_segments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/select_across_segments.db' AS db (BLOCK_SIZE 16384, STORAGE_VERSION 'v1.4.0'); +-- +ok +== +CREATE TABLE db.strings_{compression}(id INTEGER, value VARCHAR USING COMPRESSION {compression}); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO db.strings_{compression} SELECT i, expected_string(i) FROM range(20000) t(i); +-- +error: Parser Error: syntax error at or near "{" +== +CREATE TABLE db.unique_strings(id INTEGER, value VARCHAR USING COMPRESSION dict_fsst); +-- +ok +== +INSERT INTO db.unique_strings SELECT i, repeat(md5(i::VARCHAR),8) FROM range(6000) t(i); +-- +ok +== +CREATE TABLE db.numbers(id INTEGER, value INTEGER USING COMPRESSION rle); +-- +ok +== +INSERT INTO db.numbers SELECT i, CASE WHEN i%13=0 THEN NULL ELSE (i//2)%1000 END FROM range(20000) t(i); +-- +ok +== +SELECT count(*) > 1 AND bool_or(start%2048 != 0) FROM pragma_storage_info('db.{tbl}') WHERE column_name='value' AND segment_type != 'VALIDITY'; +-- +ok +== +ATTACH '{TEST_DIR}/select_across_segments.db' AS db; +-- +ok +== +CREATE TEMP TABLE retained_{compression} AS SELECT * FROM db.strings_{compression} WHERE id%2048<70 OR id%2048>=2046; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*), bool_and(value IS NOT DISTINCT FROM expected_string(id)) FROM db.strings_{compression} WHERE id%2048=0; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT count(*), bool_and(value=repeat(md5(id::VARCHAR),8)) FROM db.unique_strings WHERE id%2048<70 OR id%2048>=2046; +-- +ok +== +SELECT count(*), bool_and(value IS NOT DISTINCT FROM CASE WHEN id%13=0 THEN NULL ELSE (id//2)%1000 END) FROM db.numbers WHERE id%2048<70 OR id%2048>=2046; +-- +ok +== +SELECT count(*), bool_and(value IS NOT DISTINCT FROM CASE WHEN id%13=0 THEN NULL ELSE (id//2)%1000 END) FROM db.numbers WHERE id%2048=0; +-- +ok +== +SELECT count(*), bool_and(value IS NOT DISTINCT FROM expected_string(id)) FROM retained_{compression}; +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/storage/compression/simple_compression.test b/parser/testdata/corpus/sql/storage/compression/simple_compression.test index 7d28306..af5fbde 100644 --- a/parser/testdata/corpus/sql/storage/compression/simple_compression.test +++ b/parser/testdata/corpus/sql/storage/compression/simple_compression.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/simple_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = '{compression}' diff --git a/parser/testdata/corpus/sql/storage/compression/skip_explicit_compression_analyze.test b/parser/testdata/corpus/sql/storage/compression/skip_explicit_compression_analyze.test index c63377f..e25b706 100644 --- a/parser/testdata/corpus/sql/storage/compression/skip_explicit_compression_analyze.test +++ b/parser/testdata/corpus/sql/storage/compression/skip_explicit_compression_analyze.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/skip_explicit_compression_analyze.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold='9999GB' diff --git a/parser/testdata/corpus/sql/storage/compression/string/big_strings.test b/parser/testdata/corpus/sql/storage/compression/string/big_strings.test index 3f24394..325d97c 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/big_strings.test +++ b/parser/testdata/corpus/sql/storage/compression/string/big_strings.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/big_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_big_strings_new.db' AS db_v13 (STORAGE_VERSION 'v1.3.0'); diff --git a/parser/testdata/corpus/sql/storage/compression/string/blob.test b/parser/testdata/corpus/sql/storage/compression/string/blob.test index fcf1abd..251eabb 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/blob.test +++ b/parser/testdata/corpus/sql/storage/compression/string/blob.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_blob_new.db' AS db_v13 (STORAGE_VERSION 'v1.3.0'); diff --git a/parser/testdata/corpus/sql/storage/compression/string/empty.test b/parser/testdata/corpus/sql/storage/compression/string/empty.test index 798c325..c05fee7 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/empty.test +++ b/parser/testdata/corpus/sql/storage/compression/string/empty.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_empty_new.db' AS db_v13 (STORAGE_VERSION 'v1.3.0'); diff --git a/parser/testdata/corpus/sql/storage/compression/string/filter_pushdown.test b/parser/testdata/corpus/sql/storage/compression/string/filter_pushdown.test index e3c2342..82fb87f 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/filter_pushdown.test +++ b/parser/testdata/corpus/sql/storage/compression/string/filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_filter_pushdown_new.db' AS db_v13 (STORAGE_VERSION 'v1.3.0'); diff --git a/parser/testdata/corpus/sql/storage/compression/string/index_fetch.test b/parser/testdata/corpus/sql/storage/compression/string/index_fetch.test index 411c7cf..138b34b 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/index_fetch.test +++ b/parser/testdata/corpus/sql/storage/compression/string/index_fetch.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/index_fetch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/test_index_fetch_new.db' AS db_v13 (STORAGE_VERSION 'v1.3.0'); diff --git a/parser/testdata/corpus/sql/storage/compression/string/medium.test b/parser/testdata/corpus/sql/storage/compression/string/medium.test index e9a89bc..cf3e2ea 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/medium.test +++ b/parser/testdata/corpus/sql/storage/compression/string/medium.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/medium.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version='v1.3.0' diff --git a/parser/testdata/corpus/sql/storage/compression/string/simple.test b/parser/testdata/corpus/sql/storage/compression/string/simple.test index 0be0bbc..3912f29 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/simple.test +++ b/parser/testdata/corpus/sql/storage/compression/string/simple.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT CONCAT('A-',(i%5)::VARCHAR) FROM range(0,1025) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_dict_end.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_dict_end.test new file mode 100644 index 0000000..4747d06 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_dict_end.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/string/string_corrupt_dict_end.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_dict_end +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE column_name='a' AND compression='Uncompressed'; +-- +ok +== +SELECT length(a) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_dict_offset.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_dict_offset.test new file mode 100644 index 0000000..6952a7d --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_dict_offset.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_dict_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_dict_offset +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_int32_min.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_int32_min.test new file mode 100644 index 0000000..fd19f4b --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_int32_min.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_int32_min.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_int32_min +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_negative_marker.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_negative_marker.test new file mode 100644 index 0000000..ce61eb0 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_negative_marker.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_negative_marker.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_negative_marker +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_offset_nonmonotonic.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_offset_nonmonotonic.test new file mode 100644 index 0000000..dcc1eae --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_offset_nonmonotonic.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_offset_nonmonotonic.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_offset_nonmonotonic +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_block_id.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_block_id.test new file mode 100644 index 0000000..ce821d8 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_block_id.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_overflow_block_id.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_overflow_block_id +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_continuation.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_continuation.test new file mode 100644 index 0000000..4341992 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_continuation.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/string/string_corrupt_overflow_continuation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_overflow_continuation +-- +ok +== +SELECT additional_block_ids::VARCHAR FROM pragma_storage_info('t') WHERE len(additional_block_ids) > 1; +-- +ok +== +SELECT sum(length(a)) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_offset.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_offset.test new file mode 100644 index 0000000..002c595 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_offset.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_overflow_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_overflow_offset +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_transient_block.test b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_transient_block.test new file mode 100644 index 0000000..31452c6 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_corrupt_overflow_transient_block.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/string/string_corrupt_overflow_transient_block.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE string_corrupt_overflow_transient_block +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/string_scan_batch_boundaries.test b/parser/testdata/corpus/sql/storage/compression/string/string_scan_batch_boundaries.test new file mode 100644 index 0000000..e034f90 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/string_scan_batch_boundaries.test @@ -0,0 +1,41 @@ +# source: test/sql/storage/compression/string/string_scan_batch_boundaries.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/string_scan_batch_boundaries.db' AS strings; +-- +ok +== +USE strings; +-- +ok +== +CREATE TABLE t (i INTEGER, s VARCHAR USING COMPRESSION UNCOMPRESSED); +-- +ok +== +INSERT INTO t +SELECT i, CASE i % 2048 + WHEN 2047 THEN lpad(i::VARCHAR, 8192, 'y') + WHEN 0 THEN NULL + WHEN 1 THEN '' + ELSE lpad(i::VARCHAR, 16, 'x') +END +FROM range(6145) r(i); +-- +ok +== +SELECT count(*), count(s), sum(strlen(s)) FROM t; +-- +ok +== +SELECT count(*) FILTER (WHERE s IS DISTINCT FROM CASE i % 2048 + WHEN 2047 THEN lpad(i::VARCHAR, 8192, 'y') + WHEN 0 THEN NULL + WHEN 1 THEN '' + ELSE lpad(i::VARCHAR, 16, 'x') +END) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/string/struct.test b/parser/testdata/corpus/sql/storage/compression/string/struct.test index a6209ea..8aced51 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/struct.test +++ b/parser/testdata/corpus/sql/storage/compression/string/struct.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (s ROW(a VARCHAR)); diff --git a/parser/testdata/corpus/sql/storage/compression/string/table_copy.test b/parser/testdata/corpus/sql/storage/compression/string/table_copy.test index 6c6f673..f4316d9 100644 --- a/parser/testdata/corpus/sql/storage/compression/string/table_copy.test +++ b/parser/testdata/corpus/sql/storage/compression/string/table_copy.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/string/table_copy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT (i%500)::VARCHAR FROM range(0,150000) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/compression/string/vector_flatten.test b/parser/testdata/corpus/sql/storage/compression/string/vector_flatten.test new file mode 100644 index 0000000..a70ccb0 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/string/vector_flatten.test @@ -0,0 +1,58 @@ +# source: test/sql/storage/compression/string/vector_flatten.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE source ( + id INTEGER, + s VARCHAR, + b BLOB, + l VARCHAR[], + a VARCHAR[2], + st STRUCT(v VARCHAR) +) +-- +ok +== +INSERT INTO source +SELECT + i, + CASE i % 7 + WHEN 0 THEN NULL + WHEN 1 THEN '' + ELSE 'repeating-string-' || (i % 100)::VARCHAR + END, + encode('repeating-blob-' || (i % 100)::VARCHAR), + ['list-prefix-' || (i % 10)::VARCHAR, 'list-suffix-' || (i % 20)::VARCHAR], + ['array-prefix-' || (i % 10)::VARCHAR, 'array-suffix-' || (i % 20)::VARCHAR]::VARCHAR[2], + {'v': 'struct-string-' || (i % 100)::VARCHAR} +FROM range(10000) t(i) +-- +ok +== +SELECT count(*) >= 5 +FROM pragma_storage_info('source') +WHERE compression = 'FSST' +-- +ok +== +CREATE TABLE target AS SELECT * FROM source LIMIT 0 +-- +ok +== +INSERT INTO target +SELECT * +FROM source +WHERE id % 3 <> 0 +-- +ok +== +SELECT count(*) +FROM ( + SELECT * FROM target + EXCEPT + SELECT * FROM source WHERE id % 3 <> 0 +) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/test_using_compression.test b/parser/testdata/corpus/sql/storage/compression/test_using_compression.test index 7615c6e..76a2284 100644 --- a/parser/testdata/corpus/sql/storage/compression/test_using_compression.test +++ b/parser/testdata/corpus/sql/storage/compression/test_using_compression.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/test_using_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t( diff --git a/parser/testdata/corpus/sql/storage/compression/uncompressed/uncompressed_count.test b/parser/testdata/corpus/sql/storage/compression/uncompressed/uncompressed_count.test new file mode 100644 index 0000000..300e332 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/uncompressed/uncompressed_count.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/uncompressed/uncompressed_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT compression FROM pragma_storage_info('t') WHERE column_name='b' AND compression='Uncompressed'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_count.test b/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_count.test new file mode 100644 index 0000000..6c2d862 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_count.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/compression/uncompressed/validity_corrupt_count.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE validity_corrupt_count +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE segment_type='VALIDITY' AND compression='Uncompressed'; +-- +ok +== +SELECT sum(b) FROM t OFFSET 70; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_count_boundary.test b/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_count_boundary.test new file mode 100644 index 0000000..11d18e0 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_count_boundary.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/compression/uncompressed/validity_corrupt_count_boundary.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE validity_corrupt_count_boundary +-- +ok +== +SELECT sum(b) FROM t WHERE rowid%2=1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_offset.test b/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_offset.test new file mode 100644 index 0000000..56bc39e --- /dev/null +++ b/parser/testdata/corpus/sql/storage/compression/uncompressed/validity_corrupt_offset.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/compression/uncompressed/validity_corrupt_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE validity_corrupt_offset +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/compression/zstd/fetch_row.test b/parser/testdata/corpus/sql/storage/compression/zstd/fetch_row.test index bdb105d..3febf15 100644 --- a/parser/testdata/corpus/sql/storage/compression/zstd/fetch_row.test +++ b/parser/testdata/corpus/sql/storage/compression/zstd/fetch_row.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/zstd/fetch_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE big_string ( diff --git a/parser/testdata/corpus/sql/storage/compression/zstd/nulls.test b/parser/testdata/corpus/sql/storage/compression/zstd/nulls.test index b4c3c9f..e99d374 100644 --- a/parser/testdata/corpus/sql/storage/compression/zstd/nulls.test +++ b/parser/testdata/corpus/sql/storage/compression/zstd/nulls.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/zstd/nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl ( diff --git a/parser/testdata/corpus/sql/storage/compression/zstd/test_skipping.test b/parser/testdata/corpus/sql/storage/compression/zstd/test_skipping.test index e5efbda..48200f1 100644 --- a/parser/testdata/corpus/sql/storage/compression/zstd/test_skipping.test +++ b/parser/testdata/corpus/sql/storage/compression/zstd/test_skipping.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/zstd/test_skipping.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='zstd'; diff --git a/parser/testdata/corpus/sql/storage/compression/zstd/zstd.test b/parser/testdata/corpus/sql/storage/compression/zstd/zstd.test index 7c2b452..5f47c0a 100644 --- a/parser/testdata/corpus/sql/storage/compression/zstd/zstd.test +++ b/parser/testdata/corpus/sql/storage/compression/zstd/zstd.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/zstd/zstd.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression = 'zstd' diff --git a/parser/testdata/corpus/sql/storage/compression/zstd/zstd_force_compression.test b/parser/testdata/corpus/sql/storage/compression/zstd/zstd_force_compression.test index 33ea551..9ce596a 100644 --- a/parser/testdata/corpus/sql/storage/compression/zstd/zstd_force_compression.test +++ b/parser/testdata/corpus/sql/storage/compression/zstd/zstd_force_compression.test @@ -1,6 +1,6 @@ # source: test/sql/storage/compression/zstd/zstd_force_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE zstd_data AS SELECT concat('thisisalongstring', i) str FROM range(1000) t(i); diff --git a/parser/testdata/corpus/sql/storage/concurrent_attach_if_not_exists_create.test b/parser/testdata/corpus/sql/storage/concurrent_attach_if_not_exists_create.test index 53b2dbe..c3e144a 100644 --- a/parser/testdata/corpus/sql/storage/concurrent_attach_if_not_exists_create.test +++ b/parser/testdata/corpus/sql/storage/concurrent_attach_if_not_exists_create.test @@ -1,6 +1,6 @@ # source: test/sql/storage/concurrent_attach_if_not_exists_create.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach if not exists '{TEST_DIR}/concurrent_attach_{name}.duckdb' AS {name} diff --git a/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent.test b/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent.test index 52072a0..9e06d2d 100644 --- a/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent.test +++ b/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/storage/constraints/foreignkey/foreign_key_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE pk_integers (i INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent_memory_limit.test b/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent_memory_limit.test index 42662dd..a273c87 100644 --- a/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent_memory_limit.test +++ b/parser/testdata/corpus/sql/storage/constraints/foreignkey/foreign_key_persistent_memory_limit.test @@ -1,6 +1,6 @@ # source: test/sql/storage/constraints/foreignkey/foreign_key_persistent_memory_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET memory_limit = '1792kB'; diff --git a/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_dos.test b/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_dos.test new file mode 100644 index 0000000..82e89a1 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_dos.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/corrupt/block_alloc_size_dos.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/block_alloc_size_corrupt_dos.db' AS corrupt_db (READ_ONLY) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_max.test b/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_max.test new file mode 100644 index 0000000..f7c5738 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_max.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/corrupt/block_alloc_size_max.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/block_alloc_size_corrupt_max.db' AS corrupt_db (READ_ONLY) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_underflow.test b/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_underflow.test new file mode 100644 index 0000000..b8a4407 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/corrupt/block_alloc_size_underflow.test @@ -0,0 +1,9 @@ +# source: test/sql/storage/corrupt/block_alloc_size_underflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/block_alloc_size_corrupt_underflow.db' AS corrupt_db (READ_ONLY) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/corrupt/corrupt_catalog_entry.test b/parser/testdata/corpus/sql/storage/corrupt/corrupt_catalog_entry.test index 44d42fe..55a8310 100644 --- a/parser/testdata/corpus/sql/storage/corrupt/corrupt_catalog_entry.test +++ b/parser/testdata/corpus/sql/storage/corrupt/corrupt_catalog_entry.test @@ -1,6 +1,6 @@ # source: test/sql/storage/corrupt/corrupt_catalog_entry.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/duckdb_fuzzer_4671.db' AS corrupt_db (READ_ONLY) diff --git a/parser/testdata/corpus/sql/storage/corrupt/corrupt_encoding_overflow.test b/parser/testdata/corpus/sql/storage/corrupt/corrupt_encoding_overflow.test index f377905..77b5e0e 100644 --- a/parser/testdata/corpus/sql/storage/corrupt/corrupt_encoding_overflow.test +++ b/parser/testdata/corpus/sql/storage/corrupt/corrupt_encoding_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/storage/corrupt/corrupt_encoding_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/corrupt_wal_encoding.db' diff --git a/parser/testdata/corpus/sql/storage/delete/load_delete_modify.test b/parser/testdata/corpus/sql/storage/delete/load_delete_modify.test index 4776689..eae9790 100644 --- a/parser/testdata/corpus/sql/storage/delete/load_delete_modify.test +++ b/parser/testdata/corpus/sql/storage/delete/load_delete_modify.test @@ -1,6 +1,6 @@ # source: test/sql/storage/delete/load_delete_modify.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT * FROM generate_series(0,599999) t(i); diff --git a/parser/testdata/corpus/sql/storage/delete/repeated_deletes.test b/parser/testdata/corpus/sql/storage/delete/repeated_deletes.test index a658b36..eb2f124 100644 --- a/parser/testdata/corpus/sql/storage/delete/repeated_deletes.test +++ b/parser/testdata/corpus/sql/storage/delete/repeated_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/storage/delete/repeated_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (i INTEGER); diff --git a/parser/testdata/corpus/sql/storage/delete/test_store_deletes.test b/parser/testdata/corpus/sql/storage/delete/test_store_deletes.test index 3d92c87..518d89c 100644 --- a/parser/testdata/corpus/sql/storage/delete/test_store_deletes.test +++ b/parser/testdata/corpus/sql/storage/delete/test_store_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/storage/delete/test_store_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (12, 21), (13, 22), (12, 21) diff --git a/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes.test b/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes.test index 4c7b780..5b02bbf 100644 --- a/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes.test +++ b/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/storage/delete/test_unchanged_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS FROM range(4) t(i) diff --git a/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes_large.test b/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes_large.test index d9393b7..dee13a1 100644 --- a/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes_large.test +++ b/parser/testdata/corpus/sql/storage/delete/test_unchanged_deletes_large.test @@ -1,6 +1,6 @@ # source: test/sql/storage/delete/test_unchanged_deletes_large.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (84) diff --git a/parser/testdata/corpus/sql/storage/distinct_statistics_sample.test b/parser/testdata/corpus/sql/storage/distinct_statistics_sample.test new file mode 100644 index 0000000..161f0e5 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/distinct_statistics_sample.test @@ -0,0 +1,109 @@ +# source: test/sql/storage/distinct_statistics_sample.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE clustered AS +SELECT (i // 64)::INTEGER AS i, (i // 64)::VARCHAR AS s, (i // 64)::DOUBLE AS d +FROM range(4099) r(i); +-- +ok +== +SELECT (stats(i)).approx_unique BETWEEN 32 AND 130, + (stats(s)).approx_unique BETWEEN 32 AND 130, + (stats(d)).approx_unique BETWEEN 32 AND 130 +FROM clustered LIMIT 1; +-- +ok +== +SELECT (stats(i)).approx_unique, (stats(s)).approx_unique, (stats(d)).approx_unique +FROM clustered LIMIT 1; +-- +ok +== +CREATE TABLE nullable AS +SELECT CASE WHEN i < 1024 THEN NULL ELSE 42 END AS i, + CASE WHEN i < 1024 THEN NULL ELSE 'hello' END AS s, + 42 AS constant, NULL::INTEGER AS nulls +FROM range(2048) r(i); +-- +ok +== +SELECT (stats(i)).approx_unique, (stats(s)).approx_unique, + (stats(constant)).approx_unique, (stats(nulls)).approx_unique +FROM nullable LIMIT 1; +-- +ok +== +CREATE OR REPLACE TABLE partial AS +SELECT i, i::VARCHAR AS s, CASE WHEN i % 3 = 0 THEN NULL ELSE i::DOUBLE END AS d +FROM range({count}) r(i) WHERE i % 7 <> 0; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FROM ( + (SELECT * FROM partial EXCEPT ALL + SELECT i, i::VARCHAR, CASE WHEN i % 3 = 0 THEN NULL ELSE i::DOUBLE END + FROM range({count}) r(i) WHERE i % 7 <> 0) + UNION ALL + (SELECT i, i::VARCHAR, CASE WHEN i % 3 = 0 THEN NULL ELSE i::DOUBLE END + FROM range({count}) r(i) WHERE i % 7 <> 0 EXCEPT ALL SELECT * FROM partial) +); +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE small AS +SELECT i, i::DOUBLE AS d, i::VARCHAR AS s FROM range({count}) r(i); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT coalesce((stats(i)).approx_unique, 0) > 0, + coalesce((stats(d)).approx_unique, 0) > 0, + coalesce((stats(s)).approx_unique, 0) > 0 +FROM small LIMIT 1; +-- +ok +== +ALTER TABLE clustered ALTER COLUMN i TYPE BIGINT; +-- +ok +== +SELECT (stats(i)).approx_unique BETWEEN 32 AND 130 FROM clustered LIMIT 1; +-- +ok +== +CREATE OR REPLACE TABLE flat_input AS SELECT i, 'placeholder' AS v FROM range(4099) r(i); +-- +ok +== +CREATE OR REPLACE TABLE dictionary_input AS SELECT * FROM flat_input; +-- +ok +== +ALTER TABLE flat_input ALTER v TYPE {type} +USING (CASE WHEN i % 17 = 0 THEN NULL ELSE (i // 64)::{type} END); +-- +error: Parser Error: syntax error at or near "{" +== +ALTER TABLE dictionary_input ALTER v TYPE {type} +USING (CASE WHEN i % 17 = 0 THEN NULL ELSE (i // 64)::{type} END); +-- +error: Parser Error: syntax error at or near "{" +== +SET debug_verify_vector='none'; +-- +ok +== +SELECT (SELECT (stats(v)).approx_unique FROM flat_input LIMIT 1) = + (SELECT (stats(v)).approx_unique FROM dictionary_input LIMIT 1); +-- +ok +== +SELECT count(*) FROM ( + (SELECT * FROM flat_input EXCEPT ALL SELECT * FROM dictionary_input) + UNION ALL + (SELECT * FROM dictionary_input EXCEPT ALL SELECT * FROM flat_input) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/distinct_statistics_storage.test b/parser/testdata/corpus/sql/storage/distinct_statistics_storage.test index 50b34ca..7e22320 100644 --- a/parser/testdata/corpus/sql/storage/distinct_statistics_storage.test +++ b/parser/testdata/corpus/sql/storage/distinct_statistics_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/distinct_statistics_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select range % 10 i, range % 30 j from range(100) diff --git a/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_temp_file_size_accounting.test b/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_temp_file_size_accounting.test new file mode 100644 index 0000000..c8d30c9 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_temp_file_size_accounting.test @@ -0,0 +1,37 @@ +# source: test/sql/storage/encryption/temp_files/encrypted_temp_file_size_accounting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET temp_directory='{TEST_DIR}/encrypted_temp_file_size_accounting_tmp' +-- +ok +== +SET temp_file_encryption=true +-- +ok +== +SET memory_limit='16MB' +-- +ok +== +CREATE TEMPORARY TABLE big AS + SELECT i AS k, repeat('x', 200)::VARCHAR AS v + FROM range(500000) t(i) +-- +ok +== +SET memory_limit='1GB' +-- +ok +== +SELECT count(*) > 0 FROM duckdb_temporary_files() +-- +ok +== +SELECT + (SELECT COALESCE(sum(size), 0)::BIGINT FROM duckdb_temporary_files()) + = (SELECT COALESCE(sum(temporary_storage_bytes), 0)::BIGINT FROM duckdb_memory()) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_tmp_file_setting.test b/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_tmp_file_setting.test index 27363fe..d04d9c0 100644 --- a/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_tmp_file_setting.test +++ b/parser/testdata/corpus/sql/storage/encryption/temp_files/encrypted_tmp_file_setting.test @@ -1,6 +1,6 @@ # source: test/sql/storage/encryption/temp_files/encrypted_tmp_file_setting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET temp_directory='{TEST_DIR}/test_temp_dir' diff --git a/parser/testdata/corpus/sql/storage/encryption/temp_files/temp_directory_enable_external_access.test b/parser/testdata/corpus/sql/storage/encryption/temp_files/temp_directory_enable_external_access.test index 3941022..d248e24 100644 --- a/parser/testdata/corpus/sql/storage/encryption/temp_files/temp_directory_enable_external_access.test +++ b/parser/testdata/corpus/sql/storage/encryption/temp_files/temp_directory_enable_external_access.test @@ -1,6 +1,6 @@ # source: test/sql/storage/encryption/temp_files/temp_directory_enable_external_access.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted_temp_files_{cipher}.db' AS enc (ENCRYPTION_KEY 'asdf', ENCRYPTION_CIPHER 'GCM'); diff --git a/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_blob_storage.test b/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_blob_storage.test index 6d2fcc8..0388ab4 100644 --- a/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_blob_storage.test +++ b/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_blob_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/encryption/wal/encrypted_wal_blob_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted_blob_storage_{cipher}.db' AS enc (ENCRYPTION_KEY 'asdf', ENCRYPTION_CIPHER '{cipher}'); diff --git a/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_lazy_creation.test b/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_lazy_creation.test index 28e68f4..9b5e478 100644 --- a/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_lazy_creation.test +++ b/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_lazy_creation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/encryption/wal/encrypted_wal_lazy_creation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_no_wal_{cipher}.db' AS attach_no_wal (ENCRYPTION_KEY 'asdf', ENCRYPTION_CIPHER '{cipher}'); diff --git a/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_pragmas.test b/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_pragmas.test index 0c001e3..3838fc3 100644 --- a/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_pragmas.test +++ b/parser/testdata/corpus/sql/storage/encryption/wal/encrypted_wal_pragmas.test @@ -1,6 +1,6 @@ # source: test/sql/storage/encryption/wal/encrypted_wal_pragmas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/encrypted_wal_restart_{cipher}.db' as enc (ENCRYPTION_KEY 'asdf', ENCRYPTION_CIPHER '{cipher}'); diff --git a/parser/testdata/corpus/sql/storage/evict_unpinned_without_temp_directory.test b/parser/testdata/corpus/sql/storage/evict_unpinned_without_temp_directory.test new file mode 100644 index 0000000..d866c29 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/evict_unpinned_without_temp_directory.test @@ -0,0 +1,29 @@ +# source: test/sql/storage/evict_unpinned_without_temp_directory.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET temp_directory = ''; +-- +ok +== +SET max_memory = '80MB'; +-- +ok +== +CREATE TABLE t AS SELECT range::INT AS a, repeat('y', 80000) AS s FROM range(400); +-- +ok +== +SET max_memory = '10MB'; +-- +ok +== +SET temp_directory = '{TEST_DIR}/evict_unpinned_tmp.tmp'; +-- +ok +== +SELECT sum(memory_usage_bytes) <= 10000000 FROM duckdb_memory(); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/extended_string_stats.test b/parser/testdata/corpus/sql/storage/extended_string_stats.test index 41fb6b0..43e3f6d 100644 --- a/parser/testdata/corpus/sql/storage/extended_string_stats.test +++ b/parser/testdata/corpus/sql/storage/extended_string_stats.test @@ -1,6 +1,6 @@ # source: test/sql/storage/extended_string_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as from (values diff --git a/parser/testdata/corpus/sql/storage/extensions/extension_default.test b/parser/testdata/corpus/sql/storage/extensions/extension_default.test index 7598dcd..6390793 100644 --- a/parser/testdata/corpus/sql/storage/extensions/extension_default.test +++ b/parser/testdata/corpus/sql/storage/extensions/extension_default.test @@ -1,6 +1,6 @@ # source: test/sql/storage/extensions/extension_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(v VARCHAR DEFAULT CURRENT_SCHEMA()) diff --git a/parser/testdata/corpus/sql/storage/extensions/extension_views.test b/parser/testdata/corpus/sql/storage/extensions/extension_views.test index 192eea8..dbaae46 100644 --- a/parser/testdata/corpus/sql/storage/extensions/extension_views.test +++ b/parser/testdata/corpus/sql/storage/extensions/extension_views.test @@ -1,6 +1,6 @@ # source: test/sql/storage/extensions/extension_views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT current_schema(); diff --git a/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_async_toggle.test b/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_async_toggle.test index 54cb37d..bd258ae 100644 --- a/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_async_toggle.test +++ b/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_async_toggle.test @@ -1,6 +1,6 @@ # source: test/sql/storage/external_file_cache/external_file_cache_async_toggle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET async_threads=4 diff --git a/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_block_size.test b/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_block_size.test index b08e8ff..048df75 100644 --- a/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_block_size.test +++ b/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_block_size.test @@ -1,6 +1,6 @@ # source: test/sql/storage/external_file_cache/external_file_cache_block_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set cache_local_files=true; @@ -27,7 +27,7 @@ create temp table cached_bytes_before as select sum(nr_bytes) as total from duck -- ok == -set external_file_cache_local_block_size=4096; +set external_file_cache_local_max_block_size=4096; -- ok == @@ -43,23 +43,51 @@ drop table cached_bytes_before; -- ok == -set external_file_cache_local_block_size=16384; +set external_file_cache_local_max_block_size=16384; -- ok == -reset external_file_cache_local_block_size; +reset external_file_cache_local_max_block_size; -- ok == -set external_file_cache_local_block_size=8192; +set external_file_cache_local_max_block_size=8192; -- ok == -set external_file_cache_local_block_size=0; +set external_file_cache_local_max_block_size=0; -- ok == -set external_file_cache_remote_block_size=0; +set external_file_cache_remote_max_block_size=0; +-- +ok +== +set session external_file_cache_local_max_block_size=4096; +-- +ok +== +set session external_file_cache_remote_max_block_size=4096; +-- +ok +== +set session external_file_cache_remote_min_block_size=4096; +-- +ok +== +set session external_file_cache_request_sizing='GRID'; +-- +ok +== +set global external_file_cache_request_sizing='GRID'; +-- +ok +== +select current_setting('external_file_cache_request_sizing'); +-- +ok +== +reset external_file_cache_request_sizing; -- ok == diff --git a/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_validate.test b/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_validate.test index e3c7c56..d474776 100644 --- a/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_validate.test +++ b/parser/testdata/corpus/sql/storage/external_file_cache/external_file_cache_validate.test @@ -1,6 +1,6 @@ # source: test/sql/storage/external_file_cache/external_file_cache_validate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select 1 as col1, 2 as col2 from range(100)) to '{TEST_DIR}/test_validate_cache.parquet'; diff --git a/parser/testdata/corpus/sql/storage/external_file_cache/internal_issue_10700.test b/parser/testdata/corpus/sql/storage/external_file_cache/internal_issue_10700.test new file mode 100644 index 0000000..3f9b723 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/external_file_cache/internal_issue_10700.test @@ -0,0 +1,26 @@ +# source: test/sql/storage/external_file_cache/internal_issue_10700.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET external_file_cache_spill=true; +-- +ok +== +SET memory_limit='200MB'; +-- +ok +== +SET temp_directory='{TEST_DIR}/internal_issue_10700'; +-- +ok +== +SELECT count(*) +FROM read_parquet('https://github.com/duckdb/duckdb-data/releases/download/v1.0/city_temperature.parquet'); +-- +ok +== +SET memory_limit='1MB'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/filter_pushdown_struct.test b/parser/testdata/corpus/sql/storage/filter_pushdown_struct.test index c513c73..2fd577e 100644 --- a/parser/testdata/corpus/sql/storage/filter_pushdown_struct.test +++ b/parser/testdata/corpus/sql/storage/filter_pushdown_struct.test @@ -1,6 +1,6 @@ # source: test/sql/storage/filter_pushdown_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (a STRUCT("id" VARCHAR), b STRUCT("id" VARCHAR)); diff --git a/parser/testdata/corpus/sql/storage/full_vector_delete_checkpoint.test b/parser/testdata/corpus/sql/storage/full_vector_delete_checkpoint.test index e201f29..2c23df3 100644 --- a/parser/testdata/corpus/sql/storage/full_vector_delete_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/full_vector_delete_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/full_vector_delete_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i FROM range(8192) t(i); diff --git a/parser/testdata/corpus/sql/storage/issue3789_node_segment_tree.test b/parser/testdata/corpus/sql/storage/issue3789_node_segment_tree.test index 8365d6b..027d7e6 100644 --- a/parser/testdata/corpus/sql/storage/issue3789_node_segment_tree.test +++ b/parser/testdata/corpus/sql/storage/issue3789_node_segment_tree.test @@ -1,6 +1,6 @@ # source: test/sql/storage/issue3789_node_segment_tree.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE table1 (column1 integer, column2 integer) diff --git a/parser/testdata/corpus/sql/storage/issue7582_list_storage.test b/parser/testdata/corpus/sql/storage/issue7582_list_storage.test index bc43fb6..44700c5 100644 --- a/parser/testdata/corpus/sql/storage/issue7582_list_storage.test +++ b/parser/testdata/corpus/sql/storage/issue7582_list_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/issue7582_list_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET wal_autocheckpoint='1GB'; diff --git a/parser/testdata/corpus/sql/storage/lazy_load/lazy_load_limit.test b/parser/testdata/corpus/sql/storage/lazy_load/lazy_load_limit.test index 7eba0a5..6065bc6 100644 --- a/parser/testdata/corpus/sql/storage/lazy_load/lazy_load_limit.test +++ b/parser/testdata/corpus/sql/storage/lazy_load/lazy_load_limit.test @@ -1,6 +1,6 @@ # source: test/sql/storage/lazy_load/lazy_load_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO vals SELECT i, i::VARCHAR FROM generate_series(1000000) t(i) diff --git a/parser/testdata/corpus/sql/storage/many_checkpoints.test b/parser/testdata/corpus/sql/storage/many_checkpoints.test index b1e090e..ae518fe 100644 --- a/parser/testdata/corpus/sql/storage/many_checkpoints.test +++ b/parser/testdata/corpus/sql/storage/many_checkpoints.test @@ -1,6 +1,6 @@ # source: test/sql/storage/many_checkpoints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM test diff --git a/parser/testdata/corpus/sql/storage/many_self_append.test b/parser/testdata/corpus/sql/storage/many_self_append.test index b224135..59585fa 100644 --- a/parser/testdata/corpus/sql/storage/many_self_append.test +++ b/parser/testdata/corpus/sql/storage/many_self_append.test @@ -1,6 +1,6 @@ # source: test/sql/storage/many_self_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO vals SELECT (CASE WHEN i % 2 = 0 THEN NULL ELSE i % 100 END)::TINYINT i FROM range(10) tbl(i) diff --git a/parser/testdata/corpus/sql/storage/memory/in_memory_disabled_zstd.test b/parser/testdata/corpus/sql/storage/memory/in_memory_disabled_zstd.test index acb5a7c..c6f41fb 100644 --- a/parser/testdata/corpus/sql/storage/memory/in_memory_disabled_zstd.test +++ b/parser/testdata/corpus/sql/storage/memory/in_memory_disabled_zstd.test @@ -1,6 +1,6 @@ # source: test/sql/storage/memory/in_memory_disabled_zstd.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach ':memory:' as db2 (compress); diff --git a/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse.test b/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse.test index bf9d120..31d84c6 100644 --- a/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse.test +++ b/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/full_table_metadata_reuse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigtbl(i INT); diff --git a/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse_v7.test b/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse_v7.test index 7662b14..79c8449 100644 --- a/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse_v7.test +++ b/parser/testdata/corpus/sql/storage/metadata/full_table_metadata_reuse_v7.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/full_table_metadata_reuse_v7.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_column_metadata_reuse=true diff --git a/parser/testdata/corpus/sql/storage/metadata/multi_table_metadata_reuse.test b/parser/testdata/corpus/sql/storage/metadata/multi_table_metadata_reuse.test index 06fc12e..2569355 100644 --- a/parser/testdata/corpus/sql/storage/metadata/multi_table_metadata_reuse.test +++ b/parser/testdata/corpus/sql/storage/metadata/multi_table_metadata_reuse.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/multi_table_metadata_reuse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET experimental_metadata_reuse=true; diff --git a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse.test b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse.test index aff855d..deccc25 100644 --- a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse.test +++ b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/partial_column_metadata_reuse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE wide_tbl AS SELECT diff --git a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_drop_column.test b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_drop_column.test index 8c9cce8..b00dcbd 100644 --- a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_drop_column.test +++ b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_drop_column.test @@ -1,16 +1,12 @@ # source: test/sql/storage/metadata/partial_column_metadata_reuse_drop_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/partial_reuse_drop_column.db' AS db1 (BLOCK_SIZE 16384, STORAGE_VERSION 'latest') -- ok == -SET debug_verify_blocks=true --- -ok -== CREATE TABLE db1.wide_tbl AS SELECT i AS id, md5(i::VARCHAR || 'c0') AS c0, diff --git a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_small_block.test b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_small_block.test index f25e310..027415f 100644 --- a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_small_block.test +++ b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_small_block.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/partial_column_metadata_reuse_small_block.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/partial_reuse_carries_column_extras.db' (BLOCK_SIZE 16384, STORAGE_VERSION 'latest') diff --git a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_v7.test b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_v7.test index 79f996b..a1e999c 100644 --- a/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_v7.test +++ b/parser/testdata/corpus/sql/storage/metadata/partial_column_metadata_reuse_v7.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/partial_column_metadata_reuse_v7.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(DISTINCT column_name) FROM pragma_storage_info('wide_tbl', loaded_segments_only=true) diff --git a/parser/testdata/corpus/sql/storage/metadata/partial_table_metadata_reuse.test b/parser/testdata/corpus/sql/storage/metadata/partial_table_metadata_reuse.test index 7a6264a..b41ca81 100644 --- a/parser/testdata/corpus/sql/storage/metadata/partial_table_metadata_reuse.test +++ b/parser/testdata/corpus/sql/storage/metadata/partial_table_metadata_reuse.test @@ -1,6 +1,6 @@ # source: test/sql/storage/metadata/partial_table_metadata_reuse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO bigtbl VALUES (NULL) diff --git a/parser/testdata/corpus/sql/storage/metadata/unchanged_table_statistics.test b/parser/testdata/corpus/sql/storage/metadata/unchanged_table_statistics.test new file mode 100644 index 0000000..63c6f75 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/metadata/unchanged_table_statistics.test @@ -0,0 +1,87 @@ +# source: test/sql/storage/metadata/unchanged_table_statistics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE stable(i INTEGER PRIMARY KEY, s VARCHAR, items INTEGER[]); +-- +ok +== +INSERT INTO stable SELECT i, 'value-' || i::VARCHAR, [i, i + 1] FROM range(1000) t(i); +-- +ok +== +CREATE TABLE changed(i INTEGER); +-- +ok +== +ANALYZE stable; +-- +ok +== +CREATE TABLE saved_stats AS SELECT stats(i) AS int_stats, stats(s) AS string_stats FROM stable LIMIT 1; +-- +ok +== +INSERT INTO changed VALUES ({iteration}); +-- +error: Parser Error: syntax error at or near "}" +== +SELECT stats(i) IS NOT DISTINCT FROM (SELECT int_stats FROM saved_stats), + stats(s) IS NOT DISTINCT FROM (SELECT string_stats FROM saved_stats) +FROM stable LIMIT 1; +-- +ok +== +SELECT count(*), sum(i), sum(items[2]) FROM stable; +-- +ok +== +SELECT count(*) FROM empty_table; +-- +ok +== +SELECT i, items[1], items[2] FROM stable WHERE s = 'value-17'; +-- +ok +== +UPDATE stable SET i = i + 1000 WHERE i < 10; +-- +ok +== +DELETE FROM stable WHERE i >= 1005; +-- +ok +== +INSERT INTO empty_table VALUES (42); +-- +ok +== +SELECT count(*), sum(i), min(i), max(i) FROM stable; +-- +ok +== +CREATE OR REPLACE TABLE saved_stats AS SELECT stats(i) AS int_stats, stats(s) AS string_stats FROM stable LIMIT 1; +-- +ok +== +INSERT INTO changed VALUES (4); +-- +ok +== +SELECT i FROM empty_table; +-- +ok +== +INSERT INTO changed VALUES (5); +-- +ok +== +SELECT i, items[1], items[2] FROM stable WHERE s = 'value-0'; +-- +ok +== +SELECT count(*), sum(i) FROM stable; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/mix/test_update_delete_string.test b/parser/testdata/corpus/sql/storage/mix/test_update_delete_string.test index 04156a3..34e79b0 100644 --- a/parser/testdata/corpus/sql/storage/mix/test_update_delete_string.test +++ b/parser/testdata/corpus/sql/storage/mix/test_update_delete_string.test @@ -1,6 +1,6 @@ # source: test/sql/storage/mix/test_update_delete_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b STRING); diff --git a/parser/testdata/corpus/sql/storage/mix/updates_deletes_big_table.test b/parser/testdata/corpus/sql/storage/mix/updates_deletes_big_table.test index 077d0b3..1da3b63 100644 --- a/parser/testdata/corpus/sql/storage/mix/updates_deletes_big_table.test +++ b/parser/testdata/corpus/sql/storage/mix/updates_deletes_big_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/mix/updates_deletes_big_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT a FROM range(0, 1000) tbl1(a), repeat(0, 100) tbl2(b) diff --git a/parser/testdata/corpus/sql/storage/mix/updates_deletes_persistent_segments.test b/parser/testdata/corpus/sql/storage/mix/updates_deletes_persistent_segments.test index 1500271..91bdae6 100644 --- a/parser/testdata/corpus/sql/storage/mix/updates_deletes_persistent_segments.test +++ b/parser/testdata/corpus/sql/storage/mix/updates_deletes_persistent_segments.test @@ -1,6 +1,6 @@ # source: test/sql/storage/mix/updates_deletes_persistent_segments.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/storage/multiple_clients_checkpoint_pending_updates.test b/parser/testdata/corpus/sql/storage/multiple_clients_checkpoint_pending_updates.test index d560e5f..65072ca 100644 --- a/parser/testdata/corpus/sql/storage/multiple_clients_checkpoint_pending_updates.test +++ b/parser/testdata/corpus/sql/storage/multiple_clients_checkpoint_pending_updates.test @@ -1,6 +1,6 @@ # source: test/sql/storage/multiple_clients_checkpoint_pending_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT * FROM range(1000000); diff --git a/parser/testdata/corpus/sql/storage/nan_min_statistics.test b/parser/testdata/corpus/sql/storage/nan_min_statistics.test new file mode 100644 index 0000000..5b486f2 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/nan_min_statistics.test @@ -0,0 +1,55 @@ +# source: test/sql/storage/nan_min_statistics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO t VALUES ('nan'::{type}); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT (stats(x)).min, (stats(x)).max FROM t LIMIT 1; +-- +ok +== +SELECT MIN(x), MAX(x) FROM t; +-- +ok +== +INSERT INTO t VALUES ('nan'::{type}), (42), (-42); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT ((stats(x)).min)::{type} = -42, isnan(((stats(x)).max)::{type}) FROM t LIMIT 1; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT MIN(x) = -42, isnan(MAX(x)) FROM t; +-- +ok +== +ATTACH '{TEST_DIR}/nan_min_statistics_v1_5_5.db' AS legacy_nan_stats; +-- +ok +== +INSERT INTO legacy_nan_stats.legacy_nan_stats VALUES ('nan'::FLOAT, 'nan'::DOUBLE); +-- +ok +== +SELECT isnan(((stats(f)).min)::FLOAT), isnan(((stats(f)).max)::FLOAT), + isnan(((stats(d)).min)::DOUBLE), isnan(((stats(d)).max)::DOUBLE) +FROM legacy_nan_stats.legacy_nan_stats LIMIT 1; +-- +ok +== +CHECKPOINT legacy_nan_stats; +-- +ok +== +DETACH legacy_nan_stats; +-- +ok +== +ATTACH '{TEST_DIR}/nan_min_statistics_v1_5_5.db' AS legacy_nan_stats (READ_ONLY); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/nested/struct_of_lists_unaligned.test b/parser/testdata/corpus/sql/storage/nested/struct_of_lists_unaligned.test index fa9b1e3..c2dfc68 100644 --- a/parser/testdata/corpus/sql/storage/nested/struct_of_lists_unaligned.test +++ b/parser/testdata/corpus/sql/storage/nested/struct_of_lists_unaligned.test @@ -1,6 +1,6 @@ # source: test/sql/storage/nested/struct_of_lists_unaligned.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_list_2 (a integer, b STRUCT(c VARCHAR[], d VARCHAR[], e INTEGER[])); diff --git a/parser/testdata/corpus/sql/storage/null_byte_storage.test b/parser/testdata/corpus/sql/storage/null_byte_storage.test index ded2cda..58ad0ca 100644 --- a/parser/testdata/corpus/sql/storage/null_byte_storage.test +++ b/parser/testdata/corpus/sql/storage/null_byte_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/null_byte_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_compression='{compr}' diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_alter_then_append.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_alter_then_append.test new file mode 100644 index 0000000..a923727 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_alter_then_append.test @@ -0,0 +1,29 @@ +# source: test/sql/storage/optimistic_write/optimistic_write_alter_then_append.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET write_buffer_row_group_count = 1 +-- +ok +== +CREATE TABLE t(a INTEGER, b VARCHAR, c DOUBLE) +-- +ok +== +INSERT INTO t SELECT range, 'val_'||range, range*1.5 FROM range(130000) +-- +ok +== +ALTER TABLE t ALTER COLUMN c TYPE BIGINT +-- +ok +== +INSERT INTO t SELECT range+130000, 'new_'||(range+130000), range*2 FROM range(130000) +-- +ok +== +SELECT count(*), sum(c) FROM t +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_batch_insert_sub_rowgroup.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_batch_insert_sub_rowgroup.test new file mode 100644 index 0000000..6a42d9c --- /dev/null +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_batch_insert_sub_rowgroup.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/optimistic_write/optimistic_write_batch_insert_sub_rowgroup.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/batch_insert_sub_rowgroup.db' AS db (ROW_GROUP_SIZE 2048); +-- +ok +== +INSERT INTO t SELECT range FROM range(1836) ORDER BY range; +-- +ok +== +SELECT sum(i) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_commit_failure.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_commit_failure.test new file mode 100644 index 0000000..4b326c4 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_commit_failure.test @@ -0,0 +1,25 @@ +# source: test/sql/storage/optimistic_write/optimistic_write_commit_failure.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET GLOBAL debug_verify_blocks = true; +-- +ok +== +SELECT total_blocks, used_blocks, free_blocks FROM pragma_database_size(); +-- +ok +== +SET debug_force_commit_failure = true; +-- +ok +== +INSERT INTO t SELECT * FROM range(130000); +-- +ok +== +SET debug_force_commit_failure = false; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_cyclic_scan_single_thread.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_cyclic_scan_single_thread.test new file mode 100644 index 0000000..8dd8c64 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_cyclic_scan_single_thread.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/optimistic_write/optimistic_write_cyclic_scan_single_thread.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET write_buffer_row_group_count=1; +-- +ok +== +INSERT INTO t SELECT range FROM range(100000) tbl(range); +-- +ok +== +INSERT INTO t SELECT * FROM t; +-- +ok +== +SELECT count(*), sum(a) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_delete.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_delete.test index 614cb9f..871d07d 100644 --- a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_delete.test +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_delete.test @@ -1,6 +1,6 @@ # source: test/sql/storage/optimistic_write/optimistic_write_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT * FROM range(1000000) diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_large_strings.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_large_strings.test index 7583204..4ffceda 100644 --- a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_large_strings.test +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_large_strings.test @@ -1,6 +1,6 @@ # source: test/sql/storage/optimistic_write/optimistic_write_large_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_skip_checkpoint_on_commit={skip_checkpoint} diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_not_trigger_checkpoint.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_not_trigger_checkpoint.test index c9fcf02..26045f9 100644 --- a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_not_trigger_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_not_trigger_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/optimistic_write/optimistic_write_not_trigger_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold = '5 KB' diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_temp_table.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_temp_table.test index 023c25f..0cea061 100644 --- a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_temp_table.test +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_temp_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/optimistic_write/optimistic_write_temp_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT 42 i diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay.test new file mode 100644 index 0000000..0f485ef --- /dev/null +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay.test @@ -0,0 +1,49 @@ +# source: test/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t (id BIGINT PRIMARY KEY, payload INTEGER); +-- +ok +== +INSERT INTO t SELECT i, 0 FROM range(0, 260000) r(i); +-- +ok +== +SET checkpoint_threshold = '1TB'; +-- +ok +== +SET write_buffer_row_group_count = 1; +-- +ok +== +DELETE FROM t WHERE id >= 0 AND id < 130000; +-- +ok +== +INSERT INTO t SELECT i, 1 FROM range(0, 130000) r(i); +-- +ok +== +DELETE FROM t WHERE id >= 10000 AND id < 140000; +-- +ok +== +INSERT INTO t SELECT i, 2 FROM range(10000, 140000) r(i); +-- +ok +== +SELECT COUNT(*), COUNT(DISTINCT id) FROM t; +-- +ok +== +SELECT id, payload FROM t WHERE id IN (0, 9999, 10000, 129999, 130000, 139999, 140000) ORDER BY id; +-- +ok +== +INSERT INTO t VALUES (0, 99); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay_desync.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay_desync.test new file mode 100644 index 0000000..ed8225c --- /dev/null +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay_desync.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/optimistic_write/optimistic_write_unique_index_wal_replay_desync.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET index_scan_percentage = 0; +-- +ok +== +SELECT id, payload FROM t WHERE id = 10000; +-- +ok +== +SET index_scan_percentage = 1; +-- +ok +== +SET index_scan_max_count = 999999999; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_update.test b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_update.test index 7e4d9dd..6744175 100644 --- a/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_update.test +++ b/parser/testdata/corpus/sql/storage/optimistic_write/optimistic_write_update.test @@ -1,6 +1,6 @@ # source: test/sql/storage/optimistic_write/optimistic_write_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET a=500000 WHERE a=0 diff --git a/parser/testdata/corpus/sql/storage/overflow_strings/blob_row_fetch.test b/parser/testdata/corpus/sql/storage/overflow_strings/blob_row_fetch.test new file mode 100644 index 0000000..4fbe1b8 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/overflow_strings/blob_row_fetch.test @@ -0,0 +1,135 @@ +# source: test/sql/storage/overflow_strings/blob_row_fetch.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/blob_row_fetch.db' AS db (BLOCK_SIZE 16384); +-- +ok +== +SET force_compression='uncompressed'; +-- +ok +== +CREATE TABLE db.t(id INTEGER, val BLOB); +-- +ok +== +INSERT INTO db.t SELECT i, ('row' || i || repeat('Y', 50000))::BLOB FROM range(2500) tbl(i); +-- +ok +== +CREATE TABLE db.t2(id INTEGER, val BLOB); +-- +ok +== +INSERT INTO db.t2 SELECT i, CASE WHEN i % 7 = 0 THEN NULL ELSE ('row' || i || repeat('Y', 5000))::BLOB END FROM range(2500) tbl(i); +-- +ok +== +SELECT compression FROM pragma_storage_info('db.t') WHERE segment_type = 'BLOB' AND compression != 'Uncompressed'; +-- +ok +== +SELECT bool_and(len(additional_block_ids) > 0) FROM pragma_storage_info('db.t') WHERE segment_type = 'BLOB'; +-- +ok +== +SELECT count(*) > 1 FROM pragma_storage_info('db.t') WHERE segment_type = 'BLOB'; +-- +ok +== +SELECT count(*) > 1 FROM pragma_storage_info('db.t2') WHERE segment_type = 'BLOB'; +-- +ok +== +PRAGMA max_temp_directory_size='0B'; +-- +ok +== +SET memory_limit='90MB'; +-- +ok +== +SELECT val = ('row0' || repeat('Y', 50000))::BLOB FROM db.t WHERE id = 0; +-- +ok +== +SELECT val = ('row1022' || repeat('Y', 50000))::BLOB FROM db.t WHERE id = 1022; +-- +ok +== +SELECT val = ('row1023' || repeat('Y', 50000))::BLOB FROM db.t WHERE id = 1023; +-- +ok +== +SELECT val = ('row2047' || repeat('Y', 50000))::BLOB FROM db.t WHERE id = 2047; +-- +ok +== +SELECT val = ('row2048' || repeat('Y', 50000))::BLOB FROM db.t WHERE id = 2048; +-- +ok +== +SELECT val = ('row2499' || repeat('Y', 50000))::BLOB FROM db.t WHERE id = 2499; +-- +ok +== +SELECT count(*), bool_and(val = ('row' || id || repeat('Y', 50000))::BLOB) +FROM db.t WHERE id BETWEEN 1020 AND 1026; +-- +ok +== +SET memory_limit='2GB'; +-- +ok +== +SELECT val IS NULL FROM db.t2 WHERE id = 1022; +-- +ok +== +SELECT val = ('row1023' || repeat('Y', 5000))::BLOB FROM db.t2 WHERE id = 1023; +-- +ok +== +SELECT count(*), count(val), bool_and(val IS NULL OR val = ('row' || id || repeat('Y', 5000))::BLOB) +FROM db.t2 WHERE id BETWEEN 1015 AND 1030; +-- +ok +== +CREATE TEMP TABLE retained AS SELECT * FROM db.t2 WHERE id%1024<2 OR id%1024 BETWEEN 12 AND 13 OR id%1024>=1022; +-- +ok +== +UPDATE db.t2 SET val = ('upd' || id || repeat('Z', 5000))::BLOB WHERE id IN (1500, 1505); +-- +ok +== +UPDATE db.t2 SET val = NULL WHERE id = 1501; +-- +ok +== +SELECT val = ('upd1500' || repeat('Z', 5000))::BLOB FROM db.t2 WHERE id = 1500; +-- +ok +== +SELECT val IS NULL FROM db.t2 WHERE id = 1501; +-- +ok +== +SELECT val = ('row1502' || repeat('Y', 5000))::BLOB FROM db.t2 WHERE id = 1502; +-- +ok +== +SELECT count(*), bool_and(CASE + WHEN id IN (1500, 1505) THEN val = ('upd' || id || repeat('Z', 5000))::BLOB + WHEN id = 1501 OR id % 7 = 0 THEN val IS NULL + ELSE val = ('row' || id || repeat('Y', 5000))::BLOB END) +FROM db.t2 WHERE id BETWEEN 1495 AND 1510; +-- +ok +== +SELECT count(*), bool_and(val IS NOT DISTINCT FROM CASE WHEN id%7=0 THEN NULL ELSE ('row' || id || repeat('Y',5000))::BLOB END) FROM retained; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/overflow_strings/null_overflow_string_memory.test b/parser/testdata/corpus/sql/storage/overflow_strings/null_overflow_string_memory.test new file mode 100644 index 0000000..913d2cb --- /dev/null +++ b/parser/testdata/corpus/sql/storage/overflow_strings/null_overflow_string_memory.test @@ -0,0 +1,27 @@ +# source: test/sql/storage/overflow_strings/null_overflow_string_memory.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS +SELECT CASE WHEN i = 0 THEN repeat('x', 2*1024*1024) ELSE NULL END AS v +FROM range(50000) tbl(i); +-- +ok +== +SELECT compression FROM pragma_storage_info('t') WHERE segment_type='VARCHAR' AND compression != 'Uncompressed'; +-- +ok +== +SELECT EXISTS (SELECT * FROM pragma_storage_info('t', include_segment_info=true) WHERE contains(segment_info, 'Overflow String')); +-- +ok +== +SET memory_limit='512MB' +-- +ok +== +SELECT sum(length(v)) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_drop_table.test b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_drop_table.test index 471309f..41def87 100644 --- a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_drop_table.test +++ b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_drop_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/partial_blocks/many_columns_drop_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i0 INTEGER, i1 INTEGER, i2 INTEGER, i3 INTEGER, i4 INTEGER, i5 INTEGER, i6 INTEGER, i7 INTEGER, i8 INTEGER, i9 INTEGER, i10 INTEGER, i11 INTEGER, i12 INTEGER, i13 INTEGER, i14 INTEGER, i15 INTEGER, i16 INTEGER, i17 INTEGER, i18 INTEGER, i19 INTEGER, i20 INTEGER, i21 INTEGER, i22 INTEGER, i23 INTEGER, i24 INTEGER, i25 INTEGER, i26 INTEGER, i27 INTEGER, i28 INTEGER, i29 INTEGER, i30 INTEGER, i31 INTEGER, i32 INTEGER, i33 INTEGER, i34 INTEGER, i35 INTEGER, i36 INTEGER, i37 INTEGER, i38 INTEGER, i39 INTEGER, i40 INTEGER, i41 INTEGER, i42 INTEGER, i43 INTEGER, i44 INTEGER, i45 INTEGER, i46 INTEGER, i47 INTEGER, i48 INTEGER, i49 INTEGER, i50 INTEGER, i51 INTEGER, i52 INTEGER, i53 INTEGER, i54 INTEGER, i55 INTEGER, i56 INTEGER, i57 INTEGER, i58 INTEGER, i59 INTEGER, i60 INTEGER, i61 INTEGER, i62 INTEGER, i63 INTEGER, i64 INTEGER, i65 INTEGER, i66 INTEGER, i67 INTEGER, i68 INTEGER, i69 INTEGER, i70 INTEGER, i71 INTEGER, i72 INTEGER, i73 INTEGER, i74 INTEGER, i75 INTEGER, i76 INTEGER, i77 INTEGER, i78 INTEGER, i79 INTEGER, i80 INTEGER, i81 INTEGER, i82 INTEGER, i83 INTEGER, i84 INTEGER, i85 INTEGER, i86 INTEGER, i87 INTEGER, i88 INTEGER, i89 INTEGER, i90 INTEGER, i91 INTEGER, i92 INTEGER, i93 INTEGER, i94 INTEGER, i95 INTEGER, i96 INTEGER, i97 INTEGER, i98 INTEGER, i99 INTEGER); diff --git a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_rle.test b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_rle.test index 5ce382d..b354e65 100644 --- a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_rle.test +++ b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_rle.test @@ -1,12 +1,8 @@ # source: test/sql/storage/partial_blocks/many_columns_rle.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -PRAGMA force_compression='rle' --- -ok -== SELECT total_blocks * block_size < 10 * 262144 FROM pragma_database_size() -- ok diff --git a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_storage.test b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_storage.test index 77cfc3e..ce2617e 100644 --- a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_storage.test +++ b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/partial_blocks/many_columns_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select count(*) from pragma_storage_info('integers') where block_id IS NULL; diff --git a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_strings.test b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_strings.test index 9badde3..a02fbdf 100644 --- a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_strings.test +++ b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_strings.test @@ -1,6 +1,6 @@ # source: test/sql/storage/partial_blocks/many_columns_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(i0 VARCHAR, i1 VARCHAR, i2 VARCHAR, i3 VARCHAR, i4 VARCHAR, i5 VARCHAR, i6 VARCHAR, i7 VARCHAR, i8 VARCHAR, i9 VARCHAR, i10 VARCHAR, i11 VARCHAR, i12 VARCHAR, i13 VARCHAR, i14 VARCHAR, i15 VARCHAR, i16 VARCHAR, i17 VARCHAR, i18 VARCHAR, i19 VARCHAR, i20 VARCHAR, i21 VARCHAR, i22 VARCHAR, i23 VARCHAR, i24 VARCHAR, i25 VARCHAR, i26 VARCHAR, i27 VARCHAR, i28 VARCHAR, i29 VARCHAR, i30 VARCHAR, i31 VARCHAR, i32 VARCHAR, i33 VARCHAR, i34 VARCHAR, i35 VARCHAR, i36 VARCHAR, i37 VARCHAR, i38 VARCHAR, i39 VARCHAR, i40 VARCHAR, i41 VARCHAR, i42 VARCHAR, i43 VARCHAR, i44 VARCHAR, i45 VARCHAR, i46 VARCHAR, i47 VARCHAR, i48 VARCHAR, i49 VARCHAR, i50 VARCHAR, i51 VARCHAR, i52 VARCHAR, i53 VARCHAR, i54 VARCHAR, i55 VARCHAR, i56 VARCHAR, i57 VARCHAR, i58 VARCHAR, i59 VARCHAR, i60 VARCHAR, i61 VARCHAR, i62 VARCHAR, i63 VARCHAR, i64 VARCHAR, i65 VARCHAR, i66 VARCHAR, i67 VARCHAR, i68 VARCHAR, i69 VARCHAR, i70 VARCHAR, i71 VARCHAR, i72 VARCHAR, i73 VARCHAR, i74 VARCHAR, i75 VARCHAR, i76 VARCHAR, i77 VARCHAR, i78 VARCHAR, i79 VARCHAR, i80 VARCHAR, i81 VARCHAR, i82 VARCHAR, i83 VARCHAR, i84 VARCHAR, i85 VARCHAR, i86 VARCHAR, i87 VARCHAR, i88 VARCHAR, i89 VARCHAR, i90 VARCHAR, i91 VARCHAR, i92 VARCHAR, i93 VARCHAR, i94 VARCHAR, i95 VARCHAR, i96 VARCHAR, i97 VARCHAR, i98 VARCHAR, i99 VARCHAR); diff --git a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_validity.test b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_validity.test index 7e628ed..8e82912 100644 --- a/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_validity.test +++ b/parser/testdata/corpus/sql/storage/partial_blocks/many_columns_validity.test @@ -1,6 +1,6 @@ # source: test/sql/storage/partial_blocks/many_columns_validity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers (i1) VALUES (NULL); diff --git a/parser/testdata/corpus/sql/storage/partial_delete_checkpoint_mask.test b/parser/testdata/corpus/sql/storage/partial_delete_checkpoint_mask.test index 2a67609..6f7c239 100644 --- a/parser/testdata/corpus/sql/storage/partial_delete_checkpoint_mask.test +++ b/parser/testdata/corpus/sql/storage/partial_delete_checkpoint_mask.test @@ -1,6 +1,6 @@ # source: test/sql/storage/partial_delete_checkpoint_mask.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i FROM range(1228800) t(i) diff --git a/parser/testdata/corpus/sql/storage/partial_delete_pending_compress.test b/parser/testdata/corpus/sql/storage/partial_delete_pending_compress.test index 8ab082e..93f7e3a 100644 --- a/parser/testdata/corpus/sql/storage/partial_delete_pending_compress.test +++ b/parser/testdata/corpus/sql/storage/partial_delete_pending_compress.test @@ -1,6 +1,6 @@ # source: test/sql/storage/partial_delete_pending_compress.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA force_checkpoint diff --git a/parser/testdata/corpus/sql/storage/piecemeal_delete_checkpoint_compress.test b/parser/testdata/corpus/sql/storage/piecemeal_delete_checkpoint_compress.test index bce7e9a..43f8b29 100644 --- a/parser/testdata/corpus/sql/storage/piecemeal_delete_checkpoint_compress.test +++ b/parser/testdata/corpus/sql/storage/piecemeal_delete_checkpoint_compress.test @@ -1,6 +1,6 @@ # source: test/sql/storage/piecemeal_delete_checkpoint_compress.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM tbl WHERE i < 61440 AND i % 2 = 0 diff --git a/parser/testdata/corpus/sql/storage/pragma_storage_info_scan_type.test b/parser/testdata/corpus/sql/storage/pragma_storage_info_scan_type.test index 8f21fcd..5d09faf 100644 --- a/parser/testdata/corpus/sql/storage/pragma_storage_info_scan_type.test +++ b/parser/testdata/corpus/sql/storage/pragma_storage_info_scan_type.test @@ -1,6 +1,6 @@ # source: test/sql/storage/pragma_storage_info_scan_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bp_tbl (a INTEGER) diff --git a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_pool.test b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_pool.test index f29c2a6..878b025 100644 --- a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_pool.test +++ b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_pool.test @@ -1,6 +1,6 @@ # source: test/sql/storage/prefetch/async_native_scan_pool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT range AS i FROM range(1000000); @@ -11,7 +11,3 @@ SET storage_block_prefetch='debug_force_always' -- ok == -SELECT sum(i) FROM integers --- -ok -== diff --git a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_positional.test b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_positional.test index 30fb9e3..e38552e 100644 --- a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_positional.test +++ b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_positional.test @@ -1,6 +1,6 @@ # source: test/sql/storage/prefetch/async_native_scan_positional.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT range AS i FROM range(100000); diff --git a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead.test b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead.test new file mode 100644 index 0000000..eadfaed --- /dev/null +++ b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead.test @@ -0,0 +1,37 @@ +# source: test/sql/storage/prefetch/async_native_scan_read_ahead.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +DELETE FROM integers WHERE i % 10 = 0; +-- +ok +== +SELECT count(*), sum(i) FROM integers +-- +ok +== +SELECT count(*) FILTER (WHERE pool = 'READ_AHEAD') > 0, count(*) FILTER (WHERE pool <> 'READ_AHEAD') FROM duckdb_logs_parsed('AsyncTaskSchedule') +-- +ok +== +SELECT count(*) FROM integers WHERE i < 100 +-- +ok +== +SELECT i FROM integers WHERE i % 250000 = 1 +-- +ok +== +INSERT INTO integers SELECT range FROM range(5) +-- +ok +== +CREATE TEMPORARY TABLE expected AS SELECT count(*) AS c, sum(i) AS s FROM integers USING SAMPLE 1 PERCENT (system, 42) +-- +ok +== +SELECT count(*) = (SELECT c FROM expected) AND sum(i) = (SELECT s FROM expected) FROM integers USING SAMPLE 1 PERCENT (system, 42) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead_concurrent.test b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead_concurrent.test new file mode 100644 index 0000000..125cd12 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead_concurrent.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/prefetch/async_native_scan_read_ahead_concurrent.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE integers AS SELECT range AS i FROM range(500000); +-- +ok +== +INSERT INTO integers SELECT range FROM range(10000) +-- +ok +== +SELECT count(*) % 10000 FROM integers +-- +ok +== +SELECT count(*) FROM integers +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead_pruning.test b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead_pruning.test new file mode 100644 index 0000000..081d54c --- /dev/null +++ b/parser/testdata/corpus/sql/storage/prefetch/async_native_scan_read_ahead_pruning.test @@ -0,0 +1,33 @@ +# source: test/sql/storage/prefetch/async_native_scan_read_ahead_pruning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET force_compression='bitpacking' +-- +ok +== +CREATE TABLE integers AS SELECT (range * 1000000 + (hash(range) % 1000000))::BIGINT AS i FROM range(1000000); +-- +ok +== +CREATE TEMPORARY TABLE before AS SELECT memory_usage_bytes AS bytes FROM duckdb_memory() WHERE tag = 'BASE_TABLE' +-- +ok +== +SELECT count(*) FROM integers WHERE i BETWEEN 230000000000 AND 230010999999 +-- +ok +== +SELECT memory_usage_bytes - (SELECT bytes FROM before) <= 262144 FROM duckdb_memory() WHERE tag = 'BASE_TABLE' +-- +ok +== +SELECT count(*) FROM integers WHERE i BETWEEN 10000000 AND 20999999 +-- +ok +== +SELECT sum(task_count) FROM duckdb_logs_parsed('AsyncTaskSchedule') +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/prefetch/prefetch_run_size_cap.test b/parser/testdata/corpus/sql/storage/prefetch/prefetch_run_size_cap.test new file mode 100644 index 0000000..aa9b4cc --- /dev/null +++ b/parser/testdata/corpus/sql/storage/prefetch/prefetch_run_size_cap.test @@ -0,0 +1,41 @@ +# source: test/sql/storage/prefetch/prefetch_run_size_cap.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/prefetch_run_cap.db' AS cap_db (ROW_GROUP_SIZE 8388608, STORAGE_VERSION 'v1.2.0') +-- +ok +== +SET force_compression='uncompressed' +-- +ok +== +CREATE TABLE cap_db.t AS SELECT random() AS d FROM range(8388608) +-- +ok +== +CHECKPOINT cap_db +-- +ok +== +DETACH cap_db +-- +ok +== +ATTACH '{TEST_DIR}/prefetch_run_cap.db' AS cap_db (READ_ONLY) +-- +ok +== +SELECT sum(d) > 0 FROM cap_db.t +-- +ok +== +SELECT max(task_count) FROM duckdb_logs_parsed('AsyncTaskSchedule') WHERE pool = 'READ_AHEAD' +-- +ok +== +SET memory_limit='{limit}' +-- +error: Parser Error: Memory must have a number (e.g. 1GB) +== diff --git a/parser/testdata/corpus/sql/storage/prefetch/prefetch_run_size_cap.test.metadata.json b/parser/testdata/corpus/sql/storage/prefetch/prefetch_run_size_cap.test.metadata.json new file mode 100644 index 0000000..998efd9 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/prefetch/prefetch_run_size_cap.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "f1700139c375354d": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_basic.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_basic.test index 3031b01..8672e55 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_basic.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_basic.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_basic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_test.db' diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_generated.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_generated.test index 5d5792b..8022ff3 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_generated.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_generated.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_generated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_generated.db' AS rd diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_index.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_index.test index ba3a8de..8f220ef 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_index.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_index.db' diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_schema.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_schema.test index 6cec372..379a9e7 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_schema.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_schema.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_schema.db' AS rd diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_suggested.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_suggested.test index 52ec2da..8f18524 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_suggested.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_suggested.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_suggested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_suggested.db' AS suggested diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_top_n.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_top_n.test index 7be3a92..5ad247b 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_top_n.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_top_n.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_top_n.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_top_n{i}.db' AS rd diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_transaction.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_transaction.test index 2d2f1b0..ab50071 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_transaction.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_transaction.db' AS rd diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_union_by_name.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_union_by_name.test index 0e5dae6..848f6e4 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_union_by_name.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_unionbyname1.db' AS rd diff --git a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_virtual_columns.test b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_virtual_columns.test index a503d05..cb7aed2 100644 --- a/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_virtual_columns.test +++ b/parser/testdata/corpus/sql/storage/read_duckdb/read_duckdb_virtual_columns.test @@ -1,6 +1,6 @@ # source: test/sql/storage/read_duckdb/read_duckdb_virtual_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/read_duckdb_virt{dbindex}.db' AS rd diff --git a/parser/testdata/corpus/sql/storage/reclaim_space/reclaim_space_drop_table_optimistic.test b/parser/testdata/corpus/sql/storage/reclaim_space/reclaim_space_drop_table_optimistic.test new file mode 100644 index 0000000..d4b11b4 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/reclaim_space/reclaim_space_drop_table_optimistic.test @@ -0,0 +1,33 @@ +# source: test/sql/storage/reclaim_space/reclaim_space_drop_table_optimistic.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET preserve_insertion_order = false; +-- +ok +== +SET checkpoint_threshold = '999999GB'; +-- +ok +== +CREATE TABLE dummy (x INT); +-- +ok +== +CREATE TABLE t_to_drop (r BIGINT, s VARCHAR); +-- +ok +== +INSERT INTO t_to_drop SELECT r, repeat(md5(r::VARCHAR), 10) FROM range(200000) tt(r); +-- +ok +== +DROP TABLE t_to_drop; +-- +ok +== +SELECT used_blocks <= 2 FROM pragma_database_size(); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/reclaim_space/test_reclaim_space_update_large_string.test b/parser/testdata/corpus/sql/storage/reclaim_space/test_reclaim_space_update_large_string.test index 20b1664..687a39c 100644 --- a/parser/testdata/corpus/sql/storage/reclaim_space/test_reclaim_space_update_large_string.test +++ b/parser/testdata/corpus/sql/storage/reclaim_space/test_reclaim_space_update_large_string.test @@ -1,9 +1,9 @@ # source: test/sql/storage/reclaim_space/test_reclaim_space_update_large_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -PRAGMA force_checkpoint; +SET force_compression = 'uncompressed'; -- ok == @@ -11,7 +11,16 @@ INSERT INTO test VALUES (repeat('a', 1000000)); -- ok == -SELECT LENGTH(SUBSTRING(a, 0, 1000000)) FROM test +SELECT a = repeat('a', 1000000) FROM test +-- +ok +== +SELECT bool_and(compression = 'Uncompressed' AND len(additional_block_ids) > 0) +FROM pragma_storage_info('test') WHERE segment_type = 'VARCHAR'; +-- +ok +== +SELECT used_blocks FROM pragma_database_size() WHERE database_name = current_database(); -- ok == @@ -19,7 +28,7 @@ UPDATE test SET a=concat(a, 'a') -- ok == -select total_blocks from pragma_database_size(); +SELECT a = repeat('a', 1000010) FROM test -- ok == diff --git a/parser/testdata/corpus/sql/storage/row_group_fetch_bulk.test b/parser/testdata/corpus/sql/storage/row_group_fetch_bulk.test index ad478b1..d2e9a4e 100644 --- a/parser/testdata/corpus/sql/storage/row_group_fetch_bulk.test +++ b/parser/testdata/corpus/sql/storage/row_group_fetch_bulk.test @@ -1,6 +1,6 @@ # source: test/sql/storage/row_group_fetch_bulk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE big ( diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/alter_preserves_rowid_gaps.test b/parser/testdata/corpus/sql/storage/rowid_gaps/alter_preserves_rowid_gaps.test index 56e53d7..b02a2ee 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/alter_preserves_rowid_gaps.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/alter_preserves_rowid_gaps.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/alter_preserves_rowid_gaps.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_alter.db' AS rowid_gap_alter (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/append_after_gap_checkpoint.test b/parser/testdata/corpus/sql/storage/rowid_gaps/append_after_gap_checkpoint.test index ad17348..f45a711 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/append_after_gap_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/append_after_gap_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/append_after_gap_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_append_latest.db' AS rowid_gap_append_latest (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/bulk_append_after_gap_checkpoint.test b/parser/testdata/corpus/sql/storage/rowid_gaps/bulk_append_after_gap_checkpoint.test index 5225cf7..0c89e5d 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/bulk_append_after_gap_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/bulk_append_after_gap_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/bulk_append_after_gap_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_bulk_append.db' AS rowid_gap_bulk_append (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_checkpoint_drop_row_group.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_checkpoint_drop_row_group.test index 8c7086d..d3271c8 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_checkpoint_drop_row_group.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_checkpoint_drop_row_group.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_checkpoint_drop_row_group.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_vacuum_indexed.db' AS rowid_gap_vacuum_idx (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_dense_vacuum_merge.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_dense_vacuum_merge.test index 69ff671..814c24d 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_dense_vacuum_merge.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_dense_vacuum_merge.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_dense_vacuum_merge.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_dense_vacuum_indexed.db' AS rowid_gap_dense_vacuum (ROW_GROUP_SIZE 4096); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_legacy_no_remap.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_legacy_no_remap.test index 0b371db..4b576f1 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_legacy_no_remap.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_legacy_no_remap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_geometry_legacy_no_remap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_geom_legacy.db' AS geom_legacy (STORAGE_VERSION 'v1.4.0', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_vacuum_remap.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_vacuum_remap.test index 11b32ad..5dac27c 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_vacuum_remap.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_geometry_vacuum_remap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_geometry_vacuum_remap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_remap_geom.db' AS remap_geom (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_incremental_vacuum_remap.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_incremental_vacuum_remap.test index 829992a..4a9a336 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_incremental_vacuum_remap.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_incremental_vacuum_remap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_incremental_vacuum_remap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_incremental_remap.db' AS rowid_gap_remap (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_live_vacuum_no_rebuild.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_live_vacuum_no_rebuild.test index 608af0a..1557258 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_live_vacuum_no_rebuild.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_live_vacuum_no_rebuild.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_live_vacuum_no_rebuild.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_live_vacuum_no_rebuild.db' AS rowid_gap_live_vacuum (STORAGE_VERSION 'v1.4.0'); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_old_storage_keeps_deleted_row_group.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_old_storage_keeps_deleted_row_group.test index 5f10602..359a37a 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_old_storage_keeps_deleted_row_group.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_old_storage_keeps_deleted_row_group.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_old_storage_keeps_deleted_row_group.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_indexed_old_storage.db' AS rowid_gap_old_storage_idx (STORAGE_VERSION 'v1.5.0', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_rebuild_fallback_then_remap.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_rebuild_fallback_then_remap.test index ee61c0c..094ff0c 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_rebuild_fallback_then_remap.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_rebuild_fallback_then_remap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_rebuild_fallback_then_remap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_rebuild_then_remap.db' AS rebuild_then_remap (STORAGE_VERSION 'v1.5.0', ROW_GROUP_SIZE 2048, vacuum_rebuild_indexes 100000); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_duplicate_key_across_tasks.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_duplicate_key_across_tasks.test index 9654cad..52d870b 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_duplicate_key_across_tasks.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_duplicate_key_across_tasks.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_remap_duplicate_key_across_tasks.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_remap_tasks.db' AS remap_tasks (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_merges_across_gap.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_merges_across_gap.test index fd57db9..579e203 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_merges_across_gap.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_merges_across_gap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_remap_merges_across_gap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_remap_across_gap.db' AS remap_across_gap (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 4096); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_partial_chunk.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_partial_chunk.test index faa8af3..67847d8 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_partial_chunk.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_partial_chunk.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_remap_partial_chunk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_remap_partial.db' AS remap_partial (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_same_key_rowid_collision.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_same_key_rowid_collision.test index 231974a..e19f33d 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_same_key_rowid_collision.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexed_remap_same_key_rowid_collision.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexed_remap_same_key_rowid_collision.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_remap_collision.db' AS remap_collision (STORAGE_VERSION 'latest', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/indexes_geometry_legacy_no_merge_across_gap.test b/parser/testdata/corpus/sql/storage/rowid_gaps/indexes_geometry_legacy_no_merge_across_gap.test index cc77417..9bfc9ce 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/indexes_geometry_legacy_no_merge_across_gap.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/indexes_geometry_legacy_no_merge_across_gap.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/indexes_geometry_legacy_no_merge_across_gap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_geom_no_merge.db' AS geom_no_merge (STORAGE_VERSION 'v1.4.0', ROW_GROUP_SIZE 4096); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/leading_gap_lookup.test b/parser/testdata/corpus/sql/storage/rowid_gaps/leading_gap_lookup.test index 72970a0..a464b52 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/leading_gap_lookup.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/leading_gap_lookup.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/leading_gap_lookup.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_lookup.db' AS rowid_gap_lookup_db (STORAGE_VERSION 'latest'); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/old_storage_dense_rewrite.test b/parser/testdata/corpus/sql/storage/rowid_gaps/old_storage_dense_rewrite.test index 9737bcb..c8c1305 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/old_storage_dense_rewrite.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/old_storage_dense_rewrite.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/old_storage_dense_rewrite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/rowid_gap_old_storage_dense.db' AS rowid_gap_old_storage_dense (STORAGE_VERSION 'v1.5.0', ROW_GROUP_SIZE 2048); diff --git a/parser/testdata/corpus/sql/storage/rowid_gaps/wal_replay_after_gap_checkpoint.test b/parser/testdata/corpus/sql/storage/rowid_gaps/wal_replay_after_gap_checkpoint.test index cfd05c5..4b6f6f8 100644 --- a/parser/testdata/corpus/sql/storage/rowid_gaps/wal_replay_after_gap_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/rowid_gaps/wal_replay_after_gap_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/rowid_gaps/wal_replay_after_gap_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT i FROM range(368640) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/shutdown_create_index.test b/parser/testdata/corpus/sql/storage/shutdown_create_index.test index 188c09e..b64f49b 100644 --- a/parser/testdata/corpus/sql/storage/shutdown_create_index.test +++ b/parser/testdata/corpus/sql/storage/shutdown_create_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/shutdown_create_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (13, 22); diff --git a/parser/testdata/corpus/sql/storage/shutdown_running_transaction.test b/parser/testdata/corpus/sql/storage/shutdown_running_transaction.test index bd9f8f9..8952ba6 100644 --- a/parser/testdata/corpus/sql/storage/shutdown_running_transaction.test +++ b/parser/testdata/corpus/sql/storage/shutdown_running_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/storage/shutdown_running_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (22, 23); diff --git a/parser/testdata/corpus/sql/storage/shutdown_unique_index.test b/parser/testdata/corpus/sql/storage/shutdown_unique_index.test index 0581194..6fbf091 100644 --- a/parser/testdata/corpus/sql/storage/shutdown_unique_index.test +++ b/parser/testdata/corpus/sql/storage/shutdown_unique_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/shutdown_unique_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (12, 24) diff --git a/parser/testdata/corpus/sql/storage/storage_exceeds_block_large_string.test b/parser/testdata/corpus/sql/storage/storage_exceeds_block_large_string.test index 9216eea..3ae8451 100644 --- a/parser/testdata/corpus/sql/storage/storage_exceeds_block_large_string.test +++ b/parser/testdata/corpus/sql/storage/storage_exceeds_block_large_string.test @@ -1,12 +1,8 @@ # source: test/sql/storage/storage_exceeds_block_large_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET force_compression='uncompressed' --- -ok -== CREATE TABLE test (a VARCHAR, j BIGINT); -- ok diff --git a/parser/testdata/corpus/sql/storage/storage_exceeds_single_block.test b/parser/testdata/corpus/sql/storage/storage_exceeds_single_block.test index e8a1456..9504acd 100644 --- a/parser/testdata/corpus/sql/storage/storage_exceeds_single_block.test +++ b/parser/testdata/corpus/sql/storage/storage_exceeds_single_block.test @@ -1,6 +1,6 @@ # source: test/sql/storage/storage_exceeds_single_block.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (13, 22), (12, 21), (NULL, NULL) diff --git a/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_strings.test b/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_strings.test index 77e39ae..9179145 100644 --- a/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_strings.test +++ b/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_strings.test @@ -1,6 +1,6 @@ # source: test/sql/storage/storage_exceeds_single_block_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES ('a'), ('bb'), ('ccc'), ('dddd'), ('eeeee') diff --git a/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_types.test b/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_types.test index c6b04cf..19cfa78 100644 --- a/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_types.test +++ b/parser/testdata/corpus/sql/storage/storage_exceeds_single_block_types.test @@ -1,6 +1,6 @@ # source: test/sql/storage/storage_exceeds_single_block_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b BIGINT); diff --git a/parser/testdata/corpus/sql/storage/storage_option_coverage.test b/parser/testdata/corpus/sql/storage/storage_option_coverage.test new file mode 100644 index 0000000..03f4c60 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/storage_option_coverage.test @@ -0,0 +1,49 @@ +# source: test/sql/storage/storage_option_coverage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/compressed_disk.db' AS compressed_disk (COMPRESS false) +-- +ok +== +ATTACH '{TEST_DIR}/zero_row_group.db' AS zero_row_group (ROW_GROUP_SIZE 0) +-- +ok +== +ATTACH '{TEST_DIR}/unaligned_row_group.db' AS unaligned_row_group (ROW_GROUP_SIZE 77) +-- +ok +== +ATTACH '{TEST_DIR}/direct_io.db' AS direct_io (IO_MODE 'DIRECT_IO') +-- +ok +== +DETACH direct_io +-- +ok +== +ATTACH '{TEST_DIR}/encrypted_mmap.db' AS encrypted_mmap (ENCRYPTION_KEY 'secret', IO_MODE 'MMAP') +-- +ok +== +CREATE TABLE encrypted_mmap.t(i INTEGER) +-- +ok +== +INSERT INTO encrypted_mmap.t VALUES (42) +-- +ok +== +DETACH encrypted_mmap +-- +ok +== +SELECT * FROM encrypted_mmap.t +-- +ok +== +SET force_mbedtls_unsafe = false +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/storage_types.test b/parser/testdata/corpus/sql/storage/storage_types.test index bcb7344..8f2d56a 100644 --- a/parser/testdata/corpus/sql/storage/storage_types.test +++ b/parser/testdata/corpus/sql/storage/storage_types.test @@ -1,6 +1,6 @@ # source: test/sql/storage/storage_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a_{type} AS SELECT range::{type} i FROM range(100) diff --git a/parser/testdata/corpus/sql/storage/storage_version_65.test b/parser/testdata/corpus/sql/storage/storage_version_65.test index 4b3f4ec..7da4724 100644 --- a/parser/testdata/corpus/sql/storage/storage_version_65.test +++ b/parser/testdata/corpus/sql/storage/storage_version_65.test @@ -1,6 +1,6 @@ # source: test/sql/storage/storage_version_65.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/storage_versions65.db' diff --git a/parser/testdata/corpus/sql/storage/storage_versions.test b/parser/testdata/corpus/sql/storage/storage_versions.test index 99c93b2..4ded55c 100644 --- a/parser/testdata/corpus/sql/storage/storage_versions.test +++ b/parser/testdata/corpus/sql/storage/storage_versions.test @@ -1,6 +1,6 @@ # source: test/sql/storage/storage_versions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{DATA_DIR}/storage/empty64.db' (READ_ONLY); diff --git a/parser/testdata/corpus/sql/storage/store_group_order_all.test b/parser/testdata/corpus/sql/storage/store_group_order_all.test index 723d4d1..b1536bd 100644 --- a/parser/testdata/corpus/sql/storage/store_group_order_all.test +++ b/parser/testdata/corpus/sql/storage/store_group_order_all.test @@ -1,6 +1,6 @@ # source: test/sql/storage/store_group_order_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers( diff --git a/parser/testdata/corpus/sql/storage/temp_directory/failed_spill_keeps_block_evictable.test b/parser/testdata/corpus/sql/storage/temp_directory/failed_spill_keeps_block_evictable.test new file mode 100644 index 0000000..e10941e --- /dev/null +++ b/parser/testdata/corpus/sql/storage/temp_directory/failed_spill_keeps_block_evictable.test @@ -0,0 +1,21 @@ +# source: test/sql/storage/temp_directory/failed_spill_keeps_block_evictable.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TEMP TABLE t AS SELECT range AS i, repeat('x', 200)::VARCHAR AS s FROM range(400000); +-- +ok +== +SET memory_limit='4MB'; +-- +ok +== +SET max_temp_directory_size='10GB'; +-- +ok +== +SELECT max(length(s)) FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/temp_directory/initialization_retry.test b/parser/testdata/corpus/sql/storage/temp_directory/initialization_retry.test new file mode 100644 index 0000000..0730b98 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/temp_directory/initialization_retry.test @@ -0,0 +1,33 @@ +# source: test/sql/storage/temp_directory/initialization_retry.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY (SELECT 42) TO '{TEST_DIR}/temporary_directory_regular_file.csv'; +-- +ok +== +SET temp_directory='{TEST_DIR}/temporary_directory_regular_file.csv'; +-- +ok +== +CREATE TEMP TABLE t AS SELECT i, repeat('y', 80000) AS s FROM range(400) r(i); +-- +ok +== +SET memory_limit='10MB'; +-- +ok +== +SET temp_directory='{TEST_DIR}/temporary_directory_retry.tmp'; +-- +ok +== +SELECT sum(temporary_storage_bytes) > 0 FROM duckdb_memory(); +-- +ok +== +SET temp_directory='{TEST_DIR}/temporary_directory_after_use.tmp'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_error.test b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_error.test index b12c932..c9a9506 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_error.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_error.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/max_swap_space_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set temp_directory='{TEST_DIR}/max_swap_space_reached' @@ -19,7 +19,7 @@ CREATE OR REPLACE TABLE t2 AS SELECT random() FROM range(1000000); -- ok == -select "size" from duckdb_temporary_files() +SELECT coalesce(sum("size"), 0) FROM duckdb_temporary_files(); -- ok == @@ -43,11 +43,15 @@ CREATE OR REPLACE TABLE t2 AS SELECT random() FROM range(200000); -- ok == -CREATE OR REPLACE TABLE t2 AS SELECT * FROM range(1000000); +SELECT count(*) FROM t2; -- ok == -SELECT CASE WHEN sum("size") > 1000000 THEN true ELSE CONCAT('Expected size 1000000, but got ', sum("size"))::UNION(msg VARCHAR, b BOOLEAN) END FROM duckdb_temporary_files(); +SET max_temp_directory_size='16MiB'; +-- +ok +== +SELECT sum("size") > 1048576, sum("size") <= 16777216 FROM duckdb_temporary_files(); -- ok == diff --git a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_explicit.test b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_explicit.test index 0573ed4..6899f95 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_explicit.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_explicit.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/max_swap_space_explicit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set max_temp_directory_size='15gb' diff --git a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_inmemory.test b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_inmemory.test index ed7e522..7c973cb 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_inmemory.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_inmemory.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/max_swap_space_inmemory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set temp_directory=''; diff --git a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_persistent.test b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_persistent.test index eb18080..76cd922 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_persistent.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/max_swap_space_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('temp_directory').split('/')[-1]; diff --git a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_unlimited.test b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_unlimited.test index 984c658..57608e1 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_unlimited.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/max_swap_space_unlimited.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/max_swap_space_unlimited.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA max_temp_directory_size='-1'; diff --git a/parser/testdata/corpus/sql/storage/temp_directory/offload_failure_accounting.test b/parser/testdata/corpus/sql/storage/temp_directory/offload_failure_accounting.test new file mode 100644 index 0000000..24e6405 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/temp_directory/offload_failure_accounting.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/temp_directory/offload_failure_accounting.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA memory_limit='8MB'; +-- +ok +== +CREATE TABLE t AS SELECT repeat('x', 300000)::VARCHAR s, i FROM range(200) tbl(i); +-- +ok +== +SELECT count(*) FROM duckdb_memory() WHERE temporary_storage_bytes > 0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/temp_directory/temp_directory_null.test b/parser/testdata/corpus/sql/storage/temp_directory/temp_directory_null.test index c5df652..d8e920c 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/temp_directory_null.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/temp_directory_null.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/temp_directory_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set temp_directory='' diff --git a/parser/testdata/corpus/sql/storage/temp_directory/temp_file_truncation.test b/parser/testdata/corpus/sql/storage/temp_directory/temp_file_truncation.test new file mode 100644 index 0000000..353be9e --- /dev/null +++ b/parser/testdata/corpus/sql/storage/temp_directory/temp_file_truncation.test @@ -0,0 +1,43 @@ +# source: test/sql/storage/temp_directory/temp_file_truncation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_force_external = false; +-- +ok +== +SET temp_directory = '{TEST_DIR}/tmp_truncation'; +-- +ok +== +SET memory_limit = '24MiB'; +-- +ok +== +CREATE TEMPORARY TABLE t AS SELECT i, repeat('t', 80)::VARCHAR AS s FROM range(500000) t(i); +-- +ok +== +SELECT count(*) > 0 FROM duckdb_temporary_files(); +-- +ok +== +CREATE TEMPORARY TABLE tail AS +SELECT i, md5(i::VARCHAR) AS x FROM range(1000000) t(i) ORDER BY x; +-- +ok +== +DROP TABLE tail; +-- +ok +== +SET memory_limit = '1GB'; +-- +ok +== +SELECT (SELECT coalesce(sum(size), 0)::BIGINT FROM duckdb_temporary_files()) + = (SELECT coalesce(sum(size), 0)::BIGINT FROM read_blob('{TEST_DIR}/tmp_truncation/*.tmp')); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/temp_directory/test_default_temp_directory.test b/parser/testdata/corpus/sql/storage/temp_directory/test_default_temp_directory.test index f8e72b8..69daa94 100644 --- a/parser/testdata/corpus/sql/storage/temp_directory/test_default_temp_directory.test +++ b/parser/testdata/corpus/sql/storage/temp_directory/test_default_temp_directory.test @@ -1,6 +1,6 @@ # source: test/sql/storage/temp_directory/test_default_temp_directory.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMPORARY TABLE t AS FROM range(1_000_000); diff --git a/parser/testdata/corpus/sql/storage/temp_directory/test_runner_temp_directory.test b/parser/testdata/corpus/sql/storage/temp_directory/test_runner_temp_directory.test new file mode 100644 index 0000000..eec6192 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/temp_directory/test_runner_temp_directory.test @@ -0,0 +1,25 @@ +# source: test/sql/storage/temp_directory/test_runner_temp_directory.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT contains(current_setting('temp_directory'), 'sqllogic_temp_'); +-- +ok +== +SET temp_directory='{TEST_DIR}/explicit_temp'; +-- +ok +== +SELECT current_setting('temp_directory') = '{TEST_DIR}/explicit_temp'; +-- +ok +== +SELECT ends_with(current_setting('temp_directory'), 'runner_temp_directory.db.tmp'); +-- +ok +== +SELECT current_setting('enable_external_access'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/test_empty_table.test b/parser/testdata/corpus/sql/storage/test_empty_table.test index 5071fd6..d074a1e 100644 --- a/parser/testdata/corpus/sql/storage/test_empty_table.test +++ b/parser/testdata/corpus/sql/storage/test_empty_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_empty_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (a INTEGER, b VARCHAR) diff --git a/parser/testdata/corpus/sql/storage/test_eviction_queue_dead_nodes_underflow.test b/parser/testdata/corpus/sql/storage/test_eviction_queue_dead_nodes_underflow.test index 50239bc..1f94acb 100644 --- a/parser/testdata/corpus/sql/storage/test_eviction_queue_dead_nodes_underflow.test +++ b/parser/testdata/corpus/sql/storage/test_eviction_queue_dead_nodes_underflow.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_eviction_queue_dead_nodes_underflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) = 0 diff --git a/parser/testdata/corpus/sql/storage/test_ignore_duplicate_deletes_unique_index.test b/parser/testdata/corpus/sql/storage/test_ignore_duplicate_deletes_unique_index.test index 3ec838e..7b6e60f 100644 --- a/parser/testdata/corpus/sql/storage/test_ignore_duplicate_deletes_unique_index.test +++ b/parser/testdata/corpus/sql/storage/test_ignore_duplicate_deletes_unique_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_ignore_duplicate_deletes_unique_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE TBL (id INT NOT NULL, age INT NOT NULL, PRIMARY KEY ( id )) diff --git a/parser/testdata/corpus/sql/storage/test_index_checkpoint.test b/parser/testdata/corpus/sql/storage/test_index_checkpoint.test index 308a952..501e887 100644 --- a/parser/testdata/corpus/sql/storage/test_index_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/test_index_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_index_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2 (i INTEGER, uid VARCHAR); diff --git a/parser/testdata/corpus/sql/storage/test_large_commits.test b/parser/testdata/corpus/sql/storage/test_large_commits.test index c3cf51f..61aede0 100644 --- a/parser/testdata/corpus/sql/storage/test_large_commits.test +++ b/parser/testdata/corpus/sql/storage/test_large_commits.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_large_commits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA wal_autocheckpoint='10KB' diff --git a/parser/testdata/corpus/sql/storage/test_read_only_wal_replay.test b/parser/testdata/corpus/sql/storage/test_read_only_wal_replay.test index c659eaf..486a726 100644 --- a/parser/testdata/corpus/sql/storage/test_read_only_wal_replay.test +++ b/parser/testdata/corpus/sql/storage/test_read_only_wal_replay.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_read_only_wal_replay.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold='1TB'; @@ -23,10 +23,6 @@ ATTACH '{TEST_DIR}/read_only_wal_replay.db' AS db (READ_ONLY) -- ok == -DETACH db --- -ok -== ATTACH '{TEST_DIR}/read_only_wal_replay_index.db' AS db; -- ok diff --git a/parser/testdata/corpus/sql/storage/test_restart_extension.test b/parser/testdata/corpus/sql/storage/test_restart_extension.test index 05b13c7..5ff45d0 100644 --- a/parser/testdata/corpus/sql/storage/test_restart_extension.test +++ b/parser/testdata/corpus/sql/storage/test_restart_extension.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_restart_extension.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 AS SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/arrow/alltypes_plain.parquet') diff --git a/parser/testdata/corpus/sql/storage/test_show_tables_persistent.test b/parser/testdata/corpus/sql/storage/test_show_tables_persistent.test index 53ed0fb..2a62619 100644 --- a/parser/testdata/corpus/sql/storage/test_show_tables_persistent.test +++ b/parser/testdata/corpus/sql/storage/test_show_tables_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_show_tables_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit show tables diff --git a/parser/testdata/corpus/sql/storage/test_storage_scan.test b/parser/testdata/corpus/sql/storage/test_storage_scan.test index 1708467..e8f557e 100644 --- a/parser/testdata/corpus/sql/storage/test_storage_scan.test +++ b/parser/testdata/corpus/sql/storage/test_storage_scan.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_storage_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11), (12), (13), (14), (15), (NULL) diff --git a/parser/testdata/corpus/sql/storage/test_store_integers.test b/parser/testdata/corpus/sql/storage/test_store_integers.test index ce63ba2..f06f000 100644 --- a/parser/testdata/corpus/sql/storage/test_store_integers.test +++ b/parser/testdata/corpus/sql/storage/test_store_integers.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_store_integers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test2 (a INTEGER); diff --git a/parser/testdata/corpus/sql/storage/test_store_nulls_strings.test b/parser/testdata/corpus/sql/storage/test_store_nulls_strings.test index 247f2ab..573fd72 100644 --- a/parser/testdata/corpus/sql/storage/test_store_nulls_strings.test +++ b/parser/testdata/corpus/sql/storage/test_store_nulls_strings.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_store_nulls_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS test (a INTEGER, b STRING); diff --git a/parser/testdata/corpus/sql/storage/test_truncate_persistent.test b/parser/testdata/corpus/sql/storage/test_truncate_persistent.test index e48c4f4..4b2af79 100644 --- a/parser/testdata/corpus/sql/storage/test_truncate_persistent.test +++ b/parser/testdata/corpus/sql/storage/test_truncate_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_truncate_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS FROM range(250000) t(i); diff --git a/parser/testdata/corpus/sql/storage/test_unaligned_scan.test b/parser/testdata/corpus/sql/storage/test_unaligned_scan.test index 333bcfa..51dd3fa 100644 --- a/parser/testdata/corpus/sql/storage/test_unaligned_scan.test +++ b/parser/testdata/corpus/sql/storage/test_unaligned_scan.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_unaligned_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test SELECT CASE WHEN i%2=0 THEN i ELSE NULL END, CASE WHEN i%2=0 THEN 'hello'||i::VARCHAR ELSE NULL END FROM range(10000) tbl(i) diff --git a/parser/testdata/corpus/sql/storage/test_unique_index_checkpoint.test b/parser/testdata/corpus/sql/storage/test_unique_index_checkpoint.test index 903edf8..b1f66d9 100644 --- a/parser/testdata/corpus/sql/storage/test_unique_index_checkpoint.test +++ b/parser/testdata/corpus/sql/storage/test_unique_index_checkpoint.test @@ -1,6 +1,6 @@ # source: test/sql/storage/test_unique_index_checkpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/storage/total_string_length_nested_types.test b/parser/testdata/corpus/sql/storage/total_string_length_nested_types.test index 0ca483e..150dfe3 100644 --- a/parser/testdata/corpus/sql/storage/total_string_length_nested_types.test +++ b/parser/testdata/corpus/sql/storage/total_string_length_nested_types.test @@ -1,6 +1,6 @@ # source: test/sql/storage/total_string_length_nested_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(a VARCHAR[], b STRUCT(s VARCHAR), c VARCHAR[3]); diff --git a/parser/testdata/corpus/sql/storage/total_string_length_repeated_insert.test b/parser/testdata/corpus/sql/storage/total_string_length_repeated_insert.test index 0914d65..b373066 100644 --- a/parser/testdata/corpus/sql/storage/total_string_length_repeated_insert.test +++ b/parser/testdata/corpus/sql/storage/total_string_length_repeated_insert.test @@ -1,6 +1,6 @@ # source: test/sql/storage/total_string_length_repeated_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test(s VARCHAR); diff --git a/parser/testdata/corpus/sql/storage/types/list/default_list.test b/parser/testdata/corpus/sql/storage/types/list/default_list.test index 4fddac3..215c5a0 100644 --- a/parser/testdata/corpus/sql/storage/types/list/default_list.test +++ b/parser/testdata/corpus/sql/storage/types/list/default_list.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/list/default_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(i INT[] DEFAULT ([1, 2, 3])) diff --git a/parser/testdata/corpus/sql/storage/types/list/empty_float_arrays.test b/parser/testdata/corpus/sql/storage/types/list/empty_float_arrays.test index 993272a..75071f8 100644 --- a/parser/testdata/corpus/sql/storage/types/list/empty_float_arrays.test +++ b/parser/testdata/corpus/sql/storage/types/list/empty_float_arrays.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/list/empty_float_arrays.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_table ( diff --git a/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_order.test b/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_order.test new file mode 100644 index 0000000..dc1bf49 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_order.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/types/list/list_corrupt_offset_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE list_corrupt_offset_order +-- +ok +== +SELECT len(a) FROM t LIMIT 5 OFFSET 98; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_range.test b/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_range.test new file mode 100644 index 0000000..e9e7ea8 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_range.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/types/list/list_corrupt_offset_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE list_corrupt_offset_range +-- +ok +== +SELECT count(*) FROM (SELECT unnest(a) FROM t); +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_skip.test b/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_skip.test new file mode 100644 index 0000000..9ab5f71 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/list/list_corrupt_offset_skip.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/types/list/list_corrupt_offset_skip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +USE list_corrupt_offset_skip +-- +ok +== +SELECT a FROM t WHERE id = 7000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/list/list_index_compression.test b/parser/testdata/corpus/sql/storage/types/list/list_index_compression.test index c90fcd9..17be1a4 100644 --- a/parser/testdata/corpus/sql/storage/types/list/list_index_compression.test +++ b/parser/testdata/corpus/sql/storage/types/list/list_index_compression.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/list/list_index_compression.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER PRIMARY KEY, c INT[]); @@ -39,10 +39,6 @@ SELECT * FROM a WHERE id=4 -- ok == -DROP TABLE a; --- -ok -== CREATE TABLE a(id INTEGER, c INT[]); -- ok diff --git a/parser/testdata/corpus/sql/storage/types/list/persistent_list_storage.test b/parser/testdata/corpus/sql/storage/types/list/persistent_list_storage.test index 9e830c4..b72f106 100644 --- a/parser/testdata/corpus/sql/storage/types/list/persistent_list_storage.test +++ b/parser/testdata/corpus/sql/storage/types/list/persistent_list_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/list/persistent_list_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(b INTEGER[]); diff --git a/parser/testdata/corpus/sql/storage/types/list/store_list_of_array.test b/parser/testdata/corpus/sql/storage/types/list/store_list_of_array.test new file mode 100644 index 0000000..817ba9a --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/list/store_list_of_array.test @@ -0,0 +1,25 @@ +# source: test/sql/storage/types/list/store_list_of_array.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE arrays(id INTEGER PRIMARY KEY, values INTEGER[3][]); +-- +ok +== +INSERT INTO arrays VALUES + (1, [[1, 2, 3], [4, NULL, 6]]), + (2, []), + (3, NULL), + (4, [NULL, [7, 8, 9]]); +-- +ok +== +SELECT * FROM arrays ORDER BY id; +-- +ok +== +SELECT * FROM arrays WHERE id = 4; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/list/store_list_of_struct.test b/parser/testdata/corpus/sql/storage/types/list/store_list_of_struct.test index 254c8a9..c0da6d2 100644 --- a/parser/testdata/corpus/sql/storage/types/list/store_list_of_struct.test +++ b/parser/testdata/corpus/sql/storage/types/list/store_list_of_struct.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/list/store_list_of_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER, b ROW(a INTEGER, b INTEGER)[]); diff --git a/parser/testdata/corpus/sql/storage/types/map/map_storage.test b/parser/testdata/corpus/sql/storage/types/map/map_storage.test index e0ca6f2..747dd87 100644 --- a/parser/testdata/corpus/sql/storage/types/map/map_storage.test +++ b/parser/testdata/corpus/sql/storage/types/map/map_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/map/map_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(b MAP(INTEGER,INTEGER)); diff --git a/parser/testdata/corpus/sql/storage/types/struct/default_struct.test b/parser/testdata/corpus/sql/storage/types/struct/default_struct.test index a8faa03..adfae8c 100644 --- a/parser/testdata/corpus/sql/storage/types/struct/default_struct.test +++ b/parser/testdata/corpus/sql/storage/types/struct/default_struct.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/struct/default_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a( diff --git a/parser/testdata/corpus/sql/storage/types/struct/nested_struct_storage.test b/parser/testdata/corpus/sql/storage/types/struct/nested_struct_storage.test index 7931a3c..b73caaa 100644 --- a/parser/testdata/corpus/sql/storage/types/struct/nested_struct_storage.test +++ b/parser/testdata/corpus/sql/storage/types/struct/nested_struct_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/struct/nested_struct_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT { diff --git a/parser/testdata/corpus/sql/storage/types/struct/pushdown_extract_validity.test b/parser/testdata/corpus/sql/storage/types/struct/pushdown_extract_validity.test index ab545c6..225bf95 100644 --- a/parser/testdata/corpus/sql/storage/types/struct/pushdown_extract_validity.test +++ b/parser/testdata/corpus/sql/storage/types/struct/pushdown_extract_validity.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/struct/pushdown_extract_validity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE structs(s STRUCT(id INT)); diff --git a/parser/testdata/corpus/sql/storage/types/struct/struct_of_empty_list.test b/parser/testdata/corpus/sql/storage/types/struct/struct_of_empty_list.test index 5f95a7a..c60741f 100644 --- a/parser/testdata/corpus/sql/storage/types/struct/struct_of_empty_list.test +++ b/parser/testdata/corpus/sql/storage/types/struct/struct_of_empty_list.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/struct/struct_of_empty_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (col STRUCT(a VARCHAR[])) diff --git a/parser/testdata/corpus/sql/storage/types/struct/struct_storage.test b/parser/testdata/corpus/sql/storage/types/struct/struct_storage.test index 27599e0..033cd62 100644 --- a/parser/testdata/corpus/sql/storage/types/struct/struct_storage.test +++ b/parser/testdata/corpus/sql/storage/types/struct/struct_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/struct/struct_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES ({'i': 1, 'j': 2}), (NULL), ({'i': NULL, 'j': 2}), (ROW(1, NULL)); diff --git a/parser/testdata/corpus/sql/storage/types/test_bit_storage.test b/parser/testdata/corpus/sql/storage/types/test_bit_storage.test index bd45a53..57253e0 100644 --- a/parser/testdata/corpus/sql/storage/types/test_bit_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_bit_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_bit_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bits (b BIT); diff --git a/parser/testdata/corpus/sql/storage/types/test_blob_storage.test b/parser/testdata/corpus/sql/storage/types/test_blob_storage.test index 23a747b..bbe87d8 100644 --- a/parser/testdata/corpus/sql/storage/types/test_blob_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_blob_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_blob_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE blobs (b BLOB); diff --git a/parser/testdata/corpus/sql/storage/types/test_hugeint_storage.test b/parser/testdata/corpus/sql/storage/types/test_hugeint_storage.test index ab861c4..cc84b2e 100644 --- a/parser/testdata/corpus/sql/storage/types/test_hugeint_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_hugeint_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_hugeint_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints (h HUGEINT); diff --git a/parser/testdata/corpus/sql/storage/types/test_interval_storage.test b/parser/testdata/corpus/sql/storage/types/test_interval_storage.test index 4605e01..5be89c0 100644 --- a/parser/testdata/corpus/sql/storage/types/test_interval_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_interval_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_interval_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE interval (t INTERVAL); diff --git a/parser/testdata/corpus/sql/storage/types/test_timestamp_storage.test b/parser/testdata/corpus/sql/storage/types/test_timestamp_storage.test index 1141cd9..8533c94 100644 --- a/parser/testdata/corpus/sql/storage/types/test_timestamp_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_timestamp_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_timestamp_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamp (sec TIMESTAMP_S, milli TIMESTAMP_MS,micro TIMESTAMP_US, nano TIMESTAMP_NS ); diff --git a/parser/testdata/corpus/sql/storage/types/test_uhugeint_storage.test b/parser/testdata/corpus/sql/storage/types/test_uhugeint_storage.test index bbe7d3e..59f8727 100644 --- a/parser/testdata/corpus/sql/storage/types/test_uhugeint_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_uhugeint_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_uhugeint_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uhugeints (h UHUGEINT); diff --git a/parser/testdata/corpus/sql/storage/types/test_unsigned_storage.test b/parser/testdata/corpus/sql/storage/types/test_unsigned_storage.test index 3491aac..8acec01 100644 --- a/parser/testdata/corpus/sql/storage/types/test_unsigned_storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_unsigned_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_unsigned_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unsigned (a utinyint, b usmallint, c uinteger, d ubigint); diff --git a/parser/testdata/corpus/sql/storage/types/test_uuid.storage.test b/parser/testdata/corpus/sql/storage/types/test_uuid.storage.test index cfdee0f..1b377df 100644 --- a/parser/testdata/corpus/sql/storage/types/test_uuid.storage.test +++ b/parser/testdata/corpus/sql/storage/types/test_uuid.storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/test_uuid.storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uuids (u uuid); diff --git a/parser/testdata/corpus/sql/storage/types/variant/append_shredded.test b/parser/testdata/corpus/sql/storage/types/variant/append_shredded.test index d44325a..64a758d 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/append_shredded.test +++ b/parser/testdata/corpus/sql/storage/types/variant/append_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/append_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (col VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/extension_types.test b/parser/testdata/corpus/sql/storage/types/variant/extension_types.test index 880a28c..01053e8 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/extension_types.test +++ b/parser/testdata/corpus/sql/storage/types/variant/extension_types.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/extension_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (col VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/index_fetch.test b/parser/testdata/corpus/sql/storage/types/variant/index_fetch.test index 4503017..11c0150 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/index_fetch.test +++ b/parser/testdata/corpus/sql/storage/types/variant/index_fetch.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/index_fetch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INT PRIMARY KEY, v VARIANT); @@ -23,10 +23,6 @@ ATTACH '{TEST_DIR}/variant_index_fetch.db' as db2 (STORAGE_VERSION 'v1.5.0'); -- ok == -SET debug_force_fetch_row=true; --- -ok -== select v from tbl WHERE i < 10 -- ok diff --git a/parser/testdata/corpus/sql/storage/types/variant/struct_of_variant.test b/parser/testdata/corpus/sql/storage/types/variant/struct_of_variant.test index 251d4c5..06150f9 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/struct_of_variant.test +++ b/parser/testdata/corpus/sql/storage/types/variant/struct_of_variant.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/struct_of_variant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE variant_list( diff --git a/parser/testdata/corpus/sql/storage/types/variant/test_all_types.test b/parser/testdata/corpus/sql/storage/types/variant/test_all_types.test index cfe3a2e..2828f94 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/test_all_types.test +++ b/parser/testdata/corpus/sql/storage/types/variant/test_all_types.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/test_all_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table table_{col} as select "{col}"::VARIANT col from test_all_types() diff --git a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test index facfde0..c1c2ddd 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test +++ b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/test_all_types_single_object.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl ( @@ -27,14 +27,14 @@ ok == from query($$select col."$$ || getvariable('col_name') || $$"::$$ || getvariable('col_type') || ' from tbl'); -- -ok +error: Parser Error: syntax error at or near "NULL" == create or replace table intermediate as from query($$select col."$$ || getvariable('col_name') || $$" extracted from tbl$$); -- -ok +error: Parser Error: syntax error at or near "NULL" == from query('select extracted::' || getvariable('col_type') || ' from intermediate'); -- -ok +error: Parser Error: syntax error at or near "NULL" == diff --git a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test.metadata.json b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test.metadata.json new file mode 100644 index 0000000..2e5f39f --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_object.test.metadata.json @@ -0,0 +1,7 @@ +{ + "skip": { + "42886192e064dab4": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", + "b9def20bb37b0b43": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it", + "eb232ccbf069e731": "nested parse at bind time: the inner SQL string is parsed by a function, the grammar never sees it" + } +} diff --git a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_table.test b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_table.test index 03c6fca..7a7ef7e 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_table.test +++ b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_single_table.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/test_all_types_single_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into tbl select "{col}"::VARIANT from test_all_types() diff --git a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_variant.test b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_variant.test index 83709ef..4f7c040 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/test_all_types_variant.test +++ b/parser/testdata/corpus/sql/storage/types/variant/test_all_types_variant.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/test_all_types_variant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl as select COLUMNS(*)::VARIANT from test_all_types() diff --git a/parser/testdata/corpus/sql/storage/types/variant/update.test b/parser/testdata/corpus/sql/storage/types/variant/update.test index b8d0077..1670f02 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/update.test +++ b/parser/testdata/corpus/sql/storage/types/variant/update.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (a VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_case_sensitive_fields_shredded.test b/parser/testdata/corpus/sql/storage/types/variant/variant_case_sensitive_fields_shredded.test index a8c7702..9ab8f1a 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_case_sensitive_fields_shredded.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_case_sensitive_fields_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_case_sensitive_fields_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set variant_minimum_shredding_size = 0; @@ -47,3 +47,30 @@ values -- ok == +drop table test_structs; +-- +ok +== +set force_variant_shredding = 'STRUCT("Foo" INTEGER)'; +-- +ok +== +create table forced_case(v variant); +-- +ok +== +insert into forced_case values ({'foo': 2}::variant); +-- +ok +== +select v::varchar, + variant_extract(v, 'foo')::varchar, + variant_extract(v, 'Foo')::varchar +from forced_case; +-- +ok +== +select count(*) from forced_case where v.foo = 2 +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_shredded.test b/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_shredded.test index 8b3c5f2..bd39b5b 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_shredded.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_comparator_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_variant_shredding = 'STRUCT(a INTEGER, b VARCHAR)'; diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_stats.test b/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_stats.test index 3cb28ec..5c9bca7 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_stats.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_comparator_stats.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_comparator_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ints(col VARIANT); diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_duplicate_keys_shredding.test b/parser/testdata/corpus/sql/storage/types/variant/variant_duplicate_keys_shredding.test index f02e224..081fc1a 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_duplicate_keys_shredding.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_duplicate_keys_shredding.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_duplicate_keys_shredding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE variants AS diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_extract_filter_pushdown.test b/parser/testdata/corpus/sql/storage/types/variant/variant_extract_filter_pushdown.test index 80f042b..21b864f 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_extract_filter_pushdown.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_extract_filter_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_extract_filter_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE variant_extract_pushdown(v VARIANT); diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_extract_stats.test b/parser/testdata/corpus/sql/storage/types/variant/variant_extract_stats.test index ed3e032..d26f630 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_extract_stats.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_extract_stats.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_extract_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_variant_shredding = 'VARCHAR[]'; diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_index.test b/parser/testdata/corpus/sql/storage/types/variant/variant_index.test index fd5a8a9..2da13ce 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_index.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(col VARIANT UNIQUE, b INTEGER) diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_null_missing.test b/parser/testdata/corpus/sql/storage/types/variant/variant_null_missing.test index 07bb0a7..53cf064 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_null_missing.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_null_missing.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_null_missing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET force_variant_shredding = 'STRUCT(a INT, b INT)'; diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_null_shredding_inconsistency_issue.test b/parser/testdata/corpus/sql/storage/types/variant/variant_null_shredding_inconsistency_issue.test index a33dd44..0d3f257 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_null_shredding_inconsistency_issue.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_null_shredding_inconsistency_issue.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_null_shredding_inconsistency_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE messages AS diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_object_key_order_shredded.test b/parser/testdata/corpus/sql/storage/types/variant/variant_object_key_order_shredded.test new file mode 100644 index 0000000..beceadf --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_object_key_order_shredded.test @@ -0,0 +1,49 @@ +# source: test/sql/storage/types/variant/variant_object_key_order_shredded.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET variant_minimum_shredding_size = 1000; +-- +ok +== +CREATE TABLE t(id BIGINT, v VARIANT); +-- +ok +== +INSERT INTO t SELECT i, {'o': {'x': 42}, 'l': [42]}::VARIANT FROM range(0, 3000) tt(i); +-- +ok +== +INSERT INTO t SELECT i, {'o': {'x': 42}, 'l': [42]}::VARIANT FROM range(100000, 100005) tt(i); +-- +ok +== +SELECT vector_type(v) FROM t WHERE id = 1; +-- +ok +== +SELECT vector_type(v) FROM t WHERE id = 100000; +-- +ok +== +SELECT count(DISTINCT variant_typeof(v)), count(DISTINCT CAST(v AS VARCHAR)), count(*) FROM t; +-- +ok +== +SELECT id, variant_typeof(v), CAST(v AS VARCHAR), CAST(variant_keys(v) AS VARCHAR) FROM t WHERE id IN (1, 100000) ORDER BY id; +-- +ok +== +SELECT (SELECT v FROM t WHERE id = 1) = (SELECT v FROM t WHERE id = 100000); +-- +ok +== +SELECT CAST(v AS STRUCT(zz INTEGER)) FROM t WHERE id = 1; +-- +ok +== +SELECT CAST(v AS STRUCT(zz INTEGER)) FROM t WHERE id = 100000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_object_key_order_shredded_json.test b/parser/testdata/corpus/sql/storage/types/variant/variant_object_key_order_shredded_json.test new file mode 100644 index 0000000..6ad6def --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_object_key_order_shredded_json.test @@ -0,0 +1,13 @@ +# source: test/sql/storage/types/variant/variant_object_key_order_shredded_json.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(DISTINCT CAST(v AS JSON)), count(*) FROM t; +-- +ok +== +SELECT id, CAST(v AS JSON), CAST(v AS VARCHAR) FROM t WHERE id IN (1, 100000) ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_non_object.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_non_object.test index fdc735c..d045a30 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_non_object.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_non_object.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_shredded_extract_non_object.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t( diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_wrong_type.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_wrong_type.test new file mode 100644 index 0000000..14ecb9e --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_extract_wrong_type.test @@ -0,0 +1,76 @@ +# source: test/sql/storage/types/variant/variant_shredded_extract_wrong_type.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE shredded_booleans AS +SELECT i AS id, (i % 2 = 0)::VARIANT AS v FROM range(5) t(i); +-- +ok +== +SELECT DISTINCT vector_type(v) FROM shredded_booleans; +-- +ok +== +SELECT variant_extract(v, 'a') FROM shredded_booleans WHERE id = 1; +-- +ok +== +CREATE TABLE one_element_arrays AS +SELECT i AS id, [i]::VARIANT AS v FROM range(5) t(i); +-- +ok +== +SELECT count(v[2]), count(v[2]::VARCHAR), count(v[2]::BIGINT), + count(*) FILTER (WHERE v[2] IS NULL) FROM one_element_arrays; +-- +ok +== +SELECT variant_typeof(v[2].x) FROM one_element_arrays limit 1; +-- +ok +== +SELECT count(v[2].x::BIGINT) FROM one_element_arrays; +-- +ok +== +SET variant_minimum_shredding_size = {threshold}; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE wrong_type AS +SELECT i AS id, ({value})::VARIANT AS v, {'a': {value}}::VARIANT AS obj +FROM range(5) t(i); +-- +error: Parser Error: syntax error at or near "}" +== +PRAGMA {optimizer}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT variant_extract(v, 'missing') FROM wrong_type WHERE id = 1; +-- +ok +== +SELECT count(variant_extract(v, 'missing')) FROM wrong_type; +-- +ok +== +SELECT count(obj.a.missing) FROM wrong_type; +-- +ok +== +SELECT count(variant_extract(v, 1)) = 5 * (variant_extract(({value})::VARIANT, 1) IS NOT NULL)::INTEGER +FROM wrong_type; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT bool_and(v::VARCHAR IS NOT DISTINCT FROM ({value})::VARIANT::VARCHAR) FROM wrong_type; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(v[2]), count(v[2]::VARCHAR), count(v[2]::BIGINT), count(v[2].x::BIGINT), + count(*) FILTER (WHERE v[2] IS NULL) FROM wrong_type; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_slice.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_slice.test index c3dfb12..45881f8 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_slice.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_slice.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_shredded_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table bluesky (j VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_top_level_array_cast.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_top_level_array_cast.test new file mode 100644 index 0000000..36eab70 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredded_top_level_array_cast.test @@ -0,0 +1,33 @@ +# source: test/sql/storage/types/variant/variant_shredded_top_level_array_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE top_level AS SELECT i AS id, CAST([i] AS VARIANT) AS v FROM range(0, 5) tt(i); +-- +ok +== +CREATE TABLE nested AS SELECT i AS id, CAST({'a': [i]} AS VARIANT) AS v FROM range(0, 5) tt(i); +-- +ok +== +SELECT id, v::VARCHAR FROM top_level ORDER BY id +-- +ok +== +SELECT count(v::VARCHAR) FROM top_level +-- +ok +== +SELECT id, v::VARCHAR FROM nested ORDER BY id +-- +ok +== +SELECT id, TRY_CAST(v AS INTEGER) FROM top_level ORDER BY id +-- +ok +== +SELECT v::INTEGER FROM top_level +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_empty_keys.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_empty_keys.test index 6fd8643..7549a3b 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_empty_keys.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_empty_keys.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_shredding_empty_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET variant_minimum_shredding_size=0; diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_inconsistent.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_inconsistent.test index 066ea9a..b61b868 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_inconsistent.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_inconsistent.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_shredding_inconsistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table bluesky (col VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_omit_untyped.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_omit_untyped.test index 0f780df..3a1f346 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_omit_untyped.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_omit_untyped.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_shredding_omit_untyped.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table shredded_integer (col VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_small.test b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_small.test index 67fad48..8672161 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_small.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_shredding_small.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_shredding_small.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (id INT PRIMARY KEY, col VARIANT) diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_stats_case_sensitive_merge.test b/parser/testdata/corpus/sql/storage/types/variant/variant_stats_case_sensitive_merge.test new file mode 100644 index 0000000..a2e0908 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_stats_case_sensitive_merge.test @@ -0,0 +1,28 @@ +# source: test/sql/storage/types/variant/variant_stats_case_sensitive_merge.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/variant_stats_case_sensitive_merge.db' AS db ( + ROW_GROUP_SIZE 2048, + STORAGE_VERSION 'v1.5.0' +); +-- +ok +== +CREATE TABLE db.tbl(v VARIANT); +-- +ok +== +INSERT INTO db.tbl SELECT {'Foo': i::INTEGER}::VARIANT FROM range(2048) t(i); +-- +ok +== +INSERT INTO db.tbl SELECT {'foo': i::INTEGER}::VARIANT FROM range(2048) t(i); +-- +ok +== +SELECT stats(v).shredding_state FROM db.tbl LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_stats_merge_fast.test b/parser/testdata/corpus/sql/storage/types/variant/variant_stats_merge_fast.test new file mode 100644 index 0000000..637c8ff --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_stats_merge_fast.test @@ -0,0 +1,57 @@ +# source: test/sql/storage/types/variant/variant_stats_merge_fast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET variant_minimum_shredding_size = 0 +-- +ok +== +ATTACH '{TEST_DIR}/variant_stats_merge_fast.db' AS db ( + ROW_GROUP_SIZE 2048, + STORAGE_VERSION 'v1.5.0' +) +-- +ok +== +SET force_variant_shredding = 'INTEGER[]' +-- +ok +== +CREATE TABLE db.lists(v VARIANT) +-- +ok +== +INSERT INTO db.lists SELECT NULL FROM range(2048) +-- +ok +== +SET force_variant_shredding = 'VARCHAR[]' +-- +ok +== +SELECT stats(v).shredding_state FROM db.lists LIMIT 1 +-- +ok +== +SET force_variant_shredding = 'STRUCT(a INTEGER, b VARCHAR, c BOOLEAN)' +-- +ok +== +CREATE TABLE db.objects(v VARIANT) +-- +ok +== +INSERT INTO db.objects SELECT NULL FROM range(2048) +-- +ok +== +SET force_variant_shredding = 'STRUCT(b VARCHAR, a INTEGER, c INTEGER)' +-- +ok +== +SELECT s.fully_shredded.a.type, s.fully_shredded.b.type +FROM (SELECT stats(v) s FROM db.objects LIMIT 1) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_storage_version.test b/parser/testdata/corpus/sql/storage/types/variant/variant_storage_version.test index 9477958..4609483 100644 --- a/parser/testdata/corpus/sql/storage/types/variant/variant_storage_version.test +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_storage_version.test @@ -1,6 +1,6 @@ # source: test/sql/storage/types/variant/variant_storage_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/variant.db' (STORAGE_VERSION 'v1.4.4'); diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_struct_field_subquery.test b/parser/testdata/corpus/sql/storage/types/variant/variant_struct_field_subquery.test new file mode 100644 index 0000000..7f96256 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_struct_field_subquery.test @@ -0,0 +1,48 @@ +# source: test/sql/storage/types/variant/variant_struct_field_subquery.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET variant_minimum_shredding_size = {minimum_shredding_size}; +-- +error: Parser Error: syntax error at or near "}" +== +CREATE OR REPLACE TABLE nested_variant AS +SELECT i AS id, {'tag': i + 100, 'payload': {'obj': {'a': i, 'b': 'value_' || i}}::VARIANT} AS n +FROM range(20) t(i); +-- +ok +== +CREATE OR REPLACE VIEW nested_variant_view AS SELECT * FROM nested_variant; +-- +ok +== +SELECT id, n.payload.obj.a::BIGINT, n.payload.obj.b::VARCHAR +FROM nested_variant_view WHERE id IN (3, 17) ORDER BY id; +-- +ok +== +SELECT n.payload.obj.a::BIGINT, n.payload.obj::STRUCT(b VARCHAR, a BIGINT) +FROM {source} WHERE id = 3; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT n.payload.obj::STRUCT(b VARCHAR, a BIGINT), n.payload.obj.a::BIGINT +FROM {source} WHERE id = 3; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT n.tag, n.payload.obj.b::VARCHAR +FROM (SELECT * FROM nested_variant) WHERE n.payload.obj.a::BIGINT = 17; +-- +ok +== +INSERT INTO nested_variant VALUES (20, {'tag': 120, 'payload': {'obj': {'a': 20, 'b': 'value_20'}}::VARIANT}); +-- +ok +== +SELECT id, n.payload.obj.a::BIGINT, n.payload.obj.b::VARCHAR +FROM nested_variant_view WHERE id >= 19 ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/types/variant/variant_validity_stats.test b/parser/testdata/corpus/sql/storage/types/variant/variant_validity_stats.test new file mode 100644 index 0000000..2bde3cb --- /dev/null +++ b/parser/testdata/corpus/sql/storage/types/variant/variant_validity_stats.test @@ -0,0 +1,42 @@ +# source: test/sql/storage/types/variant/variant_validity_stats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE v AS +SELECT i::VARIANT AS non_null, NULL::VARIANT AS all_null, + (CASE WHEN i = 0 THEN i END)::VARIANT AS mixed +FROM range(2) t(i); +-- +ok +== +SELECT non_null, all_null, mixed FROM v ORDER BY rowid; +-- +ok +== +SELECT s.has_no_null, s.has_null FROM (SELECT stats(non_null) s FROM v LIMIT 1); +-- +ok +== +SELECT s.has_no_null, s.has_null FROM (SELECT stats(all_null) s FROM v LIMIT 1); +-- +ok +== +SELECT s.has_no_null, s.has_null FROM (SELECT stats(mixed) s FROM v LIMIT 1); +-- +ok +== +CREATE OR REPLACE TABLE v AS +SELECT i::VARIANT AS non_null, NULL::VARIANT AS all_null, + (CASE WHEN i = 0 THEN i END)::VARIANT AS mixed +FROM range(2) t(i); +-- +ok +== +SELECT stats(non_null).shredding_state::VARCHAR = 'SHREDDED', + stats(all_null).shredding_state::VARCHAR = 'SHREDDED', + stats(mixed).shredding_state::VARCHAR = 'SHREDDED' +FROM v LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/unzip.test b/parser/testdata/corpus/sql/storage/unzip.test index 0c167cb..44eb00d 100644 --- a/parser/testdata/corpus/sql/storage/unzip.test +++ b/parser/testdata/corpus/sql/storage/unzip.test @@ -1,6 +1,6 @@ # source: test/sql/storage/unzip.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a+1 FROM tbl; diff --git a/parser/testdata/corpus/sql/storage/update/dictionary_update_null.test b/parser/testdata/corpus/sql/storage/update/dictionary_update_null.test index 923de70..e0f4cdc 100644 --- a/parser/testdata/corpus/sql/storage/update/dictionary_update_null.test +++ b/parser/testdata/corpus/sql/storage/update/dictionary_update_null.test @@ -1,12 +1,8 @@ # source: test/sql/storage/update/dictionary_update_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET force_compression='dictionary' --- -ok -== CREATE OR REPLACE TABLE 'everflow_daily' AS SELECT case when i%10=0 THEN uuid()::VARCHAR ELSE 'N/A' END sub4 FROM range(10000) t(i) -- ok diff --git a/parser/testdata/corpus/sql/storage/update/noop_string_update_memory.test b/parser/testdata/corpus/sql/storage/update/noop_string_update_memory.test new file mode 100644 index 0000000..d6da41b --- /dev/null +++ b/parser/testdata/corpus/sql/storage/update/noop_string_update_memory.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/update/noop_string_update_memory.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT repeat('x', 65536) AS payload; +-- +ok +== +UPDATE t SET payload = payload; +-- +ok +== +SELECT memory_usage_bytes < 32768 FROM duckdb_memory() WHERE tag = 'ALLOCATOR'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/update/test_store_null_updates.test b/parser/testdata/corpus/sql/storage/update/test_store_null_updates.test index d737831..3372361 100644 --- a/parser/testdata/corpus/sql/storage/update/test_store_null_updates.test +++ b/parser/testdata/corpus/sql/storage/update/test_store_null_updates.test @@ -1,6 +1,6 @@ # source: test/sql/storage/update/test_store_null_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 22), (NULL, 22), (12, 21) diff --git a/parser/testdata/corpus/sql/storage/update/wal_restart_update_insert.test b/parser/testdata/corpus/sql/storage/update/wal_restart_update_insert.test index 93d9b4e..98ec1db 100644 --- a/parser/testdata/corpus/sql/storage/update/wal_restart_update_insert.test +++ b/parser/testdata/corpus/sql/storage/update/wal_restart_update_insert.test @@ -1,6 +1,6 @@ # source: test/sql/storage/update/wal_restart_update_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(i INTEGER PRIMARY KEY, j INTEGER); diff --git a/parser/testdata/corpus/sql/storage/vacuum/temp_table_vacuum_on_commit.test b/parser/testdata/corpus/sql/storage/vacuum/temp_table_vacuum_on_commit.test new file mode 100644 index 0000000..afb20d8 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/vacuum/temp_table_vacuum_on_commit.test @@ -0,0 +1,29 @@ +# source: test/sql/storage/vacuum/temp_table_vacuum_on_commit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET checkpoint_threshold = '1KB' +-- +ok +== +CREATE TEMP TABLE t AS SELECT range i FROM range(1000000) +-- +ok +== +CREATE TEMP TABLE before AS SELECT count(DISTINCT row_group_id) AS c FROM pragma_storage_info('t') +-- +ok +== +DELETE FROM t WHERE i % 10 <> 0 +-- +ok +== +SELECT count(DISTINCT row_group_id) < (SELECT c FROM before) FROM pragma_storage_info('t') +-- +ok +== +INSERT INTO t SELECT range FROM range(10) +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/wal/wal_autocheckpoint_entries.test b/parser/testdata/corpus/sql/storage/wal/wal_autocheckpoint_entries.test index 3eff376..d714364 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_autocheckpoint_entries.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_autocheckpoint_entries.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_autocheckpoint_entries.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/wal_autocheckpoint.db' AS autocheckpoint_db; diff --git a/parser/testdata/corpus/sql/storage/wal/wal_create_index.test b/parser/testdata/corpus/sql/storage/wal/wal_create_index.test index e3e05e0..7f647fa 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_create_index.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_create_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_create_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 1), (2, 2), (3, 3); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_create_insert_drop.test b/parser/testdata/corpus/sql/storage/wal/wal_create_insert_drop.test index 85b74d6..1b1eb8d 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_create_insert_drop.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_create_insert_drop.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_create_insert_drop.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold='999999GB'; diff --git a/parser/testdata/corpus/sql/storage/wal/wal_index_delete.test b/parser/testdata/corpus/sql/storage/wal/wal_index_delete.test index b8235d3..1be0e69 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_index_delete.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_index_delete.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_index_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a INTEGER, b VARCHAR, c DOUBLE, d TIMESTAMP); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_index_delete_gen.test b/parser/testdata/corpus/sql/storage/wal/wal_index_delete_gen.test index 62ae855..f27ca0d 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_index_delete_gen.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_index_delete_gen.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_index_delete_gen.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a BIGINT, b INT AS (2*a), c VARCHAR, d DOUBLE, e as (d + 2), f TIMESTAMP); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_index_interleaved.test b/parser/testdata/corpus/sql/storage/wal/wal_index_interleaved.test index 3c54d0c..4fa1781 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_index_interleaved.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_index_interleaved.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_index_interleaved.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl VALUES ({i} * 10); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_index_large_batch_interleaved.test b/parser/testdata/corpus/sql/storage/wal/wal_index_large_batch_interleaved.test index 5a19a8d..31ea38f 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_index_large_batch_interleaved.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_index_large_batch_interleaved.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_index_large_batch_interleaved.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl SELECT r FROM range({i}*10000, {i}*10000 + 5120) t(r); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_index_replay.test b/parser/testdata/corpus/sql/storage/wal/wal_index_replay.test index 9af1b09..2d4a7da 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_index_replay.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_index_replay.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_index_replay.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl SELECT range FROM range(100); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_lazy_creation.test b/parser/testdata/corpus/sql/storage/wal/wal_lazy_creation.test index 16fcaa5..9c85b94 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_lazy_creation.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_lazy_creation.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_lazy_creation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/attach_no_wal.db'; diff --git a/parser/testdata/corpus/sql/storage/wal/wal_null_update_row_group_pruning.test b/parser/testdata/corpus/sql/storage/wal/wal_null_update_row_group_pruning.test index 47ea1e5..1248fbc 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_null_update_row_group_pruning.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_null_update_row_group_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_null_update_row_group_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT i::BIGINT AS a FROM range(2048) tbl(i); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_promote_version.test b/parser/testdata/corpus/sql/storage/wal/wal_promote_version.test index 71ce086..ce82bff 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_promote_version.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_promote_version.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_promote_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/wal_promote.db'; diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_current_timestamp.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_current_timestamp.test index 66e0ce8..81982a8 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_current_timestamp.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_current_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_replay_consistency_add_column_current_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/wal_replay.db'; diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_random.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_random.test index f9ade6e..8010a66 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_random.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_consistency_add_column_random.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_replay_consistency_add_column_random.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE t ADD COLUMN r DOUBLE DEFAULT RANDOM(); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_default_database.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_default_database.test new file mode 100644 index 0000000..1233d64 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_default_database.test @@ -0,0 +1,17 @@ +# source: test/sql/storage/wal/wal_replay_default_database.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO test VALUES (42); +-- +ok +== +ALTER TABLE test ALTER i TYPE VARCHAR USING concat(i, ''); +-- +ok +== +SELECT typeof(i) FROM test; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_pending_index_dropped_table.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_pending_index_dropped_table.test new file mode 100644 index 0000000..f9da5e2 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_pending_index_dropped_table.test @@ -0,0 +1,33 @@ +# source: test/sql/storage/wal/wal_replay_pending_index_dropped_table.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(a INT) +-- +ok +== +ALTER TABLE t ADD PRIMARY KEY (a) +-- +ok +== +ALTER TABLE t RENAME TO s +-- +ok +== +DROP TABLE s +-- +ok +== +CREATE TABLE other(x INT) +-- +ok +== +INSERT INTO other VALUES (42) +-- +ok +== +SELECT x FROM other +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_create_index_during_wal.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_create_index_during_wal.test index eedb28d..803ba5c 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_create_index_during_wal.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_create_index_during_wal.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_replay_unbound_index_create_index_during_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold='999999GB' diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_generated_column.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_generated_column.test index e4ea882..44e3fdc 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_generated_column.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_generated_column.test @@ -1,16 +1,12 @@ # source: test/sql/storage/wal/wal_replay_unbound_index_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(a INTEGER, g AS (a + 1), b VARCHAR) -- ok == -CREATE INDEX i ON t(b) --- -ok -== INSERT INTO t SELECT v, 'x' || v FROM range(122880) r(v) -- ok diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_mixed_inserts.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_mixed_inserts.test index 2dd26dc..33c961d 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_mixed_inserts.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_mixed_inserts.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_replay_unbound_index_mixed_inserts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(b TIMESTAMP, a VARCHAR) diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_multi_index.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_multi_index.test index 446bdce..f5da290 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_multi_index.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_multi_index.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_replay_unbound_index_multi_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(a INTEGER, b VARCHAR, c INTEGER) diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_shutdown_checkpoint.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_shutdown_checkpoint.test new file mode 100644 index 0000000..fb71275 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_unbound_index_shutdown_checkpoint.test @@ -0,0 +1,29 @@ +# source: test/sql/storage/wal/wal_replay_unbound_index_shutdown_checkpoint.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/wal_detach_unbound_idx.db' AS db; +-- +ok +== +CREATE TABLE db.t(a INT, b INT); +-- +ok +== +CREATE INDEX idx ON db.t(a); +-- +ok +== +INSERT INTO db.t SELECT i, i FROM range(100) t(i); +-- +ok +== +INSERT INTO db.t VALUES (1000, 1000); +-- +ok +== +SELECT * FROM db.t WHERE a = 1000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/wal/wal_replay_with_function.test b/parser/testdata/corpus/sql/storage/wal/wal_replay_with_function.test index c608618..e9613b4 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_replay_with_function.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_replay_with_function.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_replay_with_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id INTEGER); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_storage_types.test b/parser/testdata/corpus/sql/storage/wal/wal_storage_types.test index 596743e..93a53ae 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_storage_types.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_storage_types.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_storage_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MIN(i), MAX(i), COUNT(*), COUNT(i) FROM a_{type} WHERE i=1 diff --git a/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big.test b/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big.test index 684f5ff..2acd688 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_store_mixed_updates_big.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT -i a, -i b FROM range(100000) tbl(i) diff --git a/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big_null.test b/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big_null.test index 8582e87..c9989c3 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big_null.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_store_mixed_updates_big_null.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_store_mixed_updates_big_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET b=NULL WHERE a>0 AND a%2=0 diff --git a/parser/testdata/corpus/sql/storage/wal/wal_store_sequences.test b/parser/testdata/corpus/sql/storage/wal/wal_store_sequences.test index 395377a..6116f91 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_store_sequences.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_store_sequences.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_store_sequences.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT nextval('seq2') diff --git a/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big.test b/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big.test index 258b0fc..fc8a8f1 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_store_updates_big.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a, b FROM test WHERE a>0 OR a IS NULL ORDER BY a diff --git a/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big_varchar.test b/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big_varchar.test index 6fbc94a..604d158 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big_varchar.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_store_updates_big_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_store_updates_big_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT (-i)::VARCHAR a, (-i)::VARCHAR b FROM range(100000) tbl(i) diff --git a/parser/testdata/corpus/sql/storage/wal/wal_timestamp_storage.test b/parser/testdata/corpus/sql/storage/wal/wal_timestamp_storage.test index 85749a9..2ac9488 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_timestamp_storage.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_timestamp_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_timestamp_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamp (t TIMESTAMP) diff --git a/parser/testdata/corpus/sql/storage/wal/wal_torn_uncommitted_row_group.test b/parser/testdata/corpus/sql/storage/wal/wal_torn_uncommitted_row_group.test new file mode 100644 index 0000000..44e6e04 --- /dev/null +++ b/parser/testdata/corpus/sql/storage/wal/wal_torn_uncommitted_row_group.test @@ -0,0 +1,53 @@ +# source: test/sql/storage/wal/wal_torn_uncommitted_row_group.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_abort_on_wal_failure=false; +-- +ok +== +CREATE TABLE t (id INT); +-- +ok +== +PRAGMA debug_checkpoint_abort='before_wal_flush'; +-- +ok +== +INSERT INTO t SELECT * FROM range(2, 130002); +-- +ok +== +INSERT INTO t SELECT * FROM range(3, 130003); +-- +ok +== +INSERT INTO t SELECT * FROM range(130003, 260003); +-- +ok +== +CREATE TABLE t_never_committed AS SELECT * FROM range(130000); +-- +ok +== +SELECT * FROM t_never_committed; +-- +ok +== +SET debug_abort_on_wal_failure=true; +-- +ok +== +ATTACH '{TEST_DIR}/wal_abort_on_failure_gen.db' AS db_torn; +-- +ok +== +SELECT count(*) FROM db_torn.t; +-- +ok +== +DETACH db_torn; +-- +ok +== diff --git a/parser/testdata/corpus/sql/storage/wal/wal_uhugeint_storage.test b/parser/testdata/corpus/sql/storage/wal/wal_uhugeint_storage.test index a0be051..2c883d3 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_uhugeint_storage.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_uhugeint_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_uhugeint_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO uhugeints VALUES (1043178439874412422424), (42), (NULL), (47289478944894789472897441242); diff --git a/parser/testdata/corpus/sql/storage/wal/wal_view_storage.test b/parser/testdata/corpus/sql/storage/wal/wal_view_storage.test index 7b6d1e3..5e97730 100644 --- a/parser/testdata/corpus/sql/storage/wal/wal_view_storage.test +++ b/parser/testdata/corpus/sql/storage/wal/wal_view_storage.test @@ -1,6 +1,6 @@ # source: test/sql/storage/wal/wal_view_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA test; diff --git a/parser/testdata/corpus/sql/storage_version/storage_hyperloglog.test b/parser/testdata/corpus/sql/storage_version/storage_hyperloglog.test index b7bee53..f47b5fc 100644 --- a/parser/testdata/corpus/sql/storage_version/storage_hyperloglog.test +++ b/parser/testdata/corpus/sql/storage_version/storage_hyperloglog.test @@ -1,6 +1,6 @@ # source: test/sql/storage_version/storage_hyperloglog.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/hll_v110.db' AS db_v110 (STORAGE_VERSION 'v1.1.0'); diff --git a/parser/testdata/corpus/sql/storage_version/storage_version_bump.test b/parser/testdata/corpus/sql/storage_version/storage_version_bump.test index 8162fec..d79e256 100644 --- a/parser/testdata/corpus/sql/storage_version/storage_version_bump.test +++ b/parser/testdata/corpus/sql/storage_version/storage_version_bump.test @@ -1,6 +1,6 @@ # source: test/sql/storage_version/storage_version_bump.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/v1_5_2_0.db' as db (STORAGE_VERSION 'v1.5.0'); diff --git a/parser/testdata/corpus/sql/subquery/any_all/issue_2999.test b/parser/testdata/corpus/sql/subquery/any_all/issue_2999.test index 05c06b5..bd0694e 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/issue_2999.test +++ b/parser/testdata/corpus/sql/subquery/any_all/issue_2999.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/issue_2999.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 = ANY(SELECT 1 FROM t1 JOIN (SELECT count(*) GROUP BY t0.c0) AS x(x) ON TRUE) FROM t0; diff --git a/parser/testdata/corpus/sql/subquery/any_all/subquery_in.test b/parser/testdata/corpus/sql/subquery/any_all/subquery_in.test index 45f140d..c0e7e6d 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/subquery_in.test +++ b/parser/testdata/corpus/sql/subquery/any_all/subquery_in.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/subquery_in.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0 (c0 TIME,c1 DOUBLE PRECISION); diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_any_all.test b/parser/testdata/corpus/sql/subquery/any_all/test_any_all.test index 7cb70ea..a6a905c 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_any_all.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_any_all.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_any_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 2 > ANY(SELECT * FROM integers) diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_any_left_join_in_on_clause.test b/parser/testdata/corpus/sql/subquery/any_all/test_any_left_join_in_on_clause.test new file mode 100644 index 0000000..b62f47e --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/any_all/test_any_left_join_in_on_clause.test @@ -0,0 +1,29 @@ +# source: test/sql/subquery/any_all/test_any_left_join_in_on_clause.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t1(i INT, b BOOL); +-- +ok +== +INSERT INTO t1 VALUES (1, true), (2, false), (NULL, NULL); +-- +ok +== +CREATE TABLE t2(i INT); +-- +ok +== +INSERT INTO t2 VALUES (1), (3); +-- +ok +== +SELECT x.i, (y.i <> ANY (SELECT i FROM t2)) FROM t1 x LEFT JOIN t1 y ON x.b = y.b AND y.i IN (SELECT i FROM t2) ORDER BY ALL; +-- +ok +== +SELECT x.i, (y.i = ALL (SELECT i FROM t2)) FROM t1 x LEFT JOIN t1 y ON x.b = y.b AND y.i IN (SELECT i FROM t2) ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_correlated_any_all.test b/parser/testdata/corpus/sql/subquery/any_all/test_correlated_any_all.test index 0cb5259..4059f2a 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_correlated_any_all.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_correlated_any_all.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_correlated_any_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i=ANY(SELECT i FROM integers WHERE i=i1.i) FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_correlated_cte_in.test b/parser/testdata/corpus/sql/subquery/any_all/test_correlated_cte_in.test new file mode 100644 index 0000000..8a5856f --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/any_all/test_correlated_cte_in.test @@ -0,0 +1,83 @@ +# source: test/sql/subquery/any_all/test_correlated_cte_in.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE inputs(id INTEGER, xs INTEGER[], ys INTEGER[]); +-- +ok +== +INSERT INTO inputs VALUES + (1, [1, 2, NULL], [1]), + (2, [1, 2, NULL], [2]), + (3, [1, 2, NULL], []), + (4, [1, 2, NULL], [NULL]), + (5, [1, 2, NULL], [1, NULL]), + (6, [], [1]), + (7, [1, 1, 2], [1]), + (8, [NULL], []), + (9, [1, 2, NULL], NULL), + (10, [1, 2, NULL], [1]); +-- +ok +== +SET enable_optimizer={optimizer}; +-- +error: Parser Error: syntax error at or near "}" +== +SET delim_join_as_cte={cte}; +-- +error: Parser Error: syntax error at or near "}" +== +SELECT needle, ( + WITH a AS (SELECT unnest(v.xs) AS x), + b AS (SELECT v.needle AS x) + SELECT list(x ORDER BY x) FROM a WHERE x IN (SELECT x FROM b) +) AS found +FROM (VALUES ([1, 2], 1), ([1, 2], 2)) v(xs, needle) +ORDER BY needle; +-- +ok +== +SELECT n, ( + WITH a AS (SELECT unnest(string_split(v.t, ' ')) AS w), + b AS (SELECT unnest(string_split(v.q, ' ')) AS w) + SELECT list(w ORDER BY w) FROM a WHERE w IN (SELECT w FROM b) +) AS found +FROM (VALUES (1, 'alpha beta gamma', 'alpha'), + (2, 'beta gamma delta', 'gamma'), + (3, 'delta alpha beta', 'delta')) v(n, t, q) +ORDER BY n; +-- +ok +== +SELECT id, ( + WITH a AS MATERIALIZED (SELECT unnest(v.xs) AS x), + b AS MATERIALIZED (SELECT unnest(v.ys) AS y) + SELECT [list(x IN (SELECT y FROM b) ORDER BY x NULLS LAST), + list(x NOT IN (SELECT y FROM b) ORDER BY x NULLS LAST)] + FROM a +) AS found +FROM inputs v ORDER BY id; +-- +ok +== +SELECT id, ( + WITH b AS (SELECT unnest(v.ys) AS y) + SELECT list(x IN (SELECT y FROM b) ORDER BY x NULLS LAST) + FROM (VALUES (1), (2), (NULL)) a(x) +) AS found +FROM inputs v ORDER BY id; +-- +ok +== +SELECT id, ( + WITH a AS NOT MATERIALIZED (SELECT unnest(v.xs) AS x), + b AS NOT MATERIALIZED (SELECT unnest(v.ys) AS y), + c AS (SELECT y FROM b UNION ALL SELECT y FROM b) + SELECT list(x ORDER BY x) FROM a WHERE x IN (SELECT y FROM (SELECT y FROM c)) +) AS found +FROM inputs v ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_multi_column_mark_join_nulls.test b/parser/testdata/corpus/sql/subquery/any_all/test_multi_column_mark_join_nulls.test index 5c0d5a0..b76840c 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_multi_column_mark_join_nulls.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_multi_column_mark_join_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_multi_column_mark_join_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a, b, diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_row_comparison_any_all.test b/parser/testdata/corpus/sql/subquery/any_all/test_row_comparison_any_all.test index cccbb7b..7e641c5 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_row_comparison_any_all.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_row_comparison_any_all.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_row_comparison_any_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_data(a INTEGER, b INTEGER); diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_row_not_equal_any_null_semantics.test b/parser/testdata/corpus/sql/subquery/any_all/test_row_not_equal_any_null_semantics.test index 5c84623..ba11e28 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_row_not_equal_any_null_semantics.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_row_not_equal_any_null_semantics.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_row_not_equal_any_null_semantics.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (1, 2) <> ANY (SELECT * FROM (VALUES (1, NULL::INT)) t(x, y)) diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_scalar_any_all.test b/parser/testdata/corpus/sql/subquery/any_all/test_scalar_any_all.test index 8ad1e75..55cd6cf 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_scalar_any_all.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_scalar_any_all.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_scalar_any_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 = ANY(SELECT 1) diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_scalar_in.test b/parser/testdata/corpus/sql/subquery/any_all/test_scalar_in.test index ca57eef..5d61bfd 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_scalar_in.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_scalar_in.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_scalar_in.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 IN (SELECT 1) diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_simple_not_in.test b/parser/testdata/corpus/sql/subquery/any_all/test_simple_not_in.test index f8889a4..091d852 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_simple_not_in.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_simple_not_in.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_simple_not_in.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 AS one WHERE 1 IN (SELECT 1); diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_some_subquery.test b/parser/testdata/corpus/sql/subquery/any_all/test_some_subquery.test new file mode 100644 index 0000000..0bec7eb --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/any_all/test_some_subquery.test @@ -0,0 +1,49 @@ +# source: test/sql/subquery/any_all/test_some_subquery.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 5 = SOME(SELECT 5) +-- +ok +== +SELECT 1 < SOME(SELECT 2 UNION SELECT 3) +-- +ok +== +SELECT 2 = SOME(SELECT 1 UNION ALL SELECT 2) +-- +ok +== +SELECT 2 <> SOME(SELECT 1) +-- +ok +== +SELECT 2 < SOME(SELECT 3) +-- +ok +== +SELECT 2 <= SOME(SELECT 2) +-- +ok +== +SELECT 2 > SOME(SELECT 1) +-- +ok +== +SELECT 2 >= SOME(SELECT 2) +-- +ok +== +SELECT 5 = SOME(SELECT 1 WHERE FALSE) +-- +ok +== +SELECT 5 = SOME(SELECT NULL::INTEGER) +-- +ok +== +SELECT 2 = SOME([1, 2, 3]) +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_all_subquery.test b/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_all_subquery.test index aea9fac..cd6c392 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_all_subquery.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_all_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_uncorrelated_all_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i FROM integers WHERE i >= ALL(SELECT i FROM integers) diff --git a/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_any_subquery.test b/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_any_subquery.test index 8f1778b..56b115a 100644 --- a/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_any_subquery.test +++ b/parser/testdata/corpus/sql/subquery/any_all/test_uncorrelated_any_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/any_all/test_uncorrelated_any_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i FROM integers WHERE i <= ANY(SELECT i FROM integers) diff --git a/parser/testdata/corpus/sql/subquery/any_all_variant_extremum.test b/parser/testdata/corpus/sql/subquery/any_all_variant_extremum.test new file mode 100644 index 0000000..ff2f07e --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/any_all_variant_extremum.test @@ -0,0 +1,77 @@ +# source: test/sql/subquery/any_all_variant_extremum.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE v AS SELECT x::INTEGER::VARIANT AS v FROM (VALUES (7),(15)) s(x); +-- +ok +== +SELECT 127::INTEGER::VARIANT >= ALL (SELECT v FROM v); +-- +ok +== +SELECT 127::INTEGER::VARIANT > ALL (SELECT v FROM v); +-- +ok +== +SELECT 127::INTEGER::VARIANT <= ALL (SELECT v FROM v); +-- +ok +== +SELECT 127::INTEGER::VARIANT < ALL (SELECT v FROM v); +-- +ok +== +SELECT 127::INTEGER::VARIANT >= ANY (SELECT v FROM v); +-- +ok +== +SELECT 127::INTEGER::VARIANT <= ANY (SELECT v FROM v); +-- +ok +== +SELECT 127::INTEGER::VARIANT = ANY (SELECT v FROM v); +-- +ok +== +SELECT 7::INTEGER::VARIANT = ANY (SELECT v FROM v); +-- +ok +== +SELECT '1010'::BIT >= ALL (SELECT x::BIT FROM (VALUES ('0101'),('1001')) s(x)); +-- +ok +== +CREATE TABLE c(x VARCHAR); +-- +ok +== +INSERT INTO c VALUES ('a'), ('b'); +-- +ok +== +SELECT 'B' COLLATE NOCASE >= ALL (SELECT x COLLATE NOCASE FROM c); +-- +ok +== +SELECT 'B' COLLATE NOCASE >= ALL (SELECT x COLLATE NOCASE FROM (VALUES ('a'),('c')) s(x)); +-- +ok +== +SELECT 'z' >= ALL (SELECT x FROM c); +-- +ok +== +SELECT 5 > ALL (SELECT x FROM (VALUES (1),(2),(NULL)) s(x)); +-- +ok +== +SELECT 5 > ALL (SELECT x FROM (VALUES (1),(2)) s(x)); +-- +ok +== +SELECT 5 > ALL (SELECT x FROM (VALUES (1)) s(x) WHERE x > 100); +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/complex/complex_correlated_subquery_issue.test b/parser/testdata/corpus/sql/subquery/complex/complex_correlated_subquery_issue.test index 0df3e29..69f16d0 100644 --- a/parser/testdata/corpus/sql/subquery/complex/complex_correlated_subquery_issue.test +++ b/parser/testdata/corpus/sql/subquery/complex/complex_correlated_subquery_issue.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/complex/complex_correlated_subquery_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t2(c0 INT); diff --git a/parser/testdata/corpus/sql/subquery/complex/correlated_internal_issue_5975.test b/parser/testdata/corpus/sql/subquery/complex/correlated_internal_issue_5975.test index a35e524..5b11e9d 100644 --- a/parser/testdata/corpus/sql/subquery/complex/correlated_internal_issue_5975.test +++ b/parser/testdata/corpus/sql/subquery/complex/correlated_internal_issue_5975.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/complex/correlated_internal_issue_5975.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE my_logs ( diff --git a/parser/testdata/corpus/sql/subquery/complex/correlated_list_any_join.test b/parser/testdata/corpus/sql/subquery/complex/correlated_list_any_join.test index afc027e..35f20bf 100644 --- a/parser/testdata/corpus/sql/subquery/complex/correlated_list_any_join.test +++ b/parser/testdata/corpus/sql/subquery/complex/correlated_list_any_join.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/complex/correlated_list_any_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lists(l INTEGER[]); diff --git a/parser/testdata/corpus/sql/subquery/complex/nested_unnest_subquery.test b/parser/testdata/corpus/sql/subquery/complex/nested_unnest_subquery.test index 2628fa8..d0d9ace 100644 --- a/parser/testdata/corpus/sql/subquery/complex/nested_unnest_subquery.test +++ b/parser/testdata/corpus/sql/subquery/complex/nested_unnest_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/complex/nested_unnest_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nested_lists(l INTEGER[][]); diff --git a/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists.test b/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists.test index af3c48c..2e45f29 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_correlated_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, EXISTS(SELECT i FROM integers WHERE i1.i>2) FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists_with_derived_table.test b/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists_with_derived_table.test index 24f25da..e17c6fd 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists_with_derived_table.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_correlated_exists_with_derived_table.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_correlated_exists_with_derived_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t0(c2 INT); diff --git a/parser/testdata/corpus/sql/subquery/exists/test_exists_union_by_name.test b/parser/testdata/corpus/sql/subquery/exists/test_exists_union_by_name.test index 0835351..f0e220b 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_exists_union_by_name.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_exists_union_by_name.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_exists_union_by_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ( diff --git a/parser/testdata/corpus/sql/subquery/exists/test_issue_22267.test b/parser/testdata/corpus/sql/subquery/exists/test_issue_22267.test index d9b3f12..b695725 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_issue_22267.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_issue_22267.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_issue_22267.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE posts ( diff --git a/parser/testdata/corpus/sql/subquery/exists/test_issue_23979.test b/parser/testdata/corpus/sql/subquery/exists/test_issue_23979.test index f5e50ce..fb48c82 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_issue_23979.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_issue_23979.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_issue_23979.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE issue23979_l(o INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/subquery/exists/test_issue_26401.test b/parser/testdata/corpus/sql/subquery/exists/test_issue_26401.test new file mode 100644 index 0000000..1835c63 --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/exists/test_issue_26401.test @@ -0,0 +1,33 @@ +# source: test/sql/subquery/exists/test_issue_26401.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t (a INT); +-- +ok +== +CREATE TABLE e (a INT); +-- +ok +== +SELECT EXISTS (SELECT 1 FROM t WHERE NOT EXISTS (SELECT 1 FROM e)); +-- +ok +== +SELECT a FROM t WHERE NOT EXISTS (SELECT 1 FROM t WHERE NOT EXISTS (SELECT 1 FROM e)); +-- +ok +== +SELECT * FROM t WHERE NOT EXISTS (SELECT 1 FROM e) ORDER BY a; +-- +ok +== +SELECT EXISTS (SELECT 1 FROM e); +-- +ok +== +SELECT NOT EXISTS (SELECT 1 FROM e); +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/exists/test_issue_9308.test b/parser/testdata/corpus/sql/subquery/exists/test_issue_9308.test index 0b390db..baf0f2c 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_issue_9308.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_issue_9308.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_issue_9308.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table t1(c1 int64); diff --git a/parser/testdata/corpus/sql/subquery/exists/test_scalar_exists.test b/parser/testdata/corpus/sql/subquery/exists/test_scalar_exists.test index 4874797..64a5b52 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_scalar_exists.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_scalar_exists.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_scalar_exists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT EXISTS(SELECT 1) diff --git a/parser/testdata/corpus/sql/subquery/exists/test_uncorrelated_exists_subquery.test b/parser/testdata/corpus/sql/subquery/exists/test_uncorrelated_exists_subquery.test index 3ed8494..58f36f7 100644 --- a/parser/testdata/corpus/sql/subquery/exists/test_uncorrelated_exists_subquery.test +++ b/parser/testdata/corpus/sql/subquery/exists/test_uncorrelated_exists_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/exists/test_uncorrelated_exists_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE EXISTS(SELECT 1) ORDER BY i diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_arrays.test b/parser/testdata/corpus/sql/subquery/lateral/lateral_arrays.test index db84114..972515e 100644 --- a/parser/testdata/corpus/sql/subquery/lateral/lateral_arrays.test +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_arrays.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/lateral/lateral_arrays.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(i INTEGER, arr INT[]); diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_binding_views.test b/parser/testdata/corpus/sql/subquery/lateral/lateral_binding_views.test index 9b4c10c..a006e08 100644 --- a/parser/testdata/corpus/sql/subquery/lateral/lateral_binding_views.test +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_binding_views.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/lateral/lateral_binding_views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select date '2000-01-01' as dt) to '{TEST_DIR}/datetest.csv'; diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter.test b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter.test new file mode 100644 index 0000000..3df7789 --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter.test @@ -0,0 +1,226 @@ +# source: test/sql/subquery/lateral/lateral_domain_filter.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE vertices AS SELECT i::INTEGER AS id FROM range(100) t(i); +-- +ok +== +CREATE VIEW joined_walk AS +SELECT input.id, expanded.depth +FROM vertices input +CROSS JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + input.id * 0 + UNION ALL + SELECT depth + 1 FROM walk WHERE depth < 7 + ) + SELECT depth FROM walk +) expanded +JOIN vertices target ON target.id = expanded.depth + 1; +-- +ok +== +SELECT count(*) FROM joined_walk WHERE id = 3; +-- +ok +== +EXPLAIN SELECT count(*) FROM joined_walk WHERE id = 3; +-- +ok +== +SELECT count(*), sum(depth) FROM joined_walk WHERE id = 3 AND depth > 4; +-- +ok +== +SELECT count(*) FROM (SELECT depth, id AS selected FROM joined_walk) q, + (VALUES (1), (2)) v(x) WHERE selected = 3; +-- +ok +== +CREATE TABLE owners(person INTEGER, class INTEGER); +-- +ok +== +INSERT INTO owners VALUES (1,10), (1,10), (1,NULL), (2,10), (3,20); +-- +ok +== +CREATE VIEW owner_walk AS +SELECT o.person, o.class, w.depth +FROM owners o, LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + coalesce(o.class, 0) * 0 + UNION ALL SELECT depth + 1 FROM walk WHERE depth < 2 + ) SELECT depth FROM walk +) w JOIN vertices v ON v.id = w.depth; +-- +ok +== +SELECT count(*), sum(depth) FROM owner_walk WHERE person = 1; +-- +ok +== +EXPLAIN SELECT count(*) FROM owner_walk WHERE person = 1; +-- +ok +== +WITH shared AS MATERIALIZED (SELECT * FROM owner_walk) +SELECT (SELECT count(*) FROM shared WHERE person = 1), (SELECT count(*) FROM shared); +-- +ok +== +SELECT count(*) FROM (SELECT *, count(*) OVER () AS n FROM owner_walk) q +WHERE person = 1 AND n = 15; +-- +ok +== +EXPLAIN SELECT count(*) FROM (SELECT * FROM owner_walk LIMIT 1) q WHERE person = 1; +-- +ok +== +WITH r AS MATERIALIZED (SELECT * FROM owners), d AS (SELECT class, sum(person) AS total FROM r GROUP BY class) +SELECT r.class, d.total FROM r JOIN d ON r.class IS NOT DISTINCT FROM d.class WHERE r.person = 1; +-- +ok +== +SET {setting} = false; +-- +error: Parser Error: syntax error at or near "{" +== +SET {setting} = true; +-- +error: Parser Error: syntax error at or near "{" +== +RESET {setting}; +-- +error: Parser Error: syntax error at or near "{" +== +SET disabled_optimizers = '{disabled}'; +-- +error: Parser Error: Optimizer type "{disabled}" not recognized +== +PREPARE selected_walk AS SELECT count(*) FROM joined_walk WHERE id = $1; +-- +ok +== +EXECUTE selected_walk(3); +-- +ok +== +EXECUTE selected_walk(1000); +-- +ok +== +CREATE TABLE keys(person INTEGER, k VARCHAR, s BIGINT); +-- +ok +== +INSERT INTO keys VALUES (1,'a',2), (1,NULL,2), (1,'a',NULL), (2,'a',2); +-- +ok +== +SELECT count(*), sum(w.n) FROM keys input, LATERAL ( + WITH RECURSIVE walk(n, depth) AS ( + SELECT coalesce(length(input.k), 0) + coalesce(input.s, 0), 0 + UNION ALL SELECT n, depth + 1 FROM walk WHERE depth < 1 + ) SELECT * FROM walk +) w JOIN vertices target ON target.id = w.depth WHERE person = 1; +-- +ok +== +CREATE SEQUENCE body_calls; +-- +ok +== +SELECT count(w.value) FROM owners input, LATERAL ( + WITH RECURSIVE walk(value, depth) AS ( + SELECT nextval('body_calls') + coalesce(input.class, 0) * 0, 0 + UNION ALL SELECT value, depth + 1 FROM walk WHERE depth < 2 + ) SELECT * FROM walk +) w JOIN vertices target ON target.id = w.depth WHERE person = 1; +-- +ok +== +SELECT currval('body_calls'); +-- +ok +== +CREATE SEQUENCE producer_calls; +-- +ok +== +WITH input AS MATERIALIZED (SELECT *, nextval('producer_calls') AS value FROM owners) +SELECT count(*), sum(input.value), (SELECT count(value) FROM input) FROM input, +LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + coalesce(input.class, 0) * 0 + UNION ALL SELECT depth + 1 FROM walk WHERE depth < 2 + ) SELECT * FROM walk +) w JOIN vertices target ON target.id = w.depth WHERE person = 1; +-- +ok +== +SELECT currval('producer_calls'); +-- +ok +== +EXPLAIN SELECT count(*) FROM owner_walk WHERE __internal_barrier(person = 1); +-- +ok +== +EXPLAIN SELECT count(*) FROM owner_walk WHERE person::VARCHAR::INTEGER = 1; +-- +ok +== +WITH input AS MATERIALIZED (SELECT * FROM owners), walks AS MATERIALIZED ( + SELECT input.person, w.depth FROM input, LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + coalesce(input.class, 0) * 0 + UNION ALL SELECT depth + 1 FROM walk WHERE depth < 2 + ) SELECT * FROM walk + ) w JOIN vertices target ON target.id = w.depth +) +SELECT (SELECT count(*) FROM walks WHERE person = 1), (SELECT sum(person) FROM input); +-- +ok +== +SELECT count(*), count(w.depth) FROM owners input LEFT JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + coalesce(input.class, 0) * 0 + UNION ALL SELECT depth + 1 FROM walk WHERE depth < 2 + ) SELECT * FROM walk WHERE depth > 2 +) w ON true JOIN vertices target ON target.id = input.person WHERE person = 1; +-- +ok +== +SELECT count(*) FROM owner_walk a JOIN owner_walk b ON a.person = b.person WHERE a.person = 1; +-- +ok +== +WITH copied AS NOT MATERIALIZED (SELECT * FROM owner_walk) +SELECT (SELECT count(*) FROM copied WHERE person = 1), + (SELECT count(*) FROM copied WHERE person = 2); +-- +ok +== +SELECT count(*) FROM owners input, LATERAL ( + WITH RECURSIVE outer_walk(depth) AS ( + SELECT 0 + coalesce(input.class, 0) * 0 + UNION ALL SELECT depth + 1 FROM outer_walk WHERE depth < 2 + ) + SELECT w.depth, inner_walk.step FROM outer_walk w, LATERAL ( + WITH RECURSIVE inner_steps(step) AS ( + SELECT 0 + w.depth * 0 + UNION ALL SELECT step + 1 FROM inner_steps WHERE step < 1 + ) SELECT * FROM inner_steps + ) inner_walk +) w JOIN vertices target ON target.id = w.depth WHERE person = 1; +-- +ok +== +RESET max_execution_time; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter.test.metadata.json b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter.test.metadata.json new file mode 100644 index 0000000..eb30a4b --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "b8ab9c0e2a423707": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter_shapes.test b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter_shapes.test new file mode 100644 index 0000000..db46522 --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter_shapes.test @@ -0,0 +1,211 @@ +# source: test/sql/subquery/lateral/lateral_domain_filter_shapes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE vertices AS SELECT i::INTEGER id FROM range(100) t(i); +-- +ok +== +CREATE VIEW shape_union AS +SELECT input.id,w.depth FROM vertices input +CROSS JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0+input.id*0 + UNION + SELECT depth+1 FROM walk WHERE depth<7 + ) + SELECT depth FROM walk +) w +JOIN vertices target ON target.id=w.depth+1; +-- +ok +== +SELECT count(*) FROM shape_union WHERE id=3; +-- +ok +== +EXPLAIN SELECT count(*) FROM shape_union WHERE id=3; +-- +ok +== +CREATE VIEW shape_exists AS +SELECT input.id,w.depth FROM vertices input +CROSS JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0+input.id*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<7 AND EXISTS (SELECT 1 FROM vertices v WHERE v.id=walk.depth) + ) + SELECT depth FROM walk +) w +JOIN vertices target ON target.id=w.depth+1; +-- +ok +== +SELECT count(*) FROM shape_exists WHERE id=3; +-- +ok +== +EXPLAIN SELECT count(*) FROM shape_exists WHERE id=3; +-- +ok +== +CREATE VIEW shape_anti_body AS +SELECT input.id,w.depth FROM vertices input +CROSS JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0+input.id*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<7 AND NOT EXISTS (SELECT 1 FROM vertices v WHERE v.id=walk.depth+100) + ) + SELECT depth FROM walk +) w +JOIN vertices target ON target.id=w.depth+1; +-- +ok +== +SELECT count(*) FROM shape_anti_body WHERE id=3; +-- +ok +== +EXPLAIN SELECT count(*) FROM shape_anti_body WHERE id=3; +-- +ok +== +CREATE VIEW shape_mark_body AS +SELECT input.id,w.depth FROM vertices input +CROSS JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0+input.id*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<7 AND (walk.depth IN (SELECT id FROM vertices) OR walk.depth=1) + ) + SELECT depth FROM walk +) w +JOIN vertices target ON target.id=w.depth+1; +-- +ok +== +SELECT count(*) FROM shape_mark_body WHERE id=3; +-- +ok +== +EXPLAIN SELECT count(*) FROM shape_mark_body WHERE id=3; +-- +ok +== +CREATE VIEW shape_range AS +SELECT input.id,w.depth FROM range(100) input(id) +CROSS JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0+input.id*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<7 + ) + SELECT depth FROM walk +) w +JOIN vertices target ON target.id=w.depth+1; +-- +ok +== +SELECT count(*) FROM shape_range WHERE id=3; +-- +ok +== +EXPLAIN SELECT count(*) FROM shape_range WHERE id=3; +-- +ok +== +INSERT INTO owners VALUES (1,10),(1,10),(1,NULL),(2,10),(3,20); +-- +ok +== +SELECT count(*) FROM owners input +LEFT JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<2 + ) SELECT * FROM walk WHERE depth > 2 +) w ON true +JOIN vertices target ON target.id=input.person +WHERE person=1; +-- +ok +== +EXPLAIN SELECT count(*) FROM owners input +LEFT JOIN LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<2 + ) SELECT * FROM walk WHERE depth > 2 +) w ON true +JOIN vertices target ON target.id=input.person +WHERE person=1; +-- +ok +== +SELECT count(*) FROM ( + SELECT input.person, EXISTS ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<2 + ) SELECT * FROM walk WHERE depth=2 AND input.class IS NOT NULL) AS found + FROM owners input JOIN vertices target ON target.id=input.person +) q WHERE person=1 AND found; +-- +ok +== +EXPLAIN SELECT count(*) FROM ( + SELECT input.person, EXISTS ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<2 + ) SELECT * FROM walk WHERE depth=2 AND input.class IS NOT NULL) AS found + FROM owners input JOIN vertices target ON target.id=input.person +) q WHERE person=1 AND found; +-- +ok +== +SELECT count(*) FROM ( + SELECT input.person, NOT EXISTS ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<2 + ) SELECT * FROM walk WHERE depth=2 AND input.class IS NOT NULL) AS found + FROM owners input JOIN vertices target ON target.id=input.person +) q WHERE person=1 AND found; +-- +ok +== +EXPLAIN SELECT count(*) FROM ( + SELECT input.person, NOT EXISTS ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION ALL + SELECT depth+1 FROM walk WHERE depth<2 + ) SELECT * FROM walk WHERE depth=2 AND input.class IS NOT NULL) AS found + FROM owners input JOIN vertices target ON target.id=input.person +) q WHERE person=1 AND found; +-- +ok +== +SELECT count(*), sum(w.depth) FROM owners input, LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT coalesce(input.class,0)*0 + UNION + SELECT (depth+1)%2 FROM walk + ) SELECT * FROM walk +) w JOIN vertices target ON target.id=w.depth+1 WHERE person=1; +-- +ok +== +SET disabled_optimizers='{disabled}'; +-- +error: Parser Error: Optimizer type "{disabled}" not recognized +== diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter_shapes.test.metadata.json b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter_shapes.test.metadata.json new file mode 100644 index 0000000..e88eb3c --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_filter_shapes.test.metadata.json @@ -0,0 +1,5 @@ +{ + "todo": { + "006e82c61ccfd4a4": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + } +} diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_join_filter_semantics.test b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_join_filter_semantics.test new file mode 100644 index 0000000..33b8fb2 --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_domain_join_filter_semantics.test @@ -0,0 +1,101 @@ +# source: test/sql/subquery/lateral/lateral_domain_join_filter_semantics.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE person(id BIGINT, tag VARCHAR, selected BOOLEAN, grp BIGINT); +-- +ok +== +INSERT INTO person SELECT i, (i%2)::VARCHAR, i IN (3,17,51), 0 FROM range(1000) t(i); +-- +ok +== +INSERT INTO person VALUES (3,'1',true,0),(NULL,'z',true,0),(NULL,'z',true,0); +-- +ok +== +CREATE VIEW expanded AS +SELECT i.id, i.tag, i.grp, r.x FROM person i, LATERAL ( +WITH RECURSIVE walk(x) USING KEY(x) AS ( + SELECT coalesce(i.id,0) UNION SELECT w.x+1 FROM walk w WHERE w.x0 FROM o JOIN ( + SELECT i.id,nextval('target_calls') v,r.x FROM person i, LATERAL ( + WITH RECURSIVE walk(x) AS ( + SELECT i.id UNION ALL SELECT x+1 FROM walk WHERE x 4; +-- +ok +== +EXPLAIN SELECT count(*) FROM walk_rows WHERE id = 3 AND depth > 4; +-- +ok +== +SELECT count(*) FROM (SELECT id, id IS NULL AS missing FROM walk_rows) q WHERE id = 3 OR missing; +-- +ok +== +EXPLAIN SELECT count(*) FROM (SELECT id + 1 AS next_id FROM walk_rows) q WHERE next_id = 4; +-- +ok +== +EXPLAIN SELECT sum(v) FROM (SELECT id, random() AS v FROM walk_rows) q WHERE id = 3; +-- +ok +== +EXPLAIN SELECT sum(v) FROM (SELECT id, id::VARCHAR::INTEGER AS v FROM walk_rows) q WHERE id = 3; +-- +ok +== +EXPLAIN SELECT sum(v) FROM (SELECT id, __internal_barrier(id) AS v FROM walk_rows) q WHERE id = 3; +-- +ok +== +EXPLAIN SELECT count(*) FROM (SELECT * FROM walk_rows LIMIT 1) q WHERE id = 3; +-- +ok +== +EXPLAIN SELECT count(*) FROM walk_rows WHERE __internal_barrier(id = 3); +-- +ok +== +EXPLAIN SELECT count(*) FROM walk_rows WHERE id::VARCHAR::INTEGER = 3; +-- +ok +== +EXPLAIN SELECT count(*) FROM walk_rows WHERE id + random() = 3; +-- +ok +== +INSERT INTO vertices VALUES (3), (NULL); +-- +ok +== +SELECT count(*) FROM walk_rows WHERE id = 3; +-- +ok +== +SELECT count(*) FROM walk_rows WHERE id IS NULL; +-- +ok +== +SELECT count(*) FROM walk_rows WHERE id = 1000; +-- +ok +== +SELECT count(*), count(depth) FROM ( +SELECT t.id, r.depth +FROM vertices t LEFT JOIN +LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + t.id * 0 + UNION ALL + SELECT depth + 1 FROM walk WHERE depth < 7 + ) + SELECT depth FROM walk WHERE depth > 7 +) r ON true +) q WHERE id = 3; +-- +ok +== +EXPLAIN SELECT count(*), count(depth) FROM ( +SELECT t.id, r.depth +FROM vertices t LEFT JOIN +LATERAL ( + WITH RECURSIVE walk(depth) AS ( + SELECT 0 + t.id * 0 + UNION ALL + SELECT depth + 1 FROM walk WHERE depth < 7 + ) + SELECT depth FROM walk WHERE depth > 7 +) r ON true +) q WHERE id = 3; +-- +ok +== +DELETE FROM vertices; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/lateral/lateral_values.test b/parser/testdata/corpus/sql/subquery/lateral/lateral_values.test index d3ff4d1..dded940 100644 --- a/parser/testdata/corpus/sql/subquery/lateral/lateral_values.test +++ b/parser/testdata/corpus/sql/subquery/lateral/lateral_values.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/lateral/lateral_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers, LATERAL (VALUES (integers.i + 1)) t(k) ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/lateral/pg_lateral.test b/parser/testdata/corpus/sql/subquery/lateral/pg_lateral.test index 3796e33..9f509a5 100644 --- a/parser/testdata/corpus/sql/subquery/lateral/pg_lateral.test +++ b/parser/testdata/corpus/sql/subquery/lateral/pg_lateral.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/lateral/pg_lateral.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select s1, s2, sm @@ -240,7 +240,7 @@ ORDER BY ALL; -- ok == -select * from (select f1/1000000000 from int4_tbl) x(lb), +select * from (select f1 // 1000000000 from int4_tbl) x(lb), lateral generate_series(lb,4) x4 ORDER BY ALL; -- diff --git a/parser/testdata/corpus/sql/subquery/lateral/qualified_star.test b/parser/testdata/corpus/sql/subquery/lateral/qualified_star.test new file mode 100644 index 0000000..2414ba9 --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/lateral/qualified_star.test @@ -0,0 +1,149 @@ +# source: test/sql/subquery/lateral/qualified_star.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE outer_rows(i INTEGER, j VARCHAR); +-- +ok +== +INSERT INTO outer_rows VALUES (1, 'a'), (2, 'b'), (2, 'b'), (NULL, NULL); +-- +ok +== +SELECT o.i, x.* FROM outer_rows o, LATERAL (SELECT o.*) x ORDER BY ALL; +-- +ok +== +SELECT (SELECT o.* EXCLUDE (j)) FROM outer_rows o ORDER BY 1; +-- +ok +== +SELECT x.* FROM outer_rows o, +LATERAL (SELECT y.* FROM range(1) r, LATERAL (SELECT o.*) y) x ORDER BY ALL; +-- +ok +== +SELECT o.i, x.j FROM outer_rows o +LEFT JOIN LATERAL (SELECT o.* FROM range(1) r WHERE o.i > 1) x ON true ORDER BY ALL; +-- +ok +== +SELECT count(*) FROM outer_rows o, LATERAL (SELECT o.* FROM range(2)) x; +-- +ok +== +SELECT x.* FROM outer_rows o, +LATERAL (SELECT o.* FROM (VALUES (7, 'local')) o(i,j)) x ORDER BY ALL; +-- +ok +== +SELECT x.i FROM outer_rows o, +LATERAL ( + SELECT y.* FROM (VALUES (7)) o(i), LATERAL (SELECT o.*) y +) x ORDER BY ALL; +-- +ok +== +SELECT x.a FROM outer_rows o, +LATERAL (SELECT o.* FROM (VALUES ({'a': 42})) t(o)) x ORDER BY ALL; +-- +ok +== +SELECT x.* FROM (VALUES ({'a': 42, 'b': 7}), (NULL::STRUCT(a INTEGER, b INTEGER))) t(s), +LATERAL (SELECT s.*) x ORDER BY ALL; +-- +ok +== +SELECT x.* FROM outer_rows AS "Outer Table", +LATERAL (SELECT "Outer Table".*) x ORDER BY ALL; +-- +ok +== +SELECT x.* FROM outer_rows o, +LATERAL (SELECT o.* EXCLUDE (j) REPLACE (o.i + 10 AS i)) x ORDER BY ALL; +-- +ok +== +SELECT x.renamed_i, x.j FROM outer_rows o, +LATERAL (SELECT o.* RENAME (i AS renamed_i)) x ORDER BY ALL; +-- +ok +== +SELECT x.* FROM outer_rows o, +LATERAL (SELECT COLUMNS(o.*)) x ORDER BY ALL; +-- +ok +== +SELECT x.* FROM outer_rows o, +LATERAL (SELECT COLUMNS(o.* EXCLUDE (j))) x ORDER BY ALL; +-- +ok +== +CREATE TABLE generated_outer(i INTEGER, j INTEGER GENERATED ALWAYS AS (i + 1)); +-- +ok +== +INSERT INTO generated_outer(i) VALUES (1), (NULL); +-- +ok +== +SELECT x.* FROM generated_outer o, LATERAL (SELECT o.*) x ORDER BY ALL; +-- +ok +== +CREATE SEQUENCE qualified_star_calls; +-- +ok +== +SELECT o.i, x.i FROM (SELECT nextval('qualified_star_calls') i) o, +LATERAL (SELECT o.*) x; +-- +ok +== +SELECT currval('qualified_star_calls'); +-- +ok +== +PREPARE qualified_star_plan AS +SELECT x.* FROM outer_rows o, LATERAL (SELECT o.*) x WHERE o.i >= $1 ORDER BY ALL; +-- +ok +== +EXECUTE qualified_star_plan(2); +-- +ok +== +EXECUTE qualified_star_plan(1); +-- +ok +== +DEALLOCATE qualified_star_plan; +-- +ok +== +SELECT * FROM outer_rows o, LATERAL (SELECT *) x; +-- +ok +== +SELECT * FROM outer_rows o, LATERAL (SELECT missing.* FROM range(1)) x; +-- +ok +== +SELECT x.* FROM (VALUES (42)) t(x); +-- +ok +== +WITH c AS (SELECT o.*) SELECT * FROM outer_rows o, c; +-- +ok +== +SELECT * FROM (VALUES ({'a': 1})) t1(s), (VALUES ({'a': 2})) t2(s), +LATERAL (SELECT s.*) x; +-- +ok +== +SELECT * FROM outer_rows o, LATERAL (SELECT o.* EXCLUDE (missing)) x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/lateral/test_lateral_join.test b/parser/testdata/corpus/sql/subquery/lateral/test_lateral_join.test index 67e6a2b..f061d66 100644 --- a/parser/testdata/corpus/sql/subquery/lateral/test_lateral_join.test +++ b/parser/testdata/corpus/sql/subquery/lateral/test_lateral_join.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/lateral/test_lateral_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select (select MIN(val) from unnest((select a)) t(val)) from (select ARRAY[1, 2, 3, NULL]) t(a); diff --git a/parser/testdata/corpus/sql/subquery/scalar/array_order_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/array_order_subquery.test index f6dcf02..c390853 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/array_order_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/array_order_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/array_order_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select diff --git a/parser/testdata/corpus/sql/subquery/scalar/array_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/array_subquery.test index f143d30..8613581 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/array_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/array_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/array_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, ARRAY( diff --git a/parser/testdata/corpus/sql/subquery/scalar/coalesce_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/coalesce_subquery.test index 09b0dcc..812661c 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/coalesce_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/coalesce_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/coalesce_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1 FROM (select 4) v1(vc0) WHERE (3) NOT IN (COALESCE((SELECT 1 WHERE FALSE), v1.vc0)); diff --git a/parser/testdata/corpus/sql/subquery/scalar/correlated_missing_columns.test b/parser/testdata/corpus/sql/subquery/scalar/correlated_missing_columns.test index 0fe988b..57c0573 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/correlated_missing_columns.test +++ b/parser/testdata/corpus/sql/subquery/scalar/correlated_missing_columns.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/correlated_missing_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT l_linestat FROM orders) FROM lineitem diff --git a/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot.test b/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot.test index 0e9e2cc..222f030 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot.test +++ b/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/correlated_pivot.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DaysToManufacture, StandardCost, (SELECT ["0", "1", "2", "3", "4"] FROM diff --git a/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot_error.test b/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot_error.test index 93350ab..d671424 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot_error.test +++ b/parser/testdata/corpus/sql/subquery/scalar/correlated_pivot_error.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/correlated_pivot_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DaysToManufacture, StandardCost, (SELECT ["0", "1", "2", "3", "4"] FROM diff --git a/parser/testdata/corpus/sql/subquery/scalar/correlated_scope_resolution.test b/parser/testdata/corpus/sql/subquery/scalar/correlated_scope_resolution.test new file mode 100644 index 0000000..699b470 --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/scalar/correlated_scope_resolution.test @@ -0,0 +1,135 @@ +# source: test/sql/subquery/scalar/correlated_scope_resolution.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE another_T(col1 INTEGER, col2 INTEGER); +-- +ok +== +INSERT INTO another_T VALUES (1, 2), (3, 4); +-- +ok +== +INSERT INTO lists VALUES ([1, 2]), ([3]); +-- +ok +== +SELECT (SELECT SUM(1)) +-- +ok +== +SELECT (SELECT SUM(i1.i)) FROM integers i1 +-- +ok +== +SELECT (SELECT SUM(i2.i + i1.i) FROM integers i2) FROM integers i1 ORDER BY 1 +-- +ok +== +SELECT (SELECT i2.i + i1.i FROM integers i2 WHERE i2.i = 1) FROM integers i1 ORDER BY 1 +-- +ok +== +SELECT i, (SELECT SUM(i1.i)) FROM integers i1 +-- +ok +== +SELECT MIN(i), (SELECT SUM(i1.i)) FROM integers i1 +-- +ok +== +SELECT SUM((SELECT SUM(i))) FROM integers +-- +ok +== +SELECT (WITH t3 AS (SELECT 3 WHERE count(*)) SELECT 0 FROM t3) +-- +ok +== +SELECT * FROM integers i1 WHERE (SELECT SUM(i1.i) > 0) +-- +ok +== +SELECT 1 FROM integers i1 GROUP BY (SELECT SUM(i1.i)) +-- +ok +== +SELECT * FROM integers i1, (SELECT SUM(i1.i)) t(s) +-- +ok +== +SELECT sum(c2) c0 FROM (SELECT 1) t1(c2) HAVING (SELECT c0) +-- +ok +== +SELECT i FROM integers i1 QUALIFY (SELECT SUM(i1.i)) > 0 +-- +ok +== +SELECT * FROM integers i1 WHERE (SELECT SUM(nonexistent_col) > 0) +-- +ok +== +SELECT GROUPING(t1.col1) = ALL (SELECT GROUPING(t1.col2)) +FROM another_T t1 GROUP BY CUBE(t1.col1, t1.col2) ORDER BY 1 +-- +ok +== +SELECT t1.col1, GROUPING(t1.col1), GROUPING(t1.col2), (SELECT GROUPING(t1.col2)) +FROM another_T t1 GROUP BY CUBE(t1.col1, t1.col2) ORDER BY ALL +-- +ok +== +SELECT (SELECT GROUPING(t1.col1) FROM integers) FROM another_T t1 +-- +ok +== +SELECT (SELECT SUM(u) FROM (SELECT UNNEST(l1.l) u)) FROM lists l1 ORDER BY 1 +-- +ok +== +SELECT (SELECT COUNT(*) FROM (SELECT UNNEST(l1.l, max_depth := 2) u)) FROM lists l1 ORDER BY 1 +-- +ok +== +SELECT i, (SELECT SUM(i + 1) OVER ()) FROM integers ORDER BY i +-- +ok +== +SELECT i, (SELECT SUM((SELECT i + 1)) OVER ()) FROM integers ORDER BY i +-- +ok +== +SELECT (SELECT SUM(list_transform([1, 2], lambda i: i + 1)[1])) FROM integers i1 ORDER BY 1 +-- +ok +== +SELECT (SELECT SUM(list_transform([1, 2], lambda unshadowed: unshadowed + 1)[1])) FROM integers i1 ORDER BY 1 +-- +ok +== +SELECT (SELECT SUM(list_transform([1, 2], lambda i: i + i1.i)[1])) FROM integers i1 +-- +ok +== +SELECT (SELECT SUM(list_transform([1, 2], lambda unshadowed: unshadowed + i1.i)[1])) FROM integers i1 +-- +ok +== +CREATE TABLE files(data VARCHAR); +-- +ok +== +INSERT INTO files VALUES ('x'); +-- +ok +== +SELECT * FROM files, read_csv(data.csv); +-- +ok +== +SELECT * FROM files, read_csv(files.data); +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/scalar/in_multiple_columns.test b/parser/testdata/corpus/sql/subquery/scalar/in_multiple_columns.test index 1156e11..a7e0cc4 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/in_multiple_columns.test +++ b/parser/testdata/corpus/sql/subquery/scalar/in_multiple_columns.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/in_multiple_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE table1(x INTEGER, y INTEGER); diff --git a/parser/testdata/corpus/sql/subquery/scalar/nested_subquery_window.test b/parser/testdata/corpus/sql/subquery/scalar/nested_subquery_window.test index 44e40e9..0bfa41b 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/nested_subquery_window.test +++ b/parser/testdata/corpus/sql/subquery/scalar/nested_subquery_window.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/nested_subquery_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT max((SELECT subq_0.c0 AS c1))) FROM (SELECT NULL AS c0) AS subq_0; diff --git a/parser/testdata/corpus/sql/subquery/scalar/order_by_correlated.test b/parser/testdata/corpus/sql/subquery/scalar/order_by_correlated.test index 5f1fb6e..5059bca 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/order_by_correlated.test +++ b/parser/testdata/corpus/sql/subquery/scalar/order_by_correlated.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/order_by_correlated.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, ( diff --git a/parser/testdata/corpus/sql/subquery/scalar/subquery_row_in_any.test b/parser/testdata/corpus/sql/subquery/scalar/subquery_row_in_any.test index 4f82f6e..455c508 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/subquery_row_in_any.test +++ b/parser/testdata/corpus/sql/subquery/scalar/subquery_row_in_any.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/subquery_row_in_any.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (1, 2) IN (SELECT i, i + 1 FROM integers) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_complex_correlated_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_complex_correlated_subquery.test index 939d999..2c4a3af 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_complex_correlated_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_complex_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_complex_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (SELECT s1.i FROM (SELECT * FROM integers WHERE i=i1.i) s1) AS j FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_complex_nested_correlated_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_complex_nested_correlated_subquery.test index a451d38..08785e7 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_complex_nested_correlated_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_complex_nested_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_complex_nested_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a TINYINT, b SMALLINT, c INTEGER, d BIGINT, e VARCHAR, f DATE, g TIMESTAMP) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_grouping_set.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_grouping_set.test index 63166d9..2cb6249 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_grouping_set.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_grouping_set.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_correlated_grouping_set.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (SELECT COUNT(*) FROM (SELECT i1.i FROM integers GROUP BY GROUPING SETS(i1.i)) tbl) AS j FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_having.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_having.test new file mode 100644 index 0000000..21cd0da --- /dev/null +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_having.test @@ -0,0 +1,114 @@ +# source: test/sql/subquery/scalar/test_correlated_having.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE outer_values(i INTEGER); +-- +ok +== +INSERT INTO outer_values VALUES (1), (2); +-- +ok +== +CREATE TABLE inner_values(i INTEGER); +-- +ok +== +INSERT INTO inner_values VALUES (1); +-- +ok +== +SELECT outer_values.i, + EXISTS (SELECT 1 FROM inner_values WHERE inner_values.i = outer_values.i HAVING true), + (SELECT 1 FROM inner_values WHERE inner_values.i = outer_values.i HAVING true), + EXISTS (SELECT 1 FROM inner_values WHERE inner_values.i = outer_values.i HAVING false), + (SELECT 1 FROM inner_values WHERE inner_values.i = outer_values.i HAVING false) +FROM outer_values +ORDER BY outer_values.i; +-- +ok +== +SELECT outer_values.i, + (SELECT 7 FROM inner_values WHERE inner_values.i = outer_values.i HAVING sum(inner_values.i) IS NULL), + (SELECT outer_values.i FROM inner_values WHERE inner_values.i = outer_values.i HAVING true), + (SELECT sum(inner_values.i) FROM inner_values WHERE inner_values.i = outer_values.i), + (SELECT coalesce(sum(inner_values.i), 42) + FROM inner_values WHERE inner_values.i = outer_values.i HAVING true), + (SELECT sum(inner_values.i) IS NULL + FROM inner_values WHERE inner_values.i = outer_values.i HAVING true) +FROM outer_values +ORDER BY outer_values.i; +-- +ok +== +SELECT outer_values.i, + EXISTS (SELECT sum(inner_values.i) FROM inner_values WHERE inner_values.i = outer_values.i HAVING true), + 1 IN (SELECT sum(inner_values.i) FROM inner_values WHERE inner_values.i = outer_values.i HAVING true) +FROM outer_values +ORDER BY outer_values.i; +-- +ok +== +SELECT outer_values.i, + (SELECT random() FROM inner_values WHERE inner_values.i = outer_values.i HAVING true) IS NOT NULL +FROM outer_values +ORDER BY outer_values.i; +-- +ok +== +CREATE SEQUENCE having_effect_seq START 1; +-- +ok +== +SELECT outer_values.i, + (SELECT sum(inner_values.i) + FROM inner_values + WHERE inner_values.i = outer_values.i + HAVING nextval('having_effect_seq') > 0) +FROM outer_values +ORDER BY outer_values.i; +-- +ok +== +SELECT currval('having_effect_seq'); +-- +ok +== +SELECT (SELECT CAST(CASE WHEN sum(inner_values.i) IS NULL THEN 'invalid' ELSE '1' END AS INTEGER) + FROM inner_values + WHERE inner_values.i = outer_values.i) +FROM outer_values +WHERE outer_values.i = 2; +-- +ok +== +SELECT (SELECT sum(inner_values.i) + FROM inner_values + WHERE inner_values.i = outer_values.i + HAVING CAST('invalid' AS BOOLEAN)) +FROM outer_values +WHERE outer_values.i = 2; +-- +ok +== +SET disabled_optimizers='deliminator'; +-- +ok +== +EXPLAIN SELECT (SELECT avg(inner_values.i) * 0.2 + FROM inner_values + WHERE inner_values.i = outer_values.i + HAVING true) +FROM outer_values; +-- +ok +== +EXPLAIN SELECT (SELECT coalesce(avg(inner_values.i), 0) + FROM inner_values + WHERE inner_values.i = outer_values.i + HAVING true) +FROM outer_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_set_op.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_set_op.test index 5a40d67..a7ed780 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_set_op.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_set_op.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_correlated_set_op.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (SELECT SUM(x) FROM (SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT i1.i) t(x)) FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_side_effects.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_side_effects.test index 2f3af8a..35302b7 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_side_effects.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_side_effects.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_correlated_side_effects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(DISTINCT diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery.test index 74fac54..dc234e1 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (SELECT 42+i1.i) AS j FROM integers i1 ORDER BY i; @@ -51,6 +51,14 @@ select i, (select i1.i + i + i from generate_series(1, 100, 1) t(i) ORDER BY i D -- ok == +SELECT x, (SELECT count(*) FROM (SELECT v FROM generate_series(1, 100) t(v) WHERE v >= x LIMIT 9223372036854775807 OFFSET 1)) FROM (VALUES (3), (100)) t(x) ORDER BY x; +-- +ok +== +SELECT count(*) FROM (VALUES (3)) t(x) WHERE x IN (SELECT v FROM generate_series(1, 100) t(v) WHERE v >= x - 1 LIMIT 9223372036854775807 OFFSET 1); +-- +ok +== SELECT i, (SELECT i+i1.i FROM integers ORDER BY i NULLS LAST LIMIT 1) AS j FROM integers i1 ORDER BY i; -- ok diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_cte.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_cte.test index a7e41f2..bddbade 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_cte.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_cte.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_correlated_subquery_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (WITH i2 AS (SELECT 42+i1.i AS j) SELECT j FROM i2) AS j FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_where.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_where.test index 848a431..041d70c 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_where.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_subquery_where.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_correlated_subquery_where.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS FROM VALUES (1, 22), (1, 21), (2, 22) v(id, b); diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_window.test b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_window.test index 55748ff..e882056 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_correlated_window.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_correlated_window.test @@ -1,16 +1,8 @@ # source: test/sql/subquery/scalar/test_correlated_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SELECT i, (SELECT SUM(i + 1) OVER ()) FROM integers ORDER BY i --- -ok -== -SELECT i, (SELECT SUM((SELECT i + 1)) OVER ()) FROM integers ORDER BY i --- -ok -== SELECT i, (SELECT SUM((SELECT i + 1)) OVER () WHERE i>=2) FROM integers ORDER BY i -- ok diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_count_star_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_count_star_subquery.test index bf9d679..0d89178 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_count_star_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_count_star_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_count_star_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (SELECT i FROM integers i2 WHERE i=(SELECT SUM(i) FROM integers i2 WHERE i2.i>i1.i)) FROM integers i1 ORDER BY 1; @@ -43,3 +43,7 @@ SELECT i, (SELECT CASE WHEN (SELECT COUNT(*) FROM integers i2 WHERE i2.i>i1.i)=0 -- ok == +SELECT i, (SELECT COUNT(i2.*) FROM integers i2 WHERE i2.i>i1.i) FROM integers i1 ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_delete_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_delete_subquery.test index 1a0cafa..70a0511 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_delete_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_delete_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_delete_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(id INTEGER, i INTEGER) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_grouped_correlated_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_grouped_correlated_subquery.test index 68dde78..a316928 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_grouped_correlated_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_grouped_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_grouped_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_ProductSales (ColID int, Product_Category varchar(64), Product_Name varchar(64), TotalSales int); diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_issue_4216.test b/parser/testdata/corpus/sql/subquery/scalar/test_issue_4216.test index f812f6e..6a0b186 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_issue_4216.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_issue_4216.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_issue_4216.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x INT, y INT) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_issue_6136.test b/parser/testdata/corpus/sql/subquery/scalar/test_issue_6136.test index 55f71b2..7beb5ec 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_issue_6136.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_issue_6136.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_issue_6136.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table r as select * from values (1, 1, 'a', 'A'), (1, null, 'b', 'B'), (1, 2, 'c', 'C'), (2, null, 'd', 'D') t(ra, rb, x, y); diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_issue_6184.test b/parser/testdata/corpus/sql/subquery/scalar/test_issue_6184.test index b433a17..fc44d78 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_issue_6184.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_issue_6184.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_issue_6184.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(fuel_type VARCHAR, location_country VARCHAR); diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_issue_7079.test b/parser/testdata/corpus/sql/subquery/scalar/test_issue_7079.test index 9056332..423e8f4 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_issue_7079.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_issue_7079.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_issue_7079.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO array_rv(arr) AS ( diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_join_in_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_join_in_subquery.test index 4f0e7e6..67f471c 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_join_in_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_join_in_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_join_in_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS FROM VALUES (1, 22), (1, 21), (2, 22) v(id, test_value); diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_many_correlated_columns.test b/parser/testdata/corpus/sql/subquery/scalar/test_many_correlated_columns.test index 2a52256..c4b18b4 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_many_correlated_columns.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_many_correlated_columns.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_many_correlated_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test2 VALUES (11, 1, 'a'), (12, 1, 'b'), (13, 4, 'b') diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery.test index 2335de5..a35c64e 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_scalar_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1+(SELECT 1) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery_cte.test b/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery_cte.test index f357390..960b6b8 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery_cte.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_scalar_subquery_cte.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_scalar_subquery_cte.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1+(WITH cte AS (SELECT 1) SELECT * FROM cte) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_subquery_any_join.test b/parser/testdata/corpus/sql/subquery/scalar/test_subquery_any_join.test index 1848cb6..9051e56 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_subquery_any_join.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_subquery_any_join.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_subquery_any_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i IN (SELECT i1.i FROM (SELECT * FROM integers i1 WHERE i1.i=integers.i) i1 JOIN generate_series(1, 2, 1) tbl(i) ON i1.i=tbl.i) FROM integers ORDER BY i NULLS LAST; diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_tpcds_correlated_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_tpcds_correlated_subquery.test index fb5864e..116ee0d 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_tpcds_correlated_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_tpcds_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_tpcds_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE item(i_manufact INTEGER) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_scalar_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_scalar_subquery.test index 831c913..bb8ea2b 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_scalar_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_scalar_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_uncorrelated_scalar_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers WHERE i=(SELECT 1) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_varchar_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_varchar_subquery.test index 688ddc3..3889427 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_varchar_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_uncorrelated_varchar_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_uncorrelated_varchar_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE strings(v VARCHAR) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_unnest_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_unnest_subquery.test index f2097ed..098a263 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_unnest_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_unnest_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_unnest_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT UNNEST([1])) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_update_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_update_subquery.test index 81d6861..8955407 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_update_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_update_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_update_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers i1 SET i=(SELECT MAX(i) FROM integers WHERE i1.i<>i) diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_varchar_correlated_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_varchar_correlated_subquery.test index 3b3975a..530163a 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_varchar_correlated_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_varchar_correlated_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_varchar_correlated_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL IN (SELECT * FROM strings WHERE v=s1.v) FROM strings s1 ORDER BY v diff --git a/parser/testdata/corpus/sql/subquery/scalar/test_window_function_subquery.test b/parser/testdata/corpus/sql/subquery/scalar/test_window_function_subquery.test index 3bd07d5..33bf173 100644 --- a/parser/testdata/corpus/sql/subquery/scalar/test_window_function_subquery.test +++ b/parser/testdata/corpus/sql/subquery/scalar/test_window_function_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/scalar/test_window_function_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, (SELECT row_number() OVER (ORDER BY i) FROM integers WHERE i1.i=i) FROM integers i1 ORDER BY i; diff --git a/parser/testdata/corpus/sql/subquery/table/test_aliasing.test b/parser/testdata/corpus/sql/subquery/table/test_aliasing.test index 5467e16..338177d 100644 --- a/parser/testdata/corpus/sql/subquery/table/test_aliasing.test +++ b/parser/testdata/corpus/sql/subquery/table/test_aliasing.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/table/test_aliasing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a(i integer) diff --git a/parser/testdata/corpus/sql/subquery/table/test_subquery_union.test b/parser/testdata/corpus/sql/subquery/table/test_subquery_union.test index aa683c3..9e01d04 100644 --- a/parser/testdata/corpus/sql/subquery/table/test_subquery_union.test +++ b/parser/testdata/corpus/sql/subquery/table/test_subquery_union.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/table/test_subquery_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from (select 42) sq1 union all select * from (select 43) sq2; diff --git a/parser/testdata/corpus/sql/subquery/table/test_table_subquery.test b/parser/testdata/corpus/sql/subquery/table/test_table_subquery.test index 48d3af4..c84c9b5 100644 --- a/parser/testdata/corpus/sql/subquery/table/test_table_subquery.test +++ b/parser/testdata/corpus/sql/subquery/table/test_table_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/table/test_table_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (3, 4), (4, 5), (5, 6); diff --git a/parser/testdata/corpus/sql/subquery/table/test_unnamed_subquery.test b/parser/testdata/corpus/sql/subquery/table/test_unnamed_subquery.test index 23aeb03..db54894 100644 --- a/parser/testdata/corpus/sql/subquery/table/test_unnamed_subquery.test +++ b/parser/testdata/corpus/sql/subquery/table/test_unnamed_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/table/test_unnamed_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a FROM (SELECT 42 a) diff --git a/parser/testdata/corpus/sql/subquery/test_neumann.test b/parser/testdata/corpus/sql/subquery/test_neumann.test index bc4085e..2f457d6 100644 --- a/parser/testdata/corpus/sql/subquery/test_neumann.test +++ b/parser/testdata/corpus/sql/subquery/test_neumann.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/test_neumann.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s.name, e.course, e.grade FROM students s, exams e WHERE s.id=e.sid AND e.grade=(SELECT MAX(e2.grade) FROM exams e2 WHERE s.id=e2.sid) ORDER BY name, course; diff --git a/parser/testdata/corpus/sql/subquery/test_offset.test b/parser/testdata/corpus/sql/subquery/test_offset.test index fad9194..cf987fe 100644 --- a/parser/testdata/corpus/sql/subquery/test_offset.test +++ b/parser/testdata/corpus/sql/subquery/test_offset.test @@ -1,6 +1,6 @@ # source: test/sql/subquery/test_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT c0 OFFSET 1) FROM (VALUES(1)) c0; diff --git a/parser/testdata/corpus/sql/table_function/create_external_resource.test b/parser/testdata/corpus/sql/table_function/create_external_resource.test index 7e0c3bf..ab74ca2 100644 --- a/parser/testdata/corpus/sql/table_function/create_external_resource.test +++ b/parser/testdata/corpus/sql/table_function/create_external_resource.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/create_external_resource.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO mock_create(p) AS TABLE SELECT MAP {'id': 'r1'} AS handle; diff --git a/parser/testdata/corpus/sql/table_function/database_oid.test b/parser/testdata/corpus/sql/table_function/database_oid.test index 15678d5..ce65c73 100644 --- a/parser/testdata/corpus/sql/table_function/database_oid.test +++ b/parser/testdata/corpus/sql/table_function/database_oid.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/database_oid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE x (x INT); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_available_metrics.test b/parser/testdata/corpus/sql/table_function/duckdb_available_metrics.test index b138891..506e21d 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_available_metrics.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_available_metrics.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_available_metrics.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT metric_name, metric_type, description, unit diff --git a/parser/testdata/corpus/sql/table_function/duckdb_columns.test b/parser/testdata/corpus/sql/table_function/duckdb_columns.test index 67cd590..6a36ac9 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_columns.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_columns.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_columns(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_constraints.test b/parser/testdata/corpus/sql/table_function/duckdb_constraints.test index 9976c06..b6e39a6 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_constraints.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers(i int primary key, check (i < 10)); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_constraints_fk.test b/parser/testdata/corpus/sql/table_function/duckdb_constraints_fk.test index 2609529..098deb7 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_constraints_fk.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_constraints_fk.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_constraints_fk.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tf_1 ( diff --git a/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue11284.test b/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue11284.test index 130de58..daa6876 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue11284.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue11284.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_constraints_issue11284.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (i int primary key); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue12863.test b/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue12863.test index 1ec4bb6..11e9dc1 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue12863.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_constraints_issue12863.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_constraints_issue12863.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a (ID int PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_databases.test b/parser/testdata/corpus/sql/table_function/duckdb_databases.test index 77376ab..2021fd5 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_databases.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_databases.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_databases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_databases(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_dependencies.test b/parser/testdata/corpus/sql/table_function/duckdb_dependencies.test index 1eecf4a..60c982c 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_dependencies.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_dependencies.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_dependencies.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_dependencies(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_dialects.test b/parser/testdata/corpus/sql/table_function/duckdb_dialects.test index c5005cc..2944335 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_dialects.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_dialects.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_dialects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT dialect_name FROM duckdb_dialects() ORDER BY dialect_name; @@ -11,10 +11,6 @@ SELECT current_setting('current_dialect'); -- ok == -SET current_dialect = 'duckdb'; --- -ok -== SET current_dialect = 'missing'; -- ok diff --git a/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues.test b/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues.test index 8a9d709..d5c4549 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_eviction_queues.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO fudge() AS (20); @@ -30,7 +30,3 @@ SELECT SUM(length(s)) FROM t; -- ok == -SET memory_limit='4MB'; --- -ok -== diff --git a/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues_transactions.test b/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues_transactions.test index ca3f2ac..2f4da62 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues_transactions.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_eviction_queues_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_eviction_queues_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(i BIGINT, s VARCHAR); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_extensions.test b/parser/testdata/corpus/sql/table_function/duckdb_extensions.test index 18fc7d3..f50da2c 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_extensions.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_extensions.test @@ -1,12 +1,16 @@ # source: test/sql/table_function/duckdb_extensions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT aliases FROM duckdb_extensions() WHERE extension_name='postgres_scanner'; -- ok == +SELECT DISTINCT signature_key_fingerprint FROM duckdb_extensions() WHERE install_mode='STATICALLY_LINKED'; +-- +ok +== LOAD tpch; -- ok diff --git a/parser/testdata/corpus/sql/table_function/duckdb_functions_window.test b/parser/testdata/corpus/sql/table_function/duckdb_functions_window.test index 6076a0c..3d0d3fb 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_functions_window.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_functions_window.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_functions_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select function_name, parameters, parameter_types, function_type diff --git a/parser/testdata/corpus/sql/table_function/duckdb_indexes.test b/parser/testdata/corpus/sql/table_function/duckdb_indexes.test index de01b1a..11d6c38 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_indexes.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_indexes.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_indexes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_indexes(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_keywords.test b/parser/testdata/corpus/sql/table_function/duckdb_keywords.test index acee742..ba3eaeb 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_keywords.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_keywords.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_keywords.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_keywords(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_memory_convert_to_persistent.test b/parser/testdata/corpus/sql/table_function/duckdb_memory_convert_to_persistent.test index 92cd0ec..cd1679a 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_memory_convert_to_persistent.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_memory_convert_to_persistent.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_memory_convert_to_persistent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test as select range i from range(1_000_000); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_optimizers.test b/parser/testdata/corpus/sql/table_function/duckdb_optimizers.test index f460710..9f78ed6 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_optimizers.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_optimizers.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_optimizers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_optimizers(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_prepared_statements.test b/parser/testdata/corpus/sql/table_function/duckdb_prepared_statements.test index e6811db..bbda4cc 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_prepared_statements.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_prepared_statements.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_prepared_statements.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from duckdb_prepared_statements() order by name; diff --git a/parser/testdata/corpus/sql/table_function/duckdb_schemas.test b/parser/testdata/corpus/sql/table_function/duckdb_schemas.test index 89cc751..590c32a 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_schemas.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_schemas.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_schemas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM duckdb_schemas; diff --git a/parser/testdata/corpus/sql/table_function/duckdb_sequences.test b/parser/testdata/corpus/sql/table_function/duckdb_sequences.test index 2a4504b..05dca74 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_sequences.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_sequences.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_sequences.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM duckdb_sequences(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_settings.test b/parser/testdata/corpus/sql/table_function/duckdb_settings.test index e8d29f7..cf37354 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_settings.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_settings.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_settings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT name, value FROM duckdb_settings() WHERE name='default_null_order'; diff --git a/parser/testdata/corpus/sql/table_function/duckdb_tables.test b/parser/testdata/corpus/sql/table_function/duckdb_tables.test index f541b25..27fb079 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_tables.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_tables.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM duckdb_tables(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_types.test b/parser/testdata/corpus/sql/table_function/duckdb_types.test index 617700f..21f7132 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_types.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_types.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM duckdb_types(); diff --git a/parser/testdata/corpus/sql/table_function/duckdb_views.test b/parser/testdata/corpus/sql/table_function/duckdb_views.test index 892b1fc..2040ba3 100644 --- a/parser/testdata/corpus/sql/table_function/duckdb_views.test +++ b/parser/testdata/corpus/sql/table_function/duckdb_views.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/duckdb_views.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM duckdb_views; diff --git a/parser/testdata/corpus/sql/table_function/external_resource_discovery.test b/parser/testdata/corpus/sql/table_function/external_resource_discovery.test index 4e024d4..d7d9db4 100644 --- a/parser/testdata/corpus/sql/table_function/external_resource_discovery.test +++ b/parser/testdata/corpus/sql/table_function/external_resource_discovery.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/external_resource_discovery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO mock_list(opts) AS TABLE diff --git a/parser/testdata/corpus/sql/table_function/external_resource_discovery_error.test b/parser/testdata/corpus/sql/table_function/external_resource_discovery_error.test index 5157b73..5acaa20 100644 --- a/parser/testdata/corpus/sql/table_function/external_resource_discovery_error.test +++ b/parser/testdata/corpus/sql/table_function/external_resource_discovery_error.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/external_resource_discovery_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO nohandle_list(opts) AS TABLE SELECT 'ext-1' AS reference, 'running' AS state; diff --git a/parser/testdata/corpus/sql/table_function/external_resource_logging.test b/parser/testdata/corpus/sql/table_function/external_resource_logging.test index 32e2681..933a4f5 100644 --- a/parser/testdata/corpus/sql/table_function/external_resource_logging.test +++ b/parser/testdata/corpus/sql/table_function/external_resource_logging.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/external_resource_logging.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO mock_status(h) AS TABLE diff --git a/parser/testdata/corpus/sql/table_function/external_resource_types.test b/parser/testdata/corpus/sql/table_function/external_resource_types.test index 134484a..fa74b94 100644 --- a/parser/testdata/corpus/sql/table_function/external_resource_types.test +++ b/parser/testdata/corpus/sql/table_function/external_resource_types.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/external_resource_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT count(*) FROM duckdb_external_resource_types(); @@ -56,10 +56,6 @@ CALL register_external_resource_type('q@x', kind := 'catalog', create_function : -- ok == -CALL register_external_resource_type('q@x', kind := 'catalog', create_function := 'a.b.c.d'); --- -ok -== CALL register_external_resource_type('q@x', kind := 'catalog', create_function := '"unterminated'); -- ok @@ -76,7 +72,7 @@ CALL register_external_resource_type('q@x', kind := 'catalog', create_function : -- ok == -CALL register_external_resource_type('q@x', kind := 'catalog', create_function := 'c', destroy_function := 'a.b.c.d'); +CALL register_external_resource_type('q@x', kind := 'catalog', create_function := 'c', destroy_function := 'a..b'); -- ok == diff --git a/parser/testdata/corpus/sql/table_function/icu_range_timestamptz.test b/parser/testdata/corpus/sql/table_function/icu_range_timestamptz.test index 225537d..0b20d2d 100644 --- a/parser/testdata/corpus/sql/table_function/icu_range_timestamptz.test +++ b/parser/testdata/corpus/sql/table_function/icu_range_timestamptz.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/icu_range_timestamptz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT d FROM range(TIMESTAMPTZ '1992-01-01 00:00:00-08', TIMESTAMPTZ '1992-01-01 12:00:00-08', INTERVAL (1) HOUR) tbl(d) diff --git a/parser/testdata/corpus/sql/table_function/information_schema.test b/parser/testdata/corpus/sql/table_function/information_schema.test index 4db7d31..e9af331 100644 --- a/parser/testdata/corpus/sql/table_function/information_schema.test +++ b/parser/testdata/corpus/sql/table_function/information_schema.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/information_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; diff --git a/parser/testdata/corpus/sql/table_function/information_schema_fkey_constraint_names.test b/parser/testdata/corpus/sql/table_function/information_schema_fkey_constraint_names.test index 1edd46e..0cd3681 100644 --- a/parser/testdata/corpus/sql/table_function/information_schema_fkey_constraint_names.test +++ b/parser/testdata/corpus/sql/table_function/information_schema_fkey_constraint_names.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/information_schema_fkey_constraint_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select constraint_name diff --git a/parser/testdata/corpus/sql/table_function/information_schema_issue12867.test b/parser/testdata/corpus/sql/table_function/information_schema_issue12867.test index 7dad911..3a3659e 100644 --- a/parser/testdata/corpus/sql/table_function/information_schema_issue12867.test +++ b/parser/testdata/corpus/sql/table_function/information_schema_issue12867.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/information_schema_issue12867.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a (a1 int, a2 int, PRIMARY KEY (a1, a2)); diff --git a/parser/testdata/corpus/sql/table_function/information_schema_types.test b/parser/testdata/corpus/sql/table_function/information_schema_types.test index bc9e179..2332f62 100644 --- a/parser/testdata/corpus/sql/table_function/information_schema_types.test +++ b/parser/testdata/corpus/sql/table_function/information_schema_types.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/information_schema_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select table_name, column_name diff --git a/parser/testdata/corpus/sql/table_function/issue_25882.test b/parser/testdata/corpus/sql/table_function/issue_25882.test new file mode 100644 index 0000000..79edc0c --- /dev/null +++ b/parser/testdata/corpus/sql/table_function/issue_25882.test @@ -0,0 +1,9 @@ +# source: test/sql/table_function/issue_25882.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT size, length(content) > 0 FROM read_text('/proc/self/status'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/table_function/lateral_table_function.test b/parser/testdata/corpus/sql/table_function/lateral_table_function.test index b42f2eb..c34298e 100644 --- a/parser/testdata/corpus/sql/table_function/lateral_table_function.test +++ b/parser/testdata/corpus/sql/table_function/lateral_table_function.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/lateral_table_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM read_csv(thisishopefullyanonexistentfile) diff --git a/parser/testdata/corpus/sql/table_function/postgres_setof_compatibility.test b/parser/testdata/corpus/sql/table_function/postgres_setof_compatibility.test index 09792c6..e028afb 100644 --- a/parser/testdata/corpus/sql/table_function/postgres_setof_compatibility.test +++ b/parser/testdata/corpus/sql/table_function/postgres_setof_compatibility.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/postgres_setof_compatibility.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select i from generate_series(1, 2) i; diff --git a/parser/testdata/corpus/sql/table_function/range_cardinality_extremes.test b/parser/testdata/corpus/sql/table_function/range_cardinality_extremes.test new file mode 100644 index 0000000..d886229 --- /dev/null +++ b/parser/testdata/corpus/sql/table_function/range_cardinality_extremes.test @@ -0,0 +1,29 @@ +# source: test/sql/table_function/range_cardinality_extremes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) FROM range(TIMESTAMP '1992-01-01', TIMESTAMP '1992-12-31', INTERVAL '-1 MONTH') t1, range(3) t2; +-- +ok +== +SELECT count(*) FROM range(TIMESTAMP '1992-12-31', TIMESTAMP '1992-01-01', INTERVAL '1 MONTH') t1, range(3) t2; +-- +ok +== +SELECT count(*) FROM generate_series(TIMESTAMP '1992-12-31', TIMESTAMP '1992-01-01', INTERVAL '1 day') t1, range(3) t2; +-- +ok +== +EXPLAIN SELECT count(*) FROM range(-9223372036854775808, 9223372036854775807) t1, range(2) t2; +-- +ok +== +EXPLAIN SELECT count(*) FROM range(-9223372036854775808, 9223372036854775807) t1, range(-9223372036854775808, 9223372036854775807) t2; +-- +ok +== +SELECT count(*) FROM range(TIMESTAMP '1992-01-01', TIMESTAMP '1992-12-31', INTERVAL '1 MONTH') t1, range(3) t2; +-- +ok +== diff --git a/parser/testdata/corpus/sql/table_function/range_function_different_iterators.test b/parser/testdata/corpus/sql/table_function/range_function_different_iterators.test index 1ab900b..fef8b9e 100644 --- a/parser/testdata/corpus/sql/table_function/range_function_different_iterators.test +++ b/parser/testdata/corpus/sql/table_function/range_function_different_iterators.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/range_function_different_iterators.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from range(4,15,6); diff --git a/parser/testdata/corpus/sql/table_function/range_function_lateral.test b/parser/testdata/corpus/sql/table_function/range_function_lateral.test index 4a55225..0b99075 100644 --- a/parser/testdata/corpus/sql/table_function/range_function_lateral.test +++ b/parser/testdata/corpus/sql/table_function/range_function_lateral.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/range_function_lateral.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM range(1, NULL, 1); diff --git a/parser/testdata/corpus/sql/table_function/range_non_foldable.test b/parser/testdata/corpus/sql/table_function/range_non_foldable.test index 3796466..d0a3ec1 100644 --- a/parser/testdata/corpus/sql/table_function/range_non_foldable.test +++ b/parser/testdata/corpus/sql/table_function/range_non_foldable.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/range_non_foldable.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) diff --git a/parser/testdata/corpus/sql/table_function/range_timestamp.test b/parser/testdata/corpus/sql/table_function/range_timestamp.test index cc657fb..3b6456e 100644 --- a/parser/testdata/corpus/sql/table_function/range_timestamp.test +++ b/parser/testdata/corpus/sql/table_function/range_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/range_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT d::DATE FROM range(DATE '1992-01-01', DATE '1992-10-01', INTERVAL (1) MONTH) tbl(d) diff --git a/parser/testdata/corpus/sql/table_function/range_timestamp_lateral_empty.test b/parser/testdata/corpus/sql/table_function/range_timestamp_lateral_empty.test index 3505661..1c21d1b 100644 --- a/parser/testdata/corpus/sql/table_function/range_timestamp_lateral_empty.test +++ b/parser/testdata/corpus/sql/table_function/range_timestamp_lateral_empty.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/range_timestamp_lateral_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS diff --git a/parser/testdata/corpus/sql/table_function/read_text_and_blob.test b/parser/testdata/corpus/sql/table_function/read_text_and_blob.test index 9464d12..17668eb 100644 --- a/parser/testdata/corpus/sql/table_function/read_text_and_blob.test +++ b/parser/testdata/corpus/sql/table_function/read_text_and_blob.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/read_text_and_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM read_text('test/sql/table_function/files/*.txt'); diff --git a/parser/testdata/corpus/sql/table_function/register_external_resource.test b/parser/testdata/corpus/sql/table_function/register_external_resource.test index e5a9f4a..c4e7036 100644 --- a/parser/testdata/corpus/sql/table_function/register_external_resource.test +++ b/parser/testdata/corpus/sql/table_function/register_external_resource.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/register_external_resource.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL register_external_resource('mock@local', 'r1', MAP {'id': 'abc'}, diff --git a/parser/testdata/corpus/sql/table_function/sqlite_master.test b/parser/testdata/corpus/sql/table_function/sqlite_master.test index 2c289e0..2e5c1f2 100644 --- a/parser/testdata/corpus/sql/table_function/sqlite_master.test +++ b/parser/testdata/corpus/sql/table_function/sqlite_master.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/sqlite_master.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM sqlite_master; diff --git a/parser/testdata/corpus/sql/table_function/sqlite_master_connections.test b/parser/testdata/corpus/sql/table_function/sqlite_master_connections.test index a6b25f0..030c68c 100644 --- a/parser/testdata/corpus/sql/table_function/sqlite_master_connections.test +++ b/parser/testdata/corpus/sql/table_function/sqlite_master_connections.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/sqlite_master_connections.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP VIEW sqlite_master diff --git a/parser/testdata/corpus/sql/table_function/sqlite_master_quotes.test b/parser/testdata/corpus/sql/table_function/sqlite_master_quotes.test index 06de817..86cd0e9 100644 --- a/parser/testdata/corpus/sql/table_function/sqlite_master_quotes.test +++ b/parser/testdata/corpus/sql/table_function/sqlite_master_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/sqlite_master_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE "a b c"("d e" INTEGER, f INTEGER); diff --git a/parser/testdata/corpus/sql/table_function/table_function_positional_by_name.test b/parser/testdata/corpus/sql/table_function/table_function_positional_by_name.test new file mode 100644 index 0000000..4fd23b1 --- /dev/null +++ b/parser/testdata/corpus/sql/table_function/table_function_positional_by_name.test @@ -0,0 +1,25 @@ +# source: test/sql/table_function/table_function_positional_by_name.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM range(1, 5) +-- +ok +== +SELECT * FROM range(1, stop := 5) +-- +ok +== +SELECT * FROM range(col0 := 3) +-- +ok +== +CREATE TABLE t (a INTEGER, b VARCHAR) +-- +ok +== +SELECT name FROM pragma_table_info(table_name := 't') +-- +ok +== diff --git a/parser/testdata/corpus/sql/table_function/test_information_schema_columns.test b/parser/testdata/corpus/sql/table_function/test_information_schema_columns.test index 4d3744a..9c7da71 100644 --- a/parser/testdata/corpus/sql/table_function/test_information_schema_columns.test +++ b/parser/testdata/corpus/sql/table_function/test_information_schema_columns.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/test_information_schema_columns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE wide ( diff --git a/parser/testdata/corpus/sql/table_function/test_range_function.test b/parser/testdata/corpus/sql/table_function/test_range_function.test index 443abdf..34f6a2d 100644 --- a/parser/testdata/corpus/sql/table_function/test_range_function.test +++ b/parser/testdata/corpus/sql/table_function/test_range_function.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/test_range_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM range(0, 10, 1) @@ -23,6 +23,10 @@ SELECT * FROM generate_series(10, 0, -1) ORDER BY 1 ASC -- ok == +SELECT * FROM generate_series(5, 1, -1) LIMIT 4; +-- +ok +== SELECT * FROM range(0, -5, -1) -- ok diff --git a/parser/testdata/corpus/sql/table_function/test_repeat_function.test b/parser/testdata/corpus/sql/table_function/test_repeat_function.test index 7af3994..0b602a8 100644 --- a/parser/testdata/corpus/sql/table_function/test_repeat_function.test +++ b/parser/testdata/corpus/sql/table_function/test_repeat_function.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/test_repeat_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM repeat(0, 3) diff --git a/parser/testdata/corpus/sql/table_function/test_repeat_row_function.test b/parser/testdata/corpus/sql/table_function/test_repeat_row_function.test new file mode 100644 index 0000000..d6a7879 --- /dev/null +++ b/parser/testdata/corpus/sql/table_function/test_repeat_row_function.test @@ -0,0 +1,49 @@ +# source: test/sql/table_function/test_repeat_row_function.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT * FROM repeat_row(0, num_rows=3) +-- +ok +== +SELECT * FROM repeat_row(NULL, 1, "52", true, num_rows=2) +-- +ok +== +SELECT * FROM repeat_row('hello', num_rows=2) +-- +ok +== +SELECT * FROM repeat_row(1, num_rows=0) +-- +ok +== +SELECT * FROM repeat_row(1, num_rows=10000) +-- +ok +== +SELECT * FROM repeat_row(1) +-- +ok +== +SELECT * FROM repeat_row(num_rows=3) +-- +ok +== +SELECT * FROM repeat_row() +-- +ok +== +SELECT * FROM repeat_row(1, num_rows=NULL) +-- +ok +== +SELECT * FROM repeat_row(1, num_rows=-1) +-- +ok +== +SELECT * FROM repeat_row(1, num_rows=-9223372036854775808) +-- +ok +== diff --git a/parser/testdata/corpus/sql/table_function/test_table_function.test b/parser/testdata/corpus/sql/table_function/test_table_function.test index b2f91e0..b929440 100644 --- a/parser/testdata/corpus/sql/table_function/test_table_function.test +++ b/parser/testdata/corpus/sql/table_function/test_table_function.test @@ -1,6 +1,6 @@ # source: test/sql/table_function/test_table_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM pragma_table_info('integers'); diff --git a/parser/testdata/corpus/sql/table_function/warn_deprecated_identifier_conversion.test b/parser/testdata/corpus/sql/table_function/warn_deprecated_identifier_conversion.test index 353489d..fd98a19 100644 --- a/parser/testdata/corpus/sql/table_function/warn_deprecated_identifier_conversion.test +++ b/parser/testdata/corpus/sql/table_function/warn_deprecated_identifier_conversion.test @@ -1,25 +1,9 @@ # source: test/sql/table_function/warn_deprecated_identifier_conversion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SELECT count(*) FROM glob(no_such_file.csv); --- -ok -== -SELECT count(*) FROM glob('no_such_file.csv'); --- -ok -== -SET table_function_identifier_conversion='ENABLE_IMPLICIT_STRING'; --- -ok -== SET table_function_identifier_conversion='DISABLE_IMPLICIT_STRING'; -- ok == -RESET table_function_identifier_conversion; --- -ok -== diff --git a/parser/testdata/corpus/sql/timezone/disable_timestamptz_casts.test b/parser/testdata/corpus/sql/timezone/disable_timestamptz_casts.test index 02c9f69..8e23e43 100644 --- a/parser/testdata/corpus/sql/timezone/disable_timestamptz_casts.test +++ b/parser/testdata/corpus/sql/timezone/disable_timestamptz_casts.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/disable_timestamptz_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set disable_timestamptz_casts=false; diff --git a/parser/testdata/corpus/sql/timezone/icu_calendar_operations.test b/parser/testdata/corpus/sql/timezone/icu_calendar_operations.test index a917ea4..16a14a7 100644 --- a/parser/testdata/corpus/sql/timezone/icu_calendar_operations.test +++ b/parser/testdata/corpus/sql/timezone/icu_calendar_operations.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/icu_calendar_operations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar = '{cal}'; diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar.test index b1a370a..ff828a2 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT name FROM icu_calendar_names() diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_chinese.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_chinese.test index 7fb47ba..eefaa5b 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_chinese.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_chinese.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_chinese.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='chinese' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_coptic.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_coptic.test index d8f23d6..7b73a40 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_coptic.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_coptic.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_coptic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='coptic' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_hebrew.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_hebrew.test index e20f01f..c71cfce 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_hebrew.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_hebrew.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_hebrew.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='hebrew' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic.test index dc0870d..a7c668e 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_islamic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='islamic-civil' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic_observed.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic_observed.test index a81c422..a491228 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic_observed.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_islamic_observed.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_islamic_observed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='islamic' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_japanese.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_japanese.test index b06d189..5fcee19 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_japanese.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_japanese.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_japanese.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ts, era(ts), year(ts), month(ts), day(ts) FROM (VALUES diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_persian.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_persian.test index 9d2d9e7..e54aac0 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_persian.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_persian.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_persian.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='persian' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_range_error.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_range_error.test new file mode 100644 index 0000000..58789b7 --- /dev/null +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_range_error.test @@ -0,0 +1,117 @@ +# source: test/sql/timezone/test_icu_calendar_range_error.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET Calendar='chinese'; +-- +ok +== +SELECT era(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT year(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT month(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT day(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT decade(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT century(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT millennium(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT microsecond(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT millisecond(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT second(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT minute(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT hour(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT dayofweek(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT isodow(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT week(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT dayofyear(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT quarter(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT isoyear(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT timezone(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT julian(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT yearweek(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT dayofmonth(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT weekday(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT weekofyear(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT monthname(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT dayname(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00'); +-- +ok +== +SELECT year(TIMESTAMPTZ '2024-01-10 04:00:00+00') > 0; +-- +ok +== diff --git a/parser/testdata/corpus/sql/timezone/test_icu_calendar_systems.test b/parser/testdata/corpus/sql/timezone/test_icu_calendar_systems.test index b586d03..e4d6d77 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_calendar_systems.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_calendar_systems.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_calendar_systems.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET Calendar='buddhist' diff --git a/parser/testdata/corpus/sql/timezone/test_icu_casts.test b/parser/testdata/corpus/sql/timezone/test_icu_casts.test index a73363d..baefaf1 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_casts.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_casts.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tstzs AS @@ -45,6 +45,13 @@ SELECT TRY_CAST(TIMESTAMPTZ '2262-04-11 23:47:16.854776+00' AS TIMESTAMP_NS); -- ok == +SELECT t::VARCHAR AS formatted, epoch_ns(t) AS nanoseconds +FROM ( + VALUES ('1969-12-31 23:59:59.999999999+00'::TIMESTAMPTZ_NS) +) v(t); +-- +ok +== SELECT TRY_CAST(TIMESTAMPTZ '9999-01-01 00:00:00+00' AS TIMESTAMP_NS); -- ok diff --git a/parser/testdata/corpus/sql/timezone/test_icu_datetime_overflow.test b/parser/testdata/corpus/sql/timezone/test_icu_datetime_overflow.test index 8426de9..9859864 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_datetime_overflow.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_datetime_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_datetime_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '2000-01-01 00:00:00+00'::TIMESTAMPTZ - INTERVAL 2147483647 MONTH; @@ -27,10 +27,6 @@ SELECT date_add('1900-01-01 00:00:00+00'::TIMESTAMPTZ, INTERVAL (-2147483648) MO -- ok == -SET Calendar='chinese'; --- -ok -== SELECT date_part(['decade','timezone'], '294247-01-10 04:00:54.775806+00'::TIMESTAMPTZ); -- ok diff --git a/parser/testdata/corpus/sql/timezone/test_icu_datetime_sweep.test b/parser/testdata/corpus/sql/timezone/test_icu_datetime_sweep.test index 6363a92..5582a93 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_datetime_sweep.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_datetime_sweep.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_datetime_sweep.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH instants(ts) AS (VALUES diff --git a/parser/testdata/corpus/sql/timezone/test_icu_parse_time_zone_per_row.test b/parser/testdata/corpus/sql/timezone/test_icu_parse_time_zone_per_row.test new file mode 100644 index 0000000..032efb7 --- /dev/null +++ b/parser/testdata/corpus/sql/timezone/test_icu_parse_time_zone_per_row.test @@ -0,0 +1,41 @@ +# source: test/sql/timezone/test_icu_parse_time_zone_per_row.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT s::TIMESTAMPTZ FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00'), (3, '2024-01-01 00:00:00 America/New_York'), (4, '2024-01-01 00:00:00')) t(i, s) ORDER BY i +-- +ok +== +SELECT s::TIMESTAMPTZ_NS FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00')) t(i, s) ORDER BY i +-- +ok +== +SELECT strptime(s, ['%Y-%m-%d %H:%M:%S %Z', '%Y-%m-%d %H:%M:%S']) FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00')) t(i, s) ORDER BY i +-- +ok +== +SELECT try_strptime(s, ['%Y-%m-%d %H:%M:%S %Z', '%Y-%m-%d %H:%M:%S']) FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00'), (3, '2024-01-01 00:00:00 Not/AZone')) t(i, s) ORDER BY i +-- +ok +== +COPY (SELECT * FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00')) t(i, ts)) TO '__TEST_DIR__/tz_rows.csv' (HEADER) +-- +ok +== +SELECT * FROM read_csv('__TEST_DIR__/tz_rows.csv', columns={'i': 'INTEGER', 'ts': 'TIMESTAMPTZ'}) ORDER BY i +-- +ok +== +SET TimeZone='Europe/Amsterdam' +-- +ok +== +SELECT s::TIMESTAMPTZ FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00')) t(i, s) ORDER BY i +-- +ok +== +SELECT '2024-01-01 00:00:00 Not/AZone'::TIMESTAMPTZ +-- +ok +== diff --git a/parser/testdata/corpus/sql/timezone/test_icu_timezone.test b/parser/testdata/corpus/sql/timezone/test_icu_timezone.test index 8212795..4bf98f3 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_timezone.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_timezone.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_timezone.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET TimeZone = 'Europe/Duck'; @@ -125,6 +125,14 @@ WHERE ts > '2001-02-16 18:38:40'::TIMESTAMP -- ok == +SELECT '2019-01-01 00:00:00.123456789+00'::TIMESTAMPTZ_NS AT TIME ZONE 'UTC'; +-- +ok +== +SELECT '2019-01-01 00:00:00.123456789'::TIMESTAMP_NS AT TIME ZONE 'UTC' t; +-- +ok +== set TimeZone = '{utc}'; -- ok @@ -293,3 +301,19 @@ select '2026-12-01'::TIMESTAMPTZ; -- ok == +set timezone='America/Yellowknife'; +-- +ok +== +select '2026-11-02'::TIMESTAMPTZ; +-- +ok +== +set timezone='America/Winnipeg'; +-- +ok +== +select '2026-11-02'::timestamptz +-- +ok +== diff --git a/parser/testdata/corpus/sql/timezone/test_icu_timezone_edge_cases.test b/parser/testdata/corpus/sql/timezone/test_icu_timezone_edge_cases.test index be66814..3227f7a 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_timezone_edge_cases.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_timezone_edge_cases.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_timezone_edge_cases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ts, ts::TIMESTAMPTZ FROM (VALUES @@ -49,10 +49,6 @@ SELECT ts, ts::TIMESTAMPTZ, date_part('timezone', ts::TIMESTAMPTZ) FROM (VALUES -- ok == -SET TimeZone='Europe/Amsterdam' --- -ok -== SELECT ts, ts::TIMESTAMPTZ FROM (VALUES ('1800-01-01 00:00:00'::TIMESTAMP), ('1900-01-01 00:00:00'), ('1937-06-30 23:59:59'), ('1937-07-01 00:00:00')) t(ts) diff --git a/parser/testdata/corpus/sql/timezone/test_icu_timezone_far_future.test b/parser/testdata/corpus/sql/timezone/test_icu_timezone_far_future.test index 52583d2..8d2fd34 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_timezone_far_future.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_timezone_far_future.test @@ -1,12 +1,8 @@ # source: test/sql/timezone/test_icu_timezone_far_future.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET TimeZone='America/New_York'; --- -ok -== SELECT '2038-01-19 03:14:07+00'::TIMESTAMPTZ; -- ok diff --git a/parser/testdata/corpus/sql/timezone/test_icu_timezone_properties.test b/parser/testdata/corpus/sql/timezone/test_icu_timezone_properties.test index 096e92e..52cac81 100644 --- a/parser/testdata/corpus/sql/timezone/test_icu_timezone_properties.test +++ b/parser/testdata/corpus/sql/timezone/test_icu_timezone_properties.test @@ -1,6 +1,6 @@ # source: test/sql/timezone/test_icu_timezone_properties.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE windows AS diff --git a/parser/testdata/corpus/sql/timezone/timestamptz_ns_to_date.test b/parser/testdata/corpus/sql/timezone/timestamptz_ns_to_date.test new file mode 100644 index 0000000..1777624 --- /dev/null +++ b/parser/testdata/corpus/sql/timezone/timestamptz_ns_to_date.test @@ -0,0 +1,29 @@ +# source: test/sql/timezone/timestamptz_ns_to_date.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST(CAST('2020-01-02 03:04:05.123456789+00' AS TIMESTAMPTZ_NS) AS DATE), CAST(CAST('2020-01-02 03:04:05.123456+00' AS TIMESTAMPTZ) AS DATE) +-- +ok +== +SELECT CAST(CAST('2020-01-01 23:59:59.999999999-08' AS TIMESTAMPTZ_NS) AS DATE) +-- +ok +== +SELECT CAST(CAST('1969-12-31 23:59:59.999999999+00' AS TIMESTAMPTZ_NS) AS DATE) +-- +ok +== +SELECT CAST('infinity'::TIMESTAMPTZ_NS AS DATE), CAST('-infinity'::TIMESTAMPTZ_NS AS DATE), CAST(NULL::TIMESTAMPTZ_NS AS DATE) +-- +ok +== +SELECT CAST(CAST('2020-01-02 03:04:05.123456789+00' AS TIMESTAMPTZ_NS) AS DATE) +-- +ok +== +SET disable_timestamptz_casts=true +-- +ok +== diff --git a/parser/testdata/corpus/sql/topn/test_top_n.test b/parser/testdata/corpus/sql/topn/test_top_n.test index 8ac68c9..b524bf7 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n.test +++ b/parser/testdata/corpus/sql/topn/test_top_n.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (22), (2), (7); @@ -35,3 +35,7 @@ SELECT b FROM test ORDER BY b OFFSET 10; -- ok == +EXPLAIN SELECT b FROM test ORDER BY b LIMIT 6000; +-- +ok +== diff --git a/parser/testdata/corpus/sql/topn/test_top_n_distinct_row_group_pruner.test b/parser/testdata/corpus/sql/topn/test_top_n_distinct_row_group_pruner.test index bbc1eb1..bbdb4c2 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_distinct_row_group_pruner.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_distinct_row_group_pruner.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_distinct_row_group_pruner.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/top_n_distinct_row_group_pruner_data.duckdb' AS db (ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/topn/test_top_n_lists.test b/parser/testdata/corpus/sql/topn/test_top_n_lists.test index 627ec97..b1a40c6 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_lists.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_lists.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_lists.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT [i] l FROM range(1000) tbl(i) UNION ALL SELECT NULL l FROM range(3) diff --git a/parser/testdata/corpus/sql/topn/test_top_n_medium.test b/parser/testdata/corpus/sql/topn/test_top_n_medium.test index c8ce203..22d52bd 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_medium.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_medium.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_medium.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT i, i % 1000 j FROM range(1000000) tbl(i) diff --git a/parser/testdata/corpus/sql/topn/test_top_n_nested_struct.test b/parser/testdata/corpus/sql/topn/test_top_n_nested_struct.test index c82adc3..54705b0 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_nested_struct.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_nested_struct.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_nested_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE nested_struct(cik BIGINT, entityName VARCHAR, a STRUCT(b STRUCT(c INT, d INT), c STRUCT(e INT, f INT))); diff --git a/parser/testdata/corpus/sql/topn/test_top_n_nulls_first.test b/parser/testdata/corpus/sql/topn/test_top_n_nulls_first.test index 6feb394..3a28164 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_nulls_first.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_nulls_first.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_nulls_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM integers ORDER BY i NULLS FIRST LIMIT 2 diff --git a/parser/testdata/corpus/sql/topn/test_top_n_nulls_first_row_group_reorderer_edge_cases.test b/parser/testdata/corpus/sql/topn/test_top_n_nulls_first_row_group_reorderer_edge_cases.test index d7e81b9..784263a 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_nulls_first_row_group_reorderer_edge_cases.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_nulls_first_row_group_reorderer_edge_cases.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_nulls_first_row_group_reorderer_edge_cases.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET threads TO 1 diff --git a/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner.test b/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner.test index f719e26..f401dd0 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_nulls_row_group_pruner.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS diff --git a/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner_extensive.test b/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner_extensive.test index a8324c9..427fd8e 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner_extensive.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_nulls_row_group_pruner_extensive.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_nulls_row_group_pruner_extensive.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/top_n_nulls_row_group_pruner_extensive_data.duckdb' AS db (ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/topn/test_top_n_nulls_small.test b/parser/testdata/corpus/sql/topn/test_top_n_nulls_small.test index 772f649..b20b503 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_nulls_small.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_nulls_small.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_nulls_small.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT i, i j FROM range(1000) tbl(i) UNION ALL SELECT NULL i, range j FROM range(1000) diff --git a/parser/testdata/corpus/sql/topn/test_top_n_offset_no_limit_pruner.test b/parser/testdata/corpus/sql/topn/test_top_n_offset_no_limit_pruner.test index bf0c990..f6e1084 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_offset_no_limit_pruner.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_offset_no_limit_pruner.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_offset_no_limit_pruner.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT range AS id FROM range(300000) diff --git a/parser/testdata/corpus/sql/topn/test_top_n_structs.test b/parser/testdata/corpus/sql/topn/test_top_n_structs.test index 7e10e93..1fb7f04 100644 --- a/parser/testdata/corpus/sql/topn/test_top_n_structs.test +++ b/parser/testdata/corpus/sql/topn/test_top_n_structs.test @@ -1,6 +1,6 @@ # source: test/sql/topn/test_top_n_structs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT {'i': i} l FROM range(1000) tbl(i) UNION ALL SELECT NULL l FROM range(3) diff --git a/parser/testdata/corpus/sql/topn/top_n_materialization.test b/parser/testdata/corpus/sql/topn/top_n_materialization.test index 5acc0f1..234a8e4 100644 --- a/parser/testdata/corpus/sql/topn/top_n_materialization.test +++ b/parser/testdata/corpus/sql/topn/top_n_materialization.test @@ -1,6 +1,6 @@ # source: test/sql/topn/top_n_materialization.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT i, i + 1 AS j, i + 2 AS k, -i AS l FROM range(10) t(i); diff --git a/parser/testdata/corpus/sql/topn/top_n_pruning.test b/parser/testdata/corpus/sql/topn/top_n_pruning.test index 088ba86..f891647 100644 --- a/parser/testdata/corpus/sql/topn/top_n_pruning.test +++ b/parser/testdata/corpus/sql/topn/top_n_pruning.test @@ -1,6 +1,6 @@ # source: test/sql/topn/top_n_pruning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/top_n_hard_limit.duckdb' AS db (ROW_GROUP_SIZE 2048) diff --git a/parser/testdata/corpus/sql/topn/topn_dynamic_filter_cast.test b/parser/testdata/corpus/sql/topn/topn_dynamic_filter_cast.test new file mode 100644 index 0000000..e78112c --- /dev/null +++ b/parser/testdata/corpus/sql/topn/topn_dynamic_filter_cast.test @@ -0,0 +1,129 @@ +# source: test/sql/topn/topn_dynamic_filter_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET threads TO 1; +-- +ok +== +CREATE TABLE t AS SELECT i AS k FROM range(0, 100000) t(i); +-- +ok +== +EXPLAIN ANALYZE SELECT * FROM t ORDER BY k LIMIT 10; +-- +ok +== +SELECT k FROM t ORDER BY k LIMIT 3; +-- +ok +== +CREATE TABLE tint AS SELECT i::INTEGER AS k FROM range(0, 204800) t(i); +-- +ok +== +EXPLAIN ANALYZE SELECT CAST(k AS BIGINT) AS x, count(*) FROM tint GROUP BY CAST(k AS BIGINT) ORDER BY x LIMIT 10; +-- +ok +== +SELECT CAST(k AS BIGINT) AS x, count(*) FROM tint GROUP BY CAST(k AS BIGINT) ORDER BY x LIMIT 3; +-- +ok +== +EXPLAIN ANALYZE SELECT CAST(k AS BIGINT) AS x FROM tint ORDER BY x LIMIT 5; +-- +ok +== +SELECT CAST(k AS BIGINT) AS x FROM tint ORDER BY x LIMIT 3; +-- +ok +== +CREATE TABLE ta AS SELECT i::INTEGER AS k FROM range(0, 100000) t(i); +-- +ok +== +CREATE TABLE tb AS SELECT (100000 + i)::INTEGER AS k FROM range(100000, 200000) t(i); +-- +ok +== +EXPLAIN ANALYZE SELECT k FROM (SELECT CAST(k AS BIGINT) AS k FROM ta UNION ALL SELECT CAST(k AS BIGINT) AS k FROM tb) st ORDER BY k LIMIT 5; +-- +ok +== +SELECT k FROM (SELECT CAST(k AS BIGINT) AS k FROM ta UNION ALL SELECT CAST(k AS BIGINT) AS k FROM tb) st ORDER BY k LIMIT 3; +-- +ok +== +EXPLAIN SELECT TRY_CAST(k AS TINYINT) AS x FROM tint ORDER BY x LIMIT 5; +-- +ok +== +SELECT TRY_CAST(k AS TINYINT) AS x FROM tint ORDER BY x LIMIT 3; +-- +ok +== +CREATE TABLE ttry(k INTEGER); +-- +ok +== +INSERT INTO ttry SELECT 0 FROM range(122880); +-- +ok +== +INSERT INTO ttry SELECT 1000 FROM range(122880); +-- +ok +== +SELECT TRY_CAST(k AS TINYINT) AS x FROM ttry ORDER BY x NULLS FIRST LIMIT 3; +-- +ok +== +CREATE TABLE tnull AS SELECT CASE WHEN i % 1000 = 0 THEN NULL ELSE i::INTEGER END AS k FROM range(0, 100000) t(i); +-- +ok +== +EXPLAIN ANALYZE SELECT CAST(k AS BIGINT) AS x FROM tnull ORDER BY x NULLS FIRST LIMIT 5; +-- +ok +== +SELECT CAST(k AS BIGINT) AS x FROM tnull ORDER BY x NULLS FIRST LIMIT 3; +-- +ok +== +SELECT CAST(k AS BIGINT) AS x FROM tnull ORDER BY x NULLS LAST LIMIT 3; +-- +ok +== +EXPLAIN ANALYZE SELECT CAST(k AS BIGINT) AS x FROM tint ORDER BY x DESC LIMIT 5; +-- +ok +== +SELECT CAST(k AS BIGINT) AS x FROM tint ORDER BY x DESC LIMIT 3; +-- +ok +== +EXPLAIN SELECT CAST(k AS VARCHAR) AS x FROM tint ORDER BY x LIMIT 5; +-- +ok +== +SELECT CAST(k AS VARCHAR) AS x FROM tint ORDER BY x LIMIT 3; +-- +ok +== +EXPLAIN ANALYZE SELECT CAST(k AS UBIGINT) AS x FROM tint ORDER BY x LIMIT 5; +-- +ok +== +SELECT CAST(k AS UBIGINT) AS x FROM tint ORDER BY x LIMIT 3; +-- +ok +== +EXPLAIN SELECT CAST(k AS TINYINT) AS x FROM tint ORDER BY x NULLS LAST LIMIT 5; +-- +ok +== +SELECT CAST(k AS TINYINT) AS x FROM tint ORDER BY x NULLS LAST LIMIT 5; +-- +ok +== diff --git a/parser/testdata/corpus/sql/topn/topn_nulls_first.test b/parser/testdata/corpus/sql/topn/topn_nulls_first.test index 8e04313..f63f214 100644 --- a/parser/testdata/corpus/sql/topn/topn_nulls_first.test +++ b/parser/testdata/corpus/sql/topn/topn_nulls_first.test @@ -1,6 +1,6 @@ # source: test/sql/topn/topn_nulls_first.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE topn_nulls(v INTEGER) diff --git a/parser/testdata/corpus/sql/topn/tpcds_q14_topn.test b/parser/testdata/corpus/sql/topn/tpcds_q14_topn.test index 801cfda..1a8a7b0 100644 --- a/parser/testdata/corpus/sql/topn/tpcds_q14_topn.test +++ b/parser/testdata/corpus/sql/topn/tpcds_q14_topn.test @@ -1,6 +1,6 @@ # source: test/sql/topn/tpcds_q14_topn.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE final(channel VARCHAR, i_brand_id INTEGER, i_class_id INTEGER, i_category_id INTEGER, sum_sales DECIMAL(38,2), number_sales HUGEINT); diff --git a/parser/testdata/corpus/sql/topn/tpcds_q59_topn.test b/parser/testdata/corpus/sql/topn/tpcds_q59_topn.test index f82b9b6..7c7476b 100644 --- a/parser/testdata/corpus/sql/topn/tpcds_q59_topn.test +++ b/parser/testdata/corpus/sql/topn/tpcds_q59_topn.test @@ -1,6 +1,6 @@ # source: test/sql/topn/tpcds_q59_topn.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE final(s_store_name1 VARCHAR, s_store_id1 VARCHAR, d_week_seq1 INTEGER, "sun_sales1 / sun_sales2" DOUBLE, "mon_sales1 / mon_sales2" DOUBLE, "tue_sales1 / tue_sales2" DOUBLE, "wed_sales1 / wed_sales2" DOUBLE, "thu_sales1 / thu_sales2" DOUBLE, "fri_sales1 / fri_sales2" DOUBLE, "sat_sales1 / sat_sales2" DOUBLE); diff --git a/parser/testdata/corpus/sql/tpcds/dsdgen_readonly.test b/parser/testdata/corpus/sql/tpcds/dsdgen_readonly.test index 12db7f4..da5d5b6 100644 --- a/parser/testdata/corpus/sql/tpcds/dsdgen_readonly.test +++ b/parser/testdata/corpus/sql/tpcds/dsdgen_readonly.test @@ -1,6 +1,6 @@ # source: test/sql/tpcds/dsdgen_readonly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL dsdgen(sf=0); diff --git a/parser/testdata/corpus/sql/tpcds/dsdgen_sync_scan.test b/parser/testdata/corpus/sql/tpcds/dsdgen_sync_scan.test index b1074dc..0d0f455 100644 --- a/parser/testdata/corpus/sql/tpcds/dsdgen_sync_scan.test +++ b/parser/testdata/corpus/sql/tpcds/dsdgen_sync_scan.test @@ -1,6 +1,6 @@ # source: test/sql/tpcds/dsdgen_sync_scan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_physical_table_scan_execution_strategy=SYNCHRONOUS; diff --git a/parser/testdata/corpus/sql/tpcds/tpcds_sf0.test b/parser/testdata/corpus/sql/tpcds/tpcds_sf0.test index 050def5..2f63a4f 100644 --- a/parser/testdata/corpus/sql/tpcds/tpcds_sf0.test +++ b/parser/testdata/corpus/sql/tpcds/tpcds_sf0.test @@ -1,6 +1,6 @@ # source: test/sql/tpcds/tpcds_sf0.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL dsdgen(sf=0) diff --git a/parser/testdata/corpus/sql/tpch/dbgen_readonly.test b/parser/testdata/corpus/sql/tpch/dbgen_readonly.test index d9eae44..50b9095 100644 --- a/parser/testdata/corpus/sql/tpch/dbgen_readonly.test +++ b/parser/testdata/corpus/sql/tpch/dbgen_readonly.test @@ -1,6 +1,6 @@ # source: test/sql/tpch/dbgen_readonly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL dbgen(sf=0); diff --git a/parser/testdata/corpus/sql/tpch/dbgen_reference_values.test b/parser/testdata/corpus/sql/tpch/dbgen_reference_values.test new file mode 100644 index 0000000..5401b3c --- /dev/null +++ b/parser/testdata/corpus/sql/tpch/dbgen_reference_values.test @@ -0,0 +1,35 @@ +# source: test/sql/tpch/dbgen_reference_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT c_custkey, + c_address = 'IVhzIApeRb ot,c,E', + c_comment = 'to the even, regular platelets. regular, ironic epitaphs nag e', + c_comment = 'l accounts. blithely ironic theodolites integrate boldly: caref' +FROM customer WHERE c_custkey <= 2 ORDER BY c_custkey; +-- +ok +== +SELECT s_suppkey, + s_address = ' N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ', + s_comment = 'each slyly above the careful' +FROM supplier WHERE s_suppkey = 1; +-- +ok +== +SELECT o_orderkey, o_comment = 'nstructions sleep furiously among ' +FROM orders WHERE o_orderkey = 1; +-- +ok +== +SELECT c_count, custdist FROM ( + SELECT c_count, count(*) AS custdist FROM ( + SELECT c_custkey, count(o_orderkey) AS c_count + FROM customer LEFT OUTER JOIN orders ON c_custkey = o_custkey AND o_comment NOT LIKE '%special%requests%' + GROUP BY c_custkey) c_orders + GROUP BY c_count) +ORDER BY custdist DESC, c_count DESC LIMIT 3; +-- +ok +== diff --git a/parser/testdata/corpus/sql/tpch/tpch_sf0.test b/parser/testdata/corpus/sql/tpch/tpch_sf0.test index 4dcdd86..588a3ff 100644 --- a/parser/testdata/corpus/sql/tpch/tpch_sf0.test +++ b/parser/testdata/corpus/sql/tpch/tpch_sf0.test @@ -1,6 +1,6 @@ # source: test/sql/tpch/tpch_sf0.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA tpch({i}) diff --git a/parser/testdata/corpus/sql/transactions/aborted_transaction_commit.test b/parser/testdata/corpus/sql/transactions/aborted_transaction_commit.test index cea9218..53142d0 100644 --- a/parser/testdata/corpus/sql/transactions/aborted_transaction_commit.test +++ b/parser/testdata/corpus/sql/transactions/aborted_transaction_commit.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/aborted_transaction_commit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE keys(i INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/transactions/commit_revert_failure.test b/parser/testdata/corpus/sql/transactions/commit_revert_failure.test index 8f0d3eb..7390ec0 100644 --- a/parser/testdata/corpus/sql/transactions/commit_revert_failure.test +++ b/parser/testdata/corpus/sql/transactions/commit_revert_failure.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/commit_revert_failure.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET debug_force_commit_failure=true; @@ -31,6 +31,30 @@ INSERT INTO t VALUES (5); -- ok == +CREATE TABLE indexed_t(a INTEGER PRIMARY KEY, b INTEGER) +-- +ok +== +INSERT INTO indexed_t VALUES (1, 10), (2, 20), (3, 30) +-- +ok +== +CREATE INDEX indexed_t_b ON indexed_t(b) +-- +ok +== +UPDATE indexed_t SET b = 99 WHERE a = 2 +-- +ok +== +SELECT a, b FROM indexed_t ORDER BY a +-- +ok +== +SELECT a FROM indexed_t WHERE b = 20 +-- +ok +== SET debug_force_commit_revert_failure=true; -- ok diff --git a/parser/testdata/corpus/sql/transactions/concurrent_drop_index.test b/parser/testdata/corpus/sql/transactions/concurrent_drop_index.test index 562b3a9..83f3246 100644 --- a/parser/testdata/corpus/sql/transactions/concurrent_drop_index.test +++ b/parser/testdata/corpus/sql/transactions/concurrent_drop_index.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/concurrent_drop_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER, val INTEGER) diff --git a/parser/testdata/corpus/sql/transactions/concurrent_drop_table.test b/parser/testdata/corpus/sql/transactions/concurrent_drop_table.test index ea3fcab..7274164 100644 --- a/parser/testdata/corpus/sql/transactions/concurrent_drop_table.test +++ b/parser/testdata/corpus/sql/transactions/concurrent_drop_table.test @@ -1,16 +1,12 @@ # source: test/sql/transactions/concurrent_drop_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id INTEGER PRIMARY KEY) -- ok == -INSERT INTO t SELECT range FROM range(10) --- -ok -== SELECT id FROM t WHERE id = 5 -- ok @@ -23,10 +19,6 @@ SELECT used_blocks > 1 FROM pragma_database_size() -- ok == -DROP TABLE t --- -ok -== EXPLAIN ANALYZE SELECT id FROM t WHERE id = 5 -- ok diff --git a/parser/testdata/corpus/sql/transactions/conflict_drop_then_delete.test b/parser/testdata/corpus/sql/transactions/conflict_drop_then_delete.test index 9baff94..5cc06ed 100644 --- a/parser/testdata/corpus/sql/transactions/conflict_drop_then_delete.test +++ b/parser/testdata/corpus/sql/transactions/conflict_drop_then_delete.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/conflict_drop_then_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table original_table as from range(10) select 1 as col diff --git a/parser/testdata/corpus/sql/transactions/conflict_rename_append.test b/parser/testdata/corpus/sql/transactions/conflict_rename_append.test index efa9368..21421e4 100644 --- a/parser/testdata/corpus/sql/transactions/conflict_rename_append.test +++ b/parser/testdata/corpus/sql/transactions/conflict_rename_append.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/conflict_rename_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into original_table diff --git a/parser/testdata/corpus/sql/transactions/count_star_transactions.test b/parser/testdata/corpus/sql/transactions/count_star_transactions.test index da78bf2..179fbdc 100644 --- a/parser/testdata/corpus/sql/transactions/count_star_transactions.test +++ b/parser/testdata/corpus/sql/transactions/count_star_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/count_star_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (id INT); diff --git a/parser/testdata/corpus/sql/transactions/delete_and_drop_in_same_transaction.test b/parser/testdata/corpus/sql/transactions/delete_and_drop_in_same_transaction.test index d2e73ff..7252022 100644 --- a/parser/testdata/corpus/sql/transactions/delete_and_drop_in_same_transaction.test +++ b/parser/testdata/corpus/sql/transactions/delete_and_drop_in_same_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/delete_and_drop_in_same_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE SampleTable AS diff --git a/parser/testdata/corpus/sql/transactions/delete_index_lookup_transactions.test b/parser/testdata/corpus/sql/transactions/delete_index_lookup_transactions.test index 0b4ff38..d6a8a12 100644 --- a/parser/testdata/corpus/sql/transactions/delete_index_lookup_transactions.test +++ b/parser/testdata/corpus/sql/transactions/delete_index_lookup_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/delete_index_lookup_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl VALUES (5, 'con2 payload'); diff --git a/parser/testdata/corpus/sql/transactions/min_max_deletes.test b/parser/testdata/corpus/sql/transactions/min_max_deletes.test index 9307b22..eb45e80 100644 --- a/parser/testdata/corpus/sql/transactions/min_max_deletes.test +++ b/parser/testdata/corpus/sql/transactions/min_max_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/min_max_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT min(id), max(id) FROM tbl diff --git a/parser/testdata/corpus/sql/transactions/min_max_updates.test b/parser/testdata/corpus/sql/transactions/min_max_updates.test index b01a08a..7368893 100644 --- a/parser/testdata/corpus/sql/transactions/min_max_updates.test +++ b/parser/testdata/corpus/sql/transactions/min_max_updates.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/min_max_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl FROM range(10); diff --git a/parser/testdata/corpus/sql/transactions/revert_commit_index_corruption_drop_table.test b/parser/testdata/corpus/sql/transactions/revert_commit_index_corruption_drop_table.test index ad7c987..d5eda2b 100644 --- a/parser/testdata/corpus/sql/transactions/revert_commit_index_corruption_drop_table.test +++ b/parser/testdata/corpus/sql/transactions/revert_commit_index_corruption_drop_table.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/revert_commit_index_corruption_drop_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER PRIMARY KEY, val INTEGER) diff --git a/parser/testdata/corpus/sql/transactions/rollback_drop.test b/parser/testdata/corpus/sql/transactions/rollback_drop.test index 68c89c7..d3cd060 100644 --- a/parser/testdata/corpus/sql/transactions/rollback_drop.test +++ b/parser/testdata/corpus/sql/transactions/rollback_drop.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/rollback_drop.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP TABLE original_table diff --git a/parser/testdata/corpus/sql/transactions/rollback_drop_column.test b/parser/testdata/corpus/sql/transactions/rollback_drop_column.test index ec762fd..278f49a 100644 --- a/parser/testdata/corpus/sql/transactions/rollback_drop_column.test +++ b/parser/testdata/corpus/sql/transactions/rollback_drop_column.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/rollback_drop_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER, val INTEGER, extra VARCHAR) diff --git a/parser/testdata/corpus/sql/transactions/rollback_drop_index.test b/parser/testdata/corpus/sql/transactions/rollback_drop_index.test index e242e30..0009e0d 100644 --- a/parser/testdata/corpus/sql/transactions/rollback_drop_index.test +++ b/parser/testdata/corpus/sql/transactions/rollback_drop_index.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/rollback_drop_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT index_name FROM duckdb_indexes WHERE index_name = 'idx1' diff --git a/parser/testdata/corpus/sql/transactions/rollback_drop_table.test b/parser/testdata/corpus/sql/transactions/rollback_drop_table.test index b12dae5..b2bf2c0 100644 --- a/parser/testdata/corpus/sql/transactions/rollback_drop_table.test +++ b/parser/testdata/corpus/sql/transactions/rollback_drop_table.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/rollback_drop_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER) diff --git a/parser/testdata/corpus/sql/transactions/rollback_drop_table_with_delete.test b/parser/testdata/corpus/sql/transactions/rollback_drop_table_with_delete.test index c16a9c8..1809a75 100644 --- a/parser/testdata/corpus/sql/transactions/rollback_drop_table_with_delete.test +++ b/parser/testdata/corpus/sql/transactions/rollback_drop_table_with_delete.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/rollback_drop_table_with_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER PRIMARY KEY) diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/invalidation_policy_is_respected_by_preprocessor.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/invalidation_policy_is_respected_by_preprocessor.test index 1966ef0..b9a3aee 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/invalidation_policy_is_respected_by_preprocessor.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/invalidation_policy_is_respected_by_preprocessor.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/invalidation_policy_is_respected_by_preprocessor.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t AS SELECT range::INT AS id FROM range(10); diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional.test index 1119b63..34c557c 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/multistatement_is_transactional.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE t ADD COLUMN d TIMESTAMP WITH TIME ZONE DEFAULT non_existent_function(); diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_after_BEGIN_chained_COMMIT.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_after_BEGIN_chained_COMMIT.test index 4383a27..600296c 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_after_BEGIN_chained_COMMIT.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_after_BEGIN_chained_COMMIT.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/multistatement_is_transactional_after_BEGIN_chained_COMMIT.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE t ADD COLUMN d TIMESTAMP WITH TIME ZONE DEFAULT non_existent_function(); COMMIT; diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN.test index 6ede296..3d16176 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit BEGIN TRANSACTION; ALTER TABLE t ADD COLUMN d TIMESTAMP WITH TIME ZONE DEFAULT non_existent_function(); diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN_body_COMMIT.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN_body_COMMIT.test index dde8b85..d041c92 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN_body_COMMIT.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN_body_COMMIT.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_BEGIN_body_COMMIT.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit BEGIN TRANSACTION; ALTER TABLE t ADD COLUMN d TIMESTAMP WITH TIME ZONE DEFAULT non_existent_function(); COMMIT; diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA.test index b6b27c0..dd1686f 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA disable_checkpoint_on_shutdown; ALTER TABLE t ADD COLUMN d TIMESTAMP WITH TIME ZONE DEFAULT non_existent_function(); diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA_BEGIN.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA_BEGIN.test index 1704c84..b0d9185 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA_BEGIN.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA_BEGIN.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/multistatement_is_transactional_chained_PRAGMA_BEGIN.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA disable_checkpoint_on_shutdown; BEGIN TRANSACTION; ALTER TABLE t ADD COLUMN d TIMESTAMP WITH TIME ZONE DEFAULT non_existent_function(); diff --git a/parser/testdata/corpus/sql/transactions/statement-preprocessor/pivot_is_handled_correctly.test b/parser/testdata/corpus/sql/transactions/statement-preprocessor/pivot_is_handled_correctly.test index e745dd4..699bbf3 100644 --- a/parser/testdata/corpus/sql/transactions/statement-preprocessor/pivot_is_handled_correctly.test +++ b/parser/testdata/corpus/sql/transactions/statement-preprocessor/pivot_is_handled_correctly.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/statement-preprocessor/pivot_is_handled_correctly.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PIVOT VALUES(1,2),(1,3) x(y,z) ON x USING FIRST(y) ORDER BY 1; diff --git a/parser/testdata/corpus/sql/transactions/test_alter_preserves_delete_indexes.test b/parser/testdata/corpus/sql/transactions/test_alter_preserves_delete_indexes.test new file mode 100644 index 0000000..b86a622 --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/test_alter_preserves_delete_indexes.test @@ -0,0 +1,81 @@ +# source: test/sql/transactions/test_alter_preserves_delete_indexes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t_add (id INTEGER PRIMARY KEY, val INTEGER) +-- +ok +== +INSERT INTO t_add VALUES (1, 10), (2, 20) +-- +ok +== +DELETE FROM t_add WHERE id = 1 +-- +ok +== +ALTER TABLE t_add ADD COLUMN extra INTEGER DEFAULT 0 +-- +ok +== +INSERT INTO t_add VALUES (1, 30, 0) +-- +ok +== +SELECT * FROM t_add ORDER BY id +-- +ok +== +INSERT INTO t_add VALUES (2, 40, 0) +-- +ok +== +CREATE TABLE t_drop (id INTEGER PRIMARY KEY, val INTEGER, extra INTEGER) +-- +ok +== +INSERT INTO t_drop VALUES (1, 10, 0), (2, 20, 0) +-- +ok +== +DELETE FROM t_drop WHERE id = 1 +-- +ok +== +ALTER TABLE t_drop DROP COLUMN extra +-- +ok +== +INSERT INTO t_drop VALUES (1, 30) +-- +ok +== +SELECT * FROM t_drop ORDER BY id +-- +ok +== +CREATE TABLE t_type (id INTEGER PRIMARY KEY, val INTEGER) +-- +ok +== +INSERT INTO t_type VALUES (1, 10), (2, 20) +-- +ok +== +DELETE FROM t_type WHERE id = 1 +-- +ok +== +ALTER TABLE t_type ALTER val TYPE BIGINT +-- +ok +== +INSERT INTO t_type VALUES (1, 30) +-- +ok +== +SELECT * FROM t_type ORDER BY id +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict.test b/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict.test index 043c398..98e2e34 100644 --- a/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict.test +++ b/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_alter_sequence_ownership_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (id INT); diff --git a/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict2.test b/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict2.test index 83099dd..3ea582e 100644 --- a/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict2.test +++ b/parser/testdata/corpus/sql/transactions/test_alter_sequence_ownership_conflict2.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_alter_sequence_ownership_conflict2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 ( diff --git a/parser/testdata/corpus/sql/transactions/test_basic_transactions.test b/parser/testdata/corpus/sql/transactions/test_basic_transactions.test index e0abb1a..b4f000d 100644 --- a/parser/testdata/corpus/sql/transactions/test_basic_transactions.test +++ b/parser/testdata/corpus/sql/transactions/test_basic_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_basic_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers2(i INTEGER) diff --git a/parser/testdata/corpus/sql/transactions/test_cardinality_estimation_uncommitted.test b/parser/testdata/corpus/sql/transactions/test_cardinality_estimation_uncommitted.test index 712eaf9..594a6af 100644 --- a/parser/testdata/corpus/sql/transactions/test_cardinality_estimation_uncommitted.test +++ b/parser/testdata/corpus/sql/transactions/test_cardinality_estimation_uncommitted.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_cardinality_estimation_uncommitted.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t1 SELECT range, range FROM range(10000) diff --git a/parser/testdata/corpus/sql/transactions/test_commit_cleanup_oom.test b/parser/testdata/corpus/sql/transactions/test_commit_cleanup_oom.test new file mode 100644 index 0000000..1257eb2 --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/test_commit_cleanup_oom.test @@ -0,0 +1,37 @@ +# source: test/sql/transactions/test_commit_cleanup_oom.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_skip_checkpoint_on_commit = true; +-- +ok +== +SET temp_directory = '{TEST_DIR}/tmp_cleanup_oom'; +-- +ok +== +SET memory_limit = '4MB'; +-- +ok +== +CREATE TABLE t (id INT, s VARCHAR); +-- +ok +== +INSERT INTO t SELECT range, repeat('a', 100) FROM range(5000); +-- +ok +== +UPDATE t SET s = repeat('b', 100); +-- +ok +== +SET memory_limit = '1.5MB'; +-- +ok +== +SELECT count(*) FROM t WHERE s = repeat('b', 100); +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/test_commit_cleanup_oom_index_retry.test b/parser/testdata/corpus/sql/transactions/test_commit_cleanup_oom_index_retry.test new file mode 100644 index 0000000..b4a7cb5 --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/test_commit_cleanup_oom_index_retry.test @@ -0,0 +1,49 @@ +# source: test/sql/transactions/test_commit_cleanup_oom_index_retry.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET temp_directory = '{TEST_DIR}/tmp_cleanup_oom_index_retry'; +-- +ok +== +SET memory_limit = '6MB'; +-- +ok +== +CREATE TABLE d (id INT PRIMARY KEY); +-- +ok +== +INSERT INTO d SELECT range FROM range(10); +-- +ok +== +DELETE FROM d WHERE id < 5; +-- +ok +== +SELECT count(*) FROM d; +-- +ok +== +SET memory_limit = '3.3MB'; +-- +ok +== +INSERT INTO d VALUES (100); +-- +ok +== +SELECT list(id ORDER BY id) FROM d; +-- +ok +== +INSERT INTO d SELECT range FROM range(5); +-- +ok +== +INSERT INTO d VALUES (7); +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/test_create_drop_conflict.test b/parser/testdata/corpus/sql/transactions/test_create_drop_conflict.test index c7aa2aa..60161ca 100644 --- a/parser/testdata/corpus/sql/transactions/test_create_drop_conflict.test +++ b/parser/testdata/corpus/sql/transactions/test_create_drop_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_create_drop_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA foo; diff --git a/parser/testdata/corpus/sql/transactions/test_create_drop_conflict_variation1.test b/parser/testdata/corpus/sql/transactions/test_create_drop_conflict_variation1.test index b4911bd..f1606a8 100644 --- a/parser/testdata/corpus/sql/transactions/test_create_drop_conflict_variation1.test +++ b/parser/testdata/corpus/sql/transactions/test_create_drop_conflict_variation1.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_create_drop_conflict_variation1.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * from foo.bar; diff --git a/parser/testdata/corpus/sql/transactions/test_ddl_after_dml.test b/parser/testdata/corpus/sql/transactions/test_ddl_after_dml.test index 311d3bd..2ac798b 100644 --- a/parser/testdata/corpus/sql/transactions/test_ddl_after_dml.test +++ b/parser/testdata/corpus/sql/transactions/test_ddl_after_dml.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_ddl_after_dml.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INT) @@ -35,10 +35,6 @@ select * from t1; -- ok == -PRAGMA wal_autocheckpoint='1TB' --- -ok -== CREATE TABLE t2 (id INT) -- ok diff --git a/parser/testdata/corpus/sql/transactions/test_from_update_conflict.test b/parser/testdata/corpus/sql/transactions/test_from_update_conflict.test index e898053..8ffe93c 100644 --- a/parser/testdata/corpus/sql/transactions/test_from_update_conflict.test +++ b/parser/testdata/corpus/sql/transactions/test_from_update_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_from_update_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test AS SELECT i AS a FROM range (2048, 5000, 1) t1(i) diff --git a/parser/testdata/corpus/sql/transactions/test_index_abort.test b/parser/testdata/corpus/sql/transactions/test_index_abort.test index 201c27c..90d5642 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_abort.test +++ b/parser/testdata/corpus/sql/transactions/test_index_abort.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_abort.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 1), (2, 2), (3, 3) diff --git a/parser/testdata/corpus/sql/transactions/test_index_delete_cleanup_non_main_storage.test b/parser/testdata/corpus/sql/transactions/test_index_delete_cleanup_non_main_storage.test index f07df38..6563a82 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_delete_cleanup_non_main_storage.test +++ b/parser/testdata/corpus/sql/transactions/test_index_delete_cleanup_non_main_storage.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_delete_cleanup_non_main_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET index_scan_percentage=1.0 diff --git a/parser/testdata/corpus/sql/transactions/test_index_huge_aborted_append.test b/parser/testdata/corpus/sql/transactions/test_index_huge_aborted_append.test index dc09d7a..fb7652b 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_huge_aborted_append.test +++ b/parser/testdata/corpus/sql/transactions/test_index_huge_aborted_append.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_huge_aborted_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER PRIMARY KEY); diff --git a/parser/testdata/corpus/sql/transactions/test_index_large_aborted_append.test b/parser/testdata/corpus/sql/transactions/test_index_large_aborted_append.test index 170051d..1e1a002 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_large_aborted_append.test +++ b/parser/testdata/corpus/sql/transactions/test_index_large_aborted_append.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_large_aborted_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(i INTEGER UNIQUE); diff --git a/parser/testdata/corpus/sql/transactions/test_index_local_update.test b/parser/testdata/corpus/sql/transactions/test_index_local_update.test index 6cf7afc..bc00bd3 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_local_update.test +++ b/parser/testdata/corpus/sql/transactions/test_index_local_update.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_local_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (4) diff --git a/parser/testdata/corpus/sql/transactions/test_index_pending_delete.test b/parser/testdata/corpus/sql/transactions/test_index_pending_delete.test index 41a5ee4..a65f3e5 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_pending_delete.test +++ b/parser/testdata/corpus/sql/transactions/test_index_pending_delete.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_pending_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM integers WHERE i=1 diff --git a/parser/testdata/corpus/sql/transactions/test_index_pending_update.test b/parser/testdata/corpus/sql/transactions/test_index_pending_update.test index 11bb410..0ed6f9f 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_pending_update.test +++ b/parser/testdata/corpus/sql/transactions/test_index_pending_update.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_pending_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i=4 WHERE i=1 diff --git a/parser/testdata/corpus/sql/transactions/test_index_rollback_flushed_data.test b/parser/testdata/corpus/sql/transactions/test_index_rollback_flushed_data.test index 0aaacfa..4425cad 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_rollback_flushed_data.test +++ b/parser/testdata/corpus/sql/transactions/test_index_rollback_flushed_data.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_rollback_flushed_data.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers SELECT range FROM range(2, 4097, 1); diff --git a/parser/testdata/corpus/sql/transactions/test_index_transaction_local.test b/parser/testdata/corpus/sql/transactions/test_index_transaction_local.test index 700512e..2b1d663 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_transaction_local.test +++ b/parser/testdata/corpus/sql/transactions/test_index_transaction_local.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_transaction_local.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i=1 WHERE i=4 diff --git a/parser/testdata/corpus/sql/transactions/test_index_versioned_deletes.test b/parser/testdata/corpus/sql/transactions/test_index_versioned_deletes.test index 2a1cf42..ee83d35 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_versioned_deletes.test +++ b/parser/testdata/corpus/sql/transactions/test_index_versioned_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_versioned_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i FROM integers WHERE i=1 diff --git a/parser/testdata/corpus/sql/transactions/test_index_versioned_updates.test b/parser/testdata/corpus/sql/transactions/test_index_versioned_updates.test index 6f16291..70ffac8 100644 --- a/parser/testdata/corpus/sql/transactions/test_index_versioned_updates.test +++ b/parser/testdata/corpus/sql/transactions/test_index_versioned_updates.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_index_versioned_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET j=4 WHERE i=1 diff --git a/parser/testdata/corpus/sql/transactions/test_multi_transaction_append.test b/parser/testdata/corpus/sql/transactions/test_multi_transaction_append.test index 2e08efd..1937933 100644 --- a/parser/testdata/corpus/sql/transactions/test_multi_transaction_append.test +++ b/parser/testdata/corpus/sql/transactions/test_multi_transaction_append.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_multi_transaction_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 3) diff --git a/parser/testdata/corpus/sql/transactions/test_multi_version.test b/parser/testdata/corpus/sql/transactions/test_multi_version.test index e6b5824..0109563 100644 --- a/parser/testdata/corpus/sql/transactions/test_multi_version.test +++ b/parser/testdata/corpus/sql/transactions/test_multi_version.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_multi_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i=5 WHERE i=1; diff --git a/parser/testdata/corpus/sql/transactions/test_multi_version_large.test b/parser/testdata/corpus/sql/transactions/test_multi_version_large.test index 6bc0225..e53d7b4 100644 --- a/parser/testdata/corpus/sql/transactions/test_multi_version_large.test +++ b/parser/testdata/corpus/sql/transactions/test_multi_version_large.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_multi_version_large.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1), (2), (3), (4); diff --git a/parser/testdata/corpus/sql/transactions/test_null_version.test b/parser/testdata/corpus/sql/transactions/test_null_version.test index 4d2c9bb..c6cc359 100644 --- a/parser/testdata/corpus/sql/transactions/test_null_version.test +++ b/parser/testdata/corpus/sql/transactions/test_null_version.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_null_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (NULL, 3) diff --git a/parser/testdata/corpus/sql/transactions/test_parser_error_transaction_invalidation.test b/parser/testdata/corpus/sql/transactions/test_parser_error_transaction_invalidation.test new file mode 100644 index 0000000..b3f65bc --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/test_parser_error_transaction_invalidation.test @@ -0,0 +1,29 @@ +# source: test/sql/transactions/test_parser_error_transaction_invalidation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET current_transaction_invalidation_policy='ALL_ERRORS_INVALIDATE_TRANSACTION'; +-- +ok +== +create table audit(i int); +-- +ok +== +insert into audit values (21); +-- +ok +== +inser into audit_backup from audit; +-- +error: Parser Error: syntax error at or near "inser" +== +insert into audit values (22); +-- +ok +== +select count(*) from audit; +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/test_read_only_transaction_temp_writes.test b/parser/testdata/corpus/sql/transactions/test_read_only_transaction_temp_writes.test new file mode 100644 index 0000000..557bb47 --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/test_read_only_transaction_temp_writes.test @@ -0,0 +1,141 @@ +# source: test/sql/transactions/test_read_only_transaction_temp_writes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE p(i INTEGER) +-- +ok +== +INSERT INTO p VALUES (7) +-- +ok +== +CREATE SEQUENCE ps +-- +ok +== +CREATE TEMP TABLE t(i INTEGER PRIMARY KEY) +-- +ok +== +INSERT INTO t VALUES (1), (2), (3) +-- +ok +== +UPDATE t SET i = i + 10 WHERE i = 3 +-- +ok +== +DELETE FROM t WHERE i = 1 +-- +ok +== +INSERT OR REPLACE INTO t VALUES (2) +-- +ok +== +ALTER TABLE t RENAME COLUMN i TO k +-- +ok +== +CREATE INDEX t_k ON t(k) +-- +ok +== +CREATE TEMP VIEW v AS SELECT k FROM t +-- +ok +== +SELECT k FROM v ORDER BY k +-- +ok +== +CREATE TEMP TABLE snapshot AS SELECT i FROM p +-- +ok +== +INSERT INTO snapshot SELECT i + 1 FROM p +-- +ok +== +SELECT i FROM snapshot ORDER BY i +-- +ok +== +CREATE TEMP TABLE tr(i INTEGER) +-- +ok +== +CREATE TEMP TABLE audit(msg VARCHAR) +-- +ok +== +CREATE TRIGGER trg AFTER INSERT ON tr FOR EACH STATEMENT INSERT INTO audit VALUES ('fired') +-- +ok +== +INSERT INTO tr VALUES (1) +-- +ok +== +SELECT msg FROM audit +-- +ok +== +CREATE TEMP SEQUENCE s +-- +ok +== +SELECT nextval('s'), nextval('s') +-- +ok +== +SELECT setval('s', 10) +-- +ok +== +SELECT currval('s') +-- +ok +== +DROP SEQUENCE s +-- +ok +== +DROP VIEW v +-- +ok +== +DROP INDEX t_k +-- +ok +== +DROP TRIGGER trg ON tr +-- +ok +== +INSERT INTO p VALUES (1) +-- +ok +== +SELECT nextval('ps') +-- +ok +== +CREATE TEMP TABLE c AS SELECT range i FROM range(3) +-- +ok +== +CREATE TEMP SEQUENCE cs +-- +ok +== +SELECT nextval('cs') +-- +ok +== +SELECT sum(i), nextval('cs') FROM c +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/test_read_only_transactions.test b/parser/testdata/corpus/sql/transactions/test_read_only_transactions.test index 698a7e3..1d16ebf 100644 --- a/parser/testdata/corpus/sql/transactions/test_read_only_transactions.test +++ b/parser/testdata/corpus/sql/transactions/test_read_only_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_read_only_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES (48) diff --git a/parser/testdata/corpus/sql/transactions/test_stacked_schema_change.test b/parser/testdata/corpus/sql/transactions/test_stacked_schema_change.test index dbc1cc2..364f756 100644 --- a/parser/testdata/corpus/sql/transactions/test_stacked_schema_change.test +++ b/parser/testdata/corpus/sql/transactions/test_stacked_schema_change.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_stacked_schema_change.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES (44) diff --git a/parser/testdata/corpus/sql/transactions/test_transaction_abort.test b/parser/testdata/corpus/sql/transactions/test_transaction_abort.test index 2abcf31..a8e1dc8 100644 --- a/parser/testdata/corpus/sql/transactions/test_transaction_abort.test +++ b/parser/testdata/corpus/sql/transactions/test_transaction_abort.test @@ -1,11 +1,11 @@ # source: test/sql/transactions/test_transaction_abort.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELEC 42 -- -error: Parser Error: syntax error at or near "42" +error: Parser Error: syntax error at or near "SELEC" == SELECT * FROM nonexistanttable -- diff --git a/parser/testdata/corpus/sql/transactions/test_transaction_local_add.test b/parser/testdata/corpus/sql/transactions/test_transaction_local_add.test index 4002957..f69a5ad 100644 --- a/parser/testdata/corpus/sql/transactions/test_transaction_local_add.test +++ b/parser/testdata/corpus/sql/transactions/test_transaction_local_add.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_transaction_local_add.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE integers ADD COLUMN k INTEGER DEFAULT 4 diff --git a/parser/testdata/corpus/sql/transactions/test_transaction_local_alter_type.test b/parser/testdata/corpus/sql/transactions/test_transaction_local_alter_type.test index 3dcf211..75d0296 100644 --- a/parser/testdata/corpus/sql/transactions/test_transaction_local_alter_type.test +++ b/parser/testdata/corpus/sql/transactions/test_transaction_local_alter_type.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_transaction_local_alter_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE integers ALTER j TYPE BIGINT diff --git a/parser/testdata/corpus/sql/transactions/test_transaction_local_data.test b/parser/testdata/corpus/sql/transactions/test_transaction_local_data.test index 91f0ebd..53ae333 100644 --- a/parser/testdata/corpus/sql/transactions/test_transaction_local_data.test +++ b/parser/testdata/corpus/sql/transactions/test_transaction_local_data.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_transaction_local_data.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1, 3), (2, 3) diff --git a/parser/testdata/corpus/sql/transactions/test_transaction_local_drop.test b/parser/testdata/corpus/sql/transactions/test_transaction_local_drop.test index 1d04207..a9242f1 100644 --- a/parser/testdata/corpus/sql/transactions/test_transaction_local_drop.test +++ b/parser/testdata/corpus/sql/transactions/test_transaction_local_drop.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_transaction_local_drop.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ALTER TABLE integers DROP COLUMN j diff --git a/parser/testdata/corpus/sql/transactions/test_transaction_local_unique_ops.test b/parser/testdata/corpus/sql/transactions/test_transaction_local_unique_ops.test index e9098c7..9f7c6d7 100644 --- a/parser/testdata/corpus/sql/transactions/test_transaction_local_unique_ops.test +++ b/parser/testdata/corpus/sql/transactions/test_transaction_local_unique_ops.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/test_transaction_local_unique_ops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE integers SET i=1 WHERE i=2 diff --git a/parser/testdata/corpus/sql/transactions/test_validity_append_rollback.test b/parser/testdata/corpus/sql/transactions/test_validity_append_rollback.test new file mode 100644 index 0000000..9883622 --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/test_validity_append_rollback.test @@ -0,0 +1,41 @@ +# source: test/sql/transactions/test_validity_append_rollback.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(id INTEGER PRIMARY KEY, v INTEGER); +-- +ok +== +CREATE TABLE pos(fname VARCHAR, off BIGINT); +-- +ok +== +INSERT INTO t VALUES (1,101),(2,102); +-- +ok +== +INSERT INTO t VALUES (1,201),(3,203); +-- +ok +== +INSERT INTO pos VALUES ('a',1); +-- +ok +== +INSERT INTO pos VALUES ('b',2); +-- +ok +== +SELECT * FROM pos ORDER BY fname; +-- +ok +== +INSERT INTO t VALUES (4,104); +-- +ok +== +INSERT INTO t VALUES (5,105); +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/transaction_insert_delete_chunks.test b/parser/testdata/corpus/sql/transactions/transaction_insert_delete_chunks.test index d83e575..9af4b1f 100644 --- a/parser/testdata/corpus/sql/transactions/transaction_insert_delete_chunks.test +++ b/parser/testdata/corpus/sql/transactions/transaction_insert_delete_chunks.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/transaction_insert_delete_chunks.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers FROM range(1000); diff --git a/parser/testdata/corpus/sql/transactions/transaction_insert_mixed_deletes.test b/parser/testdata/corpus/sql/transactions/transaction_insert_mixed_deletes.test index da4bbd6..027bf7f 100644 --- a/parser/testdata/corpus/sql/transactions/transaction_insert_mixed_deletes.test +++ b/parser/testdata/corpus/sql/transactions/transaction_insert_mixed_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/transaction_insert_mixed_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers FROM range(1000,3000); diff --git a/parser/testdata/corpus/sql/transactions/txid_current.test b/parser/testdata/corpus/sql/transactions/txid_current.test new file mode 100644 index 0000000..bdf4ad0 --- /dev/null +++ b/parser/testdata/corpus/sql/transactions/txid_current.test @@ -0,0 +1,49 @@ +# source: test/sql/transactions/txid_current.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(txid_current()), txid_current() = current_transaction_id(); +-- +ok +== +SET VARIABLE current_txid = txid_current(); +-- +ok +== +SELECT txid_current() = getvariable('current_txid'); +-- +ok +== +PREPARE txid AS SELECT txid_current() = getvariable('current_txid'); +-- +ok +== +EXECUTE txid; +-- +ok +== +ATTACH ':memory:' AS txid_first; +-- +ok +== +ATTACH ':memory:' AS txid_second; +-- +ok +== +USE txid_first; +-- +ok +== +USE txid_second; +-- +ok +== +SELECT txid_current() = getvariable('current_txid'), txid_current() = current_transaction_id(); +-- +ok +== +SELECT count(DISTINCT txid_current()), bool_and(txid_current() = getvariable('current_txid')) FROM range(5000); +-- +ok +== diff --git a/parser/testdata/corpus/sql/transactions/types/test_hugeint_transactions.test b/parser/testdata/corpus/sql/transactions/types/test_hugeint_transactions.test index eb1a881..fb6869e 100644 --- a/parser/testdata/corpus/sql/transactions/types/test_hugeint_transactions.test +++ b/parser/testdata/corpus/sql/transactions/types/test_hugeint_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/types/test_hugeint_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO hugeints VALUES (100::HUGEINT), (1023819078293589341789412412), (42); diff --git a/parser/testdata/corpus/sql/transactions/types/test_interval_transactions.test b/parser/testdata/corpus/sql/transactions/types/test_interval_transactions.test index 8a36377..13487a9 100644 --- a/parser/testdata/corpus/sql/transactions/types/test_interval_transactions.test +++ b/parser/testdata/corpus/sql/transactions/types/test_interval_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/types/test_interval_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO interval VALUES (INTERVAL '20' DAY), (INTERVAL '1' YEAR), (INTERVAL '1' MONTH); diff --git a/parser/testdata/corpus/sql/transactions/types/test_uhugeint_transactions.test b/parser/testdata/corpus/sql/transactions/types/test_uhugeint_transactions.test index de9698f..defec50 100644 --- a/parser/testdata/corpus/sql/transactions/types/test_uhugeint_transactions.test +++ b/parser/testdata/corpus/sql/transactions/types/test_uhugeint_transactions.test @@ -1,6 +1,6 @@ # source: test/sql/transactions/types/test_uhugeint_transactions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO uhugeints VALUES (100::UHUGEINT), (1023819078293589341789412412), (42); diff --git a/parser/testdata/corpus/sql/trigger/create_trigger_catalog.test b/parser/testdata/corpus/sql/trigger/create_trigger_catalog.test index edd9c4c..213e0e2 100644 --- a/parser/testdata/corpus/sql/trigger/create_trigger_catalog.test +++ b/parser/testdata/corpus/sql/trigger/create_trigger_catalog.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/create_trigger_catalog.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER, data VARCHAR); @@ -95,7 +95,7 @@ SELECT trigger_name, sql FROM duckdb_triggers() WHERE trigger_name = 'insert_sel -- ok == -DROP TABLE log_table; +DROP TABLE log_table CASCADE; -- ok == diff --git a/parser/testdata/corpus/sql/trigger/create_trigger_parse.test b/parser/testdata/corpus/sql/trigger/create_trigger_parse.test index 01ed772..780e11e 100644 --- a/parser/testdata/corpus/sql/trigger/create_trigger_parse.test +++ b/parser/testdata/corpus/sql/trigger/create_trigger_parse.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/create_trigger_parse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER my_trigger AFTER INSERT ON my_table INSERT INTO log_table VALUES (1); diff --git a/parser/testdata/corpus/sql/trigger/create_trigger_wal.test b/parser/testdata/corpus/sql/trigger/create_trigger_wal.test index fee70d5..ff46d91 100644 --- a/parser/testdata/corpus/sql/trigger/create_trigger_wal.test +++ b/parser/testdata/corpus/sql/trigger/create_trigger_wal.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/create_trigger_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/create_trigger_wal.db' AS triggerdb (STORAGE_VERSION 'v2.0.0'); @@ -35,3 +35,63 @@ SELECT trigger_name, for_each, columns FROM duckdb_triggers() WHERE trigger_name -- ok == +CREATE TABLE t3 (a INTEGER, b INTEGER, c INTEGER); +-- +ok +== +CREATE TABLE audit3 (x INTEGER); +-- +ok +== +CREATE TRIGGER multi_col_trigger AFTER UPDATE OF b, c ON t3 INSERT INTO audit3 VALUES (1); +-- +ok +== +ALTER TABLE t3 RENAME COLUMN b TO b2; +-- +ok +== +SELECT trigger_name, columns FROM duckdb_triggers() WHERE trigger_name = 'multi_col_trigger'; +-- +ok +== +ALTER TABLE t3 RENAME COLUMN c TO c2; +-- +ok +== +ALTER TABLE t3 RENAME COLUMN a TO a2; +-- +ok +== +CREATE TABLE audit2 (x INTEGER); +-- +ok +== +CREATE TRIGGER rename_trigger AFTER UPDATE OF j ON t2 INSERT INTO audit2 VALUES (1); +-- +ok +== +INSERT INTO t2 VALUES (0, 0); +-- +ok +== +ALTER TABLE t2 RENAME COLUMN j TO k; +-- +ok +== +SELECT trigger_name, columns FROM duckdb_triggers() WHERE trigger_name = 'rename_trigger'; +-- +ok +== +UPDATE t2 SET k = 1; +-- +ok +== +SELECT COUNT(*) FROM audit2; +-- +ok +== +UPDATE t2 SET i = 5; +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/drop_trigger.test b/parser/testdata/corpus/sql/trigger/drop_trigger.test index 1a899c3..b6513ad 100644 --- a/parser/testdata/corpus/sql/trigger/drop_trigger.test +++ b/parser/testdata/corpus/sql/trigger/drop_trigger.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/drop_trigger.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) FROM duckdb_triggers() WHERE trigger_name = 'my_trigger' AND table_name = 't1'; @@ -107,7 +107,7 @@ DROP TABLE mydb.main.cat_log; -- ok == -DROP TABLE b; +DROP TABLE log_table; -- ok == diff --git a/parser/testdata/corpus/sql/trigger/drop_trigger_parse.test b/parser/testdata/corpus/sql/trigger/drop_trigger_parse.test index fb2050a..d404fdb 100644 --- a/parser/testdata/corpus/sql/trigger/drop_trigger_parse.test +++ b/parser/testdata/corpus/sql/trigger/drop_trigger_parse.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/drop_trigger_parse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP TRIGGER my_trigger ON my_table; diff --git a/parser/testdata/corpus/sql/trigger/drop_trigger_wal.test b/parser/testdata/corpus/sql/trigger/drop_trigger_wal.test index d4a9a19..458cf7a 100644 --- a/parser/testdata/corpus/sql/trigger/drop_trigger_wal.test +++ b/parser/testdata/corpus/sql/trigger/drop_trigger_wal.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/drop_trigger_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/drop_trigger_wal.db' AS triggerdb (STORAGE_VERSION 'v2.0.0'); diff --git a/parser/testdata/corpus/sql/trigger/temporary_trigger.test b/parser/testdata/corpus/sql/trigger/temporary_trigger.test new file mode 100644 index 0000000..34f915a --- /dev/null +++ b/parser/testdata/corpus/sql/trigger/temporary_trigger.test @@ -0,0 +1,57 @@ +# source: test/sql/trigger/temporary_trigger.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE audit(msg VARCHAR) +-- +ok +== +CREATE TEMPORARY TABLE tmp_audit(msg VARCHAR) +-- +ok +== +CREATE TEMPORARY TRIGGER trg AFTER INSERT ON t FOR EACH STATEMENT INSERT INTO audit VALUES ('x') +-- +error: Parser Error: Temporary triggers are not supported +== +CREATE TEMP TRIGGER trg AFTER INSERT ON t FOR EACH STATEMENT INSERT INTO audit VALUES ('x') +-- +error: Parser Error: Temporary triggers are not supported +== +CREATE TEMPORARY TRIGGER trg AFTER INSERT ON tmp FOR EACH STATEMENT INSERT INTO tmp_audit VALUES ('x') +-- +error: Parser Error: Temporary triggers are not supported +== +SELECT count(*) FROM duckdb_triggers() +-- +ok +== +CREATE TRIGGER trg AFTER INSERT ON tmp FOR EACH STATEMENT INSERT INTO tmp_audit VALUES ('fired') +-- +ok +== +SELECT database_name, trigger_name, temporary FROM duckdb_triggers() +-- +ok +== +INSERT INTO tmp VALUES (1) +-- +ok +== +SELECT * FROM tmp_audit +-- +ok +== +CREATE TRIGGER trg_persistent AFTER INSERT ON t FOR EACH STATEMENT INSERT INTO audit VALUES ('fired') +-- +ok +== +SELECT trigger_name, temporary FROM duckdb_triggers() WHERE NOT temporary +-- +ok +== +SELECT trigger_name, temporary FROM duckdb_triggers() +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_delete.test b/parser/testdata/corpus/sql/trigger/trigger_after_delete.test index 62ed3c3..64babce 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_delete.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_delete.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE target (id INTEGER); diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_delete_referencing.test b/parser/testdata/corpus/sql/trigger/trigger_after_delete_referencing.test index fd6e24b..fb1db9f 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_delete_referencing.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_delete_referencing.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_delete_referencing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE target (id INTEGER, val VARCHAR); diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_insert.test b/parser/testdata/corpus/sql/trigger/trigger_after_insert.test index 59a04f4..8caa765 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_insert.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_insert.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER trg_basic AFTER INSERT ON target FOR EACH STATEMENT diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_insert_referencing.test b/parser/testdata/corpus/sql/trigger/trigger_after_insert_referencing.test index 99591d3..4fda13b 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_insert_referencing.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_insert_referencing.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_insert_referencing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER trg_ref AFTER INSERT ON target @@ -241,3 +241,38 @@ SELECT s FROM log_alias_shadow; -- ok == +CREATE TABLE t_copy_source (i INTEGER); +-- +ok +== +INSERT INTO t_copy_source VALUES (1), (2), (3); +-- +ok +== +COPY t_copy_source TO '{TEST_DIR}/trigger_copy.csv'; +-- +ok +== +CREATE TABLE t_copy (i INTEGER); +-- +ok +== +CREATE TABLE t_copy_log (i INTEGER); +-- +ok +== +CREATE TRIGGER tr_copy AFTER INSERT ON t_copy +REFERENCING NEW TABLE AS new_rows +FOR EACH STATEMENT + INSERT INTO t_copy_log SELECT i FROM new_rows; +-- +ok +== +COPY t_copy FROM '{TEST_DIR}/trigger_copy.csv'; +-- +ok +== +SELECT i FROM t_copy_log ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_update.test b/parser/testdata/corpus/sql/trigger/trigger_after_update.test index 6113532..bb08450 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_update.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_update.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE target (id INTEGER, val INTEGER); diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new.test b/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new.test index f0d45f6..cdbf11f 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_update_old_new.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE old_audit (id INTEGER, val INTEGER); diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new_wal.test b/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new_wal.test index f89e9b0..c7c8674 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new_wal.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_update_old_new_wal.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_update_old_new_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/trigger_upd_old_new_wal.db' AS triggerdb (STORAGE_VERSION 'v2.0.0'); diff --git a/parser/testdata/corpus/sql/trigger/trigger_after_update_referencing.test b/parser/testdata/corpus/sql/trigger/trigger_after_update_referencing.test index 09f22f2..6d048ae 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_after_update_referencing.test +++ b/parser/testdata/corpus/sql/trigger/trigger_after_update_referencing.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_after_update_referencing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE audit (id INTEGER, val INTEGER); diff --git a/parser/testdata/corpus/sql/trigger/trigger_alter_table.test b/parser/testdata/corpus/sql/trigger/trigger_alter_table.test index 791c3f6..b2119f5 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_alter_table.test +++ b/parser/testdata/corpus/sql/trigger/trigger_alter_table.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_alter_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE audit(x INTEGER); @@ -19,15 +19,76 @@ ALTER TABLE t DROP COLUMN j; -- ok == -ALTER TABLE t ALTER COLUMN i SET NOT NULL; +ALTER TABLE t ALTER COLUMN i TYPE BIGINT; -- ok == -ALTER TABLE t ALTER COLUMN i TYPE BIGINT; +ALTER TABLE t ADD PRIMARY KEY(i); -- ok == -ALTER TABLE t ADD PRIMARY KEY(i); +CREATE TABLE t2(i INT, j INT); +-- +ok +== +CREATE TABLE audit2(x INT); +-- +ok +== +CREATE TRIGGER tr2 AFTER UPDATE OF j ON t2 FOR EACH STATEMENT +INSERT INTO audit2 VALUES (1); +-- +ok +== +UPDATE t2 SET j = 1; +-- +ok +== +UPDATE t2 SET k = 2; +-- +ok +== +UPDATE t2 SET i = 99; +-- +ok +== +SELECT sql FROM duckdb_triggers() WHERE trigger_name = 'tr2'; +-- +ok +== +ALTER TABLE t2 RENAME COLUMN i TO m; +-- +ok +== +UPDATE t2 SET k = 3; +-- +ok +== +CREATE TABLE t3(a INT, b INT); +-- +ok +== +CREATE TABLE dep_log(x INT); +-- +ok +== +CREATE TRIGGER tr3 AFTER UPDATE OF b ON t3 INSERT INTO dep_log VALUES (1); +-- +ok +== +ALTER TABLE t3 RENAME COLUMN b TO c; +-- +ok +== +INSERT INTO t3 VALUES (0, 0); +-- +ok +== +UPDATE t3 SET c = 1; +-- +ok +== +SELECT COUNT(*) FROM dep_log; -- ok == diff --git a/parser/testdata/corpus/sql/trigger/trigger_before_after_mixed.test b/parser/testdata/corpus/sql/trigger/trigger_before_after_mixed.test index 176a69a..f8451a1 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_before_after_mixed.test +++ b/parser/testdata/corpus/sql/trigger/trigger_before_after_mixed.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_before_after_mixed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE log (seq INTEGER, label VARCHAR); diff --git a/parser/testdata/corpus/sql/trigger/trigger_before_delete.test b/parser/testdata/corpus/sql/trigger/trigger_before_delete.test index f2a65b7..e938303 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_before_delete.test +++ b/parser/testdata/corpus/sql/trigger/trigger_before_delete.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_before_delete.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER trg_basic BEFORE DELETE ON target FOR EACH STATEMENT diff --git a/parser/testdata/corpus/sql/trigger/trigger_before_insert.test b/parser/testdata/corpus/sql/trigger/trigger_before_insert.test index ab1a121..e35c16b 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_before_insert.test +++ b/parser/testdata/corpus/sql/trigger/trigger_before_insert.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_before_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER trg_basic BEFORE INSERT ON target FOR EACH STATEMENT diff --git a/parser/testdata/corpus/sql/trigger/trigger_before_update.test b/parser/testdata/corpus/sql/trigger/trigger_before_update.test index 8815e0d..f9fbc78 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_before_update.test +++ b/parser/testdata/corpus/sql/trigger/trigger_before_update.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_before_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TRIGGER trg_basic BEFORE UPDATE ON target FOR EACH STATEMENT diff --git a/parser/testdata/corpus/sql/trigger/trigger_concurrent_rename.test b/parser/testdata/corpus/sql/trigger/trigger_concurrent_rename.test new file mode 100644 index 0000000..c8bd8d1 --- /dev/null +++ b/parser/testdata/corpus/sql/trigger/trigger_concurrent_rename.test @@ -0,0 +1,53 @@ +# source: test/sql/trigger/trigger_concurrent_rename.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t(i INTEGER, j INTEGER); +-- +ok +== +CREATE TRIGGER tr AFTER UPDATE OF j ON t INSERT INTO audit VALUES (1); +-- +ok +== +ALTER TABLE t RENAME COLUMN j TO k; +-- +ok +== +SELECT trigger_name, columns FROM duckdb_triggers() WHERE trigger_name = 'tr'; +-- +ok +== +INSERT INTO t VALUES (0, 0); +-- +ok +== +UPDATE t SET k = 1; +-- +ok +== +SELECT count(*) FROM audit; +-- +ok +== +DROP TRIGGER tr ON t; +-- +ok +== +ALTER TABLE t RENAME COLUMN k TO j; +-- +ok +== +CREATE TRIGGER tr AFTER UPDATE OF k ON t INSERT INTO audit VALUES (1); +-- +ok +== +DELETE FROM audit; +-- +ok +== +UPDATE t SET k = 3; +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/trigger_dependency.test b/parser/testdata/corpus/sql/trigger/trigger_dependency.test new file mode 100644 index 0000000..c39ec4c --- /dev/null +++ b/parser/testdata/corpus/sql/trigger/trigger_dependency.test @@ -0,0 +1,329 @@ +# source: test/sql/trigger/trigger_dependency.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE log(i INT); +-- +ok +== +CREATE TRIGGER tr AFTER INSERT ON t FOR EACH STATEMENT INSERT INTO log VALUES (1); +-- +ok +== +DROP TABLE log RESTRICT; +-- +ok +== +DROP TABLE log CASCADE; +-- +ok +== +SELECT COUNT(*) FROM duckdb_triggers() WHERE trigger_name = 'tr'; +-- +ok +== +CREATE TABLE t1b(i INT); +-- +ok +== +CREATE TABLE log1b(i INT); +-- +ok +== +CREATE TRIGGER tr1b AFTER INSERT ON t1b FOR EACH STATEMENT INSERT INTO log1b VALUES (1); +-- +ok +== +DROP TABLE log1b; +-- +ok +== +DROP TABLE log1b CASCADE; +-- +ok +== +DROP TABLE t1b; +-- +ok +== +CREATE TABLE log2(i INT); +-- +ok +== +CREATE TRIGGER tr2 AFTER INSERT ON t2 FOR EACH STATEMENT INSERT INTO log2 VALUES (1); +-- +ok +== +SELECT COUNT(*) FROM duckdb_triggers() WHERE trigger_name = 'tr2'; +-- +ok +== +DROP TABLE log2 RESTRICT; +-- +ok +== +CREATE TABLE t3(i INT); +-- +ok +== +CREATE TABLE log3(i INT); +-- +ok +== +CREATE TRIGGER tr3 AFTER INSERT ON t3 FOR EACH STATEMENT INSERT INTO log3 VALUES (1); +-- +ok +== +DROP TABLE log3 RESTRICT; +-- +ok +== +DROP TRIGGER tr3 ON t3; +-- +ok +== +CREATE TABLE a(i INT); +-- +ok +== +CREATE TABLE b(i INT); +-- +ok +== +CREATE TABLE log_a(i INT); +-- +ok +== +CREATE TABLE log_b(i INT); +-- +ok +== +CREATE TRIGGER same AFTER INSERT ON a FOR EACH STATEMENT INSERT INTO log_a VALUES (1); +-- +ok +== +CREATE TRIGGER same AFTER INSERT ON b FOR EACH STATEMENT INSERT INTO log_b VALUES (1); +-- +ok +== +DROP TRIGGER same ON a; +-- +ok +== +DROP TABLE log_a RESTRICT; +-- +ok +== +DROP TABLE log_b RESTRICT; +-- +ok +== +CREATE TABLE t4(i INT); +-- +ok +== +CREATE TABLE log4(i INT); +-- +ok +== +CREATE TRIGGER tr4 AFTER INSERT ON t4 FOR EACH STATEMENT INSERT INTO log4 SELECT COUNT(*) FROM t4; +-- +ok +== +DROP TABLE log4 RESTRICT; +-- +ok +== +CREATE TABLE t5(i INT); +-- +ok +== +CREATE TABLE base5(i INT); +-- +ok +== +CREATE VIEW v5 AS SELECT * FROM base5; +-- +ok +== +CREATE TABLE log5(i INT); +-- +ok +== +CREATE TRIGGER tr5 AFTER INSERT ON t5 FOR EACH STATEMENT INSERT INTO log5 SELECT COUNT(*) FROM v5; +-- +ok +== +DROP VIEW v5; +-- +ok +== +DROP TABLE t5 CASCADE; +-- +ok +== +DROP TABLE base5; +-- +ok +== +DROP TABLE log5; +-- +ok +== +CREATE TABLE t6(i INT); +-- +ok +== +CREATE TEMP TABLE log6(i INT); +-- +ok +== +CREATE TRIGGER tr6 AFTER INSERT ON t6 FOR EACH STATEMENT INSERT INTO temp.log6 VALUES (1); +-- +ok +== +DROP TABLE t6; +-- +ok +== +DROP TABLE temp.log6; +-- +ok +== +CREATE TABLE t7(i INT); +-- +ok +== +CREATE TABLE log7(i INT); +-- +ok +== +CREATE TRIGGER tr7 AFTER INSERT ON t7 FOR EACH STATEMENT INSERT INTO log7 VALUES (1); +-- +ok +== +ALTER TABLE t7 RENAME TO t7b; +-- +ok +== +ALTER TABLE t7 ADD COLUMN j INT; +-- +ok +== +ALTER TABLE t7 RENAME COLUMN j TO k; +-- +ok +== +DROP TABLE t7 CASCADE; +-- +ok +== +DROP TABLE log7; +-- +ok +== +CREATE TABLE t8(i INT); +-- +ok +== +CREATE TABLE log8(i INT); +-- +ok +== +CREATE TRIGGER tr8 AFTER INSERT ON t8 FOR EACH STATEMENT INSERT INTO log8 SELECT COUNT(*) FROM t8; +-- +ok +== +ALTER TABLE t8 RENAME TO t8b; +-- +ok +== +DROP TABLE t8 CASCADE; +-- +ok +== +DROP TABLE log8; +-- +ok +== +CREATE TABLE t9(i INTEGER, j INTEGER); +-- +ok +== +CREATE TABLE audit9(x INTEGER); +-- +ok +== +CREATE TRIGGER tr9 AFTER INSERT ON t9 FOR EACH STATEMENT INSERT INTO audit9 SELECT j FROM t9; +-- +ok +== +ALTER TABLE t9 RENAME COLUMN j TO k; +-- +ok +== +DROP TABLE t9; +-- +ok +== +DROP TABLE audit9; +-- +ok +== +CREATE TABLE t10(i INTEGER, j INTEGER); +-- +ok +== +CREATE TABLE log10(x INTEGER); +-- +ok +== +CREATE TRIGGER tr10 AFTER INSERT ON t10 FOR EACH STATEMENT INSERT INTO log10 VALUES (1); +-- +ok +== +ALTER TABLE t10 RENAME COLUMN j TO k; +-- +ok +== +DROP TABLE t10; +-- +ok +== +DROP TABLE log10; +-- +ok +== +CREATE TABLE t11(i INTEGER); +-- +ok +== +CREATE TABLE src11(j INTEGER); +-- +ok +== +CREATE TABLE audit11(x INTEGER); +-- +ok +== +CREATE TRIGGER tr11 AFTER INSERT ON t11 FOR EACH STATEMENT INSERT INTO audit11 SELECT j FROM src11; +-- +ok +== +ALTER TABLE src11 RENAME COLUMN j TO k; +-- +ok +== +DROP TABLE t11 CASCADE; +-- +ok +== +DROP TABLE src11; +-- +ok +== +DROP TABLE audit11; +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/trigger_dependency_restart.test b/parser/testdata/corpus/sql/trigger/trigger_dependency_restart.test new file mode 100644 index 0000000..4bf3b5c --- /dev/null +++ b/parser/testdata/corpus/sql/trigger/trigger_dependency_restart.test @@ -0,0 +1,17 @@ +# source: test/sql/trigger/trigger_dependency_restart.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/trigger_dependency_restart.db' AS triggerdb (STORAGE_VERSION 'v2.0.0'); +-- +ok +== +ATTACH '{TEST_DIR}/trigger_dependency_restart.db' AS triggerdb; +-- +ok +== +DROP TABLE log; +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/trigger_for_each_row.test b/parser/testdata/corpus/sql/trigger/trigger_for_each_row.test index 3e27976..c53062f 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_for_each_row.test +++ b/parser/testdata/corpus/sql/trigger/trigger_for_each_row.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_for_each_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id INTEGER, val VARCHAR); @@ -881,3 +881,36 @@ SELECT id FROM del_replace_log ORDER BY id; -- ok == +CREATE TABLE copy_row_source (id INTEGER); +-- +ok +== +INSERT INTO copy_row_source VALUES (1), (2), (3); +-- +ok +== +COPY copy_row_source TO '{TEST_DIR}/trigger_copy_row.csv'; +-- +ok +== +CREATE TABLE copy_row_target (id INTEGER); +-- +ok +== +CREATE TABLE copy_row_log (id INTEGER); +-- +ok +== +CREATE TRIGGER copy_row_trg AFTER INSERT ON copy_row_target FOR EACH ROW + INSERT INTO copy_row_log VALUES (NEW.id); +-- +ok +== +COPY copy_row_target FROM '{TEST_DIR}/trigger_copy_row.csv'; +-- +ok +== +SELECT id FROM copy_row_log ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/trigger/trigger_multiple_per_event.test b/parser/testdata/corpus/sql/trigger/trigger_multiple_per_event.test index f2d4eb0..dac18e0 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_multiple_per_event.test +++ b/parser/testdata/corpus/sql/trigger/trigger_multiple_per_event.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_multiple_per_event.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE audit1 (msg VARCHAR); @@ -21,10 +21,6 @@ SELECT COUNT(*) FROM audit1; -- ok == -SELECT COUNT(*) FROM audit2; --- -ok -== CREATE SEQUENCE order_seq START 1; -- ok diff --git a/parser/testdata/corpus/sql/trigger/trigger_referencing_validation.test b/parser/testdata/corpus/sql/trigger/trigger_referencing_validation.test index d32775d..b6edf2d 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_referencing_validation.test +++ b/parser/testdata/corpus/sql/trigger/trigger_referencing_validation.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_referencing_validation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id INTEGER); diff --git a/parser/testdata/corpus/sql/trigger/trigger_returning.test b/parser/testdata/corpus/sql/trigger/trigger_returning.test index 5cd1939..1330083 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_returning.test +++ b/parser/testdata/corpus/sql/trigger/trigger_returning.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (a INTEGER, b INTEGER GENERATED ALWAYS AS (a + 1)); diff --git a/parser/testdata/corpus/sql/trigger/trigger_returning_binder_parity.test b/parser/testdata/corpus/sql/trigger/trigger_returning_binder_parity.test index 485d045..ffe2f1f 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_returning_binder_parity.test +++ b/parser/testdata/corpus/sql/trigger/trigger_returning_binder_parity.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_returning_binder_parity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE returning_agg_target (a INTEGER); diff --git a/parser/testdata/corpus/sql/trigger/trigger_update_from_multi_match.test b/parser/testdata/corpus/sql/trigger/trigger_update_from_multi_match.test index 3d31b51..d6a5708 100644 --- a/parser/testdata/corpus/sql/trigger/trigger_update_from_multi_match.test +++ b/parser/testdata/corpus/sql/trigger/trigger_update_from_multi_match.test @@ -1,6 +1,6 @@ # source: test/sql/trigger/trigger_update_from_multi_match.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id INTEGER, v INTEGER); @@ -34,10 +34,6 @@ UPDATE t SET v = src.v FROM src WHERE t.id = src.id; -- ok == -SELECT count(*) FROM audit; --- -ok -== SELECT count(*) FROM audit WHERE old_v = 0 AND (new_v IN (10, 20) AND id = 1 OR new_v IN (30, 40) AND id = 2); -- ok diff --git a/parser/testdata/corpus/sql/types/alias/nested_alias.test b/parser/testdata/corpus/sql/types/alias/nested_alias.test index 030f4de..0848f62 100644 --- a/parser/testdata/corpus/sql/types/alias/nested_alias.test +++ b/parser/testdata/corpus/sql/types/alias/nested_alias.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/nested_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE my_int AS INT diff --git a/parser/testdata/corpus/sql/types/alias/recursive_alias.test b/parser/testdata/corpus/sql/types/alias/recursive_alias.test index 28e83f0..fa3c83b 100644 --- a/parser/testdata/corpus/sql/types/alias/recursive_alias.test +++ b/parser/testdata/corpus/sql/types/alias/recursive_alias.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/recursive_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE t4 AS UNION ( v0 SETOF t4 ); diff --git a/parser/testdata/corpus/sql/types/alias/test_alias.test b/parser/testdata/corpus/sql/types/alias/test_alias.test index 7e5c9ea..f31f338 100644 --- a/parser/testdata/corpus/sql/types/alias/test_alias.test +++ b/parser/testdata/corpus/sql/types/alias/test_alias.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/test_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE alias AS VARCHAR; diff --git a/parser/testdata/corpus/sql/types/alias/test_alias_functions.test b/parser/testdata/corpus/sql/types/alias/test_alias_functions.test index 288c718..702d662 100644 --- a/parser/testdata/corpus/sql/types/alias/test_alias_functions.test +++ b/parser/testdata/corpus/sql/types/alias/test_alias_functions.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/test_alias_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE str_alias as VARCHAR; diff --git a/parser/testdata/corpus/sql/types/alias/test_alias_map.test b/parser/testdata/corpus/sql/types/alias/test_alias_map.test index c98fd6d..ad66299 100644 --- a/parser/testdata/corpus/sql/types/alias/test_alias_map.test +++ b/parser/testdata/corpus/sql/types/alias/test_alias_map.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/test_alias_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE MAPPOINT AS MAP(INTEGER,INTEGER); diff --git a/parser/testdata/corpus/sql/types/alias/test_alias_struct.test b/parser/testdata/corpus/sql/types/alias/test_alias_struct.test index 9b849ec..be5fa04 100644 --- a/parser/testdata/corpus/sql/types/alias/test_alias_struct.test +++ b/parser/testdata/corpus/sql/types/alias/test_alias_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/test_alias_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE POINT AS STRUCT(i INTEGER, j INTEGER); diff --git a/parser/testdata/corpus/sql/types/alias/test_alias_struct_nested_alias.test b/parser/testdata/corpus/sql/types/alias/test_alias_struct_nested_alias.test index a7efd84..ad88908 100644 --- a/parser/testdata/corpus/sql/types/alias/test_alias_struct_nested_alias.test +++ b/parser/testdata/corpus/sql/types/alias/test_alias_struct_nested_alias.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/test_alias_struct_nested_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE foobar AS ENUM( diff --git a/parser/testdata/corpus/sql/types/alias/test_alias_table.test b/parser/testdata/corpus/sql/types/alias/test_alias_table.test index c8d0b9a..2089b8d 100644 --- a/parser/testdata/corpus/sql/types/alias/test_alias_table.test +++ b/parser/testdata/corpus/sql/types/alias/test_alias_table.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/test_alias_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE person ( diff --git a/parser/testdata/corpus/sql/types/alias/type_with_schema.test b/parser/testdata/corpus/sql/types/alias/type_with_schema.test index 5f8a391..fcde693 100644 --- a/parser/testdata/corpus/sql/types/alias/type_with_schema.test +++ b/parser/testdata/corpus/sql/types/alias/type_with_schema.test @@ -1,6 +1,6 @@ # source: test/sql/types/alias/type_with_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE my_schema.my_type AS STRUCT ( diff --git a/parser/testdata/corpus/sql/types/bignum/issue25939.test b/parser/testdata/corpus/sql/types/bignum/issue25939.test new file mode 100644 index 0000000..9b05e93 --- /dev/null +++ b/parser/testdata/corpus/sql/types/bignum/issue25939.test @@ -0,0 +1,9 @@ +# source: test/sql/types/bignum/issue25939.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*), min(i), max(i) FROM range(72057594037927930, 72057594037928236) t(i) WHERE (i::BIGINT::BIGNUM)::VARCHAR <> i::VARCHAR; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_big_bignum.test b/parser/testdata/corpus/sql/types/bignum/test_big_bignum.test index c268cab..d2cd7c2 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_big_bignum.test +++ b/parser/testdata/corpus/sql/types/bignum/test_big_bignum.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_big_bignum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t as select concat('1', repeat('0', i))::bignum as a from range(0,100) tbl(i) diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_boundaries.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_boundaries.test index 3a82234..aaa26f1 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_boundaries.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_boundaries.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_boundaries.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select tinyint::varchar::bignum = tinyint::bignum, diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_comparisons.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_comparisons.test index 8fc29ad..5679549 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_comparisons.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_comparisons.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_comparisons.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bignum_comparisons(a bignum); diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_double.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_double.test index b1d2136..5003666 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_double.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_double.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_double.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '100'::bignum::double diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_float_string_cast.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_float_string_cast.test index 55d84d3..9d9cf6a 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_float_string_cast.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_float_string_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_float_string_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST('1.5' AS INTEGER) AS i1, CAST('1.5' AS HUGEINT) AS i2, CAST('1.5' AS BIGNUM) AS i3; diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_from_non_finite.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_from_non_finite.test new file mode 100644 index 0000000..b4893db --- /dev/null +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_from_non_finite.test @@ -0,0 +1,29 @@ +# source: test/sql/types/bignum/test_bignum_from_non_finite.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 'nan'::FLOAT::BIGNUM +-- +ok +== +SELECT 'inf'::DOUBLE::BIGNUM +-- +ok +== +CREATE TABLE f AS SELECT * FROM (VALUES ('nan'::FLOAT), (1::FLOAT), ('inf'::FLOAT)) t(x); +-- +ok +== +SELECT TRY(x::BIGNUM), TRY_CAST(x AS BIGNUM) FROM f +-- +ok +== +SELECT x = 1::BIGNUM FROM f +-- +ok +== +SELECT 1.5::DOUBLE::BIGNUM, 2::FLOAT::BIGNUM +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_hugeint.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_hugeint.test index 39674ef..a0f28c7 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_hugeint.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_hugeint.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_hugeint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit Select 85070591730234614260976917445211069672::BIGNUM ; diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_implicit_cast.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_implicit_cast.test index 42e19ff..f89eaea 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_implicit_cast.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_implicit_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_implicit_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t (a bignum) diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_large_varchar.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_large_varchar.test new file mode 100644 index 0000000..880c46a --- /dev/null +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_large_varchar.test @@ -0,0 +1,25 @@ +# source: test/sql/types/bignum/test_bignum_large_varchar.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST(repeat('9', 100000) AS BIGNUM) + 1 = CAST('1' || repeat('0', 100000) AS BIGNUM); +-- +ok +== +SELECT CAST(repeat('123456789', 1000) AS BIGNUM)::VARCHAR = repeat('123456789', 1000); +-- +ok +== +SELECT CAST('-' || repeat('987654321', 1000) || '0' AS BIGNUM)::VARCHAR = '-' || repeat('987654321', 1000) || '0'; +-- +ok +== +SELECT '4294967295'::BIGNUM, '4294967296'::BIGNUM, '-4294967296'::BIGNUM, '999999999'::BIGNUM, '1000000000'::BIGNUM, '18446744073709551616'::BIGNUM::DOUBLE; +-- +ok +== +SELECT '4294967296'::BIGNUM = 4294967296::BIGNUM, '-1000000000000000000000'::BIGNUM = -1000000000000000000000::HUGEINT::BIGNUM; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_not_cast.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_not_cast.test index f89d63e..f71762a 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_not_cast.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_not_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_not_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select {type}::bignum FROM test_all_types() limit 1; diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_subtract.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_subtract.test index 926d060..86cf9ed 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_subtract.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_subtract.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_subtract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT -(1::BIGNUM) @@ -51,3 +51,19 @@ SELECT "-"(c1, c2) FROM test_vector_types(CAST(NULL AS BIGNUM), CAST(NULL AS BIG -- ok == +SELECT x - x, x - y FROM (VALUES ('123456789012345678901234567890123456789012345678901234567890'::BIGNUM, '123456789012345678901234567890123456789012345678901234567890'::BIGNUM)) v(x, y) +-- +ok +== +SELECT x - x, x, -x - (-x) FROM (VALUES ('-98765432109876543210987654321098765432109876543210'::BIGNUM)) v(x) +-- +ok +== +CREATE TABLE big AS SELECT ('1' || repeat('7', 40 + i % 5))::BIGNUM b FROM range(100) t(i) +-- +ok +== +SELECT count(*) FROM big WHERE b - b <> 0 OR (b - 1::BIGNUM) + 1::BIGNUM <> b +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_sum.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_sum.test index 730120f..fd35557 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_sum.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_sum.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_sum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numbers ( x bignum ); diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_to_double_overflow.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_to_double_overflow.test new file mode 100644 index 0000000..9453ee1 --- /dev/null +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_to_double_overflow.test @@ -0,0 +1,25 @@ +# source: test/sql/types/bignum/test_bignum_to_double_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST(('1' || repeat('0', 309))::BIGNUM AS DOUBLE); +-- +ok +== +SELECT TRY_CAST(('-1' || repeat('0', 309))::BIGNUM AS DOUBLE); +-- +ok +== +SELECT CAST(('1' || repeat('0', 309))::BIGNUM AS DOUBLE); +-- +ok +== +SELECT TRY_CAST(b AS DOUBLE) FROM (VALUES ('12'::BIGNUM), (('1' || repeat('0', 400))::BIGNUM), ('-3'::BIGNUM)) t(b); +-- +ok +== +SELECT CAST(('1' || repeat('0', 300))::BIGNUM AS DOUBLE); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_try_cast.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_try_cast.test index 8478145..4b0bb53 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_try_cast.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRY_CAST('hello' AS BIGNUM) diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_invalid.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_invalid.test index 2cb4d22..930274e 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_invalid.test +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_invalid.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_bignum_varchar_invalid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'ä'::BIGNUM diff --git a/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_large.test b/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_large.test new file mode 100644 index 0000000..a5d33e4 --- /dev/null +++ b/parser/testdata/corpus/sql/types/bignum/test_bignum_varchar_large.test @@ -0,0 +1,32 @@ +# source: test/sql/types/bignum/test_bignum_varchar_large.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE strings AS +SELECT n, CASE WHEN n % 3 = 0 THEN '-' ELSE '' END || (1 + n % 9)::VARCHAR || + array_to_string(list_transform(range(n), lambda j: ((j * 7 + n) % 10)::VARCHAR), '') AS s +FROM range(0, 20000, 97) t(n); +-- +ok +== +SELECT count(*) FROM strings WHERE s::BIGNUM::VARCHAR <> s; +-- +ok +== +SELECT (repeat('9', 20000)::BIGNUM + 1::BIGNUM)::VARCHAR = '1' || repeat('0', 20000); +-- +ok +== +SELECT (('1' || repeat('0', 30000))::BIGNUM - 1::BIGNUM)::VARCHAR = repeat('9', 30000); +-- +ok +== +SELECT (('-1' || repeat('0', 12345) || '1')::BIGNUM)::VARCHAR = '-1' || repeat('0', 12345) || '1'; +-- +ok +== +SELECT length(('3' || repeat('1', 40000))::BIGNUM::VARCHAR); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_double_bignum.test b/parser/testdata/corpus/sql/types/bignum/test_double_bignum.test index 866fe5f..5b3bd96 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_double_bignum.test +++ b/parser/testdata/corpus/sql/types/bignum/test_double_bignum.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_double_bignum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368::double::bignum diff --git a/parser/testdata/corpus/sql/types/bignum/test_int_bignum_conversion.test b/parser/testdata/corpus/sql/types/bignum/test_int_bignum_conversion.test index 6320fc8..4b23a2d 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_int_bignum_conversion.test +++ b/parser/testdata/corpus/sql/types/bignum/test_int_bignum_conversion.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_int_bignum_conversion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select distinct i::{int_type}::bignum = i::bignum from range(0, 100) t(i); diff --git a/parser/testdata/corpus/sql/types/bignum/test_int_varchar_bignum_compatibility.test b/parser/testdata/corpus/sql/types/bignum/test_int_varchar_bignum_compatibility.test new file mode 100644 index 0000000..a8c3c9b --- /dev/null +++ b/parser/testdata/corpus/sql/types/bignum/test_int_varchar_bignum_compatibility.test @@ -0,0 +1,45 @@ +# source: test/sql/types/bignum/test_int_varchar_bignum_compatibility.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE integer_values AS +SELECT i::HUGEINT AS i FROM range(-65536, 65536) t(i) +UNION ALL +SELECT sign * ((1::HUGEINT << power) + delta) +FROM range(127) p(power), range(-8, 9) d(delta), (VALUES (-1), (1)) s(sign) +UNION ALL +SELECT sign * (('1' || repeat('0', power))::HUGEINT + delta) +FROM range(39) p(power), range(-8, 9) d(delta), (VALUES (-1), (1)) s(sign) +UNION ALL +SELECT i FROM (VALUES + ('-170141183460469231731687303715884105728'::HUGEINT), + ('170141183460469231731687303715884105727'::HUGEINT) +) t(i); +-- +ok +== +SELECT bool_and(i::VARCHAR::BIGNUM = i::BIGNUM), + bool_and(i::BIGNUM::VARCHAR = i::VARCHAR) +FROM (SELECT TRY_CAST(i AS {type}) i FROM integer_values) t +WHERE i IS NOT NULL; +-- +error: Parser Error: syntax error at or near "{" +== +CREATE TABLE unsigned_values AS +SELECT i::UHUGEINT i FROM integer_values WHERE i >= 0 +UNION ALL +SELECT (1::UHUGEINT << 127) + delta::UHUGEINT FROM range(9) t(delta) +UNION ALL +SELECT (1::UHUGEINT << 127) - delta::UHUGEINT FROM range(9) t(delta) +UNION ALL +SELECT '340282366920938463463374607431768211455'::UHUGEINT - delta::UHUGEINT FROM range(9) t(delta); +-- +ok +== +SELECT bool_and(i::VARCHAR::BIGNUM = i::BIGNUM), + bool_and(i::BIGNUM::VARCHAR = i::VARCHAR) +FROM unsigned_values; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_conversion.test b/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_conversion.test index 66267fa..7ab6f3d 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_conversion.test +++ b/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_conversion.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_varchar_bignum_conversion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '340282366920938463463374607431768211455'::UHUGEINT::bignum diff --git a/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_unhappy.test b/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_unhappy.test index d12b1b4..5935532 100644 --- a/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_unhappy.test +++ b/parser/testdata/corpus/sql/types/bignum/test_varchar_bignum_unhappy.test @@ -1,6 +1,6 @@ # source: test/sql/types/bignum/test_varchar_bignum_unhappy.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '-0'::BIGNUM diff --git a/parser/testdata/corpus/sql/types/bit/bit_issue_11211.test b/parser/testdata/corpus/sql/types/bit/bit_issue_11211.test index 9d559b1..6ae96f9 100644 --- a/parser/testdata/corpus/sql/types/bit/bit_issue_11211.test +++ b/parser/testdata/corpus/sql/types/bit/bit_issue_11211.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/bit_issue_11211.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select ( 2::bit & 2::bit ) = 2::bit as b; diff --git a/parser/testdata/corpus/sql/types/bit/bit_issue_22527.test b/parser/testdata/corpus/sql/types/bit/bit_issue_22527.test index da2212a..7d7a776 100644 --- a/parser/testdata/corpus/sql/types/bit/bit_issue_22527.test +++ b/parser/testdata/corpus/sql/types/bit/bit_issue_22527.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/bit_issue_22527.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/types/bit/bit_sort_key_order.test b/parser/testdata/corpus/sql/types/bit/bit_sort_key_order.test new file mode 100644 index 0000000..99aa6d1 --- /dev/null +++ b/parser/testdata/corpus/sql/types/bit/bit_sort_key_order.test @@ -0,0 +1,49 @@ +# source: test/sql/types/bit/bit_sort_key_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE b AS SELECT x::BIT x, i FROM (VALUES ('0',1),('1111111111111111111',2),('01',3),('1',4),('10',5)) v(x,i); +-- +ok +== +SELECT list(i ORDER BY x) FROM b +-- +ok +== +SELECT list(i ORDER BY {'x': x}), list(i ORDER BY [x]), list(i ORDER BY x DESC), list_sort(list(x))::VARCHAR FROM b +-- +ok +== +SELECT max(x, 2), min(x, 2), arg_max(i, x, 2), arg_min(i, x, 2) FROM b +-- +ok +== +SELECT max(x), min(x) FROM b +-- +ok +== +SELECT list(x ORDER BY x)::VARCHAR FROM (SELECT x FROM b ORDER BY {'x': x}) t +-- +ok +== +SELECT max(x, 5) FROM b +-- +ok +== +SELECT arg_max(i, [x]), arg_max(i, [x], 2), max([x], 2), min({'a': x}, 2) FROM b +-- +ok +== +INSERT INTO b VALUES (NULL, 6) +-- +ok +== +SELECT max(x, 2), arg_min(i, x, 2), arg_min_null(i, x) FROM b +-- +ok +== +SELECT max(v COLLATE nocase, 2), arg_max(v, v COLLATE nocase, 2), max(v, 2) FROM (VALUES ('B'), ('a'), ('C')) t(v) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/bit/bit_try_cast.test b/parser/testdata/corpus/sql/types/bit/bit_try_cast.test index ea17d5c..26e6226 100644 --- a/parser/testdata/corpus/sql/types/bit/bit_try_cast.test +++ b/parser/testdata/corpus/sql/types/bit/bit_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/bit_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT try_cast(1::BIT as TINYINT); diff --git a/parser/testdata/corpus/sql/types/bit/test_bit.test b/parser/testdata/corpus/sql/types/bit/test_bit.test index b0ea5dc..f403487 100644 --- a/parser/testdata/corpus/sql/types/bit/test_bit.test +++ b/parser/testdata/corpus/sql/types/bit/test_bit.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/test_bit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ('0101011'::BIT) diff --git a/parser/testdata/corpus/sql/types/bit/test_bit_bitwise_operations.test b/parser/testdata/corpus/sql/types/bit/test_bit_bitwise_operations.test index 4497dc5..8fa615c 100644 --- a/parser/testdata/corpus/sql/types/bit/test_bit_bitwise_operations.test +++ b/parser/testdata/corpus/sql/types/bit/test_bit_bitwise_operations.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/test_bit_bitwise_operations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO bits VALUES('101111011010'), ('110001100100'), ('101001000110') diff --git a/parser/testdata/corpus/sql/types/bit/test_bit_equality.test b/parser/testdata/corpus/sql/types/bit/test_bit_equality.test index 1b7daa2..050befa 100644 --- a/parser/testdata/corpus/sql/types/bit/test_bit_equality.test +++ b/parser/testdata/corpus/sql/types/bit/test_bit_equality.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/test_bit_equality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select bitstring('1', 6) from range(100000) group by 1; diff --git a/parser/testdata/corpus/sql/types/bit/test_bit_functions.test b/parser/testdata/corpus/sql/types/bit/test_bit_functions.test index d971856..7b927db 100644 --- a/parser/testdata/corpus/sql/types/bit/test_bit_functions.test +++ b/parser/testdata/corpus/sql/types/bit/test_bit_functions.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/test_bit_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO bits VALUES('101001111'), ('00111'), ('100101010110000000000001'), ('111111010100') diff --git a/parser/testdata/corpus/sql/types/bit/test_hex_to_bit.test b/parser/testdata/corpus/sql/types/bit/test_hex_to_bit.test index a2d965f..ea2f250 100644 --- a/parser/testdata/corpus/sql/types/bit/test_hex_to_bit.test +++ b/parser/testdata/corpus/sql/types/bit/test_hex_to_bit.test @@ -1,6 +1,6 @@ # source: test/sql/types/bit/test_hex_to_bit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE valid (v VARCHAR); diff --git a/parser/testdata/corpus/sql/types/blob/test_blob.test b/parser/testdata/corpus/sql/types/blob/test_blob.test index 4e3f754..454a962 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob.test @@ -1,6 +1,6 @@ # source: test/sql/types/blob/test_blob.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'abc �'::BYTEA; diff --git a/parser/testdata/corpus/sql/types/blob/test_blob_cast.test b/parser/testdata/corpus/sql/types/blob/test_blob_cast.test index 1564ad9..9f55c23 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob_cast.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/blob/test_blob_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'a'::BYTEA::VARCHAR diff --git a/parser/testdata/corpus/sql/types/blob/test_blob_function.test b/parser/testdata/corpus/sql/types/blob/test_blob_function.test index 4da2e7a..cb58f34 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob_function.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob_function.test @@ -1,6 +1,6 @@ # source: test/sql/types/blob/test_blob_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO blobs VALUES ('a'::BYTEA) diff --git a/parser/testdata/corpus/sql/types/blob/test_blob_invalid_utf8.test b/parser/testdata/corpus/sql/types/blob/test_blob_invalid_utf8.test index fd7c857..195601e 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob_invalid_utf8.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob_invalid_utf8.test @@ -1,16 +1,12 @@ # source: test/sql/types/blob/test_blob_invalid_utf8.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE b(b blob); -- ok == -INSERT INTO b VALUES (NULL); --- -ok -== UPDATE b SET b=blob'\x80abcdefghjijklmnopqrstuvwxyz'; -- ok diff --git a/parser/testdata/corpus/sql/types/blob/test_blob_operator.test b/parser/testdata/corpus/sql/types/blob/test_blob_operator.test index 0020812..7987947 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob_operator.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob_operator.test @@ -1,6 +1,6 @@ # source: test/sql/types/blob/test_blob_operator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE blobs (b BYTEA, g INTEGER); diff --git a/parser/testdata/corpus/sql/types/blob/test_blob_string.test b/parser/testdata/corpus/sql/types/blob/test_blob_string.test index fa7cae1..7341b4a 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob_string.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob_string.test @@ -1,6 +1,6 @@ # source: test/sql/types/blob/test_blob_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO blobs VALUES ('aaaaaaaaaa') diff --git a/parser/testdata/corpus/sql/types/blob/test_blob_try_cast.test b/parser/testdata/corpus/sql/types/blob/test_blob_try_cast.test index aafa108..88cec05 100644 --- a/parser/testdata/corpus/sql/types/blob/test_blob_try_cast.test +++ b/parser/testdata/corpus/sql/types/blob/test_blob_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/blob/test_blob_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRY_CAST('\\' AS BLOB) diff --git a/parser/testdata/corpus/sql/types/cast_expression_storage_version.test b/parser/testdata/corpus/sql/types/cast_expression_storage_version.test new file mode 100644 index 0000000..e6d87d9 --- /dev/null +++ b/parser/testdata/corpus/sql/types/cast_expression_storage_version.test @@ -0,0 +1,114 @@ +# source: test/sql/types/cast_expression_storage_version.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '{TEST_DIR}/cast_expr_old.db' AS oldb (STORAGE_VERSION 'v1.5.0'); +-- +ok +== +ATTACH '{TEST_DIR}/cast_expr_new.db' AS newb (STORAGE_VERSION 'v2.0.0'); +-- +ok +== +CREATE TYPE oldb.mood AS ENUM('sad', 'ok', 'happy'); +-- +ok +== +CREATE TYPE newb.mood AS ENUM('sad', 'ok', 'happy'); +-- +ok +== +CREATE TABLE {db}.t ( + v VARCHAR, + g DECIMAL(9,2) GENERATED ALWAYS AS (1.5), + s STRUCT(k INTEGER, v VARCHAR) GENERATED ALWAYS AS ({'k':1,'v':'x'}), + e {db}.mood GENERATED ALWAYS AS ('ok') +); +-- +error: Parser Error: syntax error at or near "{" +== +CREATE MACRO {db}.mm(a) AS a::DECIMAL(9,2); +-- +error: Parser Error: syntax error at or near "{" +== +INSERT INTO {db}.t (v) VALUES ('a'); +-- +error: Parser Error: syntax error at or near "{" +== +CHECKPOINT oldb; +-- +ok +== +CHECKPOINT newb; +-- +ok +== +DETACH oldb; +-- +ok +== +DETACH newb; +-- +ok +== +ATTACH '{TEST_DIR}/cast_expr_old.db' AS oldb (READ_ONLY); +-- +ok +== +ATTACH '{TEST_DIR}/cast_expr_new.db' AS newb (READ_ONLY); +-- +ok +== +SELECT tags.storage_version FROM duckdb_databases() WHERE database_name = 'oldb'; +-- +ok +== +SELECT typeof(g), typeof(s), typeof(e), g FROM oldb.t +-- +ok +== +SELECT typeof(g), typeof(s), typeof(e), g FROM newb.t +-- +ok +== +SELECT typeof(oldb.mm(1)) +-- +ok +== +SELECT typeof(newb.mm(1)) +-- +ok +== +ATTACH '{TEST_DIR}/cast_expr_collate.db' AS colldb (STORAGE_VERSION 'v1.4.0'); +-- +ok +== +CREATE TABLE colldb.coll (g AS (x), x VARCHAR COLLATE NOCASE); +-- +ok +== +INSERT INTO colldb.coll VALUES ('string'), ('STRING'); +-- +ok +== +CHECKPOINT colldb; +-- +ok +== +DETACH colldb; +-- +ok +== +ATTACH '{TEST_DIR}/cast_expr_collate.db' AS colldb (READ_ONLY); +-- +ok +== +SELECT generation_expression FROM duckdb_columns() WHERE table_name = 'coll' AND column_name = 'g'; +-- +ok +== +SELECT count(*) FROM colldb.coll WHERE g = 'string'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/date/date_implicit_cast.test b/parser/testdata/corpus/sql/types/date/date_implicit_cast.test index c33f078..e327c1f 100644 --- a/parser/testdata/corpus/sql/types/date/date_implicit_cast.test +++ b/parser/testdata/corpus/sql/types/date/date_implicit_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/date_implicit_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(ts {type}) diff --git a/parser/testdata/corpus/sql/types/date/date_limits.test b/parser/testdata/corpus/sql/types/date/date_limits.test index 3c1345e..3c75750 100644 --- a/parser/testdata/corpus/sql/types/date/date_limits.test +++ b/parser/testdata/corpus/sql/types/date/date_limits.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/date_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '1969-01-01'::date diff --git a/parser/testdata/corpus/sql/types/date/date_parsing.test b/parser/testdata/corpus/sql/types/date/date_parsing.test index 2258a4a..14fa22d 100644 --- a/parser/testdata/corpus/sql/types/date/date_parsing.test +++ b/parser/testdata/corpus/sql/types/date/date_parsing.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/date_parsing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '1992-01-01'::DATE::VARCHAR == '1992-01-01' diff --git a/parser/testdata/corpus/sql/types/date/date_try_cast.test b/parser/testdata/corpus/sql/types/date/date_try_cast.test index 54e80b0..3fe5b77 100644 --- a/parser/testdata/corpus/sql/types/date/date_try_cast.test +++ b/parser/testdata/corpus/sql/types/date/date_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/date_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select try_cast('' as date) diff --git a/parser/testdata/corpus/sql/types/date/test_bc_dates.test b/parser/testdata/corpus/sql/types/date/test_bc_dates.test index cc3fbef..7d3d654 100644 --- a/parser/testdata/corpus/sql/types/date/test_bc_dates.test +++ b/parser/testdata/corpus/sql/types/date/test_bc_dates.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/test_bc_dates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO dates VALUES ('-1993-08-14'), (NULL) diff --git a/parser/testdata/corpus/sql/types/date/test_date.test b/parser/testdata/corpus/sql/types/date/test_date.test index f923acd..6dd18f5 100644 --- a/parser/testdata/corpus/sql/types/date/test_date.test +++ b/parser/testdata/corpus/sql/types/date/test_date.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/test_date.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i + 5 FROM dates diff --git a/parser/testdata/corpus/sql/types/date/test_date_2411.test b/parser/testdata/corpus/sql/types/date/test_date_2411.test index 63f6ee9..fe1c5a2 100644 --- a/parser/testdata/corpus/sql/types/date/test_date_2411.test +++ b/parser/testdata/corpus/sql/types/date/test_date_2411.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/test_date_2411.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamp(i TIMESTAMP) diff --git a/parser/testdata/corpus/sql/types/date/test_incorrect_dates.test b/parser/testdata/corpus/sql/types/date/test_incorrect_dates.test index 0e2bee6..d893c88 100644 --- a/parser/testdata/corpus/sql/types/date/test_incorrect_dates.test +++ b/parser/testdata/corpus/sql/types/date/test_incorrect_dates.test @@ -1,6 +1,6 @@ # source: test/sql/types/date/test_incorrect_dates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO dates VALUES ('blabla') diff --git a/parser/testdata/corpus/sql/types/decimal/cast_from_decimal.test b/parser/testdata/corpus/sql/types/decimal/cast_from_decimal.test index 6091c92..856f2cc 100644 --- a/parser/testdata/corpus/sql/types/decimal/cast_from_decimal.test +++ b/parser/testdata/corpus/sql/types/decimal/cast_from_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/cast_from_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 127::DECIMAL(3,0)::TINYINT, -127::DECIMAL(3,0)::TINYINT, -7::DECIMAL(9,1)::TINYINT, 27::DECIMAL(18,1)::TINYINT, 33::DECIMAL(38,1)::TINYINT diff --git a/parser/testdata/corpus/sql/types/decimal/cast_to_decimal.test b/parser/testdata/corpus/sql/types/decimal/cast_to_decimal.test index de3e4e7..3449077 100644 --- a/parser/testdata/corpus/sql/types/decimal/cast_to_decimal.test +++ b/parser/testdata/corpus/sql/types/decimal/cast_to_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/cast_to_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 100::TINYINT::DECIMAL(18,3), 100::TINYINT::DECIMAL(3,0), (-100)::TINYINT::DECIMAL(3,0), 0::TINYINT::DECIMAL(3,3) diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_aggregates.test b/parser/testdata/corpus/sql/types/decimal/decimal_aggregates.test index f76cba7..cad2289 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_aggregates.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(FIRST('0.1'::DECIMAL(4,1))) diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_arithmetic.test b/parser/testdata/corpus/sql/types/decimal/decimal_arithmetic.test index 6bcd354..ee00856 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_arithmetic.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT -('0.1'::DECIMAL), -('-0.1'::DECIMAL) diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_automatic_cast.test b/parser/testdata/corpus/sql/types/decimal/decimal_automatic_cast.test index b25333a..fdb6ed5 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_automatic_cast.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_automatic_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_automatic_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1.33, 10.0] diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_average.test b/parser/testdata/corpus/sql/types/decimal/decimal_average.test index 8d464b9..73aa9b2 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_average.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_average.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_average.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE prices (v DECIMAL(10,2)); diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_decimal_overflow_cast.test b/parser/testdata/corpus/sql/types/decimal/decimal_decimal_overflow_cast.test index 55c2a3b..4fe28dd 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_decimal_overflow_cast.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_decimal_overflow_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_decimal_overflow_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1.0::DECIMAL(4,3)::DECIMAL(2,1), 1.0::DECIMAL(4,3)::DECIMAL(9,1), 1.0::DECIMAL(4,3)::DECIMAL(18,1), 1.0::DECIMAL(4,3)::DECIMAL(38,1) diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_division.test b/parser/testdata/corpus/sql/types/decimal/decimal_division.test index 9589d5d..d32235d 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_division.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_division.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_division.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT decimal_division(10.00, 4.00); @@ -95,6 +95,43 @@ SELECT decimal_division(1.00::DECIMAL(3,2), 3.00::DECIMAL(3,2), 35); -- ok == +SELECT decimal_division(1::DECIMAL(2,0), 8::DECIMAL(1,0), 2), + decimal_division(3::DECIMAL(2,0), 8::DECIMAL(1,0), 2), + decimal_division(5::DECIMAL(2,0), 8::DECIMAL(1,0), 2), + decimal_division(7::DECIMAL(2,0), 8::DECIMAL(1,0), 2); +-- +ok +== +SELECT decimal_division(-1::DECIMAL(2,0), 8::DECIMAL(1,0), 2), + decimal_division(3::DECIMAL(2,0), -8::DECIMAL(1,0), 2), + decimal_division(-5::DECIMAL(2,0), -8::DECIMAL(1,0), 2), + decimal_division(-7::DECIMAL(2,0), 8::DECIMAL(1,0), 2); +-- +ok +== +SELECT decimal_division(1::DECIMAL(19,0), 8::DECIMAL(19,0), 2), + decimal_division(3::DECIMAL(19,0), 8::DECIMAL(19,0), 2); +-- +ok +== +SELECT decimal_division(10000000000000000000::DECIMAL(38,0), + 20000000000000000000::DECIMAL(38,0), 0), + decimal_division(30000000000000000000::DECIMAL(38,0), + 20000000000000000000::DECIMAL(38,0), 0); +-- +ok +== +SELECT decimal_division(9223372036854775808::DECIMAL(20,0), + 18446744073709551614::DECIMAL(20,0), 0), + decimal_division(27670116110564327421::DECIMAL(20,0), + 18446744073709551614::DECIMAL(20,0), 0); +-- +ok +== +SELECT decimal_division(9.99::DECIMAL(3,2), 0.1::DECIMAL(1,1), 0); +-- +ok +== SELECT decimal_division(1.0::DECIMAL(4,1), 3.0::DECIMAL(4,1), -1); -- ok diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_exception.test b/parser/testdata/corpus/sql/types/decimal/decimal_exception.test index eb80397..376a4c2 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_exception.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_exception.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_exception.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select cast('9.99' as decimal(1,0)); diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_exponent.test b/parser/testdata/corpus/sql/types/decimal/decimal_exponent.test index 0eaac37..755285f 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_exponent.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_exponent.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_exponent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '1e3'::DECIMAL, '1e-1'::DECIMAL, '.1e3'::DECIMAL, '0.1e3'::DECIMAL diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_overflow.test b/parser/testdata/corpus/sql/types/decimal/decimal_overflow.test index 66a5fff..e5cfb29 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_overflow.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select (99000000000000000.0::DECIMAL(18,1)+99000000000000000.0::DECIMAL(18,1)); diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_overflow_table.test b/parser/testdata/corpus/sql/types/decimal/decimal_overflow_table.test index 40f9c12..008c02e 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_overflow_table.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_overflow_table.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_overflow_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE decimals(d DECIMAL(18,1)) diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_promotion.test b/parser/testdata/corpus/sql/types/decimal/decimal_promotion.test index ca15ec6..f014f41 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_promotion.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_promotion.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_promotion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(1::DECIMAL(4,0) + 1::DECIMAL(4,0)), diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_try_cast.test b/parser/testdata/corpus/sql/types/decimal/decimal_try_cast.test index bac788b..d00061a 100644 --- a/parser/testdata/corpus/sql/types/decimal/decimal_try_cast.test +++ b/parser/testdata/corpus/sql/types/decimal/decimal_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/decimal_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST(1000 AS DECIMAL(3,0)) diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_values_warning.test b/parser/testdata/corpus/sql/types/decimal/decimal_values_warning.test new file mode 100644 index 0000000..65a3bc2 --- /dev/null +++ b/parser/testdata/corpus/sql/types/decimal/decimal_values_warning.test @@ -0,0 +1,38 @@ +# source: test/sql/types/decimal/decimal_values_warning.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +VALUES (32942348563242.111222333444555666777888::DECIMAL(38,24)), (NULL::NUMERIC); +-- +ok +== +VALUES (NULL::NUMERIC), (32942348563242.111222333444555666777888::DECIMAL(38,24)); +-- +ok +== +VALUES (32942348563242.111222333444555666777888::DECIMAL(38,24)), (NULL); +-- +ok +== +VALUES (32942348563242.111222333444555666777888::DECIMAL(38,24)), (NULL::DECIMAL(38,24)); +-- +ok +== +VALUES (32942348563242.111222333444555666777888::DECIMAL(38,24)), (NULL::DECIMAL(10,2)); +-- +ok +== +VALUES (32942348563242.111222333444555666777888::DECIMAL(38,24)), + (32942348563242.999888777666555444333222::DECIMAL(38,24)), + (NULL::NUMERIC); +-- +ok +== +SELECT count(*) > 0 AND count(*) = count(DISTINCT query_id) +FROM duckdb_logs +WHERE log_level = 'WARNING' + AND starts_with(message, 'Potential loss of decimal precision while resolving a VALUES column'); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/decimal/decimal_zero_to_float.test b/parser/testdata/corpus/sql/types/decimal/decimal_zero_to_float.test new file mode 100644 index 0000000..f28cf76 --- /dev/null +++ b/parser/testdata/corpus/sql/types/decimal/decimal_zero_to_float.test @@ -0,0 +1,22 @@ +# source: test/sql/types/decimal/decimal_zero_to_float.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST(0::DECIMAL(38, 30) AS DOUBLE), signbit(CAST(0::DECIMAL(38, 30) AS DOUBLE)), + CAST(0::DECIMAL(38, 30) AS FLOAT), signbit(CAST(0::DECIMAL(38, 30) AS FLOAT)) +-- +ok +== +SELECT CAST(0::DECIMAL(25, 23) AS DOUBLE), signbit(CAST(0::DECIMAL(25, 23) AS DOUBLE)) +-- +ok +== +SELECT CAST(0::DECIMAL(18, 15) AS FLOAT), signbit(CAST(0::DECIMAL(18, 15) AS FLOAT)) +-- +ok +== +SELECT .00000000000000000000000 * 0 * 340282366920938463463374607431766427829. - 4 +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/decimal/large_decimal_constants.test b/parser/testdata/corpus/sql/types/decimal/large_decimal_constants.test index 8fbeef1..7b57c1e 100644 --- a/parser/testdata/corpus/sql/types/decimal/large_decimal_constants.test +++ b/parser/testdata/corpus/sql/types/decimal/large_decimal_constants.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/large_decimal_constants.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 42.1, -10239814.1, 1049185157.12345, 102398294123451814.12345, -49238409238403918140294812084.12490812490 diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal.test b/parser/testdata/corpus/sql/types/decimal/test_decimal.test index 542d580..3aa6ce7 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof('0.1'::DECIMAL); diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal_2411.test b/parser/testdata/corpus/sql/types/decimal/test_decimal_2411.test index 4736fb7..62b8d62 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal_2411.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal_2411.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal_2411.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE decimals(i DECIMAL(38,1)) diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal_2975.test b/parser/testdata/corpus/sql/types/decimal/test_decimal_2975.test index 062be41..325c2e0 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal_2975.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal_2975.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal_2975.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table q (big decimal (38,10)) diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal_4106.test b/parser/testdata/corpus/sql/types/decimal/test_decimal_4106.test index 1e5b14b..b4f86a6 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal_4106.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal_4106.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal_4106.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE from_values AS VALUES (1000000), (10.0000000005); diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal_from_string.test b/parser/testdata/corpus/sql/types/decimal/test_decimal_from_string.test index c04fa67..fbe1285 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal_from_string.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal_from_string.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal_from_string.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '+1e-1'::DECIMAL(38,3) diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal_ops.test b/parser/testdata/corpus/sql/types/decimal/test_decimal_ops.test index 88bb296..4efc623 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal_ops.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal_ops.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal_ops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM decimals diff --git a/parser/testdata/corpus/sql/types/decimal/test_decimal_small_precision_behavior.test b/parser/testdata/corpus/sql/types/decimal/test_decimal_small_precision_behavior.test index 8a1b8fb..bd24593 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_decimal_small_precision_behavior.test +++ b/parser/testdata/corpus/sql/types/decimal/test_decimal_small_precision_behavior.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_decimal_small_precision_behavior.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '1.023450000001'::DECIMAL(5,4) diff --git a/parser/testdata/corpus/sql/types/decimal/test_empty_dec.test b/parser/testdata/corpus/sql/types/decimal/test_empty_dec.test index 7f9ccb0..61c0598 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_empty_dec.test +++ b/parser/testdata/corpus/sql/types/decimal/test_empty_dec.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_empty_dec.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE decs(i DEC(), j DEC) diff --git a/parser/testdata/corpus/sql/types/decimal/test_empty_decimal.test b/parser/testdata/corpus/sql/types/decimal/test_empty_decimal.test index 777a9da..2755079 100644 --- a/parser/testdata/corpus/sql/types/decimal/test_empty_decimal.test +++ b/parser/testdata/corpus/sql/types/decimal/test_empty_decimal.test @@ -1,6 +1,6 @@ # source: test/sql/types/decimal/test_empty_decimal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE decimals(i DECIMAL(), j DECIMAL) diff --git a/parser/testdata/corpus/sql/types/enum/create_enum_collection_alias.test b/parser/testdata/corpus/sql/types/enum/create_enum_collection_alias.test new file mode 100644 index 0000000..25ff790 --- /dev/null +++ b/parser/testdata/corpus/sql/types/enum/create_enum_collection_alias.test @@ -0,0 +1,93 @@ +# source: test/sql/types/enum/create_enum_collection_alias.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE enum_list AS ENUM ('sad', 'ok', 'happy')[] +-- +ok +== +CREATE TYPE enum_array AS ENUM ('sad', 'ok', 'happy')[2] +-- +ok +== +CREATE TYPE enum_list_of_arrays AS ENUM ('sad', 'ok', 'happy')[2][] +-- +ok +== +CREATE TYPE enum_array_of_lists AS ENUM ('sad', 'ok', 'happy')[][2] +-- +ok +== +CREATE TYPE enum_nested_arrays AS ENUM ('sad', 'ok', 'happy')[2][3] +-- +ok +== +CREATE TYPE enum_keyword_list AS ENUM ('sad', 'ok', 'happy') ARRAY +-- +ok +== +CREATE TYPE enum_keyword_array AS ENUM ('sad', 'ok', 'happy') ARRAY[2] +-- +ok +== +SELECT ['happy', 'sad']::enum_list, ['ok', 'happy']::enum_array, enum_range((['happy']::enum_list)[1]) +-- +ok +== +SELECT [['ok', 'sad'], ['happy', 'ok']]::enum_list_of_arrays, [[], ['sad']]::enum_array_of_lists +-- +ok +== +SELECT [['sad', 'ok'], ['ok', 'happy'], ['happy', 'sad']]::enum_nested_arrays +-- +ok +== +SELECT ['happy']::enum_keyword_list, ['sad', 'ok']::enum_keyword_array +-- +ok +== +CREATE TYPE "quoted enum list" AS ENUM ('it''s ok', 'comma, label', '[]')[] +-- +ok +== +SELECT labels[1], labels[2], labels[3] FROM (SELECT ['it''s ok', 'comma, label', '[]']::"quoted enum list" AS labels) +-- +ok +== +CREATE TYPE empty_enum AS ENUM () +-- +ok +== +SELECT len(enum_range(NULL::empty_enum)) +-- +ok +== +CREATE TYPE enum_from_query AS ENUM (SELECT label FROM (VALUES ('sad'), ('happy')) t(label)) +-- +ok +== +SELECT enum_range(NULL::enum_from_query) +-- +ok +== +CREATE TYPE duplicate_labels AS ENUM ('sad', 'sad')[] +-- +ok +== +CREATE TYPE null_label AS ENUM ('sad', NULL)[] +-- +ok +== +CREATE TYPE invalid_array AS ENUM ('sad', 'happy')[0] +-- +ok +== +SELECT ['invalid']::enum_list +-- +ok +== +SELECT ['happy']::enum_array +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/enum/standalone_enum.test b/parser/testdata/corpus/sql/types/enum/standalone_enum.test index d95cddb..6760719 100644 --- a/parser/testdata/corpus/sql/types/enum/standalone_enum.test +++ b/parser/testdata/corpus/sql/types/enum/standalone_enum.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/standalone_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'hello'::ENUM('world', 'hello'); diff --git a/parser/testdata/corpus/sql/types/enum/test_25633.test b/parser/testdata/corpus/sql/types/enum/test_25633.test new file mode 100644 index 0000000..eb92bf6 --- /dev/null +++ b/parser/testdata/corpus/sql/types/enum/test_25633.test @@ -0,0 +1,25 @@ +# source: test/sql/types/enum/test_25633.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE years AS ENUM ('2001', '2006'); +-- +ok +== +SELECT 'sad'::mood::UINTEGER; +-- +ok +== +SELECT TRY_CAST('sad'::mood AS UINTEGER); +-- +ok +== +SELECT '2001'::years::UINTEGER; +-- +ok +== +SET allow_persistent_secrets = 'sad'::mood; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/enum/test_26369.test b/parser/testdata/corpus/sql/types/enum/test_26369.test new file mode 100644 index 0000000..8c36346 --- /dev/null +++ b/parser/testdata/corpus/sql/types/enum/test_26369.test @@ -0,0 +1,21 @@ +# source: test/sql/types/enum/test_26369.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE mood AS ENUM(); +-- +ok +== +CREATE TABLE t (m mood); +-- +ok +== +PIVOT t ON m USING count(*) GROUP BY rowid; +-- +ok +== +SELECT m::VARCHAR FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/enum/test_3479.test b/parser/testdata/corpus/sql/types/enum/test_3479.test index 6471c9a..23a5898 100644 --- a/parser/testdata/corpus/sql/types/enum/test_3479.test +++ b/parser/testdata/corpus/sql/types/enum/test_3479.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_3479.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE mood_2 AS ENUM ('1', '2', '3'); diff --git a/parser/testdata/corpus/sql/types/enum/test_3641.test b/parser/testdata/corpus/sql/types/enum/test_3641.test index b2c1d76..eb4e742 100644 --- a/parser/testdata/corpus/sql/types/enum/test_3641.test +++ b/parser/testdata/corpus/sql/types/enum/test_3641.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_3641.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE mood_2 AS ENUM ('very sad', 'very ok', 'very happy'); diff --git a/parser/testdata/corpus/sql/types/enum/test_5983.test b/parser/testdata/corpus/sql/types/enum/test_5983.test index 59dab06..88d898b 100644 --- a/parser/testdata/corpus/sql/types/enum/test_5983.test +++ b/parser/testdata/corpus/sql/types/enum/test_5983.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_5983.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CALL DBGEN(sf=0.01); diff --git a/parser/testdata/corpus/sql/types/enum/test_6356.test b/parser/testdata/corpus/sql/types/enum/test_6356.test index 2ec7b89..5dde047 100644 --- a/parser/testdata/corpus/sql/types/enum/test_6356.test +++ b/parser/testdata/corpus/sql/types/enum/test_6356.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_6356.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a (a string, b mood); diff --git a/parser/testdata/corpus/sql/types/enum/test_alter_enum.test b/parser/testdata/corpus/sql/types/enum/test_alter_enum.test index 05aa7ed..bb4e8e6 100644 --- a/parser/testdata/corpus/sql/types/enum/test_alter_enum.test +++ b/parser/testdata/corpus/sql/types/enum/test_alter_enum.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_alter_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE person ( diff --git a/parser/testdata/corpus/sql/types/enum/test_enum.test b/parser/testdata/corpus/sql/types/enum/test_enum.test index 7ac8125..3cbab08 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE IF NOT EXISTS mood AS ENUM ('sad', 'ok', 'happy'); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_case.test b/parser/testdata/corpus/sql/types/enum/test_enum_case.test index e17afd5..3838602 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_case.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_case.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE E1 AS ENUM ('v1', 'v2'); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_cast.test b/parser/testdata/corpus/sql/types/enum/test_enum_cast.test index ebd93cc..232aae1 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_cast.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO person VALUES ('Pedro', 'ok'), ('Mark', 'sad'),('Moe', 'happy'), ('Diego', NULL); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_comparisons.test b/parser/testdata/corpus/sql/types/enum/test_enum_comparisons.test index 45dc2e6..4c7b8c3 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_comparisons.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_comparisons.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_comparisons.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE mood AS ENUM ('sad', 'quackity-quack', 'happy', 'ok'); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_constraints.test b/parser/testdata/corpus/sql/types/enum/test_enum_constraints.test index 9528b18..c61f478 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_constraints.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit drop type mood diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_duckdb_types.test b/parser/testdata/corpus/sql/types/enum/test_enum_duckdb_types.test index 9c7e5e9..40759c6 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_duckdb_types.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_duckdb_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_duckdb_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT type_name, logical_type FROM duckdb_types() WHERE NOT internal diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_range_boundary_rows.test b/parser/testdata/corpus/sql/types/enum/test_enum_range_boundary_rows.test new file mode 100644 index 0000000..8dd19e1 --- /dev/null +++ b/parser/testdata/corpus/sql/types/enum/test_enum_range_boundary_rows.test @@ -0,0 +1,29 @@ +# source: test/sql/types/enum/test_enum_range_boundary_rows.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE e AS ENUM ('a', 'b', 'c', 'd'); +-- +ok +== +CREATE TABLE t AS SELECT x::e e FROM (VALUES ('a'), ('c'), ('d')) t(x); +-- +ok +== +SELECT e, enum_range_boundary(NULL, e), enum_range_boundary(e, NULL), enum_range_boundary(e, 'c'::e) FROM t ORDER BY e +-- +ok +== +CREATE TABLE t2 AS SELECT x::e e FROM (VALUES (NULL), ('c')) t(x); +-- +ok +== +SELECT enum_range_boundary(e, NULL) FROM t2 ORDER BY e NULLS FIRST +-- +ok +== +SELECT enum_range_boundary(NULL, 'b'::e), enum_range_boundary('b'::e, 'a'::e) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_schema.test b/parser/testdata/corpus/sql/types/enum/test_enum_schema.test index e6ee3d4..462f06f 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_schema.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_schema.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_schema.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE s1.mood AS ENUM ('sad', 'ok', 'happy'); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_structs.test b/parser/testdata/corpus/sql/types/enum/test_enum_structs.test index 2c9d310..cd3f672 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_structs.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_structs.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_structs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET storage_compatibility_version='v0.10.2'; diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_table.test b/parser/testdata/corpus/sql/types/enum/test_enum_table.test index 99d044c..0471b8f 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_table.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_table.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_table.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO person VALUES ('Moe', 'diego'); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_temp_tbl.test b/parser/testdata/corpus/sql/types/enum/test_enum_temp_tbl.test index afa4a39..405636f 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_temp_tbl.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_temp_tbl.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_temp_tbl.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TEMP TABLE tbl_temp (name varchar , cur_mood mood); diff --git a/parser/testdata/corpus/sql/types/enum/test_enum_to_numbers.test b/parser/testdata/corpus/sql/types/enum/test_enum_to_numbers.test index 98edac5..3d82f62 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enum_to_numbers.test +++ b/parser/testdata/corpus/sql/types/enum/test_enum_to_numbers.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enum_to_numbers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create type enum_numstrings as enum ('1', '2', '3', '4'); diff --git a/parser/testdata/corpus/sql/types/enum/test_enums_and_built_in_types.test b/parser/testdata/corpus/sql/types/enum/test_enums_and_built_in_types.test index 7145349..7a4c5a0 100644 --- a/parser/testdata/corpus/sql/types/enum/test_enums_and_built_in_types.test +++ b/parser/testdata/corpus/sql/types/enum/test_enums_and_built_in_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/enum/test_enums_and_built_in_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE "integer" AS ENUM ('1', '2', '3'); diff --git a/parser/testdata/corpus/sql/types/float/ieee_floating_points.test b/parser/testdata/corpus/sql/types/float/ieee_floating_points.test index 7a94aa9..82f1413 100644 --- a/parser/testdata/corpus/sql/types/float/ieee_floating_points.test +++ b/parser/testdata/corpus/sql/types/float/ieee_floating_points.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/ieee_floating_points.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE tbl(val {type}) @@ -19,6 +19,14 @@ SELECT val, val % 0::{type} FROM tbl -- error: Parser Error: syntax error at or near "{" == +SET error_on_division_by_zero = false; +-- +ok +== +SET error_on_division_by_zero = true; +-- +ok +== SELECT sqrt(-1::{type}); -- error: Parser Error: syntax error at or near "{" diff --git a/parser/testdata/corpus/sql/types/float/infinity_test.test b/parser/testdata/corpus/sql/types/float/infinity_test.test index cccb36c..efbea3a 100644 --- a/parser/testdata/corpus/sql/types/float/infinity_test.test +++ b/parser/testdata/corpus/sql/types/float/infinity_test.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/infinity_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'INF'::{type}, '-INF'::{type} diff --git a/parser/testdata/corpus/sql/types/float/nan_aggregate.test b/parser/testdata/corpus/sql/types/float/nan_aggregate.test index 8063f70..933a1d2 100644 --- a/parser/testdata/corpus/sql/types/float/nan_aggregate.test +++ b/parser/testdata/corpus/sql/types/float/nan_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table floats(f {type}, i int); @@ -35,7 +35,7 @@ insert into floats_doubles VALUES (2e38, 1e308), (2e38, 1e308), (-1e38, 0), (-1e -- ok == -select sum(f) from floats_doubles where f > 0 +select sum(f), typeof(sum(f)) from floats_doubles where f > 0 -- ok == diff --git a/parser/testdata/corpus/sql/types/float/nan_aggregates.test b/parser/testdata/corpus/sql/types/float/nan_aggregates.test index c38c2f5..0601b78 100644 --- a/parser/testdata/corpus/sql/types/float/nan_aggregates.test +++ b/parser/testdata/corpus/sql/types/float/nan_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM('inf'::{type}), SUM('-inf'::{type}), SUM('nan'::{type}) diff --git a/parser/testdata/corpus/sql/types/float/nan_arithmetic.test b/parser/testdata/corpus/sql/types/float/nan_arithmetic.test index 4cd3cec..cf3bdfb 100644 --- a/parser/testdata/corpus/sql/types/float/nan_arithmetic.test +++ b/parser/testdata/corpus/sql/types/float/nan_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{val}'::{type} + 1 diff --git a/parser/testdata/corpus/sql/types/float/nan_cast.test b/parser/testdata/corpus/sql/types/float/nan_cast.test index 84dcbaa..1ea97a4 100644 --- a/parser/testdata/corpus/sql/types/float/nan_cast.test +++ b/parser/testdata/corpus/sql/types/float/nan_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{val}'::{source_type} diff --git a/parser/testdata/corpus/sql/types/float/nan_functions.test b/parser/testdata/corpus/sql/types/float/nan_functions.test index c7b6ce1..65d8d9e 100644 --- a/parser/testdata/corpus/sql/types/float/nan_functions.test +++ b/parser/testdata/corpus/sql/types/float/nan_functions.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT nextafter(3, '-inf'::{type}) diff --git a/parser/testdata/corpus/sql/types/float/nan_join.test b/parser/testdata/corpus/sql/types/float/nan_join.test index 2b0f5c3..53405eb 100644 --- a/parser/testdata/corpus/sql/types/float/nan_join.test +++ b/parser/testdata/corpus/sql/types/float/nan_join.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM floats JOIN (SELECT 'inf'::{type}) tbl(f) USING (f) diff --git a/parser/testdata/corpus/sql/types/float/nan_minmax_order.test b/parser/testdata/corpus/sql/types/float/nan_minmax_order.test new file mode 100644 index 0000000..14b9a78 --- /dev/null +++ b/parser/testdata/corpus/sql/types/float/nan_minmax_order.test @@ -0,0 +1,33 @@ +# source: test/sql/types/float/nan_minmax_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT MIN(f), MAX(f) FROM (VALUES ('nan'::{type}), (1::{type}), (2::{type})) t(f) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT MIN(f), MAX(f) FROM (VALUES (1::{type}), (2::{type}), ('nan'::{type})) t(f) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT MIN(f), MAX(f) FROM (VALUES ('nan'::{type}), ('nan'::{type})) t(f) +-- +error: Parser Error: syntax error at or near "{" +== +CREATE TABLE fl AS SELECT i, CASE WHEN i = 1 OR i = 9999 THEN 'nan'::{type} ELSE i::{type} END AS f FROM range(1, 10001) t(i) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT MIN(f), MAX(f) FROM fl +-- +ok +== +SELECT (i = 1 OR i = 9999) AS nan_group, MIN(f), MAX(f) FROM fl GROUP BY 1 ORDER BY 1 +-- +ok +== +DROP TABLE fl +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/float/nan_ordering.test b/parser/testdata/corpus/sql/types/float/nan_ordering.test index e01d32a..c116799 100644 --- a/parser/testdata/corpus/sql/types/float/nan_ordering.test +++ b/parser/testdata/corpus/sql/types/float/nan_ordering.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_ordering.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE floats(f {type}); diff --git a/parser/testdata/corpus/sql/types/float/nan_test.test b/parser/testdata/corpus/sql/types/float/nan_test.test index a899e31..bf5b603 100644 --- a/parser/testdata/corpus/sql/types/float/nan_test.test +++ b/parser/testdata/corpus/sql/types/float/nan_test.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 'NAN'::{type} diff --git a/parser/testdata/corpus/sql/types/float/nan_window.test b/parser/testdata/corpus/sql/types/float/nan_window.test index f4485b7..fa1fe4b 100644 --- a/parser/testdata/corpus/sql/types/float/nan_window.test +++ b/parser/testdata/corpus/sql/types/float/nan_window.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nan_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT f, SUM(i) OVER (PARTITION BY f) FROM floats ORDER BY f diff --git a/parser/testdata/corpus/sql/types/float/nested_nan.test b/parser/testdata/corpus/sql/types/float/nested_nan.test index 2aa6925..0ae5818 100644 --- a/parser/testdata/corpus/sql/types/float/nested_nan.test +++ b/parser/testdata/corpus/sql/types/float/nested_nan.test @@ -1,6 +1,6 @@ # source: test/sql/types/float/nested_nan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ['nan'::double] diff --git a/parser/testdata/corpus/sql/types/geo/geometry.test b/parser/testdata/corpus/sql/types/geo/geometry.test index 114cfef..0874e6b 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry.test +++ b/parser/testdata/corpus/sql/types/geo/geometry.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(id INT, g GEOMETRY); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_blob_cast.test b/parser/testdata/corpus/sql/types/geo/geometry_blob_cast.test new file mode 100644 index 0000000..863a9b3 --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_blob_cast.test @@ -0,0 +1,90 @@ +# source: test/sql/types/geo/geometry_blob_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +insert into t1 values + (1, 'POINT(0 1)'), + (2, 'LINESTRING Z (0 0 1, 1 1 2)'), + (3, 'POLYGON M ((0 0 1, 4 0 2, 4 4 3, 0 4 4, 0 0 1))'), + (4, 'MULTIPOINT ZM ((1 1 1 1), (2 2 2 2))'), + (5, 'GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(0 0, 1 1))'), + (6, 'POINT EMPTY'), + (7, NULL); +-- +ok +== +select count(*) from t1 where g::BLOB IS NOT DISTINCT FROM ST_AsWKB(g); +-- +ok +== +select typeof(g::BLOB), hex(g::BLOB) from t1 where id = 1; +-- +ok +== +select id, g::BLOB::GEOMETRY from t1 order by id; +-- +ok +== +select count(*) from t1 where g::BLOB::GEOMETRY IS NOT DISTINCT FROM ST_GeomFromWKB(g::BLOB); +-- +ok +== +select '\x00\x00\x00\x00\x01\x3F\xF0\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00'::BLOB::GEOMETRY, + hex('\x00\x00\x00\x00\x01\x3F\xF0\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00'::BLOB::GEOMETRY::BLOB); +-- +ok +== +select g, typeof(g) from (select ST_AsWKB('POINT(1 2)'::GEOMETRY)::GEOMETRY('OGC:CRS84') as g); +-- +ok +== +select hex('POINT(1 2)'::GEOMETRY('OGC:CRS84')::BLOB); +-- +ok +== +select '\x01\x02'::BLOB::GEOMETRY; +-- +ok +== +select (ST_AsWKB('POINT(1 2)'::GEOMETRY) || ST_AsWKB('POINT(9 9)'::GEOMETRY))::GEOMETRY; +-- +ok +== +select '\x01\x08\x00\x00\x00'::BLOB::GEOMETRY; +-- +ok +== +select TRY_CAST('\x01\x02'::BLOB AS GEOMETRY); +-- +ok +== +select id, TRY_CAST(b AS GEOMETRY) from (values + (1, ST_AsWKB('POINT(1 2)'::GEOMETRY)), + (2, '\x01\x02'::BLOB), + (3, NULL::BLOB), + (4, ST_AsWKB('LINESTRING(0 0, 1 1)'::GEOMETRY))) t(id, b) +order by id; +-- +ok +== +select ST_AsText(ST_AsWKB('POINT(1 2)'::GEOMETRY)); +-- +ok +== +create table t2 as select id, g::BLOB as b from t1; +-- +ok +== +select id, b::GEOMETRY from t2 order by id; +-- +ok +== +insert into t1 select id + 100, b from t2; +-- +ok +== +select count(*) from t1 where g IS NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_blob_cast_invalid_parts.test b/parser/testdata/corpus/sql/types/geo/geometry_blob_cast_invalid_parts.test new file mode 100644 index 0000000..36153f1 --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_blob_cast_invalid_parts.test @@ -0,0 +1,41 @@ +# source: test/sql/types/geo/geometry_blob_cast_invalid_parts.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT from_hex('0104000000020000000101000000000000000000f03f000000000000004001020000000200000000000000000000000000000000000000000000000000f03f000000000000f03f')::GEOMETRY +-- +ok +== +SELECT from_hex('0104000000020000000101000000000000000000f03f000000000000004001e9030000000000000000f03f00000000000000400000000000000840')::GEOMETRY +-- +ok +== +SELECT from_hex('0107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000101000000000000000000f03f0000000000000040')::GEOMETRY +-- +ok +== +SELECT TRY_CAST(from_hex(x) AS GEOMETRY) IS NULL FROM (VALUES ('0104000000020000000101000000000000000000f03f000000000000004001020000000200000000000000000000000000000000000000000000000000f03f000000000000f03f'), ('0104000000020000000101000000000000000000f03f000000000000004001e9030000000000000000f03f00000000000000400000000000000840'), ('0107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000101000000000000000000f03f0000000000000040')) t(x) +-- +ok +== +CREATE TABLE geometries(g GEOMETRY) +-- +ok +== +INSERT INTO geometries SELECT from_hex('0104000000020000000101000000000000000000f03f000000000000004001020000000200000000000000000000000000000000000000000000000000f03f000000000000f03f')::GEOMETRY +-- +ok +== +SELECT from_hex('0104000000020000000101000000000000000000f03f00000000000000400101000000000000000000f03f0000000000000040')::GEOMETRY +-- +ok +== +SELECT from_hex('0107000000020000000104000000010000000101000000000000000000f03f000000000000004001020000000200000000000000000000000000000000000000000000000000f03f000000000000f03f')::GEOMETRY +-- +ok +== +SELECT from_hex('0107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000107000000010000000101000000000000000000f03f0000000000000040')::GEOMETRY IS NOT NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_compatability.test b/parser/testdata/corpus/sql/types/geo/geometry_compatability.test index c35a4ce..e9cadb6 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_compatability.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_compatability.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_compatability.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit copy (select content from read_blob('{DATA_DIR}/storage/spatial_geo.db')) to '{TEST_DIR}/geo.db' (format BLOB); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_crs.test b/parser/testdata/corpus/sql/types/geo/geometry_crs.test index 43f1edb..be59783 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_crs.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_crs.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_crs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select st_crs(NULL); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_crs_formats.test b/parser/testdata/corpus/sql/types/geo/geometry_crs_formats.test new file mode 100644 index 0000000..25e24d4 --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_crs_formats.test @@ -0,0 +1,29 @@ +# source: test/sql/types/geo/geometry_crs_formats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof('POINT(0 1)'::GEOMETRY(' OGC:CRS84 ')); +-- +ok +== +SELECT typeof('POINT(0 1)'::GEOMETRY($wkt$PROJCRS("Web Mercator",ID("EPSG",3857))$wkt$)); +-- +ok +== +SELECT typeof('POINT(0 1)'::GEOMETRY($wkt$GEOGCRS["WGS ""Quoted""",ID["OGC","Q1"]]$wkt$)); +-- +ok +== +SELECT typeof('POINT(0 1)'::GEOMETRY( + $wkt$BOUNDCRS[SOURCECRS["A"],TARGETCRS["B"],ABRIDGEDTRANSFORMATION["Transform",ID["EPSG",1234]]]$wkt$ +)); +-- +ok +== +SELECT typeof('POINT(0 1)'::GEOMETRY( + $wkt$BOUNDCRS[SOURCECRS["A"],TARGETCRS["B"],ABRIDGEDTRANSFORMATION["Fallback Name"]]$wkt$ +)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_crs_persist.test b/parser/testdata/corpus/sql/types/geo/geometry_crs_persist.test new file mode 100644 index 0000000..b12ed4c --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_crs_persist.test @@ -0,0 +1,49 @@ +# source: test/sql/types/geo/geometry_crs_persist.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE wkb (g GEOMETRY('OGC:CRS84')); +-- +ok +== +INSERT INTO wkb SELECT (CASE WHEN x % 2 = 0 THEN 'POINT (' || x || ' ' || x || ')' ELSE 'LINESTRING (0 0, ' || x || ' ' || x || ')' END)::GEOMETRY('OGC:CRS84') FROM range(100) r(x); +-- +ok +== +CREATE TABLE shredded (g GEOMETRY('OGC:CRS84')); +-- +ok +== +INSERT INTO shredded SELECT ('POINT (' || x || ' ' || x || ')')::GEOMETRY('OGC:CRS84') FROM range(100) r(x); +-- +ok +== +SELECT g, typeof(g) FROM wkb ORDER BY rowid LIMIT 2; +-- +ok +== +SELECT g, typeof(g) FROM shredded ORDER BY rowid LIMIT 2; +-- +ok +== +DELETE FROM wkb WHERE rowid % 3 = 0; +-- +ok +== +DELETE FROM shredded WHERE rowid % 3 = 0; +-- +ok +== +SELECT g FROM wkb ORDER BY rowid LIMIT 3; +-- +ok +== +SELECT g FROM shredded ORDER BY rowid LIMIT 3; +-- +ok +== +SELECT count(*) FROM wkb; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_crs_projjson.test b/parser/testdata/corpus/sql/types/geo/geometry_crs_projjson.test index 24c3171..dbaa930 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_crs_projjson.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_crs_projjson.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_crs_projjson.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof('POINT(0 1)'::GEOMETRY(' diff --git a/parser/testdata/corpus/sql/types/geo/geometry_crs_wkt2.test b/parser/testdata/corpus/sql/types/geo/geometry_crs_wkt2.test index 52ccc94..83a9c98 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_crs_wkt2.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_crs_wkt2.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_crs_wkt2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof('POINT(0 1)'::GEOMETRY('GEOGCRS["WGS 84 (CRS84)", diff --git a/parser/testdata/corpus/sql/types/geo/geometry_from_wkb_stats.test b/parser/testdata/corpus/sql/types/geo/geometry_from_wkb_stats.test index 87c4c22..caeed84 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_from_wkb_stats.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_from_wkb_stats.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_from_wkb_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lines_wkb(wkb BLOB); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_intersection_filter_parquet.test b/parser/testdata/corpus/sql/types/geo/geometry_intersection_filter_parquet.test index 863c25a..83d3c8f 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_intersection_filter_parquet.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_intersection_filter_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_intersection_filter_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( diff --git a/parser/testdata/corpus/sql/types/geo/geometry_intersects.test b/parser/testdata/corpus/sql/types/geo/geometry_intersects.test index 16f827b..ebfaba8 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_intersects.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_intersects.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_intersects.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 'POINT(0 1)'::GEOMETRY && 'POINT(0 0)'::GEOMETRY; diff --git a/parser/testdata/corpus/sql/types/geo/geometry_legacy_recheckpoint.test b/parser/testdata/corpus/sql/types/geo/geometry_legacy_recheckpoint.test index 9911b5a..f667c2e 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_legacy_recheckpoint.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_legacy_recheckpoint.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_legacy_recheckpoint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/geometry_legacy_recheckpoint.db' AS db (STORAGE_VERSION 'v1.4.4'); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_nonascii_cast.test b/parser/testdata/corpus/sql/types/geo/geometry_nonascii_cast.test index 48720a6..c64be3c 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_nonascii_cast.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_nonascii_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_nonascii_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 'pä int(0 1)'::GEOMETRY diff --git a/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test b/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test index b5eeee9..0f4c8d7 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_parquet_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY ( @@ -33,3 +33,20 @@ WHERE t.type = 'TABLE_SCAN'; -- ok == +PRAGMA profiling_output = '{TEST_DIR}/output_multi.json'; +-- +error: Parser Error: Profiler file type ({TEST_DIR}/output_multi.json) must either have the same file extension as the profiling output type (query_tree), or be a '.txt' file. Set "enable_profiling = 'json'" first. +== +select * from '{TEST_DIR}/points.parquet' where g && 'POLYGON((10 10, 20 10, 20 20, 10 20, 10 10))'::GEOMETRY and id::VARCHAR::INT >= 0; +-- +ok +== +SELECT t.row_groups_scanned +FROM '{TEST_DIR}/output_multi.json' prof, + LATERAL unnest(prof.operator) t0(op0), + LATERAL unnest(op0.children) t1(op1), + LATERAL unnest(op1.children) t2(t) +WHERE t.type = 'TABLE_SCAN'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test.metadata.json b/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test.metadata.json index 2a074e6..cb6eeab 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test.metadata.json +++ b/parser/testdata/corpus/sql/types/geo/geometry_parquet_pushdown.test.metadata.json @@ -1,5 +1,6 @@ { "todo": { - "6d655e14266461ae": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" + "6d655e14266461ae": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work", + "826ed4638e7eabb5": "oracle's Parser Error comes from outside the parse pipeline (bind-time setting/function/constraint validation or nested SQL parsing); darkwing accepts by design - revisit with milestone 6 error-fidelity work" } } diff --git a/parser/testdata/corpus/sql/types/geo/geometry_persist.test b/parser/testdata/corpus/sql/types/geo/geometry_persist.test index bd28f9b..fcce043 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_persist.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_persist.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_persist.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(g GEOMETRY); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_persist_wal.test b/parser/testdata/corpus/sql/types/geo/geometry_persist_wal.test index 36ec320..9f6ecf4 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_persist_wal.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_persist_wal.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_persist_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/geometry_wal.db' AS geo_wal (STORAGE_VERSION 'v1.5.0') diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred.test b/parser/testdata/corpus/sql/types/geo/geometry_shred.test index 14f66ad..2b5b6a0 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET geometry_minimum_shredding_size = 0; diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_deletes.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_deletes.test index 29e66a1..ddcfb65 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_deletes.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set checkpoint_threshold='10gb' diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_empty.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_empty.test index fdb61b7..d39df84 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_empty.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_empty.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(type VARCHAR, has_z BOOLEAN, has_m BOOLEAN, g GEOMETRY); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_fetch.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_fetch.test index 0b5d76a..864b14d 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_fetch.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_fetch.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_fetch.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(g geometry, id integer); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_limit.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_limit.test index 738d770..bec5685 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_limit.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_limit.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_limit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET geometry_minimum_shredding_size = 3; diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_list.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_list.test index bade743..7fd99f8 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_list.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1(g geometry[], id integer); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_more.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_more.test index 5b28453..1b61baf 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_more.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_more.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_more.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET checkpoint_threshold='10gb'; diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_pk_append.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_pk_append.test index c8f8ff6..efe05fd 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_shred_pk_append.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_pk_append.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_shred_pk_append.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(id UUID PRIMARY KEY, g GEOMETRY); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_shred_shapes.test b/parser/testdata/corpus/sql/types/geo/geometry_shred_shapes.test new file mode 100644 index 0000000..46c337f --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_shred_shapes.test @@ -0,0 +1,97 @@ +# source: test/sql/types/geo/geometry_shred_shapes.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET geometry_minimum_shredding_size = 0 +-- +ok +== +CREATE TABLE points(g GEOMETRY) +-- +ok +== +INSERT INTO points VALUES ('POINT(1 2)'), (NULL) +-- +ok +== +CREATE TABLE lines(g GEOMETRY) +-- +ok +== +INSERT INTO lines VALUES ('LINESTRING(0 0, 1 1)'), (NULL) +-- +ok +== +CREATE TABLE polygons(g GEOMETRY) +-- +ok +== +INSERT INTO polygons VALUES ('POLYGON((0 0, 4 0, 4 4, 0 0))'), (NULL) +-- +ok +== +CREATE TABLE multipoints(g GEOMETRY) +-- +ok +== +INSERT INTO multipoints VALUES ('MULTIPOINT(0 0, 1 1)'), (NULL) +-- +ok +== +CREATE TABLE multilines(g GEOMETRY) +-- +ok +== +INSERT INTO multilines VALUES ('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))'), (NULL) +-- +ok +== +CREATE TABLE multipolygons(g GEOMETRY) +-- +ok +== +INSERT INTO multipolygons VALUES + ('MULTIPOLYGON(((0 0, 4 0, 4 4, 0 0)), ((5 5, 6 5, 6 6, 5 5)))'), + (NULL) +-- +ok +== +SELECT segment_type FROM pragma_storage_info('points') WHERE segment_type = 'GEOMETRY' +UNION ALL +SELECT segment_type FROM pragma_storage_info('lines') WHERE segment_type = 'GEOMETRY' +UNION ALL +SELECT segment_type FROM pragma_storage_info('polygons') WHERE segment_type = 'GEOMETRY' +UNION ALL +SELECT segment_type FROM pragma_storage_info('multipoints') WHERE segment_type = 'GEOMETRY' +UNION ALL +SELECT segment_type FROM pragma_storage_info('multilines') WHERE segment_type = 'GEOMETRY' +UNION ALL +SELECT segment_type FROM pragma_storage_info('multipolygons') WHERE segment_type = 'GEOMETRY' +-- +ok +== +SELECT g FROM points ORDER BY rowid +-- +ok +== +SELECT g FROM lines ORDER BY rowid +-- +ok +== +SELECT g FROM polygons ORDER BY rowid +-- +ok +== +SELECT g FROM multipoints ORDER BY rowid +-- +ok +== +SELECT g FROM multilines ORDER BY rowid +-- +ok +== +SELECT g FROM multipolygons ORDER BY rowid +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_stats.test b/parser/testdata/corpus/sql/types/geo/geometry_stats.test index 7951ec4..2a4dadc 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_stats.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_stats.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into t1 values (0, 'POINT(0 0)'::GEOMETRY); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_stats_prune.test b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune.test index d3440b2..01e867f 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_stats_prune.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_stats_prune.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ATTACH '{TEST_DIR}/repro_geo_rowgroup.db' AS geoms (ROW_GROUP_SIZE 2048, STORAGE_VERSION 'v1.5.0'); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_nan.test b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_nan.test new file mode 100644 index 0000000..f82806e --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_nan.test @@ -0,0 +1,37 @@ +# source: test/sql/types/geo/geometry_stats_prune_nan.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE p(g GEOMETRY); +-- +ok +== +INSERT INTO p VALUES ('POINT(nan 5)'), ('POINT(1 1)'); +-- +ok +== +SELECT list(g && 'POINT(100 5)'::GEOMETRY ORDER BY g::VARCHAR) FROM p; +-- +ok +== +SELECT count(*) FROM p WHERE g && 'POINT(100 5)'::GEOMETRY; +-- +ok +== +SELECT count(*) FROM p WHERE g && 'POINT(1 1)'::GEOMETRY; +-- +ok +== +CREATE TABLE persisted AS SELECT CASE WHEN i = 7 THEN 'POINT(nan 5)'::GEOMETRY ELSE ('POINT(' || i || ' 1)')::GEOMETRY END g FROM range(5000) t(i); +-- +ok +== +SELECT count(*) FROM persisted WHERE g && 'POINT(100000 5)'::GEOMETRY; +-- +ok +== +SELECT count(*) FROM persisted WHERE g && 'POINT(3 1)'::GEOMETRY; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_null.test b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_null.test new file mode 100644 index 0000000..4493154 --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_null.test @@ -0,0 +1,72 @@ +# source: test/sql/types/geo/geometry_stats_prune_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +COPY ( + SELECT + CASE + WHEN i % 10 = 0 THEN NULL + ELSE printf('POINT(%d %d)', i % 100, i % 100)::GEOMETRY + END AS g, + i AS id + FROM range(1000) tbl(i) +) TO '{TEST_DIR}/duckdb_geo_nullable.parquet' (FORMAT PARQUET, GEOPARQUET_VERSION 'V2', ROW_GROUP_SIZE 1000); +-- +ok +== +SELECT count(*) FROM '{TEST_DIR}/duckdb_geo_nullable.parquet' WHERE g && 'POLYGON((-1 -1, 200 -1, 200 200, -1 200, -1 -1))'::GEOMETRY; +-- +ok +== +CREATE TABLE geo_nullable AS + SELECT + CASE + WHEN i % 10 = 0 THEN NULL + ELSE printf('POINT(%d %d)', i % 100, i % 100)::GEOMETRY + END AS g, + i AS id + FROM range(1000) tbl(i); +-- +ok +== +SELECT count(*) FROM geo_nullable WHERE g && 'POLYGON((-1 -1, 200 -1, 200 200, -1 200, -1 -1))'::GEOMETRY; +-- +ok +== +CREATE TABLE geo_not_null AS SELECT printf('POINT(%d %d)', i % 100, i % 100)::GEOMETRY AS g FROM range(1000) tbl(i); +-- +ok +== +SELECT count(*) FROM geo_not_null WHERE g && 'POLYGON((-1 -1, 200 -1, 200 200, -1 200, -1 -1))'::GEOMETRY; +-- +ok +== +EXPLAIN SELECT count(*) FROM geo_not_null WHERE g && 'POLYGON((-1 -1, 200 -1, 200 200, -1 200, -1 -1))'::GEOMETRY; +-- +ok +== +SELECT count(*) FROM geo_nullable WHERE g && 'POLYGON((500 500, 600 500, 600 600, 500 600, 500 500))'::GEOMETRY; +-- +ok +== +CREATE TABLE geo_empty AS SELECT printf('POINT(%d %d)', i % 100, i % 100)::GEOMETRY AS g FROM range(999) tbl(i); +-- +ok +== +INSERT INTO geo_empty VALUES ('POLYGON EMPTY'::GEOMETRY); +-- +ok +== +SELECT count(*) FROM geo_empty WHERE g && 'POLYGON((-1 -1, 200 -1, 200 200, -1 200, -1 -1))'::GEOMETRY; +-- +ok +== +COPY (SELECT * FROM geo_empty) TO '{TEST_DIR}/duckdb_geo_empty.parquet' (FORMAT PARQUET, GEOPARQUET_VERSION 'V2', ROW_GROUP_SIZE 2000); +-- +ok +== +SELECT count(*) FROM '{TEST_DIR}/duckdb_geo_empty.parquet' WHERE g && 'POLYGON((-1 -1, 200 -1, 200 200, -1 200, -1 -1))'::GEOMETRY; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_shredded.test b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_shredded.test index d2aa8fd..d7826ba 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_shredded.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_stats_prune_shredded.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_stats_prune_shredded.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit set geometry_minimum_shredding_size=0; diff --git a/parser/testdata/corpus/sql/types/geo/geometry_storage_version.test b/parser/testdata/corpus/sql/types/geo/geometry_storage_version.test index a6d1d24..af1f179 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_storage_version.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_storage_version.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_storage_version.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/geometry.db' (STORAGE_VERSION 'v1.4.4'); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_try_cast_malformed.test b/parser/testdata/corpus/sql/types/geo/geometry_try_cast_malformed.test new file mode 100644 index 0000000..dcb927b --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_try_cast_malformed.test @@ -0,0 +1,58 @@ +# source: test/sql/types/geo/geometry_try_cast_malformed.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST('POINT(1 2' AS GEOMETRY), TRY_CAST('FOO(1 2)' AS GEOMETRY), TRY_CAST('POINT(1 2) x' AS GEOMETRY), + TRY_CAST('POINT(1 2)' AS GEOMETRY); +-- +ok +== +SELECT TRY_CAST(['POINT(1 2)', 'POINT('] AS GEOMETRY[]); +-- +ok +== +SELECT TRY_CAST(g AS GEOMETRY) FROM (VALUES ('POINT(1 2)'), ('LINESTRING(0 0'), (NULL), ('POINT EMPTY')) t(g); +-- +ok +== +SELECT CAST('POINT(1 2' AS GEOMETRY); +-- +ok +== +SELECT CAST('POINT(1 2) x' AS GEOMETRY); +-- +ok +== +COPY (SELECT * FROM (VALUES ('POINT(1 2)'), ('POINT(1'), ('POINT(3 4)')) t(g)) TO '{TEMP_DIR}/malformed_wkt.csv' (HEADER); +-- +ok +== +SELECT g FROM read_csv('{TEMP_DIR}/malformed_wkt.csv', columns={'g': 'GEOMETRY'}, header=true, ignore_errors=true); +-- +ok +== +SELECT g FROM read_csv('{TEMP_DIR}/malformed_wkt.csv', columns={'g': 'GEOMETRY'}, header=true, store_rejects=true); +-- +ok +== +SELECT line, error_type FROM reject_errors; +-- +ok +== +SELECT g FROM read_csv('{TEMP_DIR}/malformed_wkt.csv', columns={'g': 'GEOMETRY'}, header=true); +-- +ok +== +CREATE TABLE geoms (g GEOMETRY); +-- +ok +== +COPY geoms FROM '{TEMP_DIR}/malformed_wkt.csv' (HEADER, IGNORE_ERRORS); +-- +ok +== +SELECT g FROM geoms; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_update.test b/parser/testdata/corpus/sql/types/geo/geometry_update.test index a689605..3d74fac 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_update.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_update.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (id INT, geo GEOMETRY) diff --git a/parser/testdata/corpus/sql/types/geo/geometry_vertex_extract.test b/parser/testdata/corpus/sql/types/geo/geometry_vertex_extract.test index 8a2f041..43f09c7 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_vertex_extract.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_vertex_extract.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_vertex_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT vertex_extract('POINT(1 2)'::GEOMETRY, 'x'); diff --git a/parser/testdata/corpus/sql/types/geo/geometry_wkb.test b/parser/testdata/corpus/sql/types/geo/geometry_wkb.test index c8330e9..45a551e 100644 --- a/parser/testdata/corpus/sql/types/geo/geometry_wkb.test +++ b/parser/testdata/corpus/sql/types/geo/geometry_wkb.test @@ -1,6 +1,6 @@ # source: test/sql/types/geo/geometry_wkb.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into t1 values @@ -19,6 +19,18 @@ select id, ST_AsText(ST_GeomFromWKB(ST_AsWKB(g))) from t1 order by id; -- ok == +SELECT ST_GeomFromWKB(ST_AsWKB('POINT(1 2)'::GEOMETRY) || ST_AsWKB('POINT(9 9)'::GEOMETRY)); +-- +ok +== +SELECT octet_length(ST_AsWKB(g)) FROM (SELECT ST_GeomFromWKB(x) AS g FROM (VALUES (''::BLOB)) t(x)); +-- +ok +== +SELECT octet_length(ST_AsWKB(g)) FROM (SELECT ST_GeomFromWKB(x) AS g FROM (VALUES (unhex('0107000000020000000101000000000000000000F03F0000000000000040'))) t(x)); +-- +ok +== create table t_all_types(id INT, g GEOMETRY); -- ok diff --git a/parser/testdata/corpus/sql/types/geo/geometry_wkb_depth.test b/parser/testdata/corpus/sql/types/geo/geometry_wkb_depth.test new file mode 100644 index 0000000..2e5b0a7 --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_wkb_depth.test @@ -0,0 +1,37 @@ +# source: test/sql/types/geo/geometry_wkb_depth.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT ST_AsText(ST_GeomFromWKB(from_hex(repeat('010700000001000000', 15) || '010700000000000000')))[1:40]; +-- +ok +== +SELECT octet_length(ST_AsWKB(ST_GeomFromWKB(from_hex(repeat('010700000001000000', 16) || '010700000000000000')))); +-- +ok +== +SELECT octet_length(ST_AsWKB(from_hex(repeat('010700000001000000', 50000) || '010700000000000000')::GEOMETRY)); +-- +ok +== +SELECT octet_length(ST_AsWKB(ST_GeomFromWKB(from_hex(repeat('000000000700000001', 16) || '000000000700000000')))); +-- +ok +== +SELECT octet_length(ST_AsWKB(TRY_CAST(from_hex(repeat('010700000001000000', 16) || '010700000000000000') AS GEOMETRY))), octet_length(ST_AsWKB(TRY_CAST(from_hex(repeat('010700000001000000', 50000) || '010700000000000000') AS GEOMETRY))); +-- +ok +== +SELECT ST_AsText(ST_GeomFromWKB(from_hex('0107000000020000000107000000000000000101000000000000000000F03F0000000000000040'))); +-- +ok +== +CREATE TABLE geoms AS SELECT ST_GeomFromWKB(from_hex(repeat('010700000001000000', 15) || '0101000000000000000000F03F0000000000000040')) g; +-- +ok +== +SELECT ST_AsText(g)[-30:] FROM geoms; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/geo/geometry_wkb_invalid_flag.test b/parser/testdata/corpus/sql/types/geo/geometry_wkb_invalid_flag.test new file mode 100644 index 0000000..95e0c2f --- /dev/null +++ b/parser/testdata/corpus/sql/types/geo/geometry_wkb_invalid_flag.test @@ -0,0 +1,29 @@ +# source: test/sql/types/geo/geometry_wkb_invalid_flag.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT from_hex('01A10F0000000000000000F03F0000000000000040')::GEOMETRY; +-- +ok +== +SELECT TRY_CAST(from_hex('01A10F0000000000000000F03F0000000000000040') AS GEOMETRY); +-- +ok +== +SELECT from_hex('01A10F0000000000000000F03F0000000000000040')::GEOMETRY && 'POINT(1 2)'; +-- +ok +== +CREATE TABLE g(geom GEOMETRY); +-- +ok +== +INSERT INTO g VALUES (from_hex('01A10F0000000000000000F03F0000000000000040')); +-- +ok +== +SELECT st_astext(from_hex('01B90B0000000000000000F03F000000000000004000000000000008400000000000001040')::GEOMETRY); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/hugeint/hugeint_multiply.test b/parser/testdata/corpus/sql/types/hugeint/hugeint_multiply.test index ee477b0..73a1cc8 100644 --- a/parser/testdata/corpus/sql/types/hugeint/hugeint_multiply.test +++ b/parser/testdata/corpus/sql/types/hugeint/hugeint_multiply.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/hugeint_multiply.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 251658240::HUGEINT * 251658240::HUGEINT diff --git a/parser/testdata/corpus/sql/types/hugeint/hugeint_sum_overflow.test b/parser/testdata/corpus/sql/types/hugeint/hugeint_sum_overflow.test index 9ddcf8b..8831eba 100644 --- a/parser/testdata/corpus/sql/types/hugeint/hugeint_sum_overflow.test +++ b/parser/testdata/corpus/sql/types/hugeint/hugeint_sum_overflow.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/hugeint_sum_overflow.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(170141183460469231731687303715884105727) FROM range(10); diff --git a/parser/testdata/corpus/sql/types/hugeint/hugeint_try_cast.test b/parser/testdata/corpus/sql/types/hugeint/hugeint_try_cast.test index e1ea233..978bd28 100644 --- a/parser/testdata/corpus/sql/types/hugeint/hugeint_try_cast.test +++ b/parser/testdata/corpus/sql/types/hugeint/hugeint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/hugeint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST('170141183460469231731687303715884105728' AS HUGEINT) diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_aggregates.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_aggregates.test index 720b449..67e19f8 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_aggregates.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints(g INTEGER, h HUGEINT); diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_arithmetic.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_arithmetic.test index 84b218f..47d842f 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_arithmetic.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT -(100::HUGEINT), -(-(50::HUGEINT)); @@ -115,6 +115,10 @@ SELECT 100::HUGEINT // 0::HUGEINT -- ok == +SELECT TRY(100::HUGEINT // 0::HUGEINT) +-- +ok +== SELECT '100000000000000000000000000000000000000'::HUGEINT // '10000000000000'::HUGEINT, '100000000000000000000000000000000000000'::HUGEINT // '2'::HUGEINT -- ok @@ -135,6 +139,10 @@ SELECT 100::HUGEINT % 0::HUGEINT -- ok == +SELECT TRY(100::HUGEINT % 0::HUGEINT) +-- +ok +== SELECT '100000000000000000000000000000000000000'::HUGEINT % '6587689457689375689735'::HUGEINT, '100000000000000000000000000000000000000'::HUGEINT % '3'::HUGEINT -- ok diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_auto_cast.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_auto_cast.test index 1e653e6..84b9744 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_auto_cast.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_auto_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_auto_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 10000000000000000000::HUGEINT + 100::TINYINT, 10000000000000000000::HUGEINT + 100::SMALLINT, 10000000000000000000::HUGEINT + 100::INTEGER, 10000000000000000000::HUGEINT + 100::BIGINT; diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_bitwise.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_bitwise.test index 2f63cd6..9a3fafe 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_bitwise.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_bitwise.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_bitwise.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1::HUGEINT << 3 diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_conversion.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_conversion.test index 1ec5297..7b9a4de 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_conversion.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_conversion.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_conversion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '7'::HUGEINT, '130'::HUGEINT, '924829852'::HUGEINT @@ -47,6 +47,28 @@ SELECT '-170141183460469231731687303715884105729'::HUGEINT; -- ok == +SELECT + '0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'::HUGEINT, + '0b01111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111'::HUGEINT, + '0x000000000000000000000000000000000000000000000000000000000000000007'::HUGEINT, + '0b00000000_00101010'::HUGEINT; +-- +ok +== +SELECT '0x80000000000000000000000000000000'::HUGEINT; +-- +ok +== +SELECT '0b10000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000'::HUGEINT; +-- +ok +== +SELECT + TRY_CAST('0x80000000000000000000000000000000' AS HUGEINT), + TRY_CAST('0b10000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000' AS HUGEINT); +-- +ok +== SELECT 42::TINYINT::HUGEINT, 42::SMALLINT::HUGEINT, 42::INTEGER::HUGEINT, 42::BIGINT::HUGEINT, 42::FLOAT::HUGEINT, 42::DOUBLE::HUGEINT; -- ok @@ -139,6 +161,10 @@ SELECT typeof(10), typeof(10000000000), typeof(170141183460469231731687303715884 -- ok == +FROM query('SELECT typeof(1' || repeat('0', 274) || '), typeof(1' || repeat('0', 294) || '), typeof(2' || repeat('0', 294) || '), (1' || repeat('0', 274) || ') = 1e274') +-- +ok +== select 1e30, 1e100, 1e-1 -- ok diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_exponent.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_exponent.test index 6430e1c..c0b7812 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_exponent.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_exponent.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_exponent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '170141183460469231731687303715884105700e0'::hugeint @@ -23,15 +23,15 @@ select '2e38'::hugeint -- ok == -select '0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e5'::hugeint; +select ('0.' || repeat('0', 288) || '1e5')::hugeint -- ok == -select '1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e5'::hugeint; +select ('1.' || repeat('0', 288) || '1e5')::hugeint -- ok == -select '1.1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e5'::hugeint; +select ('1.1' || repeat('0', 287) || '1e5')::hugeint; -- ok == diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_functions.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_functions.test index 1808e5b..a2b6223 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_functions.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_functions.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select abs(1::HUGEINT), abs('-1329227995784915872903807060280344576'::HUGEINT), abs(0::HUGEINT) diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_null_value.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_null_value.test index 8eb0593..6ec561e 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_null_value.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_null_value.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_null_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL::HUGEINT diff --git a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_ops.test b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_ops.test index a0429db..ad68f3a 100644 --- a/parser/testdata/corpus/sql/types/hugeint/test_hugeint_ops.test +++ b/parser/testdata/corpus/sql/types/hugeint/test_hugeint_ops.test @@ -1,6 +1,6 @@ # source: test/sql/types/hugeint/test_hugeint_ops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints(h HUGEINT); diff --git a/parser/testdata/corpus/sql/types/interval/frac_interval.test b/parser/testdata/corpus/sql/types/interval/frac_interval.test index c584610..33d45d6 100644 --- a/parser/testdata/corpus/sql/types/interval/frac_interval.test +++ b/parser/testdata/corpus/sql/types/interval/frac_interval.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/frac_interval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select interval '0.00005 MILLENNIUM'; diff --git a/parser/testdata/corpus/sql/types/interval/interval_alias.test b/parser/testdata/corpus/sql/types/interval/interval_alias.test index 1aa8829..a209a0d 100644 --- a/parser/testdata/corpus/sql/types/interval/interval_alias.test +++ b/parser/testdata/corpus/sql/types/interval/interval_alias.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/interval_alias.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT alias('5 days'::INTERVAL DAY TO SECOND); diff --git a/parser/testdata/corpus/sql/types/interval/interval_colon_time_overflow.test b/parser/testdata/corpus/sql/types/interval/interval_colon_time_overflow.test new file mode 100644 index 0000000..bc5bea3 --- /dev/null +++ b/parser/testdata/corpus/sql/types/interval/interval_colon_time_overflow.test @@ -0,0 +1,37 @@ +# source: test/sql/types/interval/interval_colon_time_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT '9223372036854775807 microseconds 999999999:00:00'::INTERVAL; +-- +ok +== +SELECT INTERVAL '9223372036854775807 microseconds 999999999:00:00'; +-- +ok +== +SELECT INTERVAL '-9223372036854775807 microseconds -999999999:00:00'; +-- +ok +== +SELECT INTERVAL '-9223372036854775807 microseconds -1 microseconds -00:00:00'; +-- +ok +== +SELECT INTERVAL '1 hour -00:30:00'; +-- +ok +== +SELECT INTERVAL '1 day -01:00:00'; +-- +ok +== +SELECT INTERVAL '-00:30:00'; +-- +ok +== +SELECT INTERVAL '999999999:00:00'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/interval/interval_constants.test b/parser/testdata/corpus/sql/types/interval/interval_constants.test index db33515..9b92922 100644 --- a/parser/testdata/corpus/sql/types/interval/interval_constants.test +++ b/parser/testdata/corpus/sql/types/interval/interval_constants.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/interval_constants.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT interval 2 days; diff --git a/parser/testdata/corpus/sql/types/interval/interval_epoch_overflow.test b/parser/testdata/corpus/sql/types/interval/interval_epoch_overflow.test new file mode 100644 index 0000000..88c3ea2 --- /dev/null +++ b/parser/testdata/corpus/sql/types/interval/interval_epoch_overflow.test @@ -0,0 +1,13 @@ +# source: test/sql/types/interval/interval_epoch_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT epoch_us(INTERVAL '2147483647 months') +-- +ok +== +SELECT epoch_ns(INTERVAL '400 years') +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/interval/interval_multiply_overflow.test b/parser/testdata/corpus/sql/types/interval/interval_multiply_overflow.test new file mode 100644 index 0000000..5a1bcce --- /dev/null +++ b/parser/testdata/corpus/sql/types/interval/interval_multiply_overflow.test @@ -0,0 +1,33 @@ +# source: test/sql/types/interval/interval_multiply_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT INTERVAL '1952257854 days 3 months' * 1.1; +-- +ok +== +SELECT 1.1 * INTERVAL '1952257854 days 3 months'; +-- +ok +== +SELECT INTERVAL '-1952257855 days -3 months' * 1.1; +-- +ok +== +SELECT INTERVAL '1952257854 days 3 months' / 0.9090909090909091; +-- +ok +== +SELECT datepart('month', i), datepart('day', i) FROM (SELECT INTERVAL '1952257845 days 3 months' * 1.1 AS i) t; +-- +ok +== +SELECT datepart('month', i), datepart('day', i) FROM (SELECT INTERVAL '-1952257854 days -3 months' * 1.1 AS i) t; +-- +ok +== +SELECT INTERVAL '2 days 3 months' * 1.1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/interval/interval_ten_digit_hours.test b/parser/testdata/corpus/sql/types/interval/interval_ten_digit_hours.test new file mode 100644 index 0000000..4f376a2 --- /dev/null +++ b/parser/testdata/corpus/sql/types/interval/interval_ten_digit_hours.test @@ -0,0 +1,37 @@ +# source: test/sql/types/interval/interval_ten_digit_hours.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT i::VARCHAR, i::VARCHAR::INTERVAL = i FROM (SELECT to_microseconds(3600000000 * 1000000000) AS i) +-- +ok +== +SELECT i::VARCHAR, i::VARCHAR::INTERVAL = i FROM (SELECT to_microseconds(9223372036854775807) AS i) +-- +ok +== +SELECT '-1000000000:00:00'::INTERVAL = -to_microseconds(3600000000 * 1000000000) +-- +ok +== +SELECT '2562047788:00:54.775808'::INTERVAL +-- +ok +== +SELECT '25620477880:00:00'::INTERVAL +-- +ok +== +SELECT '1000000000:00:00'::TIME +-- +ok +== +SELECT i::VARCHAR, i::VARCHAR::INTERVAL = i FROM (SELECT to_microseconds(-9223372036854775807 - 1) AS i) +-- +ok +== +SELECT '-2562047788:00:54.775809'::INTERVAL +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/interval/interval_try_cast.test b/parser/testdata/corpus/sql/types/interval/interval_try_cast.test index 29c1f59..92dc5eb 100644 --- a/parser/testdata/corpus/sql/types/interval/interval_try_cast.test +++ b/parser/testdata/corpus/sql/types/interval/interval_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/interval_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT cast(' ' as interval) @@ -83,6 +83,13 @@ SELECT -- ok == +SELECT + TRY_CAST('-2147483648 months ago' AS INTERVAL), + TRY_CAST('-2147483648 days ago' AS INTERVAL), + TRY_CAST('-9223372036854775800 microseconds -8 microseconds ago' AS INTERVAL); +-- +ok +== SELECT CAST('2147483648 days' AS INTERVAL); -- ok diff --git a/parser/testdata/corpus/sql/types/interval/test_interval.test b/parser/testdata/corpus/sql/types/interval/test_interval.test index f32fba2..4ab2dfa 100644 --- a/parser/testdata/corpus/sql/types/interval/test_interval.test +++ b/parser/testdata/corpus/sql/types/interval/test_interval.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/test_interval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT INTERVAL '2 years' @@ -65,6 +65,15 @@ SELECT interval '-2147483648 months' AS without_ago, -- ok == +SELECT '-9223372036854775800 microseconds -8 microseconds ago'::INTERVAL; +-- +ok +== +SELECT INTERVAL '-9223372036854775807 microseconds ago' = INTERVAL '9223372036854775807 microseconds', + INTERVAL '9223372036854775807 microseconds ago' = INTERVAL '-9223372036854775807 microseconds'; +-- +ok +== SELECT INTERVAL '@2mons 1H'; -- ok diff --git a/parser/testdata/corpus/sql/types/interval/test_interval_addition.test b/parser/testdata/corpus/sql/types/interval/test_interval_addition.test index 2d917d8..2d837d2 100644 --- a/parser/testdata/corpus/sql/types/interval/test_interval_addition.test +++ b/parser/testdata/corpus/sql/types/interval/test_interval_addition.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/test_interval_addition.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DATE '1992-03-01' + INTERVAL '1' YEAR diff --git a/parser/testdata/corpus/sql/types/interval/test_interval_between.test b/parser/testdata/corpus/sql/types/interval/test_interval_between.test index e7098a2..8e9bb24 100644 --- a/parser/testdata/corpus/sql/types/interval/test_interval_between.test +++ b/parser/testdata/corpus/sql/types/interval/test_interval_between.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/test_interval_between.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH d(y) AS ( diff --git a/parser/testdata/corpus/sql/types/interval/test_interval_comparison.test b/parser/testdata/corpus/sql/types/interval/test_interval_comparison.test index 09ea46f..d243829 100644 --- a/parser/testdata/corpus/sql/types/interval/test_interval_comparison.test +++ b/parser/testdata/corpus/sql/types/interval/test_interval_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/test_interval_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT INTERVAL '30' DAY > INTERVAL '1' MONTH diff --git a/parser/testdata/corpus/sql/types/interval/test_interval_ops.test b/parser/testdata/corpus/sql/types/interval/test_interval_ops.test index 5cffda1..4f0c500 100644 --- a/parser/testdata/corpus/sql/types/interval/test_interval_ops.test +++ b/parser/testdata/corpus/sql/types/interval/test_interval_ops.test @@ -1,6 +1,6 @@ # source: test/sql/types/interval/test_interval_ops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM interval i1 JOIN interval i2 USING (t) ORDER BY 1 diff --git a/parser/testdata/corpus/sql/types/list/list_case.test b/parser/testdata/corpus/sql/types/list/list_case.test index b27bf75..0c35145 100644 --- a/parser/testdata/corpus/sql/types/list/list_case.test +++ b/parser/testdata/corpus/sql/types/list/list_case.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT case when 1=1 then [1] else [2] end diff --git a/parser/testdata/corpus/sql/types/list/list_comparison.test b/parser/testdata/corpus/sql/types/list/list_comparison.test index 7eb73be..da30936 100644 --- a/parser/testdata/corpus/sql/types/list/list_comparison.test +++ b/parser/testdata/corpus/sql/types/list/list_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1] < [2] diff --git a/parser/testdata/corpus/sql/types/list/list_concat_null.test b/parser/testdata/corpus/sql/types/list/list_concat_null.test index ec58ea8..0e06e6f 100644 --- a/parser/testdata/corpus/sql/types/list/list_concat_null.test +++ b/parser/testdata/corpus/sql/types/list/list_concat_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_concat_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE table x1 (b INT[]); diff --git a/parser/testdata/corpus/sql/types/list/list_constant_reference.test b/parser/testdata/corpus/sql/types/list/list_constant_reference.test new file mode 100644 index 0000000..42eb546 --- /dev/null +++ b/parser/testdata/corpus/sql/types/list/list_constant_reference.test @@ -0,0 +1,76 @@ +# source: test/sql/types/list/list_constant_reference.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list(__mark_join_marker ORDER BY id) +FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,NULL::INTEGER])) p(id,k) +JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,NULL::INTEGER])) b(k) ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) +FROM (VALUES (1,[1,2]),(0,NULL::INTEGER[]),(2,[2,1]),(3,[1,NULL::INTEGER])) p(id,k) +JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,NULL::INTEGER])) b(k) ON p.k <> b.k; +-- +ok +== +SELECT list(__mark_join_marker ORDER BY id) +FROM (VALUES (1,[1,2]),(2,[2,1]),(3,[1,NULL::INTEGER]),(0,NULL::INTEGER[])) p(id,k) +JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,NULL::INTEGER])) b(k) ON p.k <> b.k; +-- +ok +== +CREATE TABLE list_probes AS +SELECT * FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[]::INTEGER[]),(3,NULL::INTEGER[]), + (4,[1,NULL::INTEGER]),(5,[2,1]),(6,NULL::INTEGER[]),(7,[1,2])) p(id,k); +-- +ok +== +CREATE TABLE list_build AS SELECT * FROM (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER]),([]::INTEGER[])) b(k); +-- +ok +== +WITH actual AS ( + SELECT id, __mark_join_marker AS marker + FROM list_probes p JOIN BY(TYPE MARK) list_build b ON p.k {comparison} b.k +), expected AS ( + SELECT id, CASE WHEN bool_or(p.k {comparison} b.k) THEN true + WHEN count(*) FILTER (WHERE (p.k {comparison} b.k) IS NULL) > 0 THEN NULL + ELSE false END AS marker + FROM list_probes p CROSS JOIN list_build b GROUP BY id +) +SELECT count(*) FROM actual JOIN expected USING (id) +WHERE actual.marker IS DISTINCT FROM expected.marker; +-- +error: Parser Error: syntax error at or near "{" +== +WITH actual AS ( + SELECT id, __mark_join_marker AS marker + FROM list_probes p JOIN BY(TYPE MARK) list_build b ON {'k':p.k} {comparison} {'k':b.k} +), expected AS ( + SELECT id, bool_or({'k':p.k} {comparison} {'k':b.k}) AS marker + FROM list_probes p CROSS JOIN list_build b GROUP BY id +) +SELECT count(*) FROM actual JOIN expected USING (id) +WHERE actual.marker IS DISTINCT FROM expected.marker; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT list(__mark_join_marker ORDER BY id) +FROM list_probes p +JOIN BY(TYPE MARK) (VALUES ([1,2]),(NULL::INTEGER[])) b(k) ON p.k <> b.k; +-- +ok +== +SELECT count(*) FROM list_probes p +JOIN BY(TYPE MARK) (SELECT k FROM list_build WHERE false) b ON p.k <> b.k +WHERE __mark_join_marker IS DISTINCT FROM false; +-- +ok +== +SELECT list(k ORDER BY id, n) +FROM list_probes CROSS JOIN (VALUES (0),(1)) b(n); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/list/list_cross_product.test b/parser/testdata/corpus/sql/types/list/list_cross_product.test index 4086b41..54bf1f0 100644 --- a/parser/testdata/corpus/sql/types/list/list_cross_product.test +++ b/parser/testdata/corpus/sql/types/list/list_cross_product.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_cross_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT * FROM (VALUES (1, [1, 2, 3]), (2, NULL), (3, [NULL, 3, 4])) tbl (a, b); diff --git a/parser/testdata/corpus/sql/types/list/list_distinct.test b/parser/testdata/corpus/sql/types/list/list_distinct.test index c754752..068beee 100644 --- a/parser/testdata/corpus/sql/types/list/list_distinct.test +++ b/parser/testdata/corpus/sql/types/list/list_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1] IS NOT DISTINCT FROM [2] diff --git a/parser/testdata/corpus/sql/types/list/list_extract_internal_issue2747.test b/parser/testdata/corpus/sql/types/list/list_extract_internal_issue2747.test index c072c9b..5978123 100644 --- a/parser/testdata/corpus/sql/types/list/list_extract_internal_issue2747.test +++ b/parser/testdata/corpus/sql/types/list/list_extract_internal_issue2747.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_extract_internal_issue2747.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select string_split(string_agg(NULL, ','), ',')[100] from range(10); diff --git a/parser/testdata/corpus/sql/types/list/list_extract_struct.test b/parser/testdata/corpus/sql/types/list/list_extract_struct.test index 3d06e23..68e364f 100644 --- a/parser/testdata/corpus/sql/types/list/list_extract_struct.test +++ b/parser/testdata/corpus/sql/types/list/list_extract_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_extract_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT diff --git a/parser/testdata/corpus/sql/types/list/list_index.test b/parser/testdata/corpus/sql/types/list/list_index.test index 57fb4a7..b9e272d 100644 --- a/parser/testdata/corpus/sql/types/list/list_index.test +++ b/parser/testdata/corpus/sql/types/list/list_index.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES (2, NULL), (3, [NULL]), (4, [4, 5, NULL, 6]); diff --git a/parser/testdata/corpus/sql/types/list/list_index_abort_small.test b/parser/testdata/corpus/sql/types/list/list_index_abort_small.test index ee76a45..bffe283 100644 --- a/parser/testdata/corpus/sql/types/list/list_index_abort_small.test +++ b/parser/testdata/corpus/sql/types/list/list_index_abort_small.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_index_abort_small.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a SELECT i id, NULL c FROM range(2, 2500, 1) tbl(i) diff --git a/parser/testdata/corpus/sql/types/list/list_index_abort_small_nested.test b/parser/testdata/corpus/sql/types/list/list_index_abort_small_nested.test index c425be2..9da2367 100644 --- a/parser/testdata/corpus/sql/types/list/list_index_abort_small_nested.test +++ b/parser/testdata/corpus/sql/types/list/list_index_abort_small_nested.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_index_abort_small_nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER PRIMARY KEY, c INT[][]); diff --git a/parser/testdata/corpus/sql/types/list/list_indexing.test b/parser/testdata/corpus/sql/types/list/list_indexing.test index e92ed60..e00b290 100644 --- a/parser/testdata/corpus/sql/types/list/list_indexing.test +++ b/parser/testdata/corpus/sql/types/list/list_indexing.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_indexing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (l INTEGER[]); diff --git a/parser/testdata/corpus/sql/types/list/list_null_members.test b/parser/testdata/corpus/sql/types/list/list_null_members.test index 3bba304..dd020f9 100644 --- a/parser/testdata/corpus/sql/types/list/list_null_members.test +++ b/parser/testdata/corpus/sql/types/list/list_null_members.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_null_members.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW list_int AS diff --git a/parser/testdata/corpus/sql/types/list/list_null_members_small.test b/parser/testdata/corpus/sql/types/list/list_null_members_small.test index b86c975..088425a 100644 --- a/parser/testdata/corpus/sql/types/list/list_null_members_small.test +++ b/parser/testdata/corpus/sql/types/list/list_null_members_small.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_null_members_small.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW list_int AS diff --git a/parser/testdata/corpus/sql/types/list/list_of_struct.test b/parser/testdata/corpus/sql/types/list/list_of_struct.test index b96dfb4..cc4f54f 100644 --- a/parser/testdata/corpus/sql/types/list/list_of_struct.test +++ b/parser/testdata/corpus/sql/types/list/list_of_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_of_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a AS SELECT [{'a': 3, 'b': 'hello'}, NULL, {'a': NULL, 'b': 'thisisalongstring'}] l; diff --git a/parser/testdata/corpus/sql/types/list/list_parse_recursion.test b/parser/testdata/corpus/sql/types/list/list_parse_recursion.test index 562f9e0..9b849c2 100644 --- a/parser/testdata/corpus/sql/types/list/list_parse_recursion.test +++ b/parser/testdata/corpus/sql/types/list/list_parse_recursion.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_parse_recursion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT REPEAT ( '[{"a":' , 100000 )::INT[] diff --git a/parser/testdata/corpus/sql/types/list/list_stats.test b/parser/testdata/corpus/sql/types/list/list_stats.test index 23bbbb5..30469dc 100644 --- a/parser/testdata/corpus/sql/types/list/list_stats.test +++ b/parser/testdata/corpus/sql/types/list/list_stats.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s.child_stats.min, s.child_stats.max FROM (SELECT STATS([3, 4]) s) diff --git a/parser/testdata/corpus/sql/types/list/list_test_many_deletes.test b/parser/testdata/corpus/sql/types/list/list_test_many_deletes.test index 33bd0ea..5b0a0e8 100644 --- a/parser/testdata/corpus/sql/types/list/list_test_many_deletes.test +++ b/parser/testdata/corpus/sql/types/list/list_test_many_deletes.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_test_many_deletes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE lists(i INT[]) diff --git a/parser/testdata/corpus/sql/types/list/list_to_varchar_cast.test b/parser/testdata/corpus/sql/types/list/list_to_varchar_cast.test index e7d2613..3171b0b 100644 --- a/parser/testdata/corpus/sql/types/list/list_to_varchar_cast.test +++ b/parser/testdata/corpus/sql/types/list/list_to_varchar_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_to_varchar_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT concat_ws('.', list_reverse(string_split('1.2..3', '.'))); diff --git a/parser/testdata/corpus/sql/types/list/list_update_with_many_matches.test b/parser/testdata/corpus/sql/types/list/list_update_with_many_matches.test index 04c4bf3..6ab4085 100644 --- a/parser/testdata/corpus/sql/types/list/list_update_with_many_matches.test +++ b/parser/testdata/corpus/sql/types/list/list_update_with_many_matches.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_update_with_many_matches.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table lists(id int, i int[]); diff --git a/parser/testdata/corpus/sql/types/list/list_updates.test b/parser/testdata/corpus/sql/types/list/list_updates.test index 8a81af6..4791eb3 100644 --- a/parser/testdata/corpus/sql/types/list/list_updates.test +++ b/parser/testdata/corpus/sql/types/list/list_updates.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER, b INTEGER[]); diff --git a/parser/testdata/corpus/sql/types/list/list_updates_varchar.test b/parser/testdata/corpus/sql/types/list/list_updates_varchar.test index 6f5740c..b2068ac 100644 --- a/parser/testdata/corpus/sql/types/list/list_updates_varchar.test +++ b/parser/testdata/corpus/sql/types/list/list_updates_varchar.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/list_updates_varchar.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER, b VARCHAR[]); diff --git a/parser/testdata/corpus/sql/types/list/mix_numeric_types.test b/parser/testdata/corpus/sql/types/list/mix_numeric_types.test index a4a67f0..2a19d6b 100644 --- a/parser/testdata/corpus/sql/types/list/mix_numeric_types.test +++ b/parser/testdata/corpus/sql/types/list/mix_numeric_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/mix_numeric_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select [100::UTINYINT, 10000::SMALLINT]; diff --git a/parser/testdata/corpus/sql/types/list/nested_comparison_validity.test b/parser/testdata/corpus/sql/types/list/nested_comparison_validity.test new file mode 100644 index 0000000..9045364 --- /dev/null +++ b/parser/testdata/corpus/sql/types/list/nested_comparison_validity.test @@ -0,0 +1,65 @@ +# source: test/sql/types/list/nested_comparison_validity.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT id,x=y,x<>y FROM (VALUES (1,[1,NULL],[0,NULL]),(2,[2,NULL],[2,NULL])) t(id,x,y) ORDER BY id; +-- +ok +== +SELECT id,x=y,x<>y FROM (VALUES (1,[1,NULL]::INTEGER[2],[0,NULL]::INTEGER[2]),(2,[2,NULL]::INTEGER[2],[2,NULL]::INTEGER[2])) t(id,x,y) ORDER BY id; +-- +ok +== +SELECT id,x=y,x<>y FROM (VALUES (1,{'a':1,'b':NULL},{'a':0,'b':NULL}),(2,{'a':2,'b':NULL},{'a':2,'b':NULL})) t(id,x,y) ORDER BY id; +-- +ok +== +SELECT id,x=y,x<>y FROM (VALUES (1,row(1,NULL),row(0,NULL)),(2,row(2,NULL),row(2,NULL))) t(id,x,y) ORDER BY id; +-- +ok +== +SELECT id,x=y,x<>y,x=y,x IS NOT DISTINCT FROM y FROM (VALUES (1,[1],[1]),(2,[0],[1]),(3,[2,3],[2,3])) t(id,x,y) ORDER BY id; +-- +ok +== +SELECT id,x=y,x<>y FROM (VALUES (1,[1,NULL],[1,2]),(2,[3,4,5],[3,4,5])) t(id,x,y) ORDER BY id; +-- +ok +== +CREATE TABLE nested_pairs(id INTEGER,x INTEGER[],y INTEGER[]); +-- +ok +== +INSERT INTO nested_pairs VALUES (1,[1,NULL],[0,NULL]),(2,[2,NULL],[2,NULL]),(3,NULL,[2,NULL]),(4,[2,NULL],NULL),(5,[NULL,2],[NULL,2]),(6,[NULL,2],[3,2]),(7,[NULL,3],[NULL,2]),(8,[2,NULL],[2,3]); +-- +ok +== +SELECT id,x=y,x<>y,x IS NOT DISTINCT FROM y,x IS DISTINCT FROM y FROM nested_pairs ORDER BY id; +-- +ok +== +SELECT id FROM nested_pairs WHERE x=y ORDER BY id; +-- +ok +== +SELECT id FROM nested_pairs WHERE x<>y ORDER BY id; +-- +ok +== +SELECT p.id,q.id,p.x=q.y FROM nested_pairs p JOIN nested_pairs q ON p.id=q.id AND p.x=q.y ORDER BY p.id; +-- +ok +== +SELECT p.id,q.id,p.x<>q.y FROM nested_pairs p JOIN nested_pairs q ON p.id=q.id AND p.x<>q.y ORDER BY p.id; +-- +ok +== +SELECT [2,NULL]=[2,NULL],[2,NULL]<>[2,NULL],NULL::INTEGER[]=[2,NULL],NULL::INTEGER[]<>[2,NULL]; +-- +ok +== +SELECT count(DISTINCT x),bool_and(x=x),bool_and(x IS NOT DISTINCT FROM x) FROM (VALUES ([[1],[2,3]]),([[1],[2,3]]),([[1],[2,4]])) t(x); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/list/nested_list_extract.test b/parser/testdata/corpus/sql/types/list/nested_list_extract.test index f524d99..71f932f 100644 --- a/parser/testdata/corpus/sql/types/list/nested_list_extract.test +++ b/parser/testdata/corpus/sql/types/list/nested_list_extract.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/nested_list_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER, b INTEGER[][]); diff --git a/parser/testdata/corpus/sql/types/list/nested_list_slice.test b/parser/testdata/corpus/sql/types/list/nested_list_slice.test index 477253d..1eb1a93 100644 --- a/parser/testdata/corpus/sql/types/list/nested_list_slice.test +++ b/parser/testdata/corpus/sql/types/list/nested_list_slice.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/nested_list_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT id, b[0:1] FROM a ORDER BY id diff --git a/parser/testdata/corpus/sql/types/list/nested_list_updates.test b/parser/testdata/corpus/sql/types/list/nested_list_updates.test index d055527..1f82ad5 100644 --- a/parser/testdata/corpus/sql/types/list/nested_list_updates.test +++ b/parser/testdata/corpus/sql/types/list/nested_list_updates.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/nested_list_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE a SET b=[[7, 8, 9], [10, 11]] WHERE b IS NULL diff --git a/parser/testdata/corpus/sql/types/list/recursive_unnest.test b/parser/testdata/corpus/sql/types/list/recursive_unnest.test index fad92d3..ba1c2c7 100644 --- a/parser/testdata/corpus/sql/types/list/recursive_unnest.test +++ b/parser/testdata/corpus/sql/types/list/recursive_unnest.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/recursive_unnest.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT UNNEST([[1, 2, 3]], recursive := true) diff --git a/parser/testdata/corpus/sql/types/list/unnest_aggregate.test b/parser/testdata/corpus/sql/types/list/unnest_aggregate.test index c465852..9350d3d 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_aggregate.test +++ b/parser/testdata/corpus/sql/types/list/unnest_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(a) FROM UNNEST(RANGE(1, 11)) t(a); diff --git a/parser/testdata/corpus/sql/types/list/unnest_array.test b/parser/testdata/corpus/sql/types/list/unnest_array.test index cb40261..e018db8 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_array.test +++ b/parser/testdata/corpus/sql/types/list/unnest_array.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT unnest([[1, 2], [3, 4]]::int[][], recursive:=true) diff --git a/parser/testdata/corpus/sql/types/list/unnest_complex_types.test b/parser/testdata/corpus/sql/types/list/unnest_complex_types.test index 47cc16e..5bd1689 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_complex_types.test +++ b/parser/testdata/corpus/sql/types/list/unnest_complex_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_complex_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT id, UNNEST(i), UNNEST(j) FROM (VALUES (3, ['hello', NULL, 'world'], [NULL])) tbl(id, i, j) diff --git a/parser/testdata/corpus/sql/types/list/unnest_expand.test b/parser/testdata/corpus/sql/types/list/unnest_expand.test index 41fc88d..9390212 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_expand.test +++ b/parser/testdata/corpus/sql/types/list/unnest_expand.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_expand.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (str VARCHAR, str_list VARCHAR[]); diff --git a/parser/testdata/corpus/sql/types/list/unnest_group_by.test b/parser/testdata/corpus/sql/types/list/unnest_group_by.test index 0f21f8b..b3e11f4 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_group_by.test +++ b/parser/testdata/corpus/sql/types/list/unnest_group_by.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_group_by.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT unnest(['a', 'b']) AS tag, count(*) FROM range(1) GROUP BY tag ORDER BY tag diff --git a/parser/testdata/corpus/sql/types/list/unnest_having_qualify.test b/parser/testdata/corpus/sql/types/list/unnest_having_qualify.test index 1239498..5fdfe3d 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_having_qualify.test +++ b/parser/testdata/corpus/sql/types/list/unnest_having_qualify.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_having_qualify.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 42 having unnest([1,2,3]); diff --git a/parser/testdata/corpus/sql/types/list/unnest_non_constant_options.test b/parser/testdata/corpus/sql/types/list/unnest_non_constant_options.test new file mode 100644 index 0000000..6252d1a --- /dev/null +++ b/parser/testdata/corpus/sql/types/list/unnest_non_constant_options.test @@ -0,0 +1,37 @@ +# source: test/sql/types/list/unnest_non_constant_options.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT UNNEST([[1,2]], max_depth := unnest([2])); +-- +ok +== +SELECT UNNEST([1], recursive := unnest([true])); +-- +ok +== +SELECT UNNEST([1], keep_parent_names := unnest([true])); +-- +ok +== +SELECT UNNEST([1], max_depth := sum(1)); +-- +ok +== +SELECT UNNEST([1], max_depth := row_number() OVER ()); +-- +ok +== +SELECT UNNEST([1], recursive := NULL); +-- +ok +== +SELECT UNNEST([1], max_depth := NULL); +-- +ok +== +SELECT UNNEST([[1,2]], max_depth := 1 + 1); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/list/unnest_null_empty.test b/parser/testdata/corpus/sql/types/list/unnest_null_empty.test index 97569ae..dc09d2f 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_null_empty.test +++ b/parser/testdata/corpus/sql/types/list/unnest_null_empty.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_null_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE people(id INTEGER, name VARCHAR, address VARCHAR[]); diff --git a/parser/testdata/corpus/sql/types/list/unnest_table_function.test b/parser/testdata/corpus/sql/types/list/unnest_table_function.test index 47440cb..f69ae39 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_table_function.test +++ b/parser/testdata/corpus/sql/types/list/unnest_table_function.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_table_function.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM UNNEST(ARRAY[1, 2, 3]); diff --git a/parser/testdata/corpus/sql/types/list/unnest_types.test b/parser/testdata/corpus/sql/types/list/unnest_types.test index cacb505..66f8be9 100644 --- a/parser/testdata/corpus/sql/types/list/unnest_types.test +++ b/parser/testdata/corpus/sql/types/list/unnest_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/list/unnest_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a as select list(i::{type}) AS l from range(1, 6, 1) t1(i) diff --git a/parser/testdata/corpus/sql/types/map/map_cast.test b/parser/testdata/corpus/sql/types/map/map_cast.test index e5a1a49..e98bdbb 100644 --- a/parser/testdata/corpus/sql/types/map/map_cast.test +++ b/parser/testdata/corpus/sql/types/map/map_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/map/map_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP(['a', 'b', 'c'], [1, 2, NULL])::MAP(VARCHAR, VARCHAR) diff --git a/parser/testdata/corpus/sql/types/map/map_const_and_col_combination.test b/parser/testdata/corpus/sql/types/map/map_const_and_col_combination.test index 1573c66..80bc488 100644 --- a/parser/testdata/corpus/sql/types/map/map_const_and_col_combination.test +++ b/parser/testdata/corpus/sql/types/map/map_const_and_col_combination.test @@ -1,6 +1,6 @@ # source: test/sql/types/map/map_const_and_col_combination.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ints (i INT); diff --git a/parser/testdata/corpus/sql/types/map/map_empty.test b/parser/testdata/corpus/sql/types/map/map_empty.test index ee579b6..ce4e7e9 100644 --- a/parser/testdata/corpus/sql/types/map/map_empty.test +++ b/parser/testdata/corpus/sql/types/map/map_empty.test @@ -1,6 +1,6 @@ # source: test/sql/types/map/map_empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT MAP { * : ? IN ( SELECT TRUE ) } ; diff --git a/parser/testdata/corpus/sql/types/map/map_extract_nested_null.test b/parser/testdata/corpus/sql/types/map/map_extract_nested_null.test index 5bced05..c8b3efb 100644 --- a/parser/testdata/corpus/sql/types/map/map_extract_nested_null.test +++ b/parser/testdata/corpus/sql/types/map/map_extract_nested_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/map/map_extract_nested_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test(id int, attr MAP(VARCHAR, UNION(i INT, s VARCHAR))); diff --git a/parser/testdata/corpus/sql/types/map/map_keys_outer_join_null.test b/parser/testdata/corpus/sql/types/map/map_keys_outer_join_null.test new file mode 100644 index 0000000..d454741 --- /dev/null +++ b/parser/testdata/corpus/sql/types/map/map_keys_outer_join_null.test @@ -0,0 +1,64 @@ +# source: test/sql/types/map/map_keys_outer_join_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE a AS SELECT i FROM range(5000) r(i); +-- +ok +== +CREATE TABLE b AS SELECT i FROM range(20000) r(i); +-- +ok +== +CREATE TABLE c AS SELECT i, (i % 256 - 128)::TINYINT AS i8, MAP {'k' || (i % 3): i} AS m FROM range(3000) r(i); +-- +ok +== +CREATE TABLE d AS SELECT i, (i % 256 - 128)::TINYINT AS i8 FROM range(6000) r(i); +-- +ok +== +SELECT count(*), count(keys) FROM ( + SELECT a.i, map_keys(c.m) AS keys + FROM a LEFT JOIN b ON a.i = b.i + LEFT JOIN c ON b.i = c.i + FULL JOIN d ON c.i8 = d.i8 + ORDER BY ALL +); +-- +ok +== +SELECT count(*) FROM ( + SELECT a.i, map_values(c.m) AS vals, map_entries(c.m) AS entries + FROM a LEFT JOIN b ON a.i = b.i + LEFT JOIN c ON b.i = c.i + FULL JOIN d ON c.i8 = d.i8 + ORDER BY ALL +); +-- +ok +== +CREATE TABLE p AS SELECT i, (i % 500)::DECIMAL(18,3) AS dec, i % 10 AS k FROM range(2000) r(i); +-- +ok +== +CREATE TABLE mid AS SELECT i, i % 10 AS k FROM range(3000) r(i); +-- +ok +== +CREATE TABLE sm AS SELECT i, (i % 50)::DECIMAL(18,3) AS dec, + CASE WHEN i % 3 = 0 THEN NULL ELSE MAP {'k' || (i % 3): i} END AS m +FROM range(200) r(i); +-- +ok +== +SELECT count(*) FROM ( + SELECT map_keys(t3.m) AS c0 + FROM p t1 FULL JOIN sm t3 ON t1.dec = t3.dec + WHERE t1.k IN (SELECT k FROM mid) + ORDER BY c0 +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/map/map_null.test b/parser/testdata/corpus/sql/types/map/map_null.test index ca94777..74a7674 100644 --- a/parser/testdata/corpus/sql/types/map/map_null.test +++ b/parser/testdata/corpus/sql/types/map/map_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/map/map_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select map(NULL::INT[], [1,2,3]) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_aggregate.test b/parser/testdata/corpus/sql/types/nested/array/array_aggregate.test index 740d62a..96aff3e 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_aggregate.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (a INT[3]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_case.test b/parser/testdata/corpus/sql/types/nested/array/array_case.test new file mode 100644 index 0000000..2fd1b48 --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/array/array_case.test @@ -0,0 +1,29 @@ +# source: test/sql/types/nested/array/array_case.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CASE WHEN i % 3 = 0 THEN NULL ELSE [i]::INT[1] END FROM range(5) t(i); +-- +ok +== +SELECT CASE WHEN i % 2 = 0 THEN [i, i + 1]::INT[2] WHEN i % 3 = 0 THEN NULL ELSE [i * 10, NULL]::INT[2] END FROM range(7) t(i); +-- +ok +== +SELECT CASE WHEN i % 2 = 0 THEN [[i::VARCHAR, 'a long string that is not inlined'], NULL]::VARCHAR[2][2] ELSE [NULL, ['z', NULL]]::VARCHAR[2][2] END FROM range(4) t(i); +-- +ok +== +SELECT COALESCE(CASE WHEN i % 2 = 0 THEN [i, i]::INT[2] END, [-1, -1]::INT[2]) FROM range(4) t(i); +-- +ok +== +SELECT CASE WHEN i % 2 = 0 THEN {'a': [i, i]::INT[2], 'b': [[i]]} ELSE {'a': NULL, 'b': [[i, NULL]]} END FROM range(3) t(i); +-- +ok +== +SELECT sum(len(CASE WHEN i % 2 = 0 THEN [i::VARCHAR, 'x']::VARCHAR[2] END)) FROM range(100000) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/array/array_cast.test b/parser/testdata/corpus/sql/types/nested/array/array_cast.test index 5155234..d636885 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_cast.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_value(1, 2, 3)::VARCHAR diff --git a/parser/testdata/corpus/sql/types/nested/array/array_coverage.test b/parser/testdata/corpus/sql/types/nested/array/array_coverage.test index a8fc094..9f8d5e4 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_coverage.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DISTINCT array_value(array_value(1, 2, 3), array_value(4,5,6)); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_fuzzer_failures.test b/parser/testdata/corpus/sql/types/nested/array/array_fuzzer_failures.test index 0e6d518..76c5979 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_fuzzer_failures.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_fuzzer_failures.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_fuzzer_failures.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE array_tbl(c50 INTEGER[2][]);; diff --git a/parser/testdata/corpus/sql/types/nested/array/array_invalid.test b/parser/testdata/corpus/sql/types/nested/array/array_invalid.test index 11d34b8..bc99c6c 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_invalid.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_invalid.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_invalid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(a INT, b INT[0]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_joins.test b/parser/testdata/corpus/sql/types/nested/array/array_joins.test index bf2a47e..05e6ef5 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_joins.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_joins.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_joins.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(i INTEGER, a INTEGER[3]) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_joins_2.test b/parser/testdata/corpus/sql/types/nested/array/array_joins_2.test index e427950..2f57735 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_joins_2.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_joins_2.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_joins_2.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_array (c1 int[3]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_large.test b/parser/testdata/corpus/sql/types/nested/array/array_large.test index 4a0cb55..fca8467 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_large.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_large.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_large.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (a INT[4096]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_lateral_unnest.test b/parser/testdata/corpus/sql/types/nested/array/array_lateral_unnest.test new file mode 100644 index 0000000..635c700 --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/array/array_lateral_unnest.test @@ -0,0 +1,41 @@ +# source: test/sql/types/nested/array/array_lateral_unnest.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE m(id INT, fixed INT[2]); +-- +ok +== +INSERT INTO m VALUES (1, [1, 2]), (2, [3, 4]), (3, NULL); +-- +ok +== +SELECT * FROM m, UNNEST(m.fixed) AS s(v) ORDER BY ALL; +-- +ok +== +SELECT id, v FROM m, UNNEST(m.fixed) AS s(v) WHERE v > 1 ORDER BY ALL; +-- +ok +== +SELECT id, v FROM m LEFT JOIN UNNEST(m.fixed) AS s(v) ON true ORDER BY ALL; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM m) SELECT id, v FROM c, UNNEST(c.fixed) AS s(v) ORDER BY ALL; +-- +ok +== +CREATE TABLE n(id INT, grid INT[2][2]); +-- +ok +== +INSERT INTO n VALUES (1, [[1, 2], [3, 4]]); +-- +ok +== +SELECT id, v FROM n, UNNEST(n.grid) AS s(v) ORDER BY ALL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/array/array_limit_offset.test b/parser/testdata/corpus/sql/types/nested/array/array_limit_offset.test index 7177999..9819ed3 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_limit_offset.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_limit_offset.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_limit_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl1 VALUES ([1, 2, 3]), ([4, NULL, 6]), ([7, 8, 9]), (NULL), ([10, 11, 12]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_list_agg.test b/parser/testdata/corpus/sql/types/nested/array/array_list_agg.test index ad5f68b..37b20df 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_list_agg.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_list_agg.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_list_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE arrays (a INTEGER[3]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_list_aggregate.test b/parser/testdata/corpus/sql/types/nested/array/array_list_aggregate.test index 79ff1dd..1c2f0ae 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_list_aggregate.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_list_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_list_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (a INT, b INT, c INT); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_misc.test b/parser/testdata/corpus/sql/types/nested/array/array_misc.test index 9493c14..e06b135 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_misc.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_misc.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_misc.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE arrays (a INTEGER[3]) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_csv.test b/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_csv.test index d06f88d..0c178fc 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_csv.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_csv.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_roundtrip_csv.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE arrays2 (a INTEGER[3]) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_json.test b/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_json.test index 4d19cf2..2828c2d 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_json.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_json.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_roundtrip_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a::JSON FROM arrays diff --git a/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_parquet.test b/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_parquet.test index 564cd94..081d240 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_parquet.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_roundtrip_parquet.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_roundtrip_parquet.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit COPY (SELECT [range, range + 1, range + 2] a FROM range(3)) TO '{TEST_DIR}/arrays_parquet_test.parquet' diff --git a/parser/testdata/corpus/sql/types/nested/array/array_rowgroup.test b/parser/testdata/corpus/sql/types/nested/array/array_rowgroup.test index 6339aad..3e23be0 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_rowgroup.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_rowgroup.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_rowgroup.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table arrays(id int primary key, a int[3]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_simple.test b/parser/testdata/corpus/sql/types/nested/array/array_simple.test index 0def06e..1c5e19f 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_simple.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_simple.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_simple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT array_value(1, 2, 3); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_statistics.test b/parser/testdata/corpus/sql/types/nested/array/array_statistics.test index 9e0e29b..fa97d65 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_statistics.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_statistics.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_statistics.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s.child_stats.min, s.child_stats.max, s.has_no_null, s.has_null FROM (SELECT STATS(array_value(1,2)) s) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_storage_3.test b/parser/testdata/corpus/sql/types/nested/array/array_storage_3.test index 0028096..9799550 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_storage_3.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_storage_3.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_storage_3.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma preserve_insertion_order=true diff --git a/parser/testdata/corpus/sql/types/nested/array/array_summarize.test b/parser/testdata/corpus/sql/types/nested/array/array_summarize.test index 4e9372f..92641fa 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_summarize.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_summarize.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_summarize.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SUMMARIZE arrays diff --git a/parser/testdata/corpus/sql/types/nested/array/array_try_cast.test b/parser/testdata/corpus/sql/types/nested/array/array_try_cast.test index c6d702a..2e23625 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_try_cast.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRY_CAST(array_value(1,2) as INTEGER[3]); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_try_cast_vector_types.test b/parser/testdata/corpus/sql/types/nested/array/array_try_cast_vector_types.test index 8e5fdd6..e194b13 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_try_cast_vector_types.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_try_cast_vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_try_cast_vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TRY_CAST(test_vector AS INT[2]) AS a FROM test_vector_types(NULL::INTEGER[]) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_tupleformat.test b/parser/testdata/corpus/sql/types/nested/array/array_tupleformat.test index ac50a54..9a878ff 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_tupleformat.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_tupleformat.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_tupleformat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (i VARCHAR[3]) diff --git a/parser/testdata/corpus/sql/types/nested/array/array_unnest.test b/parser/testdata/corpus/sql/types/nested/array/array_unnest.test index eeecc95..426edbc 100644 --- a/parser/testdata/corpus/sql/types/nested/array/array_unnest.test +++ b/parser/testdata/corpus/sql/types/nested/array/array_unnest.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/array/array_unnest.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT UNNEST(array_value(1, 2, NULL, 4, 5)); diff --git a/parser/testdata/corpus/sql/types/nested/array/array_value_comparison.test b/parser/testdata/corpus/sql/types/nested/array/array_value_comparison.test new file mode 100644 index 0000000..a714c99 --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/array/array_value_comparison.test @@ -0,0 +1,58 @@ +# source: test/sql/types/nested/array/array_value_comparison.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE arr_test (arr INT[3]); +-- +ok +== +INSERT INTO arr_test VALUES (ARRAY[1,2,3]::INT[3]), (ARRAY[1,2,4]::INT[3]), (ARRAY[1,2,2]::INT[3]); +-- +ok +== +SELECT + count(*) FILTER (arr > ARRAY[1,2,3]::INT[3]), + count(*) FILTER (arr >= ARRAY[1,2,3]::INT[3]), + count(*) FILTER (arr < ARRAY[1,2,3]::INT[3]), + count(*) FILTER (arr <= ARRAY[1,2,3]::INT[3]), + count(*) FILTER (arr = ARRAY[1,2,3]::INT[3]), + count(*) FILTER (arr <> ARRAY[1,2,3]::INT[3]), +FROM arr_test +-- +ok +== +SELECT count(*) FROM arr_test WHERE arr > ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,3]::INT[3] +-- +ok +== +SELECT count(*) FROM arr_test WHERE arr >= ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,3]::INT[3] +-- +ok +== +SELECT count(*) FROM arr_test WHERE arr < ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,3]::INT[3] +-- +ok +== +SELECT count(*) FROM arr_test WHERE arr <= ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,3]::INT[3] +-- +ok +== +SELECT count(*) FROM arr_test WHERE arr > ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,4]::INT[3] +-- +ok +== +SELECT count(*) FROM arr_test WHERE arr > ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,2]::INT[3] +-- +ok +== +SELECT + ARRAY[1,2,3]::INT[3] > ARRAY[1,2,3]::INT[3], + ARRAY[1,2,3]::INT[3] >= ARRAY[1,2,3]::INT[3], + ARRAY[1,2,3]::INT[3] < ARRAY[1,2,3]::INT[3], + ARRAY[1,2,3]::INT[3] <= ARRAY[1,2,3]::INT[3], + ARRAY[1,2,3]::INT[3] = ARRAY[1,2,3]::INT[3], + ARRAY[1,2,3]::INT[3] <> ARRAY[1,2,3]::INT[3] +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/list/any_list.test b/parser/testdata/corpus/sql/types/nested/list/any_list.test index 0f64c99..12b3eac 100644 --- a/parser/testdata/corpus/sql/types/nested/list/any_list.test +++ b/parser/testdata/corpus/sql/types/nested/list/any_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/any_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 1=ALL([1, 2, 3]); diff --git a/parser/testdata/corpus/sql/types/nested/list/array.test b/parser/testdata/corpus/sql/types/nested/list/array.test index ed9cfd2..bc8f577 100644 --- a/parser/testdata/corpus/sql/types/nested/list/array.test +++ b/parser/testdata/corpus/sql/types/nested/list/array.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ARRAY[1,2], ARRAY[NULL], ARRAY['hello', 'world'], ARRAY[] diff --git a/parser/testdata/corpus/sql/types/nested/list/array_agg.test b/parser/testdata/corpus/sql/types/nested/list/array_agg.test index 24a2aeb..c46aede 100644 --- a/parser/testdata/corpus/sql/types/nested/list/array_agg.test +++ b/parser/testdata/corpus/sql/types/nested/list/array_agg.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/array_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ARRAY_AGG(NULL), ARRAY_AGG(42) diff --git a/parser/testdata/corpus/sql/types/nested/list/internal_issue_2457.test b/parser/testdata/corpus/sql/types/nested/list/internal_issue_2457.test index 5a56f4e..05a3bf6 100644 --- a/parser/testdata/corpus/sql/types/nested/list/internal_issue_2457.test +++ b/parser/testdata/corpus/sql/types/nested/list/internal_issue_2457.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/internal_issue_2457.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE t1 (i INT, l INT[]); diff --git a/parser/testdata/corpus/sql/types/nested/list/list_aggr_parameter.test b/parser/testdata/corpus/sql/types/nested/list/list_aggr_parameter.test index 2a02cdb..c8f7113 100644 --- a/parser/testdata/corpus/sql/types/nested/list/list_aggr_parameter.test +++ b/parser/testdata/corpus/sql/types/nested/list/list_aggr_parameter.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/list_aggr_parameter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_aggr(list(i), 'quantile', 0.5) FROM range(1, 11) tbl(i); diff --git a/parser/testdata/corpus/sql/types/nested/list/list_aggregate_dict.test b/parser/testdata/corpus/sql/types/nested/list/list_aggregate_dict.test index 2e01d85..42e392f 100644 --- a/parser/testdata/corpus/sql/types/nested/list/list_aggregate_dict.test +++ b/parser/testdata/corpus/sql/types/nested/list/list_aggregate_dict.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/list_aggregate_dict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit pragma force_compression='dictionary'; diff --git a/parser/testdata/corpus/sql/types/nested/list/list_aggregates.test b/parser/testdata/corpus/sql/types/nested/list/list_aggregates.test index 699b7a4..4d166b8 100644 --- a/parser/testdata/corpus/sql/types/nested/list/list_aggregates.test +++ b/parser/testdata/corpus/sql/types/nested/list/list_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/list_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select min(i::varchar), max(i::varchar) from range(10) tbl(i); diff --git a/parser/testdata/corpus/sql/types/nested/list/list_cast_child_offset.test b/parser/testdata/corpus/sql/types/nested/list/list_cast_child_offset.test new file mode 100644 index 0000000..2bebc51 --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/list/list_cast_child_offset.test @@ -0,0 +1,57 @@ +# source: test/sql/types/nested/list/list_cast_child_offset.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +WITH t(l) AS (VALUES ([['bad'], ['1', '2'], ['3', '4']]), ([['bad'], ['5', '6'], ['7', '8']])) +SELECT CAST(list_slice(l, 2, 3) AS INTEGER[][2]) FROM t +-- +ok +== +WITH t(l) AS (VALUES (['bad', '1', '2']), (['bad', '5', '6'])) +SELECT CAST(list_slice(l, 2, 3) AS INTEGER[]) FROM t +-- +ok +== +WITH t(l) AS (VALUES ([['bad'], ['1', '2'], ['3', '4']]), ([['bad'], ['5', '6'], ['7', '8']])) +SELECT CAST(list_slice(l, 2, 3) AS INTEGER[][]) FROM t +-- +ok +== +WITH t(l) AS (VALUES ([[['bad']], [['1']], [['2']]]), ([[['z']], [['7']], [['8']]])) +SELECT CAST(list_slice(l, 2, 3) AS INTEGER[][][]) FROM t +-- +ok +== +WITH t(l) AS (VALUES ([{'a': 'bad'}, {'a': '1'}, {'a': '2'}]), ([{'a': 'z'}, {'a': '7'}, {'a': '8'}])) +SELECT CAST(list_slice(l, 2, 3) AS STRUCT(a INTEGER)[]) FROM t +-- +ok +== +WITH t(l) AS (VALUES (['bad', '1', '2']), (NULL), ([]), (['bad', '5', '6'])) +SELECT CAST(list_slice(l, 2, 3) AS INTEGER[]) FROM t +-- +ok +== +SELECT count(*), any_value(x) FROM (SELECT CAST(list_slice(['bad', '3', '4'], 2, 3) AS INTEGER[]) x FROM range(5000)) +-- +ok +== +SELECT i, l::INT[] FROM list_child_offset WHERE i = 99 +-- +ok +== +SELECT l::INT[] FROM unreferenced_bad_child WHERE i = 0 +-- +ok +== +WITH t(l) AS (VALUES (['bad', '1', '2']), (['bad', '5', '6'])) +SELECT CAST(list_slice(l, 1, 3) AS INTEGER[]) FROM t +-- +ok +== +WITH t(l) AS (VALUES (['bad', '1', '2']), (['bad', '5', '6'])) +SELECT TRY_CAST(list_slice(l, 1, 3) AS INTEGER[]) FROM t +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/list/list_comparison_stale_positions.test b/parser/testdata/corpus/sql/types/nested/list/list_comparison_stale_positions.test new file mode 100644 index 0000000..6ee884b --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/list/list_comparison_stale_positions.test @@ -0,0 +1,77 @@ +# source: test/sql/types/nested/list/list_comparison_stale_positions.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO t VALUES ([1, NULL]), ([1, 2]), ([1, NULL, 3]); +-- +ok +== +SELECT l, l IS NOT DISTINCT FROM [1, NULL, 3] FROM t +-- +ok +== +SELECT l, l IS DISTINCT FROM [1, NULL, 3] FROM t +-- +ok +== +DELETE FROM t +-- +ok +== +INSERT INTO t VALUES ([1, NULL, 3]), ([1, NULL]), ([1, 2]), ([1, NULL, 3]) +-- +ok +== +SELECT l, l < [1, NULL, 3], l > [1, NULL, 3], l <= [1, NULL, 3] FROM t +-- +ok +== +CREATE TABLE n(l INTEGER[][]); +-- +ok +== +INSERT INTO n VALUES ([[1], [NULL]]), ([[1], [2]]), ([[1], [NULL], [3]]) +-- +ok +== +SELECT l, l IS NOT DISTINCT FROM [[1], [NULL], [3]] FROM n +-- +ok +== +CREATE TABLE a(l INTEGER[3]); +-- +ok +== +INSERT INTO a VALUES ([1, NULL, 9]), ([1, 2, 3]), ([1, NULL, 3]) +-- +ok +== +SELECT l, l IS NOT DISTINCT FROM [1, NULL, 3]::INTEGER[3] FROM a +-- +ok +== +CREATE TABLE r AS +SELECT CASE WHEN random() < 0.1 THEN NULL + ELSE [CASE WHEN random() < 0.3 THEN NULL ELSE (random() * 3)::INT END + FOR x IN range((random() * 4)::INT + 1)] END AS a, + CASE WHEN random() < 0.1 THEN NULL + ELSE [CASE WHEN random() < 0.3 THEN NULL ELSE (random() * 3)::INT END + FOR x IN range((random() * 4)::INT + 1)] END AS b +FROM range(20000); +-- +ok +== +SELECT count(*) FROM r WHERE (a < b)::INT + (a > b)::INT + (a IS NOT DISTINCT FROM b)::INT <> 1 +-- +ok +== +SELECT count(*) FROM r +WHERE (a IS NOT DISTINCT FROM b) <> ( + CASE WHEN a IS NULL AND b IS NULL THEN true + WHEN a IS NULL OR b IS NULL THEN false + WHEN len(a) <> len(b) THEN false + ELSE len(list_filter(range(1, len(a) + 1), lambda i: a[i] IS DISTINCT FROM b[i])) = 0 END) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/list/list_subquery.test b/parser/testdata/corpus/sql/types/nested/list/list_subquery.test index 4112b2c..87962dc 100644 --- a/parser/testdata/corpus/sql/types/nested/list/list_subquery.test +++ b/parser/testdata/corpus/sql/types/nested/list/list_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/list_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT [1, 2]) diff --git a/parser/testdata/corpus/sql/types/nested/list/nested_comparison_null_children.test b/parser/testdata/corpus/sql/types/nested/list/nested_comparison_null_children.test new file mode 100644 index 0000000..b552f8b --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/list/nested_comparison_null_children.test @@ -0,0 +1,91 @@ +# source: test/sql/types/nested/list/nested_comparison_null_children.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE l(a INTEGER[], b INTEGER[]); +-- +ok +== +INSERT INTO l VALUES ([NULL], [3]), ([NULL, 1], [1, 1]), ([3, 2, NULL], [3, 2, 3]), + ([NULL, NULL, NULL], [1, 2, 1]), ([2, 1], [2, NULL]), + ([NULL], [NULL]), ([1, NULL, 3], [1, NULL, 3]), (NULL, [1]), ([1], NULL); +-- +ok +== +SELECT a, b, a = b FROM l +-- +ok +== +SELECT a, b, a <> b FROM l +-- +ok +== +SELECT [NULL] = [3], [NULL, 1] = [1, 1], [3, 2, NULL] = [3, 2, 3], [NULL, NULL, NULL] = [1, 2, 1], + [2, 1] = [2, NULL], [NULL] = [NULL], [1, NULL, 3] = [1, NULL, 3] +-- +ok +== +CREATE TABLE one(a INTEGER[], b INTEGER[]); +-- +ok +== +INSERT INTO one VALUES ([2, 1], [2, NULL]); +-- +ok +== +SELECT a = b FROM one +-- +ok +== +CREATE TABLE s(a STRUCT(x INTEGER, y INTEGER), b STRUCT(x INTEGER, y INTEGER)); +-- +ok +== +INSERT INTO s VALUES ({'x': NULL, 'y': 1}, {'x': 3, 'y': 1}), ({'x': 1, 'y': NULL}, {'x': 1, 'y': 2}), + ({'x': NULL, 'y': 1}, {'x': NULL, 'y': 1}), ({'x': 1, 'y': 1}, {'x': 1, 'y': 1}), + (NULL, {'x': 1, 'y': 1}); +-- +ok +== +SELECT a, b, a = b FROM s +-- +ok +== +CREATE TABLE a(x INTEGER[2], y INTEGER[2]); +-- +ok +== +INSERT INTO a VALUES ([NULL, 1], [3, 1]), ([NULL, 1], [NULL, 1]), (NULL, [1, 1]); +-- +ok +== +SELECT x, y, x = y FROM a +-- +ok +== +CREATE TABLE r AS +SELECT CASE WHEN random() < 0.1 THEN NULL + ELSE [CASE WHEN random() < 0.35 THEN NULL ELSE (random() * 3)::INT END + FOR i IN range((random() * 4)::INT + 1)] END AS a, + CASE WHEN random() < 0.1 THEN NULL + ELSE [CASE WHEN random() < 0.35 THEN NULL ELSE (random() * 3)::INT END + FOR i IN range((random() * 4)::INT + 1)] END AS b +FROM range(20000); +-- +ok +== +SELECT count(*) FROM r +WHERE (a = b) IS DISTINCT FROM (CASE WHEN a IS NULL OR b IS NULL THEN NULL ELSE (a IS NOT DISTINCT FROM b) END) +-- +ok +== +SELECT count(*) FROM r WHERE (a <> b) IS DISTINCT FROM (NOT (a = b)) +-- +ok +== +SELECT count(*) FROM r WHERE (a IS NULL OR b IS NULL) + AND NOT ((a = b) IS NULL AND (a < b) IS NULL AND (a >= b) IS NULL) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_extract.test b/parser/testdata/corpus/sql/types/nested/list/test_list_extract.test index 360d852..cf34733 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_extract.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_extract.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT LIST_EXTRACT(NULL, 1) diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_functions_with_null_structs.test b/parser/testdata/corpus/sql/types/nested/list/test_list_functions_with_null_structs.test index bd8d171..1f51b9a 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_functions_with_null_structs.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_functions_with_null_structs.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_functions_with_null_structs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE struct_data(str STRUCT(val VARCHAR)[]); diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_index.test b/parser/testdata/corpus/sql/types/nested/list/test_list_index.test index 1482a78..75009b8 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_index.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_index.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a[1] FROM (VALUES (LIST_VALUE())) tbl(a) diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_slice.test b/parser/testdata/corpus/sql/types/nested/list/test_list_slice.test index a328e61..b994fec 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_slice.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_slice.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_slice.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE listdata ( diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_slice_negative_step.test b/parser/testdata/corpus/sql/types/nested/list/test_list_slice_negative_step.test index 99e29f6..000bda3 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_slice_negative_step.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_slice_negative_step.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_slice_negative_step.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT list_slice([1,2,3,4,5], 1, 3, -1); diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_slice_numeric_limits.test b/parser/testdata/corpus/sql/types/nested/list/test_list_slice_numeric_limits.test index 41b6cde..6197950 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_slice_numeric_limits.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_slice_numeric_limits.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_slice_numeric_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ([1,2,3,4,5,6])[-9223372036854775808:5]; diff --git a/parser/testdata/corpus/sql/types/nested/list/test_list_slice_step.test b/parser/testdata/corpus/sql/types/nested/list/test_list_slice_step.test index 19f1f31..bedaaaa 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_list_slice_step.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_list_slice_step.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_list_slice_step.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT ([1,2,3,4,5,6])[-10:-10]; diff --git a/parser/testdata/corpus/sql/types/nested/list/test_nested_list.test b/parser/testdata/corpus/sql/types/nested/list/test_nested_list.test index 4ff7123..2d74a95 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_nested_list.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_nested_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_nested_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [{'i': 1,'j': [2, 3]}, NULL, {'i': 1, 'j': [2, 3]}]; diff --git a/parser/testdata/corpus/sql/types/nested/list/test_scalar_list.test b/parser/testdata/corpus/sql/types/nested/list/test_scalar_list.test index a76daf0..84ca3b7 100644 --- a/parser/testdata/corpus/sql/types/nested/list/test_scalar_list.test +++ b/parser/testdata/corpus/sql/types/nested/list/test_scalar_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/list/test_scalar_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT LIST_VALUE('hello') diff --git a/parser/testdata/corpus/sql/types/nested/map/map_error.test b/parser/testdata/corpus/sql/types/nested/map/map_error.test index d679eda..47fc145 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_error.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_error.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP(list_value(NULL, NULL, NULL, NULL, NULL), list_value(10, 9, 10, 11, 13)) diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column.test index 21407ac..9a7b530 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (list STRUCT(a INT, b VARCHAR)[]); diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column_null_entry.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column_null_entry.test index ab60892..9b7dcf0 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column_null_entry.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/column_null_entry.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/column_null_entry.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t1 VALUES (ARRAY[(10, NULL), (7,'g')]) diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/data_types.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/data_types.test index cb5b718..11314cd 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/data_types.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/data_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/data_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table string_key as select MAP_FROM_ENTRIES(ARRAY[('a', 'x'), ('b', 'y')]) col; diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/dictionary_vector.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/dictionary_vector.test index df2efda..a05c093 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/dictionary_vector.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/dictionary_vector.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/dictionary_vector.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 as select diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/empty.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/empty.test index 9b2b75d..1d99d13 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/empty.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/empty.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/empty.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT map_from_entries(); diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/invalid.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/invalid.test index d99e137..d3453e7 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/invalid.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/invalid.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/invalid.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT map_from_entries(ARRAY[(1,2), (3,4)], ARRAY[(5,6), (7,8)]); diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/nested.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/nested.test index 689098e..5d23a6b 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/nested.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/nested.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/nested.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP_FROM_ENTRIES(ARRAY[([1,2], 2), ([3,4], 4)]); diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null.test index 6ca357f..a2dc423 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP_FROM_ENTRIES(NULL); diff --git a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null_entry.test b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null_entry.test index 7113622..82cc2f7 100644 --- a/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null_entry.test +++ b/parser/testdata/corpus/sql/types/nested/map/map_from_entries/null_entry.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/map_from_entries/null_entry.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP_FROM_ENTRIES(ARRAY[NULL, (1, 'x'), NULL, (2, 'y')]); diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map.test b/parser/testdata/corpus/sql/types/nested/map/test_map.test index 31c28ae..0c9fe09 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP(list_value(1, 2, 3), list_value(10, 9, 8)) diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_and_lambdas.test b/parser/testdata/corpus/sql/types/nested/map/test_map_and_lambdas.test index 62bf55e..1f6cc14 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_and_lambdas.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_and_lambdas.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_and_lambdas.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE i AS SELECT str_split('my yay', ' ') AS l, range AS i FROM range(3); diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_cardinality.test b/parser/testdata/corpus/sql/types/nested/map/test_map_cardinality.test index 914c4bd..fcb24d1 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_cardinality.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_cardinality.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_cardinality.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select cardinality(NULL) diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_concat.test b/parser/testdata/corpus/sql/types/nested/map/test_map_concat.test index 589690b..622d511 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_concat.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_concat.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_concat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select map_concat(map([3,4,5], ['a', 'b', 'c']), map([1], ['d'])); diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_constant.test b/parser/testdata/corpus/sql/types/nested/map/test_map_constant.test index a8f82b9..1617372 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_constant.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_constant.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_constant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP {}; diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_contains.test b/parser/testdata/corpus/sql/types/nested/map/test_map_contains.test index c68e34b..31284b4 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_contains.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_contains.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT map_contains_entry(map([1,2,3],[4,5,6]), 2, 5) AS res; diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_entries.test b/parser/testdata/corpus/sql/types/nested/map/test_map_entries.test index 242bc51..8bec0f5 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_entries.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_entries.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_entries.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select map_entries(MAP()) diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_keys.test b/parser/testdata/corpus/sql/types/nested/map/test_map_keys.test index da6f45d..0c4e482 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_keys.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_keys.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select map_keys(MAP([],[])); diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_nested_keys.test b/parser/testdata/corpus/sql/types/nested/map/test_map_nested_keys.test index 732ce44..cea4e5c 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_nested_keys.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_nested_keys.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_nested_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MAP( diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript.test b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript.test index 7871839..3248755 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_subscript.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select m[1] from (select MAP(LIST_VALUE(1, 2, 3, 4),LIST_VALUE(10, 9, 8, 7)) as m) as T diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_composite.test b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_composite.test index 6506ac7..64b3bf9 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_composite.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_composite.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_subscript_composite.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select m[[2,0]] from (select MAP(LIST_VALUE([0], [1], [2,0], [3]),LIST_VALUE(10, 9, 8, 7)) as m) as T diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_from_column.test b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_from_column.test index 330fc5f..0512e3c 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_from_column.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_from_column.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_subscript_from_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t1 ( diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_vector_types.test b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_vector_types.test index e9281d5..c388281 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_vector_types.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_subscript_vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT true as equal diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_where.test b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_where.test index 57e3e27..9f8e4c3 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_where.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_subscript_where.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_subscript_where.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into t1 diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_values.test b/parser/testdata/corpus/sql/types/nested/map/test_map_values.test index 58c22fd..a5c38e3 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_values.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_values.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select map_values(MAP([],[])); diff --git a/parser/testdata/corpus/sql/types/nested/map/test_map_vector_types.test b/parser/testdata/corpus/sql/types/nested/map/test_map_vector_types.test index 663e696..e712d1a 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_map_vector_types.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_map_vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_map_vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create macro input() as table diff --git a/parser/testdata/corpus/sql/types/nested/map/test_null_map_interaction.test b/parser/testdata/corpus/sql/types/nested/map/test_null_map_interaction.test index 4788e07..dc903cf 100644 --- a/parser/testdata/corpus/sql/types/nested/map/test_null_map_interaction.test +++ b/parser/testdata/corpus/sql/types/nested/map/test_null_map_interaction.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/map/test_null_map_interaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TYPEOF(MAP_KEYS(NULL::MAP(TEXT, BIGINT))); diff --git a/parser/testdata/corpus/sql/types/nested/nested_constant_comparison.test b/parser/testdata/corpus/sql/types/nested/nested_constant_comparison.test new file mode 100644 index 0000000..830d8bf --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/nested_constant_comparison.test @@ -0,0 +1,17 @@ +# source: test/sql/types/nested/nested_constant_comparison.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT [1] IN ([1]), {'a': 1} IN ({'a': 1}), MAP {1: 2} IN (MAP {1: 2}), [1, 2]::INT[2] IN ([1, 2]::INT[2]) +-- +ok +== +SELECT [1] = [2], [NULL::INT] = [1], NULL::INT[] = [1] +-- +ok +== +SELECT l = [1] FROM (VALUES ([1]), ([2]), (NULL)) t(l) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/nested_nested_types.test b/parser/testdata/corpus/sql/types/nested/nested_nested_types.test index 2d8a817..3567cce 100644 --- a/parser/testdata/corpus/sql/types/nested/nested_nested_types.test +++ b/parser/testdata/corpus/sql/types/nested/nested_nested_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/nested_nested_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [{'i':1,'j':[2,3]},NULL] diff --git a/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates.test b/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates.test index 42b26d1..a478beb 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates.test +++ b/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/struct_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select min(struct_pack(i := i, j := i + 2)), max(struct_pack(i := i, j := i + 2)), first(struct_pack(i := i, j := i + 2)) from range(10) tbl(i); diff --git a/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates_types.test b/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates_types.test index bc51dd1..de06a77 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates_types.test +++ b/parser/testdata/corpus/sql/types/nested/struct/struct_aggregates_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/struct_aggregates_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE structs AS SELECT {'i': i::{type}} AS s FROM range(11) tbl(i) diff --git a/parser/testdata/corpus/sql/types/nested/struct/struct_dict.test b/parser/testdata/corpus/sql/types/nested/struct/struct_dict.test index 26123fb..24aa28e 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/struct_dict.test +++ b/parser/testdata/corpus/sql/types/nested/struct/struct_dict.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/struct_dict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {'i': 1, 'j': 2}; diff --git a/parser/testdata/corpus/sql/types/nested/struct/struct_is_null.test b/parser/testdata/corpus/sql/types/nested/struct/struct_is_null.test index fb72164..8c463b3 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/struct_is_null.test +++ b/parser/testdata/corpus/sql/types/nested/struct/struct_is_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/struct_is_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (data struct(str varchar)[]); diff --git a/parser/testdata/corpus/sql/types/nested/struct/struct_of_lists_where.test b/parser/testdata/corpus/sql/types/nested/struct/struct_of_lists_where.test index 43258ab..17adb46 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/struct_of_lists_where.test +++ b/parser/testdata/corpus/sql/types/nested/struct/struct_of_lists_where.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/struct_of_lists_where.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t2 (id int, v_map struct(key integer[], val decimal[]), k integer[]); diff --git a/parser/testdata/corpus/sql/types/nested/struct/struct_subquery.test b/parser/testdata/corpus/sql/types/nested/struct/struct_subquery.test index 791829d..75a2dfe 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/struct_subquery.test +++ b/parser/testdata/corpus/sql/types/nested/struct/struct_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/struct_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT {'a': 3}) diff --git a/parser/testdata/corpus/sql/types/nested/struct/test_struct.test b/parser/testdata/corpus/sql/types/nested/struct/test_struct.test index a91901f..8064357 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/test_struct.test +++ b/parser/testdata/corpus/sql/types/nested/struct/test_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/test_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT e, STRUCT_PACK(e) FROM struct_data ORDER BY e LIMIT 2 diff --git a/parser/testdata/corpus/sql/types/nested/struct/test_struct_keys.test b/parser/testdata/corpus/sql/types/nested/struct/test_struct_keys.test index 59ab2ed..dce88bf 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/test_struct_keys.test +++ b/parser/testdata/corpus/sql/types/nested/struct/test_struct_keys.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/test_struct_keys.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select struct_keys({a: 1, b: 2, c: 3, d: 4, e: 5}); diff --git a/parser/testdata/corpus/sql/types/nested/struct/test_struct_values.test b/parser/testdata/corpus/sql/types/nested/struct/test_struct_values.test index f33aaa7..cb01a15 100644 --- a/parser/testdata/corpus/sql/types/nested/struct/test_struct_values.test +++ b/parser/testdata/corpus/sql/types/nested/struct/test_struct_values.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/struct/test_struct_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select struct_values({a: 1, b: 'x', c: 3}); diff --git a/parser/testdata/corpus/sql/types/nested/test_deeply_nested_types.test b/parser/testdata/corpus/sql/types/nested/test_deeply_nested_types.test new file mode 100644 index 0000000..b42ca92 --- /dev/null +++ b/parser/testdata/corpus/sql/types/nested/test_deeply_nested_types.test @@ -0,0 +1,33 @@ +# source: test/sql/types/nested/test_deeply_nested_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET max_expression_depth = 300000; +-- +ok +== +SELECT list_contains(CAST(NULL AS INTEGER[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]), 1); +-- +ok +== +SELECT CAST(NULL AS INTEGER[1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1][1]); +-- +ok +== +SELECT typeof(CAST(NULL AS INTEGER[][2][][2][][2][][2][][2])); +-- +ok +== +SELECT typeof(CAST(NULL AS INTEGER[][][][][])); +-- +ok +== +SELECT list_contains(CAST(NULL AS VARCHAR[][][][][]), 'abc' COLLATE NOCASE); +-- +ok +== +SELECT column_name, column_type FROM (DESCRIBE SELECT CAST(n AS STRUCT(a INTEGER[3], "b c" MAP(VARCHAR, UNION(x INTEGER, y VARCHAR[]))[])[][2]) FROM (SELECT NULL AS n)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/nested/unnest_range_plan.test b/parser/testdata/corpus/sql/types/nested/unnest_range_plan.test index 0d2b5a3..35ef74b 100644 --- a/parser/testdata/corpus/sql/types/nested/unnest_range_plan.test +++ b/parser/testdata/corpus/sql/types/nested/unnest_range_plan.test @@ -1,6 +1,6 @@ # source: test/sql/types/nested/unnest_range_plan.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * diff --git a/parser/testdata/corpus/sql/types/null/test_boolean_null.test b/parser/testdata/corpus/sql/types/null/test_boolean_null.test index f68bcb6..e1e1a75 100644 --- a/parser/testdata/corpus/sql/types/null/test_boolean_null.test +++ b/parser/testdata/corpus/sql/types/null/test_boolean_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/null/test_boolean_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 0 AND 0, 0 AND 1, 1 AND 0, 1 AND 1, NULL AND 0, NULL AND 1, 0 AND NULL, 1 AND NULL, NULL AND NULL diff --git a/parser/testdata/corpus/sql/types/null/test_is_null.test b/parser/testdata/corpus/sql/types/null/test_is_null.test index ecf5c97..8d3fb79 100644 --- a/parser/testdata/corpus/sql/types/null/test_is_null.test +++ b/parser/testdata/corpus/sql/types/null/test_is_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/null/test_is_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (11, 1), (NULL, 2), (13, 3) diff --git a/parser/testdata/corpus/sql/types/null/test_null.test b/parser/testdata/corpus/sql/types/null/test_null.test index ab96e3c..6698050 100644 --- a/parser/testdata/corpus/sql/types/null/test_null.test +++ b/parser/testdata/corpus/sql/types/null/test_null.test @@ -1,6 +1,6 @@ # source: test/sql/types/null/test_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 3 + NULL diff --git a/parser/testdata/corpus/sql/types/null/test_null_aggr.test b/parser/testdata/corpus/sql/types/null/test_null_aggr.test index 2c12ed1..2088af0 100644 --- a/parser/testdata/corpus/sql/types/null/test_null_aggr.test +++ b/parser/testdata/corpus/sql/types/null/test_null_aggr.test @@ -1,6 +1,6 @@ # source: test/sql/types/null/test_null_aggr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT SUM(a), MIN(a), MAX(a) FROM test diff --git a/parser/testdata/corpus/sql/types/null/test_null_cast.test b/parser/testdata/corpus/sql/types/null/test_null_cast.test index 8c49af0..258e728 100644 --- a/parser/testdata/corpus/sql/types/null/test_null_cast.test +++ b/parser/testdata/corpus/sql/types/null/test_null_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/null/test_null_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL::BIGINT::VARCHAR::INT[]::ROW(i INTEGER, k INTEGER)::DECIMAL(4,0) diff --git a/parser/testdata/corpus/sql/types/numeric/arithmetic_vector_types.test b/parser/testdata/corpus/sql/types/numeric/arithmetic_vector_types.test index d1bdec8..12617d8 100644 --- a/parser/testdata/corpus/sql/types/numeric/arithmetic_vector_types.test +++ b/parser/testdata/corpus/sql/types/numeric/arithmetic_vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/arithmetic_vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a + b FROM test_vector_types(NULL::INT, NULL::INT) t(a, b) diff --git a/parser/testdata/corpus/sql/types/numeric/bigint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/bigint_try_cast.test index 70b9882..1411daf 100644 --- a/parser/testdata/corpus/sql/types/numeric/bigint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/bigint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/bigint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bigints AS SELECT i::BIGINT i FROM (VALUES (-9223372036854775808), (0), (9223372036854775807)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/bool_casts.test b/parser/testdata/corpus/sql/types/numeric/bool_casts.test index f8a2d32..4a2ff41 100644 --- a/parser/testdata/corpus/sql/types/numeric/bool_casts.test +++ b/parser/testdata/corpus/sql/types/numeric/bool_casts.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/bool_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE booleans AS SELECT b::BOOLEAN b FROM (VALUES (NULL), (0), (1)) tbl(b) diff --git a/parser/testdata/corpus/sql/types/numeric/combinations/decimal_combinations.test b/parser/testdata/corpus/sql/types/numeric/combinations/decimal_combinations.test index 4a1598b..b1e9a7c 100644 --- a/parser/testdata/corpus/sql/types/numeric/combinations/decimal_combinations.test +++ b/parser/testdata/corpus/sql/types/numeric/combinations/decimal_combinations.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/combinations/decimal_combinations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tinyint_limits AS SELECT (-128)::TINYINT min, 127::TINYINT max diff --git a/parser/testdata/corpus/sql/types/numeric/combinations/usmallint_combinations.test b/parser/testdata/corpus/sql/types/numeric/combinations/usmallint_combinations.test index ac87b95..d6e9e0b 100644 --- a/parser/testdata/corpus/sql/types/numeric/combinations/usmallint_combinations.test +++ b/parser/testdata/corpus/sql/types/numeric/combinations/usmallint_combinations.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/combinations/usmallint_combinations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof([100::USMALLINT, 10000::SMALLINT]); diff --git a/parser/testdata/corpus/sql/types/numeric/combinations/utinyint_combinations.test b/parser/testdata/corpus/sql/types/numeric/combinations/utinyint_combinations.test index 9e5e820..9ee549d 100644 --- a/parser/testdata/corpus/sql/types/numeric/combinations/utinyint_combinations.test +++ b/parser/testdata/corpus/sql/types/numeric/combinations/utinyint_combinations.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/combinations/utinyint_combinations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select typeof([100::UTINYINT, 10000::SMALLINT]); diff --git a/parser/testdata/corpus/sql/types/numeric/float_precision.test b/parser/testdata/corpus/sql/types/numeric/float_precision.test new file mode 100644 index 0000000..be4c362 --- /dev/null +++ b/parser/testdata/corpus/sql/types/numeric/float_precision.test @@ -0,0 +1,56 @@ +# source: test/sql/types/numeric/float_precision.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(CAST(NULL AS FLOAT)); +-- +ok +== +SELECT typeof(CAST(NULL AS FLOAT(1))); +-- +ok +== +SELECT typeof(CAST(NULL AS FLOAT(24))); +-- +ok +== +SELECT typeof(CAST(NULL AS FLOAT(25))); +-- +ok +== +SELECT typeof(CAST(NULL AS FLOAT(53))); +-- +ok +== +CREATE TABLE float_precision(f1 FLOAT(1), f24 FLOAT(24), f25 FLOAT(25), f53 FLOAT(53)); +-- +ok +== +SELECT data_type +FROM duckdb_columns() +WHERE table_name = 'float_precision' +ORDER BY column_index; +-- +ok +== +SELECT CAST(NULL AS FLOAT(0)); +-- +ok +== +SELECT CAST(NULL AS FLOAT(54)); +-- +ok +== +CREATE TABLE float_precision_too_low(i FLOAT(0)); +-- +ok +== +CREATE TABLE float_precision_too_high(i FLOAT(54)); +-- +ok +== +SELECT CAST(NULL AS FLOAT(1.5)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/numeric/hugeint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/hugeint_try_cast.test index 0712c6f..bb557aa 100644 --- a/parser/testdata/corpus/sql/types/numeric/hugeint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/hugeint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/hugeint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints AS SELECT i::HUGEINT i FROM (VALUES (-170141183460469231731687303715884105728), (0), (170141183460469231731687303715884105727)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/integer_try_cast.test b/parser/testdata/corpus/sql/types/numeric/integer_try_cast.test index 805c21e..f23d770 100644 --- a/parser/testdata/corpus/sql/types/numeric/integer_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/integer_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/integer_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers AS SELECT i::INTEGER i FROM (VALUES (-2147483648), (0), (2147483647)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/smallint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/smallint_try_cast.test index 9f25f61..b875634 100644 --- a/parser/testdata/corpus/sql/types/numeric/smallint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/smallint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/smallint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE smallints AS SELECT i::SMALLINT i FROM (VALUES (-32768), (0), (32767)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/test_empty_numeric.test b/parser/testdata/corpus/sql/types/numeric/test_empty_numeric.test index d143103..4f963ff 100644 --- a/parser/testdata/corpus/sql/types/numeric/test_empty_numeric.test +++ b/parser/testdata/corpus/sql/types/numeric/test_empty_numeric.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/test_empty_numeric.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE numerics(i NUMERIC(), j NUMERIC) diff --git a/parser/testdata/corpus/sql/types/numeric/tinyint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/tinyint_try_cast.test index 75b098b..7c4b324 100644 --- a/parser/testdata/corpus/sql/types/numeric/tinyint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/tinyint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/tinyint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tinyints AS SELECT i::TINYINT i FROM (VALUES (-128), (0), (127)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/ubigint_arithmetic_casting.test b/parser/testdata/corpus/sql/types/numeric/ubigint_arithmetic_casting.test index 965fdd1..6055d1b 100644 --- a/parser/testdata/corpus/sql/types/numeric/ubigint_arithmetic_casting.test +++ b/parser/testdata/corpus/sql/types/numeric/ubigint_arithmetic_casting.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/ubigint_arithmetic_casting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(1::UBIGINT + 1::TINYINT) diff --git a/parser/testdata/corpus/sql/types/numeric/ubigint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/ubigint_try_cast.test index c370cf3..c81ee66 100644 --- a/parser/testdata/corpus/sql/types/numeric/ubigint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/ubigint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/ubigint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ubigints AS SELECT i::UBIGINT i FROM (VALUES (0), (18446744073709551615)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/uhugeint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/uhugeint_try_cast.test index 21226f2..e105eae 100644 --- a/parser/testdata/corpus/sql/types/numeric/uhugeint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/uhugeint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/uhugeint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uhugeints AS SELECT i::UHUGEINT i FROM (VALUES (0::UHUGEINT), (1::UHUGEINT), ('340282366920938463463374607431768211455'::UHUGEINT)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/uinteger_try_cast.test b/parser/testdata/corpus/sql/types/numeric/uinteger_try_cast.test index 59824b9..a6cc89a 100644 --- a/parser/testdata/corpus/sql/types/numeric/uinteger_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/uinteger_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/uinteger_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uintegers AS SELECT i::UINTEGER i FROM (VALUES (0), (4294967295)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/usmallint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/usmallint_try_cast.test index 0f2227b..9cfa08c 100644 --- a/parser/testdata/corpus/sql/types/numeric/usmallint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/usmallint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/usmallint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE usmallints AS SELECT i::USMALLINT i FROM (VALUES (0), (65535)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/numeric/utinyint_try_cast.test b/parser/testdata/corpus/sql/types/numeric/utinyint_try_cast.test index d08feef..39f3da8 100644 --- a/parser/testdata/corpus/sql/types/numeric/utinyint_try_cast.test +++ b/parser/testdata/corpus/sql/types/numeric/utinyint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/numeric/utinyint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE utinyints AS SELECT i::UTINYINT i FROM (VALUES (0), (255)) tbl(i) diff --git a/parser/testdata/corpus/sql/types/string/test_big_strings.test b/parser/testdata/corpus/sql/types/string/test_big_strings.test index d04b5e9..7622e82 100644 --- a/parser/testdata/corpus/sql/types/string/test_big_strings.test +++ b/parser/testdata/corpus/sql/types/string/test_big_strings.test @@ -1,6 +1,6 @@ # source: test/sql/types/string/test_big_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES ('aaaaaaaaaa') diff --git a/parser/testdata/corpus/sql/types/string/test_unicode.test b/parser/testdata/corpus/sql/types/string/test_unicode.test index 937ec2f..cf14f45 100644 --- a/parser/testdata/corpus/sql/types/string/test_unicode.test +++ b/parser/testdata/corpus/sql/types/string/test_unicode.test @@ -1,6 +1,6 @@ # source: test/sql/types/string/test_unicode.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE emojis(id INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/types/struct/create_qualified_type_array.test b/parser/testdata/corpus/sql/types/struct/create_qualified_type_array.test index 3d02dfa..edb0bbe 100644 --- a/parser/testdata/corpus/sql/types/struct/create_qualified_type_array.test +++ b/parser/testdata/corpus/sql/types/struct/create_qualified_type_array.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/create_qualified_type_array.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create type u as struct (i int, j int); diff --git a/parser/testdata/corpus/sql/types/struct/create_type_struct.test b/parser/testdata/corpus/sql/types/struct/create_type_struct.test index 9066811..3068811 100644 --- a/parser/testdata/corpus/sql/types/struct/create_type_struct.test +++ b/parser/testdata/corpus/sql/types/struct/create_type_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/create_type_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE app.item AS STRUCT ( diff --git a/parser/testdata/corpus/sql/types/struct/empty_struct.test b/parser/testdata/corpus/sql/types/struct/empty_struct.test index b5abebe..ede4107 100644 --- a/parser/testdata/corpus/sql/types/struct/empty_struct.test +++ b/parser/testdata/corpus/sql/types/struct/empty_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/empty_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT row(), struct_pack() diff --git a/parser/testdata/corpus/sql/types/struct/empty_tuple_storage.test b/parser/testdata/corpus/sql/types/struct/empty_tuple_storage.test new file mode 100644 index 0000000..c1befe5 --- /dev/null +++ b/parser/testdata/corpus/sql/types/struct/empty_tuple_storage.test @@ -0,0 +1,33 @@ +# source: test/sql/types/struct/empty_tuple_storage.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT [row()] l, CASE WHEN range % 2 = 0 THEN [row(), row()] END l2 FROM range(3000) +-- +ok +== +SELECT count(l), count(l2) FROM t +-- +ok +== +SELECT l2 FROM t LIMIT 2 +-- +ok +== +UPDATE t SET l2 = [row()] WHERE l2 IS NULL +-- +ok +== +DELETE FROM t WHERE rowid % 3 = 0 +-- +ok +== +SELECT count(*), count(l2), sum(len(l2)) FROM t +-- +ok +== +CREATE TABLE t2 AS SELECT MAP {1: row()} m, array_value(row(), row()) a, [[row()], []] l +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/inet_struct_comparison.test b/parser/testdata/corpus/sql/types/struct/inet_struct_comparison.test index e23df44..a11cf14 100644 --- a/parser/testdata/corpus/sql/types/struct/inet_struct_comparison.test +++ b/parser/testdata/corpus/sql/types/struct/inet_struct_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/inet_struct_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(c0 INT, c1 INET); diff --git a/parser/testdata/corpus/sql/types/struct/nested_struct_projection_pushdown.test b/parser/testdata/corpus/sql/types/struct/nested_struct_projection_pushdown.test index feb8f36..3200c51 100644 --- a/parser/testdata/corpus/sql/types/struct/nested_struct_projection_pushdown.test +++ b/parser/testdata/corpus/sql/types/struct/nested_struct_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/nested_struct_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE test_structs( diff --git a/parser/testdata/corpus/sql/types/struct/nested_structs.test b/parser/testdata/corpus/sql/types/struct/nested_structs.test index f603769..82eebb5 100644 --- a/parser/testdata/corpus/sql/types/struct/nested_structs.test +++ b/parser/testdata/corpus/sql/types/struct/nested_structs.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/nested_structs.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(c ROW(i ROW(a INTEGER), j INTEGER)); diff --git a/parser/testdata/corpus/sql/types/struct/remap_struct.test b/parser/testdata/corpus/sql/types/struct/remap_struct.test index 2c1a501..8a41941 100644 --- a/parser/testdata/corpus/sql/types/struct/remap_struct.test +++ b/parser/testdata/corpus/sql/types/struct/remap_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/remap_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT remap_struct({'i': 1, 'j': 2}, NULL::ROW(v2 INT), NULL, {'v2': NULL::INTEGER}); @@ -168,3 +168,33 @@ SELECT remap_struct( -- ok == +SELECT typeof(mapped) = typeof(NULL::STRUCT(renamed STRUCT(a INTEGER))), mapped +FROM (SELECT remap_struct( + {'x': NULL::"NULL"}, + NULL::STRUCT(renamed STRUCT(a INTEGER)), + {'renamed': 'x'}, + NULL +) AS mapped); +-- +ok +== +SELECT typeof(mapped) = typeof(NULL::STRUCT(renamed INTEGER[])), mapped +FROM (SELECT remap_struct( + {'x': NULL::"NULL"}, + NULL::STRUCT(renamed INTEGER[]), + {'renamed': 'x'}, + NULL +) AS mapped); +-- +ok +== +SELECT typeof(mapped) = typeof(NULL::STRUCT(renamed MAP(VARCHAR, INTEGER))), mapped +FROM (SELECT remap_struct( + {'x': NULL::"NULL"}, + NULL::STRUCT(renamed MAP(VARCHAR, INTEGER)), + {'renamed': 'x'}, + NULL +) AS mapped); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/remap_struct_constant_nested.test b/parser/testdata/corpus/sql/types/struct/remap_struct_constant_nested.test new file mode 100644 index 0000000..935289d --- /dev/null +++ b/parser/testdata/corpus/sql/types/struct/remap_struct_constant_nested.test @@ -0,0 +1,48 @@ +# source: test/sql/types/struct/remap_struct_constant_nested.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT remap_struct(struct_pack(id := id, m := MAP {1: 'a', 2: 'b'}), + NULL::STRUCT(id INTEGER, m2 MAP(INTEGER, VARCHAR)), + {'id': 'id', 'm2': ROW('m', {'key': 'key', 'value': 'value'})}, + NULL) +FROM range(3) t(id) +-- +ok +== +SELECT remap_struct(struct_pack(id := id, l := [1, 2, 3]), + NULL::STRUCT(id INTEGER, l2 INTEGER[]), + {'id': 'id', 'l2': ROW('l', {'list': 'list'})}, + NULL) +FROM range(3) t(id) +-- +ok +== +SELECT remap_struct(struct_pack(id := id, l := [[1, 2], [3]]), + NULL::STRUCT(id INTEGER, l2 INTEGER[][]), + {'id': 'id', 'l2': ROW('l', {'list': ROW('list', {'list': 'list'})})}, + NULL) +FROM range(3) t(id) +-- +ok +== +SELECT remap_struct(struct_pack(id := id, m := NULL::MAP(INTEGER, VARCHAR)), + NULL::STRUCT(id INTEGER, m2 MAP(INTEGER, VARCHAR)), + {'id': 'id', 'm2': ROW('m', {'key': 'key', 'value': 'value'})}, + NULL) +FROM range(3) t(id) +-- +ok +== +SELECT count(*), count(DISTINCT r.m2), min(cardinality(r.m2)) +FROM ( + SELECT remap_struct(struct_pack(id := id, m := MAP {1: 'a', 2: 'b'}), + NULL::STRUCT(id INTEGER, m2 MAP(INTEGER, VARCHAR)), + {'id': 'id', 'm2': ROW('m', {'key': 'key', 'value': 'value'})}, + NULL) AS r + FROM range(5000) t(id) +) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/remap_struct_in_list.test b/parser/testdata/corpus/sql/types/struct/remap_struct_in_list.test index b25c6ac..7b7daca 100644 --- a/parser/testdata/corpus/sql/types/struct/remap_struct_in_list.test +++ b/parser/testdata/corpus/sql/types/struct/remap_struct_in_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/remap_struct_in_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT remap_struct( @@ -62,3 +62,33 @@ FROM ( -- ok == +SELECT typeof(mapped) = typeof(NULL::STRUCT(a INTEGER)[]), mapped +FROM (SELECT remap_struct( + [NULL::"NULL", NULL::"NULL"], + NULL::STRUCT(a INTEGER)[], + {'list': 'list'}, + NULL +) AS mapped); +-- +ok +== +SELECT typeof(mapped) = typeof(NULL::INTEGER[][]), mapped +FROM (SELECT remap_struct( + [NULL::"NULL", NULL::"NULL"], + NULL::INTEGER[][], + {'list': 'list'}, + NULL +) AS mapped); +-- +ok +== +SELECT typeof(mapped) = typeof(NULL::MAP(VARCHAR, INTEGER)[]), mapped +FROM (SELECT remap_struct( + [NULL::"NULL", NULL::"NULL"], + NULL::MAP(VARCHAR, INTEGER)[], + {'list': 'list'}, + NULL +) AS mapped); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/remap_struct_in_map.test b/parser/testdata/corpus/sql/types/struct/remap_struct_in_map.test index a360b3d..e4e5a37 100644 --- a/parser/testdata/corpus/sql/types/struct/remap_struct_in_map.test +++ b/parser/testdata/corpus/sql/types/struct/remap_struct_in_map.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/remap_struct_in_map.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT remap_struct( @@ -134,3 +134,33 @@ SELECT remap_struct( -- ok == +SELECT typeof(mapped) = typeof(NULL::MAP(VARCHAR, STRUCT(a INTEGER))), mapped +FROM (SELECT remap_struct( + MAP {'one': NULL::"NULL", 'two': NULL::"NULL"}, + NULL::MAP(VARCHAR, STRUCT(a INTEGER)), + {'key': 'key', 'value': 'value'}, + NULL +) AS mapped); +-- +ok +== +SELECT typeof(mapped) = typeof(NULL::MAP(VARCHAR, INTEGER[])), mapped +FROM (SELECT remap_struct( + MAP {'one': NULL::"NULL", 'two': NULL::"NULL"}, + NULL::MAP(VARCHAR, INTEGER[]), + {'key': 'key', 'value': 'value'}, + NULL +) AS mapped); +-- +ok +== +SELECT typeof(mapped) = typeof(NULL::MAP(VARCHAR, MAP(VARCHAR, INTEGER))), mapped +FROM (SELECT remap_struct( + MAP {'one': NULL::"NULL", 'two': NULL::"NULL"}, + NULL::MAP(VARCHAR, MAP(VARCHAR, INTEGER)), + {'key': 'key', 'value': 'value'}, + NULL +) AS mapped); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/remap_struct_list_source_name.test b/parser/testdata/corpus/sql/types/struct/remap_struct_list_source_name.test index 7259997..d4d8d65 100644 --- a/parser/testdata/corpus/sql/types/struct/remap_struct_list_source_name.test +++ b/parser/testdata/corpus/sql/types/struct/remap_struct_list_source_name.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/remap_struct_list_source_name.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT remap_struct( diff --git a/parser/testdata/corpus/sql/types/struct/remap_struct_size.test b/parser/testdata/corpus/sql/types/struct/remap_struct_size.test index c78c76c..ba0fbea 100644 --- a/parser/testdata/corpus/sql/types/struct/remap_struct_size.test +++ b/parser/testdata/corpus/sql/types/struct/remap_struct_size.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/remap_struct_size.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE src(col1 STRUCT(i INT, j INT)[]); diff --git a/parser/testdata/corpus/sql/types/struct/struct_case.test b/parser/testdata/corpus/sql/types/struct/struct_case.test index 0dc7d05..8eea4be 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_case.test +++ b/parser/testdata/corpus/sql/types/struct/struct_case.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_case.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CASE WHEN 1=1 THEN {'i': 1} ELSE {'i': 2} END diff --git a/parser/testdata/corpus/sql/types/struct/struct_case_insensitivity.test b/parser/testdata/corpus/sql/types/struct/struct_case_insensitivity.test index d37f41e..5c84d7e 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_case_insensitivity.test +++ b/parser/testdata/corpus/sql/types/struct/struct_case_insensitivity.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_case_insensitivity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT ({'HELLO': 3}) col; diff --git a/parser/testdata/corpus/sql/types/struct/struct_cast.test b/parser/testdata/corpus/sql/types/struct/struct_cast.test index 8e57e23..fa2fbb4 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_cast.test +++ b/parser/testdata/corpus/sql/types/struct/struct_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {'i': 1, 'j': 2}::ROW(i BIGINT, j VARCHAR); diff --git a/parser/testdata/corpus/sql/types/struct/struct_cast_parent_path_order.test b/parser/testdata/corpus/sql/types/struct/struct_cast_parent_path_order.test new file mode 100644 index 0000000..5cab5b7 --- /dev/null +++ b/parser/testdata/corpus/sql/types/struct/struct_cast_parent_path_order.test @@ -0,0 +1,33 @@ +# source: test/sql/types/struct/struct_cast_parent_path_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE cast_parent(n STRUCT(x STRUCT(a INTEGER, b INTEGER))); +-- +ok +== +INSERT INTO cast_parent VALUES + ({'x': {'a': 1, 'b': 11}}), + ({'x': {'a': 2, 'b': 22}}), + ({'x': NULL}), + (NULL); +-- +ok +== +CREATE VIEW cast_parent_view AS SELECT * FROM cast_parent; +-- +ok +== +SELECT n.x::STRUCT(b INTEGER, a BIGINT), n.x.a FROM {source}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT n.x.a, n.x::STRUCT(b INTEGER, a BIGINT) FROM {source}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT n.x.a, n.x::STRUCT(b INTEGER, a BIGINT), n.x FROM {source}; +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/types/struct/struct_cast_superset.test b/parser/testdata/corpus/sql/types/struct/struct_cast_superset.test index d2290ac..f164f88 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_cast_superset.test +++ b/parser/testdata/corpus/sql/types/struct/struct_cast_superset.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_cast_superset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (s1 STRUCT(a INT, b INT)); diff --git a/parser/testdata/corpus/sql/types/struct/struct_comparison.test b/parser/testdata/corpus/sql/types/struct/struct_comparison.test index 755a793..755190b 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_comparison.test +++ b/parser/testdata/corpus/sql/types/struct/struct_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {'x': 1} < {'x': 2} diff --git a/parser/testdata/corpus/sql/types/struct/struct_concat.test b/parser/testdata/corpus/sql/types/struct/struct_concat.test index 1307a90..f97ef79 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_concat.test +++ b/parser/testdata/corpus/sql/types/struct/struct_concat.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_concat.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT struct_concat({'a': 1}, {'b': NULL}, NULL::STRUCT(k INT), struct_pack( x := 'foobar'));; diff --git a/parser/testdata/corpus/sql/types/struct/struct_contains.test b/parser/testdata/corpus/sql/types/struct/struct_contains.test index db10247..a1c2044 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_contains.test +++ b/parser/testdata/corpus/sql/types/struct/struct_contains.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_contains.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT struct_contains(ROW(1, 2), 2); @@ -155,6 +155,10 @@ SELECT c0, c0 IN x FROM (SELECT [c0, c1] AS x FROM t0) AS y, t0 ORDER BY c0, x; -- ok == +SELECT struct_contains(ROW(1.0::FLOAT, 2.0::DOUBLE), 1.0::FLOAT), struct_contains(ROW(1::INT, 2::BIGINT), 1::INT); +-- +ok +== SELECT struct_contains({'a': 1, 'b': 2}, 2); -- ok diff --git a/parser/testdata/corpus/sql/types/struct/struct_contains_types.test b/parser/testdata/corpus/sql/types/struct/struct_contains_types.test new file mode 100644 index 0000000..8302f65 --- /dev/null +++ b/parser/testdata/corpus/sql/types/struct/struct_contains_types.test @@ -0,0 +1,29 @@ +# source: test/sql/types/struct/struct_contains_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT struct_contains((DATE '1970-01-02', 5), 1), struct_position((DATE '1970-01-02', 5), 1) +-- +ok +== +SELECT struct_contains(('a'::ENUM('a','b'), 0::UTINYINT), 0::UTINYINT), struct_contains(('a'::ENUM('a','b'), 1::UTINYINT), 0::UTINYINT) +-- +ok +== +SELECT struct_contains((1::INT, 2::BIGINT), 1::TINYINT), struct_position((1::INT, 2::BIGINT), 1::TINYINT) +-- +ok +== +SELECT struct_contains((1, 'a'), 'a'), struct_position((1.5, 2), 2) +-- +ok +== +SELECT struct_position((1, 1, 1), 1), struct_position((NULL::INT, 1, NULL::INT), NULL::INT) +-- +ok +== +SELECT struct_position(([1], 'a', [2]), [2]), struct_contains(([1], 'a'), 'a') +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/struct_cross_product.test b/parser/testdata/corpus/sql/types/struct/struct_cross_product.test index 2ef7527..77acf3b 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_cross_product.test +++ b/parser/testdata/corpus/sql/types/struct/struct_cross_product.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_cross_product.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE VIEW v1 AS SELECT * FROM (VALUES (1, {'a': {'a1': 3, 'a2': 7}, 'b': [1, 2, 3]}), (2, NULL), (3, {'a': NULL, 'b': [4, 5, NULL]})) tbl (a, b); diff --git a/parser/testdata/corpus/sql/types/struct/struct_different_names.test b/parser/testdata/corpus/sql/types/struct/struct_different_names.test index 8eb4935..bf496c6 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_different_names.test +++ b/parser/testdata/corpus/sql/types/struct/struct_different_names.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_different_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE wrong AS FROM (VALUES (ROW(3))); diff --git a/parser/testdata/corpus/sql/types/struct/struct_distinct.test b/parser/testdata/corpus/sql/types/struct/struct_distinct.test index 5654daf..f5a126a 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_distinct.test +++ b/parser/testdata/corpus/sql/types/struct/struct_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {'x': 1::{type}} IS NOT DISTINCT FROM {'x': 2::{type}} diff --git a/parser/testdata/corpus/sql/types/struct/struct_equality_bug.test b/parser/testdata/corpus/sql/types/struct/struct_equality_bug.test index 182cd81..b66ae9f 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_equality_bug.test +++ b/parser/testdata/corpus/sql/types/struct/struct_equality_bug.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_equality_bug.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers VALUES (1),(1),(3),(20),(20),(20); diff --git a/parser/testdata/corpus/sql/types/struct/struct_index.test b/parser/testdata/corpus/sql/types/struct/struct_index.test index e6f0fe7..8564499 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_index.test +++ b/parser/testdata/corpus/sql/types/struct/struct_index.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER PRIMARY KEY, c ROW(i ROW(a INTEGER), j INTEGER)); diff --git a/parser/testdata/corpus/sql/types/struct/struct_named_cast.test b/parser/testdata/corpus/sql/types/struct/struct_named_cast.test index f403b0d..e098a1d 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_named_cast.test +++ b/parser/testdata/corpus/sql/types/struct/struct_named_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_named_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {'a': 42, 'b': 84}::STRUCT(b INT, a INT) diff --git a/parser/testdata/corpus/sql/types/struct/struct_null_members.test b/parser/testdata/corpus/sql/types/struct/struct_null_members.test index 2a000de..7648cbe 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_null_members.test +++ b/parser/testdata/corpus/sql/types/struct/struct_null_members.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_null_members.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT lhs.i, rhs.i, diff --git a/parser/testdata/corpus/sql/types/struct/struct_operations.test b/parser/testdata/corpus/sql/types/struct/struct_operations.test index a94edd9..1678a9e 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_operations.test +++ b/parser/testdata/corpus/sql/types/struct/struct_operations.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_operations.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(id INTEGER, b ROW(i INTEGER, j INTEGER)); diff --git a/parser/testdata/corpus/sql/types/struct/struct_pack_list.test b/parser/testdata/corpus/sql/types/struct/struct_pack_list.test index 3ce7154..237d804 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_pack_list.test +++ b/parser/testdata/corpus/sql/types/struct/struct_pack_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_pack_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT a from (SELECT STRUCT_PACK(a := 42, b := 43) as a) as t diff --git a/parser/testdata/corpus/sql/types/struct/struct_position.test b/parser/testdata/corpus/sql/types/struct/struct_position.test index 37adb90..c8ce98f 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_position.test +++ b/parser/testdata/corpus/sql/types/struct/struct_position.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_position.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT struct_position(ROW(7, 2, 5), 7) @@ -175,6 +175,10 @@ SELECT struct_position(ROW(MAP([1], [2])), MAP([1], [3])) -- ok == +SELECT struct_position(ROW(1.0::FLOAT, 2.0::DOUBLE), 1.0::FLOAT), struct_position(ROW(1.0::FLOAT, 2.0::DOUBLE), 2.0::DOUBLE), struct_position(ROW(1::INT, 2::BIGINT), 1::INT); +-- +ok +== SELECT struct_position({'a': 1, 'b': 2}, 2); -- ok diff --git a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown.test b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown.test index f6ed051..29a974f 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown.test +++ b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_projection_pushdown.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE test_structs(id INT, s STRUCT(a integer, b bool)); diff --git a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_in_storage.test b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_in_storage.test index a1d2b9c..e5b3309 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_in_storage.test +++ b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_in_storage.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_projection_pushdown_in_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_structs( diff --git a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_optimizer_bug.test b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_optimizer_bug.test index c1af034..aee6dd8 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_optimizer_bug.test +++ b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_optimizer_bug.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_projection_pushdown_optimizer_bug.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl( @@ -34,3 +34,15 @@ GROUP BY id; -- ok == +CREATE TABLE t0(c1 BOOLEAN, c2 STRUCT(k0 BOOLEAN, k1 VARCHAR)); +-- +ok +== +CREATE TABLE t1(c0 INT, c1 VARCHAR(500)); +-- +ok +== +SELECT t1.* FROM t1, t0 INNER JOIN (SELECT t0.c2 AS col0 FROM t0) AS sub0 ON t0.c2['k0'] WHERE ((true)IS NOT DISTINCT FROM(t0.c1)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_unnamed.test b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_unnamed.test index 63e154b..eb46e25 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_unnamed.test +++ b/parser/testdata/corpus/sql/types/struct/struct_projection_pushdown_unnamed.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_projection_pushdown_unnamed.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT x[2].k diff --git a/parser/testdata/corpus/sql/types/struct/struct_search_physical_types.test b/parser/testdata/corpus/sql/types/struct/struct_search_physical_types.test new file mode 100644 index 0000000..0bbf14e --- /dev/null +++ b/parser/testdata/corpus/sql/types/struct/struct_search_physical_types.test @@ -0,0 +1,25 @@ +# source: test/sql/types/struct/struct_search_physical_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT struct_contains(row(1::{type}, 2::{type}), 2::{type}); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT struct_position(row(1::{type}, 2::{type}), 3::{type}); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT struct_contains(row(INTERVAL '1 day', INTERVAL '2 days'), INTERVAL '2 days'); +-- +ok +== +SELECT struct_contains( + CASE WHEN i = 0 THEN NULL ELSE row(i::INTEGER, (i + 1)::INTEGER) END, + i::INTEGER + ) +FROM range(2) t(i); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/struct_stats.test b/parser/testdata/corpus/sql/types/struct/struct_stats.test index 6386da1..8fdf708 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_stats.test +++ b/parser/testdata/corpus/sql/types/struct/struct_stats.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT s.child_stats.i.min, s.child_stats.j.min FROM (SELECT STATS({'i': 3, 'j': 4}) s) diff --git a/parser/testdata/corpus/sql/types/struct/struct_subquery.test b/parser/testdata/corpus/sql/types/struct/struct_subquery.test index e037ce2..4803a0a 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_subquery.test +++ b/parser/testdata/corpus/sql/types/struct/struct_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT tbl.a['i'] + tbl.b['j'] FROM (VALUES ({'i': 1, 'j': 2})) tbl(b)) FROM (VALUES ({'i': 1, 'j': 2})) tbl(a); diff --git a/parser/testdata/corpus/sql/types/struct/struct_tables.test b/parser/testdata/corpus/sql/types/struct/struct_tables.test index 32c6bf8..e3184dd 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_tables.test +++ b/parser/testdata/corpus/sql/types/struct/struct_tables.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_tables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a(b ROW(i INTEGER, j INTEGER)); diff --git a/parser/testdata/corpus/sql/types/struct/struct_unnest_recursion.test b/parser/testdata/corpus/sql/types/struct/struct_unnest_recursion.test index 7687dbf..18cf96a 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_unnest_recursion.test +++ b/parser/testdata/corpus/sql/types/struct/struct_unnest_recursion.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_unnest_recursion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT UNNEST ( ( '1,2,3,4,,6' , ( 1 ) ) ) , x x; diff --git a/parser/testdata/corpus/sql/types/struct/struct_updates.test b/parser/testdata/corpus/sql/types/struct/struct_updates.test index 602d098..9ea93d5 100644 --- a/parser/testdata/corpus/sql/types/struct/struct_updates.test +++ b/parser/testdata/corpus/sql/types/struct/struct_updates.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/struct_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO a VALUES ({'i': 1, 'j': 2}); diff --git a/parser/testdata/corpus/sql/types/struct/test_tuple.test b/parser/testdata/corpus/sql/types/struct/test_tuple.test index aa5310b..30313a0 100644 --- a/parser/testdata/corpus/sql/types/struct/test_tuple.test +++ b/parser/testdata/corpus/sql/types/struct/test_tuple.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/test_tuple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(row(1, 'a')); diff --git a/parser/testdata/corpus/sql/types/struct/unnamed_struct_casts.test b/parser/testdata/corpus/sql/types/struct/unnamed_struct_casts.test index 14e53ea..cf098aa 100644 --- a/parser/testdata/corpus/sql/types/struct/unnamed_struct_casts.test +++ b/parser/testdata/corpus/sql/types/struct/unnamed_struct_casts.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnamed_struct_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select row(42, 'hello') union all select '{'': 42,'': hello}'; diff --git a/parser/testdata/corpus/sql/types/struct/unnamed_struct_comparison.test b/parser/testdata/corpus/sql/types/struct/unnamed_struct_comparison.test index c74f833..552bbd5 100644 --- a/parser/testdata/corpus/sql/types/struct/unnamed_struct_comparison.test +++ b/parser/testdata/corpus/sql/types/struct/unnamed_struct_comparison.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnamed_struct_comparison.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select a IS DISTINCT FROM b from VALUES ((NULL, 1, NULL), (5, 6, 7)) t(a, b); diff --git a/parser/testdata/corpus/sql/types/struct/unnamed_struct_mix.test b/parser/testdata/corpus/sql/types/struct/unnamed_struct_mix.test index cdbc6d9..0d343c5 100644 --- a/parser/testdata/corpus/sql/types/struct/unnamed_struct_mix.test +++ b/parser/testdata/corpus/sql/types/struct/unnamed_struct_mix.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnamed_struct_mix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select [{ t:'abc', len:5 }, ('abc', 2)] diff --git a/parser/testdata/corpus/sql/types/struct/unnamed_struct_to_tuple.test b/parser/testdata/corpus/sql/types/struct/unnamed_struct_to_tuple.test new file mode 100644 index 0000000..182e2ca --- /dev/null +++ b/parser/testdata/corpus/sql/types/struct/unnamed_struct_to_tuple.test @@ -0,0 +1,65 @@ +# source: test/sql/types/struct/unnamed_struct_to_tuple.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT s, m, typeof(s), typeof(m) FROM 'data/parquet-testing/empty_field_names.parquet' ORDER BY ALL +-- +ok +== +SELECT s[1], m."x" FROM 'data/parquet-testing/empty_field_names.parquet' WHERE s[1] >= 2 ORDER BY ALL +-- +ok +== +SELECT s::JSON, m::JSON FROM 'data/parquet-testing/empty_field_names.parquet' ORDER BY ALL +-- +ok +== +SELECT m::STRUCT(x VARCHAR, y INTEGER) FROM (SELECT m FROM 'data/parquet-testing/empty_field_names.parquet' LIMIT 1) +-- +ok +== +SELECT m::STRUCT(a INTEGER, b VARCHAR) FROM 'data/parquet-testing/empty_field_names.parquet' +-- +ok +== +SELECT * FROM 'data/parquet-testing/empty_root_column_name.parquet' +-- +ok +== +CREATE TABLE tbl AS FROM 'data/parquet-testing/empty_field_names.parquet' +-- +ok +== +SELECT typeof(s), typeof(m) FROM tbl LIMIT 1 +-- +ok +== +SELECT s::JSON, m::JSON FROM tbl ORDER BY ALL LIMIT 1 +-- +ok +== +SELECT json_transform('{"": "a"}', '{"": "VARCHAR"}') +-- +ok +== +SELECT json_transform('{"": 1, "a": 2}', '{"a": "INTEGER", "": "INTEGER"}') +-- +ok +== +SELECT typeof(a) FROM read_json('data/json/internal_3813.json', map_inference_threshold=10) +-- +ok +== +SELECT typeof(a) FROM read_json('data/json/internal_3813.json', map_inference_threshold=-1) +-- +ok +== +SELECT v::VARCHAR, v::JSON FROM (SELECT '{"": 1}'::JSON::VARIANT v) +-- +ok +== +SELECT v::VARCHAR, v::JSON FROM (SELECT '{"": 1, "x": {"": [2]}}'::JSON::VARIANT v) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/unnest_column_names.test b/parser/testdata/corpus/sql/types/struct/unnest_column_names.test index 19acdb1..d5acc7d 100644 --- a/parser/testdata/corpus/sql/types/struct/unnest_column_names.test +++ b/parser/testdata/corpus/sql/types/struct/unnest_column_names.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnest_column_names.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT unnest([{'a':{ 'aa': 42}, 'b':{'bb': 84}}], recursive := true, keep_parent_names := true); diff --git a/parser/testdata/corpus/sql/types/struct/unnest_struct.test b/parser/testdata/corpus/sql/types/struct/unnest_struct.test index 03ab188..ed36030 100644 --- a/parser/testdata/corpus/sql/types/struct/unnest_struct.test +++ b/parser/testdata/corpus/sql/types/struct/unnest_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnest_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT UNNEST({'a': 42, 'b': 88}) @@ -83,3 +83,19 @@ SELECT UNNEST(UNNEST([{'a': 42, 'b': 88}, {'a': NULL, 'b': 99}])) -- ok == +SELECT unnest(NULL::STRUCT(a INT, b INT[]), recursive := true); +-- +ok +== +SELECT unnest(NULL::STRUCT(a INT, b STRUCT(c INT)), recursive := true, keep_parent_names := true); +-- +ok +== +SELECT unnest(s, recursive := true) FROM (VALUES (NULL::STRUCT(a INT, b INT[])), ({'a': 1, 'b': [2, 3]})) t(s); +-- +ok +== +SELECT typeof(COLUMNS(*)) FROM (SELECT unnest(NULL::STRUCT(a INT, b INT[]), recursive := true)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/struct/unnest_struct_mix.test b/parser/testdata/corpus/sql/types/struct/unnest_struct_mix.test index adf2ef3..8eed76f 100644 --- a/parser/testdata/corpus/sql/types/struct/unnest_struct_mix.test +++ b/parser/testdata/corpus/sql/types/struct/unnest_struct_mix.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnest_struct_mix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl_structs AS SELECT {'a': 1, 'b': 2, 'c': 3} AS s; diff --git a/parser/testdata/corpus/sql/types/struct/unnest_struct_subquery.test b/parser/testdata/corpus/sql/types/struct/unnest_struct_subquery.test index b8e2d0d..c7b10e6 100644 --- a/parser/testdata/corpus/sql/types/struct/unnest_struct_subquery.test +++ b/parser/testdata/corpus/sql/types/struct/unnest_struct_subquery.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/unnest_struct_subquery.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT (SELECT UNNEST(a).a) FROM (VALUES ({'a': 42, 'b': 88})) t(a); diff --git a/parser/testdata/corpus/sql/types/struct/update_empty_row.test b/parser/testdata/corpus/sql/types/struct/update_empty_row.test index f5931bd..e0ff274 100644 --- a/parser/testdata/corpus/sql/types/struct/update_empty_row.test +++ b/parser/testdata/corpus/sql/types/struct/update_empty_row.test @@ -1,6 +1,6 @@ # source: test/sql/types/struct/update_empty_row.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE t0 SET (c0) = ROW(); diff --git a/parser/testdata/corpus/sql/types/test_date_cast.test b/parser/testdata/corpus/sql/types/test_date_cast.test index 74614de..f86df9e 100644 --- a/parser/testdata/corpus/sql/types/test_date_cast.test +++ b/parser/testdata/corpus/sql/types/test_date_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/test_date_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE df (x VARCHAR, y BIGINT); diff --git a/parser/testdata/corpus/sql/types/test_interval_negation_overflow.test b/parser/testdata/corpus/sql/types/test_interval_negation_overflow.test new file mode 100644 index 0000000..28615d0 --- /dev/null +++ b/parser/testdata/corpus/sql/types/test_interval_negation_overflow.test @@ -0,0 +1,33 @@ +# source: test/sql/types/test_interval_negation_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TIME '12:00:00' - INTERVAL '-4611686018427387904 microseconds -4611686018427387904 microseconds'; +-- +ok +== +SELECT TIMETZ '12:00:00+00' - INTERVAL '-4611686018427387904 microseconds -4611686018427387904 microseconds'; +-- +ok +== +SELECT '1 hour'::INTERVAL - INTERVAL '9223372036854775807 microseconds 1 microseconds'; +-- +ok +== +SELECT TIME '12:00:00' - INTERVAL '1 hour'; +-- +ok +== +SELECT TIMETZ '12:00:00+00' - INTERVAL '1 hour'; +-- +ok +== +SELECT DATE '2024-01-01' - INTERVAL '1 month'; +-- +ok +== +SELECT TIMESTAMP '2024-01-01 12:00:00' - INTERVAL '1 day'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/test_null_type.test b/parser/testdata/corpus/sql/types/test_null_type.test index 2f662d2..4514aab 100644 --- a/parser/testdata/corpus/sql/types/test_null_type.test +++ b/parser/testdata/corpus/sql/types/test_null_type.test @@ -1,6 +1,6 @@ # source: test/sql/types/test_null_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table null_table (i "null") diff --git a/parser/testdata/corpus/sql/types/test_qualified_type_cast.test b/parser/testdata/corpus/sql/types/test_qualified_type_cast.test index d14f00b..9b58690 100644 --- a/parser/testdata/corpus/sql/types/test_qualified_type_cast.test +++ b/parser/testdata/corpus/sql/types/test_qualified_type_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/test_qualified_type_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 'abc'::text; @@ -21,7 +21,7 @@ ok == select cast(1 as memory.main.bla.text); -- -error: Parser Error: syntax error at or near "." +ok == SELECT cast (1 as main.{type}) -- diff --git a/parser/testdata/corpus/sql/types/test_quotes.test b/parser/testdata/corpus/sql/types/test_quotes.test index eeae4d8..2e73c3b 100644 --- a/parser/testdata/corpus/sql/types/test_quotes.test +++ b/parser/testdata/corpus/sql/types/test_quotes.test @@ -1,6 +1,6 @@ # source: test/sql/types/test_quotes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t_defaults ( diff --git a/parser/testdata/corpus/sql/types/test_typeof.test b/parser/testdata/corpus/sql/types/test_typeof.test index b795b79..1f68474 100644 --- a/parser/testdata/corpus/sql/types/test_typeof.test +++ b/parser/testdata/corpus/sql/types/test_typeof.test @@ -1,6 +1,6 @@ # source: test/sql/types/test_typeof.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(1) diff --git a/parser/testdata/corpus/sql/types/test_user_type_errors_18452.test b/parser/testdata/corpus/sql/types/test_user_type_errors_18452.test index 6a29fe7..70fc3ff 100644 --- a/parser/testdata/corpus/sql/types/test_user_type_errors_18452.test +++ b/parser/testdata/corpus/sql/types/test_user_type_errors_18452.test @@ -1,6 +1,6 @@ # source: test/sql/types/test_user_type_errors_18452.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TYPE l AS X(0,0,0,0,0,0,0,0,0,0,0); diff --git a/parser/testdata/corpus/sql/types/time/test_time.test b/parser/testdata/corpus/sql/types/time/test_time.test index dcf54ea..6f8e851 100644 --- a/parser/testdata/corpus/sql/types/time/test_time.test +++ b/parser/testdata/corpus/sql/types/time/test_time.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/test_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM times diff --git a/parser/testdata/corpus/sql/types/time/test_time_2411.test b/parser/testdata/corpus/sql/types/time/test_time_2411.test index 2661ca8..2fe2db9 100644 --- a/parser/testdata/corpus/sql/types/time/test_time_2411.test +++ b/parser/testdata/corpus/sql/types/time/test_time_2411.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/test_time_2411.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO times VALUES ('00:00:01') diff --git a/parser/testdata/corpus/sql/types/time/test_time_ns.test b/parser/testdata/corpus/sql/types/time/test_time_ns.test index 4b1c9c4..149fb70 100644 --- a/parser/testdata/corpus/sql/types/time/test_time_ns.test +++ b/parser/testdata/corpus/sql/types/time/test_time_ns.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/test_time_ns.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '15:30:00.123456789'::TIME_NS; diff --git a/parser/testdata/corpus/sql/types/time/test_time_tz.test b/parser/testdata/corpus/sql/types/time/test_time_tz.test index d13dce3..b8d23d2 100644 --- a/parser/testdata/corpus/sql/types/time/test_time_tz.test +++ b/parser/testdata/corpus/sql/types/time/test_time_tz.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/test_time_tz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select timetz '02:30:00'; @@ -19,6 +19,10 @@ SELECT '02:30:00+04:30:45'::TIMETZ; -- ok == +SELECT '12:00:00-05:00:59'::TIMETZ; +-- +ok +== SELECT '2023-08-20 16:15:03.123456'::TIMETZ; -- ok diff --git a/parser/testdata/corpus/sql/types/time/test_time_tz_collate.test b/parser/testdata/corpus/sql/types/time/test_time_tz_collate.test index 0684213..e6fa2ab 100644 --- a/parser/testdata/corpus/sql/types/time/test_time_tz_collate.test +++ b/parser/testdata/corpus/sql/types/time/test_time_tz_collate.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/test_time_tz_collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT {comparison_type}'09:00:00+00:00'::TIMETZ) >{comparison_type}'09:01:00+01:00'::TIMETZ); diff --git a/parser/testdata/corpus/sql/types/time/test_time_tz_icu.test b/parser/testdata/corpus/sql/types/time/test_time_tz_icu.test index a66d08b..50376db 100644 --- a/parser/testdata/corpus/sql/types/time/test_time_tz_icu.test +++ b/parser/testdata/corpus/sql/types/time/test_time_tz_icu.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/test_time_tz_icu.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET TimeZone='Asia/Singapore'; diff --git a/parser/testdata/corpus/sql/types/time/time_beyond_day.test b/parser/testdata/corpus/sql/types/time/time_beyond_day.test new file mode 100644 index 0000000..27190a4 --- /dev/null +++ b/parser/testdata/corpus/sql/types/time/time_beyond_day.test @@ -0,0 +1,17 @@ +# source: test/sql/types/time/time_beyond_day.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT make_time(23, 59, 60.5) +-- +ok +== +SELECT '24:00:00.000000001'::TIME_NS +-- +ok +== +SELECT make_time(23, 59, 60), make_time(12, 30, 60), '24:00:00'::TIME_NS, '23:59:59.999999999'::TIME_NS +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/time/time_limits.test b/parser/testdata/corpus/sql/types/time/time_limits.test index c45bdf7..18db23d 100644 --- a/parser/testdata/corpus/sql/types/time/time_limits.test +++ b/parser/testdata/corpus/sql/types/time/time_limits.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/time_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select time '23:59:59.999999' diff --git a/parser/testdata/corpus/sql/types/time/time_parsing.test b/parser/testdata/corpus/sql/types/time/time_parsing.test index 95dd8f9..0b8528f 100644 --- a/parser/testdata/corpus/sql/types/time/time_parsing.test +++ b/parser/testdata/corpus/sql/types/time/time_parsing.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/time_parsing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '14:42:04'::TIME::VARCHAR diff --git a/parser/testdata/corpus/sql/types/time/time_try_cast.test b/parser/testdata/corpus/sql/types/time/time_try_cast.test index c772577..cc48a59 100644 --- a/parser/testdata/corpus/sql/types/time/time_try_cast.test +++ b/parser/testdata/corpus/sql/types/time/time_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/time/time_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select try_cast('' as time) diff --git a/parser/testdata/corpus/sql/types/time/timetz_minmax_order.test b/parser/testdata/corpus/sql/types/time/timetz_minmax_order.test new file mode 100644 index 0000000..80e5789 --- /dev/null +++ b/parser/testdata/corpus/sql/types/time/timetz_minmax_order.test @@ -0,0 +1,46 @@ +# source: test/sql/types/time/timetz_minmax_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE z AS SELECT * FROM (VALUES (1,'10:00:00+05'::TIMETZ),(2,'09:00:00+00'::TIMETZ),(3,'07:00:00+00'::TIMETZ)) v(i,x); +-- +ok +== +SELECT list(i ORDER BY x) FROM z +-- +ok +== +SELECT max(x), min(x), arg_max(i, x), arg_min(i, x) FROM z +-- +ok +== +SELECT max(x, 2), min(x, 2), arg_max(i, x, 2), arg_min(i, x, 2) FROM z +-- +ok +== +SELECT list_sort(list(x)), list(x ORDER BY {'a': x}), list(x ORDER BY [x] DESC) FROM z +-- +ok +== +SELECT max(x) OVER (), min(x) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) FROM z ORDER BY i +-- +ok +== +SELECT max(x, 3)::VARCHAR FROM (VALUES ('00:00:00+15:59:59'::TIMETZ), ('24:00:00-15:59:59'::TIMETZ), ('12:34:56.789-07:30'::TIMETZ)) v(x) +-- +ok +== +SELECT list_max(list(x)), list_min(list(x)), list_max(['1'::BIT, '01'::BIT, '0'::BIT]), list_min([2::VARIANT, 1::VARIANT]) +FROM z +-- +ok +== +SET default_collation=nocase +-- +ok +== +SELECT list_max(['a', 'B']), list_aggr(['a', 'b'], 'string_agg', '-') +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/alternative_timestamp_casts.test b/parser/testdata/corpus/sql/types/timestamp/alternative_timestamp_casts.test index 6a98f12..b258427 100644 --- a/parser/testdata/corpus/sql/types/timestamp/alternative_timestamp_casts.test +++ b/parser/testdata/corpus/sql/types/timestamp/alternative_timestamp_casts.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/alternative_timestamp_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT DATE '1992-01-01'::TIMESTAMP_MS diff --git a/parser/testdata/corpus/sql/types/timestamp/bc_timestamp.test b/parser/testdata/corpus/sql/types/timestamp/bc_timestamp.test index 5bf55ab..13069cd 100644 --- a/parser/testdata/corpus/sql/types/timestamp/bc_timestamp.test +++ b/parser/testdata/corpus/sql/types/timestamp/bc_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/bc_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '1969-01-01 01:03:20.45432'::TIMESTAMP::VARCHAR diff --git a/parser/testdata/corpus/sql/types/timestamp/infinity_cast_coverage.test b/parser/testdata/corpus/sql/types/timestamp/infinity_cast_coverage.test index fe188f3..9a3c255 100644 --- a/parser/testdata/corpus/sql/types/timestamp/infinity_cast_coverage.test +++ b/parser/testdata/corpus/sql/types/timestamp/infinity_cast_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/infinity_cast_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '{infinity_string}'::{base_type}::{target_type} == '{infinity_string}' diff --git a/parser/testdata/corpus/sql/types/timestamp/test_incorrect_timestamp.test b/parser/testdata/corpus/sql/types/timestamp/test_incorrect_timestamp.test index 17ac41d..a031708 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_incorrect_timestamp.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_incorrect_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_incorrect_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamp(t TIMESTAMP) diff --git a/parser/testdata/corpus/sql/types/timestamp/test_infinite_time.test b/parser/testdata/corpus/sql/types/timestamp/test_infinite_time.test index be24055..bb29c38 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_infinite_time.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_infinite_time.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_infinite_time.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '{str}'::{datatype}, '-{str}'::{datatype}; diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp.test index 0653fa3..340b801 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT timestamp '2017-07-23 13:10:11'; diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_2411.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_2411.test index 4c3c293..4add8b0 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_2411.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_2411.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp_2411.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamp1(i TIMESTAMP) diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_auto_casting.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_auto_casting.test index fcadec8..9e03e21 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_auto_casting.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_auto_casting.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp_auto_casting.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE timestamps(ts_SEC TIMESTAMP_S, ts_MS TIMESTAMP_MS, ts TIMESTAMP, ts_NS TIMESTAMP_NS) diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_ms.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_ms.test index e944517..0a72731 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_ms.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_ms.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp_ms.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST('2001-04-20 14:42:11.123' AS TIMESTAMP) a, CAST('2001-04-20 14:42:11.0' AS TIMESTAMP) b; diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_to_tz_cast.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_to_tz_cast.test index 978d723..7352bc8 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_to_tz_cast.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_to_tz_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp_to_tz_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table ts_{unit}_tbl_1 as from VALUES diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_types.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_types.test index 9623e03..95d960b 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_types.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS timestamp (sec TIMESTAMP_S, milli TIMESTAMP_MS,micro TIMESTAMP_US, nano TIMESTAMP_NS ); diff --git a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_tz.test b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_tz.test index 439c820..641daaf 100644 --- a/parser/testdata/corpus/sql/types/timestamp/test_timestamp_tz.test +++ b/parser/testdata/corpus/sql/types/timestamp/test_timestamp_tz.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/test_timestamp_tz.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select timestamptz '2021-11-15 02:30:00'; diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_limits.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_limits.test index 662dd28..88bb821 100644 --- a/parser/testdata/corpus/sql/types/timestamp/timestamp_limits.test +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_limits.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/timestamp_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select timestamp '1970-01-01'; diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_ms_timestamptz_mixing.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_ms_timestamptz_mixing.test new file mode 100644 index 0000000..7b26a7c --- /dev/null +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_ms_timestamptz_mixing.test @@ -0,0 +1,33 @@ +# source: test/sql/types/timestamp/timestamp_ms_timestamptz_mixing.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(CASE WHEN true THEN CAST('2020-01-02 03:04:05.123' AS TIMESTAMP_MS) ELSE CAST('2020-01-02 03:04:05+00' AS TIMESTAMPTZ) END) +-- +ok +== +SELECT CASE WHEN false THEN CAST('2020-01-02 03:04:05.123' AS TIMESTAMP_MS) ELSE CAST('2020-01-02 03:04:05+00' AS TIMESTAMPTZ) END +-- +ok +== +SELECT typeof(CASE WHEN true THEN CAST('2020-01-02' AS TIMESTAMP_S) ELSE CAST('2020-01-02 03:04:05+00' AS TIMESTAMPTZ) END) +-- +ok +== +SELECT date_diff('day', CAST('2020-01-01' AS TIMESTAMP_MS), CAST('2020-02-01 00:00:00+00' AS TIMESTAMPTZ)) +-- +ok +== +SELECT date_diff('hour', CAST('2020-02-01 00:00:00+00' AS TIMESTAMPTZ), CAST('2020-02-01 06:00:00' AS TIMESTAMP_S)) +-- +ok +== +SELECT CAST('2020-01-02 03:04:05.123' AS TIMESTAMP_MS) = CAST('2020-01-02 03:04:05.123+00' AS TIMESTAMPTZ) +-- +ok +== +SELECT typeof(COALESCE(CAST('2020-01-02' AS TIMESTAMP_MS), CAST('2020-01-02 03:04:05+00' AS TIMESTAMPTZ_NS))) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_ns_lower_bound.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_ns_lower_bound.test new file mode 100644 index 0000000..d8991ed --- /dev/null +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_ns_lower_bound.test @@ -0,0 +1,29 @@ +# source: test/sql/types/timestamp/timestamp_ns_lower_bound.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT epoch_ns(make_timestamp_ns(-9223372036854775807::BIGINT - 1)), + epoch_ns(make_timestamp_ns(-9223372036854775806::BIGINT)) +-- +ok +== +SELECT CAST(make_timestamp_ns(-9223372036854775807::BIGINT - 1) AS VARCHAR), + CAST(make_timestamp_ns(-9223372036854775806::BIGINT) AS VARCHAR) +-- +ok +== +SELECT CAST(make_timestamp_ns(-9223372036854775807::BIGINT - 1) AS TIME_NS), + CAST(make_timestamp_ns(-9223372036854775806::BIGINT) AS TIME_NS) +-- +ok +== +SELECT epoch_ns(CAST('1677-09-21 00:12:43.145224192' AS TIMESTAMP_NS)), + epoch_ns(CAST('1677-09-21 00:12:43.145224194' AS TIMESTAMP_NS)) +-- +ok +== +SELECT CAST('1677-09-21 00:12:43.145224191' AS TIMESTAMP_NS) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_offset_boundaries.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_offset_boundaries.test new file mode 100644 index 0000000..67c7c90 --- /dev/null +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_offset_boundaries.test @@ -0,0 +1,13 @@ +# source: test/sql/types/timestamp/timestamp_offset_boundaries.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST('294247-01-10 04:00:54.775806-01' AS TIMESTAMPTZ) IS NULL +-- +ok +== +SELECT TRY_CAST('290309-12-22 (BC) 00:00:00+23:59:59' AS TIMESTAMPTZ) IS NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_precision.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_precision.test index f9c6bb9..638943a 100644 --- a/parser/testdata/corpus/sql/types/timestamp/timestamp_precision.test +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_precision.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/timestamp_precision.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE ts_precision( @@ -44,3 +44,7 @@ SELECT TIMESTAMP_NS '2262-04-11 23:47:16.854775807'; -- ok == +SELECT '2020-01-01'::TIMESTAMP(NULL); +-- +error: Parser Error: TIMESTAMP precision cannot be NULL +== diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_round_out_of_range.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_round_out_of_range.test new file mode 100644 index 0000000..25ebd40 --- /dev/null +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_round_out_of_range.test @@ -0,0 +1,21 @@ +# source: test/sql/types/timestamp/timestamp_round_out_of_range.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TIMESTAMP '294247-01-10 04:00:54.775806'::TIMESTAMP_S +-- +ok +== +SELECT TIMESTAMP '294247-01-10 04:00:54.6'::TIMESTAMP_S::TIMESTAMPTZ +-- +ok +== +SELECT TRY_CAST(TIMESTAMP '294247-01-10 04:00:54.775806' AS TIMESTAMP_S)::VARCHAR, TRY_CAST(TIMESTAMP '294247-01-10 04:00:54.775806' AS TIMESTAMP_MS) +-- +ok +== +SELECT TIMESTAMP '294247-01-10 04:00:54.4'::TIMESTAMP_S, TIMESTAMP '2024-01-01 10:00:00.6'::TIMESTAMP_S +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_time_of_day_overflow.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_time_of_day_overflow.test new file mode 100644 index 0000000..287c737 --- /dev/null +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_time_of_day_overflow.test @@ -0,0 +1,9 @@ +# source: test/sql/types/timestamp/timestamp_time_of_day_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT make_timestamp(-9223372036854775806)::TIME; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_timezone_cast.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_timezone_cast.test index 904237b..d667e5c 100644 --- a/parser/testdata/corpus/sql/types/timestamp/timestamp_timezone_cast.test +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_timezone_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/timestamp_timezone_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT TIMESTAMP '2021-05-25 04:55:03.382494 UTC'; diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamp_try_cast.test b/parser/testdata/corpus/sql/types/timestamp/timestamp_try_cast.test index 7e31ba2..75dfcda 100644 --- a/parser/testdata/corpus/sql/types/timestamp/timestamp_try_cast.test +++ b/parser/testdata/corpus/sql/types/timestamp/timestamp_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/timestamp_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select try_cast('' as timestamp) diff --git a/parser/testdata/corpus/sql/types/timestamp/timestamptz_ns_casts.test b/parser/testdata/corpus/sql/types/timestamp/timestamptz_ns_casts.test new file mode 100644 index 0000000..01318b8 --- /dev/null +++ b/parser/testdata/corpus/sql/types/timestamp/timestamptz_ns_casts.test @@ -0,0 +1,20 @@ +# source: test/sql/types/timestamp/timestamptz_ns_casts.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST(t AS TIMESTAMP_MS), CAST(t AS TIMESTAMP_S) +FROM (VALUES (CAST('2020-01-02 03:04:05.123456789+00' AS TIMESTAMPTZ_NS)), + (CAST('1969-12-31 23:59:59.123456789+00' AS TIMESTAMPTZ_NS)), + (NULL::TIMESTAMPTZ_NS)) ts(t) +-- +ok +== +SELECT CAST('infinity'::TIMESTAMPTZ_NS AS TIMESTAMP_MS) +-- +ok +== +SELECT CAST('-infinity'::TIMESTAMPTZ_NS AS TIMESTAMP_S) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/timestamp/utc_offset.test b/parser/testdata/corpus/sql/types/timestamp/utc_offset.test index 6a812bb..d2554ba 100644 --- a/parser/testdata/corpus/sql/types/timestamp/utc_offset.test +++ b/parser/testdata/corpus/sql/types/timestamp/utc_offset.test @@ -1,6 +1,6 @@ # source: test/sql/types/timestamp/utc_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '2025-01-01T08:00:00+08'::TIMESTAMP AS c; diff --git a/parser/testdata/corpus/sql/types/type/test_make_get_type.test b/parser/testdata/corpus/sql/types/type/test_make_get_type.test index ac1dbb9..6d3ac8f 100644 --- a/parser/testdata/corpus/sql/types/type/test_make_get_type.test +++ b/parser/testdata/corpus/sql/types/type/test_make_get_type.test @@ -1,6 +1,6 @@ # source: test/sql/types/type/test_make_get_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT get_type(NULL); diff --git a/parser/testdata/corpus/sql/types/type/test_type_storage.test b/parser/testdata/corpus/sql/types/type/test_type_storage.test index b34e5cb..b6b95c7 100644 --- a/parser/testdata/corpus/sql/types/type/test_type_storage.test +++ b/parser/testdata/corpus/sql/types/type/test_type_storage.test @@ -1,6 +1,6 @@ # source: test/sql/types/type/test_type_storage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE T (v TYPE); diff --git a/parser/testdata/corpus/sql/types/type_constructor_error_location.test b/parser/testdata/corpus/sql/types/type_constructor_error_location.test new file mode 100644 index 0000000..294e988 --- /dev/null +++ b/parser/testdata/corpus/sql/types/type_constructor_error_location.test @@ -0,0 +1,25 @@ +# source: test/sql/types/type_constructor_error_location.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT NULL::DECIMAL(3, 4) +-- +ok +== +SELECT NULL::DECIMAL(NULL) +-- +ok +== +SELECT NULL::MAP +-- +ok +== +SELECT NULL::DECIMAL(1, 2, 3) +-- +ok +== +SELECT NULL::STRUCT(a INT, a INT) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/type_constructors.test b/parser/testdata/corpus/sql/types/type_constructors.test new file mode 100644 index 0000000..0b7efa7 --- /dev/null +++ b/parser/testdata/corpus/sql/types/type_constructors.test @@ -0,0 +1,68 @@ +# source: test/sql/types/type_constructors.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT typeof(NULL::DECIMAL), typeof(NULL::DECIMAL(10)), typeof(NULL::DECIMAL(10, 2)); +-- +ok +== +SELECT NULL::DECIMAL(10, 2, 3); +-- +ok +== +SELECT NULL::DECIMAL('ten'); +-- +ok +== +SELECT NULL::DECIMAL(NULL); +-- +ok +== +SELECT typeof(NULL::VARCHAR), typeof(NULL::VARCHAR(10)); +-- +ok +== +SELECT NULL::VARCHAR(10, 20); +-- +ok +== +CREATE TYPE no_modifiers AS INTEGER; +-- +ok +== +SELECT NULL::no_modifiers(1); +-- +ok +== +SELECT NULL::DECIMAL(99); +-- +ok +== +SELECT NULL::MAP; +-- +ok +== +SELECT typeof(NULL::STRUCT(a INT, b VARCHAR)), typeof(NULL::ENUM('x', 'y')), typeof(NULL::UNION(u INT)); +-- +ok +== +SELECT NULL::ENUM(1, 2); +-- +ok +== +SELECT DISTINCT parameters, parameter_types, varargs FROM duckdb_types() +WHERE type_name = 'decimal' ORDER BY 1; +-- +ok +== +SELECT DISTINCT parameters, parameter_types, varargs FROM duckdb_types() +WHERE type_name = 'struct'; +-- +ok +== +SELECT DISTINCT parameters, parameter_types, varargs FROM duckdb_types() +WHERE type_name = 'integer'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/type_expression_roundtrip.test b/parser/testdata/corpus/sql/types/type_expression_roundtrip.test new file mode 100644 index 0000000..68eefa2 --- /dev/null +++ b/parser/testdata/corpus/sql/types/type_expression_roundtrip.test @@ -0,0 +1,77 @@ +# source: test/sql/types/type_expression_roundtrip.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TYPE pt AS STRUCT(x DOUBLE, y DOUBLE); +-- +ok +== +CREATE TABLE gen ( + v VARCHAR, + c_dec DECIMAL(9,2) GENERATED ALWAYS AS (1.5), + c_arr INTEGER[3] GENERATED ALWAYS AS ([1,2,3]), + c_list INTEGER[] GENERATED ALWAYS AS ([1,2]), + c_nested INTEGER[][] GENERATED ALWAYS AS ([[1],[2]]), + c_struct STRUCT(k INTEGER, v VARCHAR) GENERATED ALWAYS AS ({'k':1,'v':'x'}), + c_tuple TUPLE(INTEGER, VARCHAR) GENERATED ALWAYS AS ((1,'a')), + c_map MAP(VARCHAR, INTEGER) GENERATED ALWAYS AS (MAP{'a':1}), + c_union UNION(n INTEGER, s VARCHAR) GENERATED ALWAYS AS (union_value(n := 1)), + c_enum mood GENERATED ALWAYS AS ('ok'), + c_udt pt GENERATED ALWAYS AS ({'x':1.0,'y':2.0}), + c_tsns TIMESTAMP_NS GENERATED ALWAYS AS (TIMESTAMP '2020-01-01'), + c_tstz TIMESTAMPTZ GENERATED ALWAYS AS (TIMESTAMP '2020-01-01'), + c_ts_s TIMESTAMP_S GENERATED ALWAYS AS (TIMESTAMP '2020-01-01'), + c_timetz TIMETZ GENERATED ALWAYS AS (TIME '12:00:00'), + c_uuid UUID GENERATED ALWAYS AS ('00000000-0000-0000-0000-000000000001'), + c_blob BLOB GENERATED ALWAYS AS ('abc'), + c_bit BIT GENERATED ALWAYS AS ('101'), + c_bignum BIGNUM GENERATED ALWAYS AS (1), + c_hugeint HUGEINT GENERATED ALWAYS AS (1), + c_uhugeint UHUGEINT GENERATED ALWAYS AS (1), + c_interval INTERVAL GENERATED ALWAYS AS (INTERVAL 1 DAY), + c_null "NULL" GENERATED ALWAYS AS (NULL) +); +-- +ok +== +INSERT INTO gen (v) VALUES ('a'); +-- +ok +== +SELECT typeof(c_dec), typeof(c_arr), typeof(c_list), typeof(c_nested), typeof(c_struct), typeof(c_tuple) FROM gen +-- +ok +== +SELECT typeof(c_map), typeof(c_union), typeof(c_tsns), typeof(c_tstz), typeof(c_ts_s), typeof(c_timetz) FROM gen +-- +ok +== +SELECT typeof(c_uuid), typeof(c_blob), typeof(c_bit), typeof(c_bignum), typeof(c_hugeint), typeof(c_uhugeint), typeof(c_interval) FROM gen +-- +ok +== +SELECT c_enum, c_udt FROM gen +-- +ok +== +SELECT c_dec, c_arr, c_map, c_union, c_interval FROM gen +-- +ok +== +CREATE TEMP MACRO take_dec(a DECIMAL(9,2)) AS a; +-- +ok +== +CREATE TEMP MACRO take_struct(a STRUCT(k INTEGER, v VARCHAR)) AS a; +-- +ok +== +CREATE TEMP MACRO take_arr(a INTEGER[3]) AS a; +-- +ok +== +SELECT typeof(take_dec(1.5::DECIMAL(9,2))), typeof(take_struct({'k':1,'v':'x'})), typeof(take_arr([1,2,3]::INTEGER[3])) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/type_literal.test b/parser/testdata/corpus/sql/types/type_literal.test index 94d5958..7ac2a4d 100644 --- a/parser/testdata/corpus/sql/types/type_literal.test +++ b/parser/testdata/corpus/sql/types/type_literal.test @@ -1,6 +1,6 @@ # source: test/sql/types/type_literal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT typeof(DECIMAL(4,2) '1.23'), DECIMAL(4,2) '1.23', typeof(STRUCT(a INTEGER) '{"a": 42}'); diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_aggregates.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_aggregates.test index ff03f74..b1eb1ff 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_aggregates.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_aggregates.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_aggregates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE hugeints(g INTEGER, h UHUGEINT); diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_arithmetic.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_arithmetic.test index ae42f69..db851f1 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_arithmetic.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT -(50::UHUGEINT) @@ -71,6 +71,10 @@ SELECT 100::UHUGEINT // 0::UHUGEINT -- ok == +SELECT TRY(100::UHUGEINT // 0::UHUGEINT) +-- +ok +== SELECT '100000000000000000000000000000000000000'::UHUGEINT // '10000000000000'::UHUGEINT, '100000000000000000000000000000000000000'::UHUGEINT // '2'::UHUGEINT -- ok @@ -83,6 +87,10 @@ SELECT 100::UHUGEINT % 0::UHUGEINT -- ok == +SELECT TRY(100::UHUGEINT % 0::UHUGEINT) +-- +ok +== SELECT '100000000000000000000000000000000000000'::UHUGEINT % '6587689457689375689735'::UHUGEINT, '100000000000000000000000000000000000000'::UHUGEINT % '3'::UHUGEINT -- ok diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_auto_cast.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_auto_cast.test index eed89af..ced2209 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_auto_cast.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_auto_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_auto_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 10000000000000000000::UHUGEINT + 100::TINYINT, 10000000000000000000::UHUGEINT + 100::SMALLINT, 10000000000000000000::UHUGEINT + 100::INTEGER, 10000000000000000000::UHUGEINT + 100::BIGINT; diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_conversion.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_conversion.test index c7264c8..2285276 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_conversion.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_conversion.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_conversion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '7'::UHUGEINT, '130'::UHUGEINT, '924829852'::UHUGEINT @@ -35,6 +35,28 @@ SELECT '340282366920938463463374607431768211455'::UHUGEINT, '0'::UHUGEINT; -- ok == +SELECT + '0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'::UHUGEINT, + '0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111'::UHUGEINT, + '0x000000000000000000000000000000000000000000000000000000000000000007'::UHUGEINT, + '0b00000000_00101010'::UHUGEINT; +-- +ok +== +SELECT '0x100000000000000000000000000000000'::HUGEINT; +-- +ok +== +SELECT '0b1_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000'::UHUGEINT; +-- +ok +== +SELECT + TRY_CAST('0x100000000000000000000000000000000' AS UHUGEINT), + TRY_CAST('0b1_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000' AS UHUGEINT); +-- +ok +== SELECT 42::TINYINT::UHUGEINT, 42::SMALLINT::UHUGEINT, 42::INTEGER::UHUGEINT, 42::BIGINT::UHUGEINT, 42::FLOAT::UHUGEINT, 42::DOUBLE::UHUGEINT; -- ok diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_exponent.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_exponent.test index a22a65e..1d789e7 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_exponent.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_exponent.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_exponent.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '170141183460469231731687303715884105700e0'::UHUGEINT diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_functions.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_functions.test index bf58802..d8a2f9f 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_functions.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_functions.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_functions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select abs(1::UHUGEINT), abs('1329227995784915872903807060280344576'::UHUGEINT), abs(0::UHUGEINT) diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_null_value.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_null_value.test index 3555638..69fd26b 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_null_value.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_null_value.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_null_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT NULL::UHUGEINT diff --git a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_ops.test b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_ops.test index 92acf17..391d2d7 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_ops.test +++ b/parser/testdata/corpus/sql/types/uhugeint/test_uhugeint_ops.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/test_uhugeint_ops.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE uhugeints(h UHUGEINT); diff --git a/parser/testdata/corpus/sql/types/uhugeint/uhugeint_literal.test b/parser/testdata/corpus/sql/types/uhugeint/uhugeint_literal.test index 119d3e9..9f605fe 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/uhugeint_literal.test +++ b/parser/testdata/corpus/sql/types/uhugeint/uhugeint_literal.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/uhugeint_literal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select 340282366920938463463374607431768211455 diff --git a/parser/testdata/corpus/sql/types/uhugeint/uhugeint_multiply.test b/parser/testdata/corpus/sql/types/uhugeint/uhugeint_multiply.test index 1b20400..1c2315a 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/uhugeint_multiply.test +++ b/parser/testdata/corpus/sql/types/uhugeint/uhugeint_multiply.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/uhugeint_multiply.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 251658240::UHUGEINT * 251658240::UHUGEINT diff --git a/parser/testdata/corpus/sql/types/uhugeint/uhugeint_try_cast.test b/parser/testdata/corpus/sql/types/uhugeint/uhugeint_try_cast.test index ae652a4..839dde8 100644 --- a/parser/testdata/corpus/sql/types/uhugeint/uhugeint_try_cast.test +++ b/parser/testdata/corpus/sql/types/uhugeint/uhugeint_try_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/uhugeint/uhugeint_try_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT CAST('340282366920938463463374607431768211456' AS UHUGEINT) diff --git a/parser/testdata/corpus/sql/types/union/struct_to_json_union.test b/parser/testdata/corpus/sql/types/union/struct_to_json_union.test index 19b53d1..eb9e8aa 100644 --- a/parser/testdata/corpus/sql/types/union/struct_to_json_union.test +++ b/parser/testdata/corpus/sql/types/union/struct_to_json_union.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/struct_to_json_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table union_tbl( diff --git a/parser/testdata/corpus/sql/types/union/struct_to_union.test b/parser/testdata/corpus/sql/types/union/struct_to_union.test index 50d2582..9472939 100644 --- a/parser/testdata/corpus/sql/types/union/struct_to_union.test +++ b/parser/testdata/corpus/sql/types/union/struct_to_union.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/struct_to_union.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table union_tbl( diff --git a/parser/testdata/corpus/sql/types/union/struct_to_union_try_cast.test b/parser/testdata/corpus/sql/types/union/struct_to_union_try_cast.test new file mode 100644 index 0000000..4c7131f --- /dev/null +++ b/parser/testdata/corpus/sql/types/union/struct_to_union_try_cast.test @@ -0,0 +1,33 @@ +# source: test/sql/types/union/struct_to_union_try_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT try_cast({'tag': 5::UTINYINT, 'a': 1, 'b': NULL::VARCHAR} AS UNION(a INT, b VARCHAR)) +-- +ok +== +SELECT cast({'tag': 5::UTINYINT, 'a': 1, 'b': NULL::VARCHAR} AS UNION(a INT, b VARCHAR)) +-- +ok +== +SELECT try_cast({'tag': 0::UTINYINT, 'a': 'zz', 'b': NULL::VARCHAR} AS UNION(a INT, b VARCHAR)) +-- +ok +== +SELECT cast({'tag': 0::UTINYINT, 'a': 'zz', 'b': NULL::VARCHAR} AS UNION(a INT, b VARCHAR)) +-- +ok +== +SELECT try_cast(s AS UNION(a INT, b VARCHAR)) FROM (VALUES + ({'tag': 0::UTINYINT, 'a': '1', 'b': NULL::VARCHAR}), + ({'tag': 7::UTINYINT, 'a': '2', 'b': NULL}), + ({'tag': 1::UTINYINT, 'a': NULL, 'b': 'x'}), + ({'tag': 0::UTINYINT, 'a': '3', 'b': 'y'})) t(s) +-- +ok +== +SELECT cast(s AS UNION(a INT, b VARCHAR)) FROM (VALUES ({'tag': 0::UTINYINT, 'a': '3', 'b': 'y'})) t(s) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/union/union_aggregate.test b/parser/testdata/corpus/sql/types/union/union_aggregate.test index b713f79..23e5ad9 100644 --- a/parser/testdata/corpus/sql/types/union/union_aggregate.test +++ b/parser/testdata/corpus/sql/types/union/union_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (u UNION(num INT, str VARCHAR)); diff --git a/parser/testdata/corpus/sql/types/union/union_ambiguous.test b/parser/testdata/corpus/sql/types/union/union_ambiguous.test index 4fe6749..3785888 100644 --- a/parser/testdata/corpus/sql/types/union/union_ambiguous.test +++ b/parser/testdata/corpus/sql/types/union/union_ambiguous.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_ambiguous.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a UNION(b INT, b INT)); diff --git a/parser/testdata/corpus/sql/types/union/union_cast.test b/parser/testdata/corpus/sql/types/union/union_cast.test index d9e29f0..dcade80 100644 --- a/parser/testdata/corpus/sql/types/union/union_cast.test +++ b/parser/testdata/corpus/sql/types/union/union_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl1(u UNION(i32 INT, str VARCHAR)); diff --git a/parser/testdata/corpus/sql/types/union/union_compare.test b/parser/testdata/corpus/sql/types/union/union_compare.test index 3e3ae3b..f4d6ea9 100644 --- a/parser/testdata/corpus/sql/types/union/union_compare.test +++ b/parser/testdata/corpus/sql/types/union/union_compare.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_compare.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table unions(u UNION(num INTEGER, str VARCHAR)); diff --git a/parser/testdata/corpus/sql/types/union/union_extract.test b/parser/testdata/corpus/sql/types/union/union_extract.test index d439b38..e641438 100644 --- a/parser/testdata/corpus/sql/types/union/union_extract.test +++ b/parser/testdata/corpus/sql/types/union/union_extract.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_extract.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT union_extract(1, 'b'); diff --git a/parser/testdata/corpus/sql/types/union/union_join.test b/parser/testdata/corpus/sql/types/union/union_join.test index eff7699..3fa7228 100644 --- a/parser/testdata/corpus/sql/types/union/union_join.test +++ b/parser/testdata/corpus/sql/types/union/union_join.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_join.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1(id INT, a UNION(b INT, c VARCHAR)); diff --git a/parser/testdata/corpus/sql/types/union/union_limit_offset.test b/parser/testdata/corpus/sql/types/union/union_limit_offset.test index dd27b6b..5bb87d3 100644 --- a/parser/testdata/corpus/sql/types/union/union_limit_offset.test +++ b/parser/testdata/corpus/sql/types/union/union_limit_offset.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_limit_offset.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO tbl1 VALUES (1), ('bar'), (2), ('foo'), (3), ('baz'); diff --git a/parser/testdata/corpus/sql/types/union/union_limits.test b/parser/testdata/corpus/sql/types/union/union_limits.test index f8b63f3..d389214 100644 --- a/parser/testdata/corpus/sql/types/union/union_limits.test +++ b/parser/testdata/corpus/sql/types/union/union_limits.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_limits.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (u UNION( @@ -35,16 +35,16 @@ CREATE TABLE tbl1 (u UNION( a225 INT, a226 INT, a227 INT, a228 INT, a229 INT, a230 INT, a231 INT, a232 INT, a233 INT, a234 INT, a235 INT, a236 INT, a237 INT, a238 INT, a239 INT, a240 INT, a241 INT, a242 INT, a243 INT, a244 INT, a245 INT, a246 INT, a247 INT, a248 INT, - a249 INT, a250 INT, a251 INT, a252 INT, a253 INT, a254 INT, a255 INT, a256 INT + a249 INT, a250 INT, a251 INT, a252 INT, a253 INT, a254 INT, a255 INT )) -- ok == -INSERT INTO tbl1 VALUES (union_value(a256 := 1337)), (union_value(a1 := 42)) +INSERT INTO tbl1 VALUES (union_value(a255 := 1337)), (union_value(a1 := 42)) -- ok == -SELECT u.a256 FROM tbl1; +SELECT u.a255 FROM tbl1; -- ok == diff --git a/parser/testdata/corpus/sql/types/union/union_list.test b/parser/testdata/corpus/sql/types/union/union_list.test index 200671b..13c4cb6 100644 --- a/parser/testdata/corpus/sql/types/union/union_list.test +++ b/parser/testdata/corpus/sql/types/union/union_list.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_list.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (union_list UNION(str VARCHAR, num INT)[]); diff --git a/parser/testdata/corpus/sql/types/union/union_list_empty_to_varchar.test b/parser/testdata/corpus/sql/types/union/union_list_empty_to_varchar.test new file mode 100644 index 0000000..02b6e7d --- /dev/null +++ b/parser/testdata/corpus/sql/types/union/union_list_empty_to_varchar.test @@ -0,0 +1,25 @@ +# source: test/sql/types/union/union_list_empty_to_varchar.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST(CAST([]::INTEGER[] AS UNION(i INTEGER)[]) AS VARCHAR) || 'x'; +-- +ok +== +SELECT CAST(CAST([]::VARCHAR[] AS UNION(i INTEGER, s VARCHAR)[]) AS VARCHAR) || 'x'; +-- +ok +== +SELECT md5(CAST(CAST([]::INTEGER[] AS UNION(i INTEGER)[]) AS VARCHAR)); +-- +ok +== +SELECT CAST(l AS VARCHAR) FROM (VALUES ([]::UNION(i INTEGER)[]), ([1]::UNION(i INTEGER)[]), (NULL)) t(l); +-- +ok +== +SELECT CAST(CAST([1, 2]::INTEGER[] AS UNION(i INTEGER)[]) AS VARCHAR); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/union/union_sort.test b/parser/testdata/corpus/sql/types/union/union_sort.test index 0c30052..0b6c221 100644 --- a/parser/testdata/corpus/sql/types/union/union_sort.test +++ b/parser/testdata/corpus/sql/types/union/union_sort.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_sort.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (a UNION(a INT, b INT)); diff --git a/parser/testdata/corpus/sql/types/union/union_struct.test b/parser/testdata/corpus/sql/types/union/union_struct.test index 30af3a8..1764ed8 100644 --- a/parser/testdata/corpus/sql/types/union/union_struct.test +++ b/parser/testdata/corpus/sql/types/union/union_struct.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_struct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl1 (union_struct UNION(str VARCHAR, obj STRUCT(k VARCHAR, v INT))) diff --git a/parser/testdata/corpus/sql/types/union/union_tag.test b/parser/testdata/corpus/sql/types/union/union_tag.test index 19a473e..26d48ed 100644 --- a/parser/testdata/corpus/sql/types/union/union_tag.test +++ b/parser/testdata/corpus/sql/types/union/union_tag.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_tag.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT union_tag(1); diff --git a/parser/testdata/corpus/sql/types/union/union_test.test b/parser/testdata/corpus/sql/types/union/union_test.test index f5c7140..4447b5c 100644 --- a/parser/testdata/corpus/sql/types/union/union_test.test +++ b/parser/testdata/corpus/sql/types/union/union_test.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(u UNION(i INTEGER, f FLOAT)); diff --git a/parser/testdata/corpus/sql/types/union/union_try_cast_member_failure.test b/parser/testdata/corpus/sql/types/union/union_try_cast_member_failure.test new file mode 100644 index 0000000..c04e1cd --- /dev/null +++ b/parser/testdata/corpus/sql/types/union/union_try_cast_member_failure.test @@ -0,0 +1,56 @@ +# source: test/sql/types/union/union_try_cast_member_failure.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT union_value(a := 'q' || i::VARCHAR)::UNION(a VARCHAR, b VARCHAR) u FROM range(3000) t(i); +-- +ok +== +SELECT count(*) FROM (SELECT try_cast(u AS UNION(a INT, b VARCHAR, c VARCHAR)) x FROM t) WHERE x IS NULL; +-- +ok +== +SELECT max(length(union_extract(try_cast(u AS UNION(a INT, b VARCHAR, c VARCHAR)), 'c'))) FROM t; +-- +ok +== +SELECT try_cast(u AS UNION(a INT, b INT)) FROM (SELECT union_value(a := 'x')::UNION(a VARCHAR, b INT) u); +-- +ok +== +SELECT try_cast(union_value(a := 'x')::UNION(a VARCHAR, b INT) AS UNION(a INT, b INT, c INT)), + try_cast(union_value(a := '7')::UNION(a VARCHAR, b INT) AS UNION(a INT, b INT, c INT)); +-- +ok +== +CREATE TABLE mixed(u UNION(a VARCHAR, b VARCHAR), i INT); +-- +ok +== +INSERT INTO mixed SELECT CASE + WHEN i % 4 = 0 THEN union_value(a := i::VARCHAR)::UNION(a VARCHAR, b VARCHAR) + WHEN i % 4 = 1 THEN union_value(a := 'q' || i::VARCHAR)::UNION(a VARCHAR, b VARCHAR) + WHEN i % 4 = 2 THEN union_value(b := 'b' || i::VARCHAR)::UNION(a VARCHAR, b VARCHAR) + ELSE NULL END, i +FROM range(8) t(i); +-- +ok +== +INSERT INTO mixed VALUES (union_value(a := NULL::VARCHAR)::UNION(a VARCHAR, b VARCHAR), 100); +-- +ok +== +SELECT i, u, try_cast(u AS UNION(a INT, b VARCHAR, c VARCHAR)) x, union_tag(x) FROM mixed ORDER BY i; +-- +ok +== +SELECT count(*), count(x), count(union_extract(x, 'c')) +FROM (SELECT try_cast(u AS UNION(a INT, b VARCHAR, c VARCHAR)) x FROM mixed, range(1000)); +-- +ok +== +SELECT CAST(u AS UNION(a INT, b VARCHAR)) FROM mixed; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/union/union_validity.test b/parser/testdata/corpus/sql/types/union/union_validity.test index e17fc4b..d8215db 100644 --- a/parser/testdata/corpus/sql/types/union/union_validity.test +++ b/parser/testdata/corpus/sql/types/union/union_validity.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_validity.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (u UNION(a INT, b VARCHAR)); diff --git a/parser/testdata/corpus/sql/types/union/union_value.test b/parser/testdata/corpus/sql/types/union/union_value.test index 5f85a17..770974d 100644 --- a/parser/testdata/corpus/sql/types/union/union_value.test +++ b/parser/testdata/corpus/sql/types/union/union_value.test @@ -1,6 +1,6 @@ # source: test/sql/types/union/union_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(u UNION(num INTEGER, str STRING)); diff --git a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_arithmetic.test b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_arithmetic.test index 099f72e..ec7a463 100644 --- a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_arithmetic.test +++ b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_arithmetic.test @@ -1,6 +1,6 @@ # source: test/sql/types/unsigned/test_unsigned_arithmetic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE unsigned(a UTINYINT,b USMALLINT, c UINTEGER, d UBIGINT); @@ -71,6 +71,10 @@ SELECT 100::UTINYINT // 0::UTINYINT -- ok == +SELECT TRY(100::UTINYINT // 0::UTINYINT) +-- +ok +== SELECT 100::UTINYINT % 20::UTINYINT, 90::UTINYINT % 20::UTINYINT -- ok @@ -79,3 +83,7 @@ SELECT 100::UTINYINT % 0::UTINYINT -- ok == +SELECT TRY(100::UTINYINT % 0::UTINYINT) +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_auto_cast.test b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_auto_cast.test index 566b047..3407513 100644 --- a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_auto_cast.test +++ b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_auto_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/unsigned/test_unsigned_auto_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT 200::UTINYINT + 0.5 diff --git a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_conversion.test b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_conversion.test index 0e1eb83..07dd1dd 100644 --- a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_conversion.test +++ b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_conversion.test @@ -1,6 +1,6 @@ # source: test/sql/types/unsigned/test_unsigned_conversion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '7'::UTINYINT, '130'::UTINYINT, '255'::UTINYINT diff --git a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_verify.test b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_verify.test index b6bce9b..94864ca 100644 --- a/parser/testdata/corpus/sql/types/unsigned/test_unsigned_verify.test +++ b/parser/testdata/corpus/sql/types/unsigned/test_unsigned_verify.test @@ -1,6 +1,6 @@ # source: test/sql/types/unsigned/test_unsigned_verify.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select []::uint16[] diff --git a/parser/testdata/corpus/sql/types/uuid/test_uuid_cast.test b/parser/testdata/corpus/sql/types/uuid/test_uuid_cast.test index f85327c..5978c13 100644 --- a/parser/testdata/corpus/sql/types/uuid/test_uuid_cast.test +++ b/parser/testdata/corpus/sql/types/uuid/test_uuid_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/uuid/test_uuid_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select try_cast(try_cast('00112233-4455-6677-8899-aabbccddeeff'::UUID AS BLOB) as uuid) as test; diff --git a/parser/testdata/corpus/sql/types/uuid/test_uuid_uhugeint_cast.test b/parser/testdata/corpus/sql/types/uuid/test_uuid_uhugeint_cast.test index 2bd6438..171e84b 100644 --- a/parser/testdata/corpus/sql/types/uuid/test_uuid_uhugeint_cast.test +++ b/parser/testdata/corpus/sql/types/uuid/test_uuid_uhugeint_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/uuid/test_uuid_uhugeint_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT '00000000-0000-0000-0000-000000000000'::UUID::UHUGEINT; diff --git a/parser/testdata/corpus/sql/types/variant/debug_shred_empty_object.test b/parser/testdata/corpus/sql/types/variant/debug_shred_empty_object.test new file mode 100644 index 0000000..f02cf5c --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/debug_shred_empty_object.test @@ -0,0 +1,29 @@ +# source: test/sql/types/variant/debug_shred_empty_object.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA debug_verify_vector = 'shredded_vector'; +-- +ok +== +CREATE TABLE variants AS SELECT empty_struct::VARIANT v FROM test_all_types(); +-- +ok +== +SELECT v IS NULL, v IS NOT NULL FROM variants; +-- +ok +== +SELECT count(*), count(v), sum(v IS NULL), sum(v IS NOT NULL) FROM variants; +-- +ok +== +SELECT count(*) FROM variants WHERE v IS NULL; +-- +ok +== +SELECT count(*) FROM variants WHERE v IS NOT NULL; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/implicit_cast_from_variant.test b/parser/testdata/corpus/sql/types/variant/implicit_cast_from_variant.test index 9d764ed..b102349 100644 --- a/parser/testdata/corpus/sql/types/variant/implicit_cast_from_variant.test +++ b/parser/testdata/corpus/sql/types/variant/implicit_cast_from_variant.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/implicit_cast_from_variant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select [100::VARIANT, 1.2] diff --git a/parser/testdata/corpus/sql/types/variant/json_cast.test b/parser/testdata/corpus/sql/types/variant/json_cast.test index d4d6266..3bbe8c3 100644 --- a/parser/testdata/corpus/sql/types/variant/json_cast.test +++ b/parser/testdata/corpus/sql/types/variant/json_cast.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/json_cast.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select '"test"'::JSON::VARIANT; diff --git a/parser/testdata/corpus/sql/types/variant/list_to_variant_null_after_value.test b/parser/testdata/corpus/sql/types/variant/list_to_variant_null_after_value.test new file mode 100644 index 0000000..966daba --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/list_to_variant_null_after_value.test @@ -0,0 +1,33 @@ +# source: test/sql/types/variant/list_to_variant_null_after_value.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE v AS SELECT ['hello world long string', NULL]::VARIANT v FROM range(3); +-- +ok +== +INSERT INTO v SELECT ['hello world long string', NULL]::VARIANT FROM range(3); +-- +ok +== +SELECT count(DISTINCT v), count(DISTINCT v::VARCHAR) FROM v +-- +ok +== +SELECT count(DISTINCT hash(v)) FROM v +-- +ok +== +SELECT hash(['hello world long string', NULL]::VARIANT) = hash(['hello world long string', NULL]::VARIANT) +-- +ok +== +SELECT count(DISTINCT hash(x)) FROM (SELECT [{'a': 1}, {'a': NULL}, NULL, {'a': i % 1}]::VARIANT x FROM range(100) t(i)) +-- +ok +== +SELECT ['hello world long string', NULL, 'another long string value', NULL]::VARIANT::VARCHAR +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/map_extract_variant_values.test b/parser/testdata/corpus/sql/types/variant/map_extract_variant_values.test new file mode 100644 index 0000000..42555e7 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/map_extract_variant_values.test @@ -0,0 +1,25 @@ +# source: test/sql/types/variant/map_extract_variant_values.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tm AS SELECT i, MAP {'z': 'q'} m FROM range(10) t(i); +-- +ok +== +SELECT count(map_extract(m::MAP(VARCHAR, VARIANT), 'z')) FROM tm; +-- +ok +== +SELECT DISTINCT element_at(m::MAP(VARCHAR, VARIANT), 'z')::VARCHAR FROM tm; +-- +ok +== +SELECT count(*), max(length(x::VARCHAR)) FROM (SELECT map_extract(MAP {'k' || (i % 3): 'v' || i, 'z': 'q'}::MAP(VARCHAR, VARIANT), 'z') FROM range(5000) t(i)) s(x); +-- +ok +== +SELECT count(*) FROM (SELECT list_intersect(['a', 'b']::VARIANT[], [x::VARIANT, 'b']) l FROM (SELECT 'v' || i AS x FROM range(5000) t(i))) WHERE len(l) = 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/test_all_types.test b/parser/testdata/corpus/sql/types/variant/test_all_types.test index 7311bef..e3d3dd4 100644 --- a/parser/testdata/corpus/sql/types/variant/test_all_types.test +++ b/parser/testdata/corpus/sql/types/variant/test_all_types.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/test_all_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select struct_pack(*COLUMNS(*))::VARIANT::JSON from test_all_types(); diff --git a/parser/testdata/corpus/sql/types/variant/test_variant_list_copy_shredded.test b/parser/testdata/corpus/sql/types/variant/test_variant_list_copy_shredded.test new file mode 100644 index 0000000..d63e458 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/test_variant_list_copy_shredded.test @@ -0,0 +1,25 @@ +# source: test/sql/types/variant/test_variant_list_copy_shredded.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT [NULL::INT] x FROM range(3000); +-- +ok +== +SELECT count(list_concat(x::VARIANT[], [])) FROM t; +-- +ok +== +CREATE TABLE t2 AS SELECT ['a' || i, NULL] x FROM range(100000) t(i); +-- +ok +== +SELECT max(length(list_concat(x::VARIANT[], [])::VARCHAR)), max(length(list_resize(x::VARIANT[], 3)::VARCHAR)), max(length(list_append(x::VARIANT[], 1::VARIANT)::VARCHAR)), max(length(list_prepend(1::VARIANT, x::VARIANT[])::VARCHAR)), max(length((x::VARIANT[] || x::VARIANT[])::VARCHAR)) FROM t2; +-- +ok +== +SELECT list_concat(x::VARIANT[], [42::VARIANT]) FROM t2 WHERE x[1] = 'a99999' +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/tpch_test.test b/parser/testdata/corpus/sql/types/variant/tpch_test.test index 1300bc1..08486ac 100644 --- a/parser/testdata/corpus/sql/types/variant/tpch_test.test +++ b/parser/testdata/corpus/sql/types/variant/tpch_test.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/tpch_test.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit attach '{TEST_DIR}/tpch_sf0001_variant.db' as foo (STORAGE_VERSION 'v1.5.0'); diff --git a/parser/testdata/corpus/sql/types/variant/tpch_test_through_json.test b/parser/testdata/corpus/sql/types/variant/tpch_test_through_json.test index 889e11d..18a7db9 100644 --- a/parser/testdata/corpus/sql/types/variant/tpch_test_through_json.test +++ b/parser/testdata/corpus/sql/types/variant/tpch_test_through_json.test @@ -1,13 +1,14 @@ # source: test/sql/types/variant/tpch_test_through_json.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -select lineitem::json from lineitem limit 2; --- -ok -== -select lineitem::json::variant::JSON from lineitem limit 2; +select count(*), + bool_and(list_sort(json_keys(lineitem::json)) = variant_keys(lineitem::json::variant)), + bool_and(lineitem::json::variant = lineitem::json::variant::JSON::variant), + bool_and(lineitem::json::variant::JSON = lineitem::json::variant::JSON::variant::JSON), + bool_and(json_keys(lineitem::json::variant::JSON) = list_sort(json_keys(lineitem::json))) +from lineitem; -- ok == diff --git a/parser/testdata/corpus/sql/types/variant/try_cast_from_variant.test b/parser/testdata/corpus/sql/types/variant/try_cast_from_variant.test index 80c8710..59b2d93 100644 --- a/parser/testdata/corpus/sql/types/variant/try_cast_from_variant.test +++ b/parser/testdata/corpus/sql/types/variant/try_cast_from_variant.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/try_cast_from_variant.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select try_cast('hello world'::variant as int) + 1; diff --git a/parser/testdata/corpus/sql/types/variant/try_cast_nested_list_writer.test b/parser/testdata/corpus/sql/types/variant/try_cast_nested_list_writer.test new file mode 100644 index 0000000..33d36a6 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/try_cast_nested_list_writer.test @@ -0,0 +1,34 @@ +# source: test/sql/types/variant/try_cast_nested_list_writer.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +select try_cast([['bad'], ['2']]::variant as INTEGER[][]); +-- +ok +== +select try_cast([['1'], ['bad'], ['3']]::variant as INTEGER[][]); +-- +ok +== +CREATE TABLE v AS SELECT * FROM (VALUES + ([['1'],['2']]::variant), + ([['bad'],['2']]::variant), + ([['3'],['4']]::variant), + ([['5'],['nope']]::variant) +) t(x); +-- +ok +== +SELECT count(*) FROM v WHERE try_cast(x AS INTEGER[][]) IS NULL +-- +ok +== +SELECT try_cast(x AS INTEGER[][]) FROM v +-- +ok +== +SELECT CAST([['bad'], ['2']]::variant AS INTEGER[][]); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_binary_duplicate_keys.test b/parser/testdata/corpus/sql/types/variant/variant_binary_duplicate_keys.test new file mode 100644 index 0000000..4414578 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_binary_duplicate_keys.test @@ -0,0 +1,37 @@ +# source: test/sql/types/variant/variant_binary_duplicate_keys.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT variant_bytes_to_variant('\x01\x01\x00\x01\x61\x02\x02\x00\x00\x00\x02\x04\x0C\x00\x0C\x01'::BLOB) +-- +ok +== +SELECT variant_normalize(variant_bytes_to_variant('\x01\x01\x00\x01\x61\x02\x02\x00\x00\x00\x02\x04\x0C\x00\x0C\x01'::BLOB))::VARCHAR +-- +ok +== +SELECT variant_normalize(variant_bytes_to_variant('\x01\x02\x00\x01\x02\x62\x61\x02\x05\x00\x01\x01\x01\x01\x00\x02\x04\x06\x08\x0A\x0C\x00\x0C\x01\x0C\x02\x0C\x03\x0C\x04'::BLOB))::VARCHAR +-- +ok +== +SET variant_minimum_shredding_size=0 +-- +ok +== +ATTACH '__TEST_DIR__/variant_dup_keys.db' AS s +-- +ok +== +CREATE TABLE s.t AS SELECT variant_bytes_to_variant('\x01\x01\x00\x01\x61\x02\x02\x00\x00\x00\x02\x04\x0C\x00\x0C\x01'::BLOB) v +-- +ok +== +CHECKPOINT s +-- +ok +== +SELECT variant_bytes_to_variant('\x01\x02\x00\x01\x02\x61\x62\x02\x02\x00\x01\x00\x02\x04\x0C\x00\x0C\x01'::BLOB)::VARCHAR +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_cast_parameter_stats.test b/parser/testdata/corpus/sql/types/variant/variant_cast_parameter_stats.test new file mode 100644 index 0000000..e515343 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_cast_parameter_stats.test @@ -0,0 +1,21 @@ +# source: test/sql/types/variant/variant_cast_parameter_stats.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tbl AS SELECT concat('thisisastring', i) s FROM range(1000) t(i); +-- +ok +== +PREPARE p AS FROM tbl WHERE s LIKE $1::VARIANT LIMIT 5; +-- +ok +== +EXECUTE p('thisisastring99') +-- +ok +== +SELECT count(*) FROM tbl WHERE s LIKE 'thisisastring1%'::VARIANT +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_cast_parent_path_order.test b/parser/testdata/corpus/sql/types/variant/variant_cast_parent_path_order.test new file mode 100644 index 0000000..34ad247 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_cast_parent_path_order.test @@ -0,0 +1,29 @@ +# source: test/sql/types/variant/variant_cast_parent_path_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE cast_parent AS SELECT {'x': {'a': 1}::VARIANT} AS n; +-- +ok +== +CREATE TABLE variant_parent AS SELECT n::VARIANT AS n FROM cast_parent; +-- +ok +== +CREATE VIEW variant_parent_view AS SELECT * FROM variant_parent; +-- +ok +== +SELECT n.x::STRUCT(a BIGINT), n.x.a FROM {source}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT n.x.a, n.x::STRUCT(a BIGINT) FROM {source}; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT n.x.a, n.x::STRUCT(a BIGINT), n.x FROM {source}; +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_cast_stats.test b/parser/testdata/corpus/sql/types/variant/variant_cast_stats.test index 60b443d..23ad317 100644 --- a/parser/testdata/corpus/sql/types/variant/variant_cast_stats.test +++ b/parser/testdata/corpus/sql/types/variant/variant_cast_stats.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/variant_cast_stats.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT range n FROM range(10); diff --git a/parser/testdata/corpus/sql/types/variant/variant_cast_stats_json.test b/parser/testdata/corpus/sql/types/variant/variant_cast_stats_json.test new file mode 100644 index 0000000..a5e65d5 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_cast_stats_json.test @@ -0,0 +1,33 @@ +# source: test/sql/types/variant/variant_cast_stats_json.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_verify_stats=true; +-- +ok +== +CREATE TABLE js(j JSON); +-- +ok +== +INSERT INTO js VALUES ('{"bbbb":12345678,"aaaa":1}'), ('{"bbbb":87654321,"aaaa":2}'); +-- +ok +== +SELECT j::VARIANT::JSON FROM js; +-- +ok +== +CREATE TABLE jw(j JSON); +-- +ok +== +INSERT INTO jw VALUES ('{ "aaaa" : 12345678 }'), ('{ "aaaa" : 87654321 }'); +-- +ok +== +SELECT j::VARIANT::JSON FROM jw; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_cast_tz_from_string.test b/parser/testdata/corpus/sql/types/variant/variant_cast_tz_from_string.test new file mode 100644 index 0000000..88af473 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_cast_tz_from_string.test @@ -0,0 +1,25 @@ +# source: test/sql/types/variant/variant_cast_tz_from_string.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT CAST('garbage'::VARIANT AS {target}) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT TRY_CAST('garbage'::VARIANT AS {target}) +-- +error: Parser Error: syntax error at or near "{" +== +SELECT CAST('23:59:59+16:00'::VARIANT AS TIMETZ) +-- +ok +== +SELECT CAST('10:00:00+02'::VARIANT AS TIMETZ), CAST('2024-01-01 10:00:00+00'::VARIANT AS TIMESTAMPTZ) = TIMESTAMPTZ '2024-01-01 10:00:00+00' +-- +ok +== +SELECT TRY_CAST(s AS TIMESTAMPTZ) IS NULL FROM (VALUES (1, '2024-01-01'), (2, 'x')) t(i, s) ORDER BY i +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_casts.test b/parser/testdata/corpus/sql/types/variant/variant_casts.test index f6e1677..fb48690 100644 --- a/parser/testdata/corpus/sql/types/variant/variant_casts.test +++ b/parser/testdata/corpus/sql/types/variant/variant_casts.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/variant_casts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE struct AS SELECT {'a': 42, 'b': 84} s diff --git a/parser/testdata/corpus/sql/types/variant/variant_decimal_arithmetic.test b/parser/testdata/corpus/sql/types/variant/variant_decimal_arithmetic.test new file mode 100644 index 0000000..cea660f --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_decimal_arithmetic.test @@ -0,0 +1,29 @@ +# source: test/sql/types/variant/variant_decimal_arithmetic.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT 10.0 % (2.0)::VARIANT; +-- +ok +== +SELECT 10.0 + (2.0)::VARIANT; +-- +ok +== +SELECT 1.5::VARIANT - 1.5; +-- +ok +== +SELECT 10.5 * 1::VARIANT; +-- +ok +== +SELECT TRY(1.5 + 1::VARIANT); +-- +ok +== +SELECT 10.5 + (1::VARIANT)::DECIMAL(5,1); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_distinct.test b/parser/testdata/corpus/sql/types/variant/variant_distinct.test index ab1c39a..77e6781 100644 --- a/parser/testdata/corpus/sql/types/variant/variant_distinct.test +++ b/parser/testdata/corpus/sql/types/variant/variant_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/variant_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT [1]::VARIANT IS NOT DISTINCT FROM [2] diff --git a/parser/testdata/corpus/sql/types/variant/variant_extract_json_cast_shredded.test b/parser/testdata/corpus/sql/types/variant/variant_extract_json_cast_shredded.test new file mode 100644 index 0000000..1252c1e --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_extract_json_cast_shredded.test @@ -0,0 +1,31 @@ +# source: test/sql/types/variant/variant_extract_json_cast_shredded.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +ATTACH '__TEST_DIR__/variant_extract_json_cast.db' AS shred (STORAGE_VERSION 'v1.5.0'); +-- +ok +== +CREATE TABLE shred.t AS SELECT '{"s": "x", "b": "true", "n": 42}'::JSON::VARIANT AS v FROM range(10); +-- +ok +== +SELECT (variant_extract(v, 's')::JSON)::VARCHAR, (variant_extract(v, 'b')::JSON)::VARCHAR, (variant_extract(v, 'n')::JSON)::VARCHAR +FROM shred.t LIMIT 1; +-- +ok +== +SELECT json_type(variant_extract(v, 's')::JSON), json_type(variant_extract(v, 'b')::JSON), json_type(variant_extract(v, 'n')::JSON) +FROM shred.t LIMIT 1; +-- +ok +== +SELECT variant_extract(v, 's')::VARCHAR, variant_extract(v, 'b')::BOOLEAN, variant_extract(v, 'n')::INTEGER FROM shred.t LIMIT 1; +-- +ok +== +SET disabled_optimizers = 'unused_columns'; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_icu_casts.test b/parser/testdata/corpus/sql/types/variant/variant_icu_casts.test new file mode 100644 index 0000000..cb08272 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_icu_casts.test @@ -0,0 +1,21 @@ +# source: test/sql/types/variant/variant_icu_casts.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET TimeZone = 'Europe/Berlin'; +-- +ok +== +select '1992-09-20 12:30:00.123456789+05:00'::TIMESTAMPTZ as t; +-- +ok +== +select '1992-09-20 12:30:00.123456789+05:00'::TIMESTAMPTZ::VARIANT as tv; +-- +ok +== +select '1992-09-20 12:30:00.123456789+05:00'::TIMESTAMPTZ::VARIANT::VARCHAR as tvv; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_map_to_variant_filter.test b/parser/testdata/corpus/sql/types/variant/variant_map_to_variant_filter.test index 13fb30a..83f24c3 100644 --- a/parser/testdata/corpus/sql/types/variant/variant_map_to_variant_filter.test +++ b/parser/testdata/corpus/sql/types/variant/variant_map_to_variant_filter.test @@ -1,6 +1,6 @@ # source: test/sql/types/variant/variant_map_to_variant_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t AS SELECT i, MAP{'k': i::VARIANT} AS m FROM range(2) t(i); diff --git a/parser/testdata/corpus/sql/types/variant/variant_object_key_order.test b/parser/testdata/corpus/sql/types/variant/variant_object_key_order.test new file mode 100644 index 0000000..958e74a --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_object_key_order.test @@ -0,0 +1,24 @@ +# source: test/sql/types/variant/variant_object_key_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT variant_typeof(v), CAST(v AS VARCHAR), CAST(variant_keys(v) AS VARCHAR), v = {'l': [42], 'o': {'x': 42}}::VARIANT +FROM (SELECT {'o': {'x': 42}, 'l': [42]}::VARIANT AS v); +-- +ok +== +SELECT variant_typeof(variant_extract(v, 'o')), CAST(v AS VARCHAR) +FROM (SELECT {'o': {'y': 1, 'x': 2}, 'l': [42]}::VARIANT AS v); +-- +ok +== +SELECT variant_typeof(v), CAST(v AS VARCHAR), CAST(variant_keys(v) AS VARCHAR) +FROM (SELECT {'a': [2], 'B': 1}::VARIANT AS v); +-- +ok +== +SELECT CAST({'o': {'x': 42}, 'l': [42]}::VARIANT AS STRUCT(zz INTEGER)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_object_key_order_json.test b/parser/testdata/corpus/sql/types/variant/variant_object_key_order_json.test new file mode 100644 index 0000000..4f9e5d5 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_object_key_order_json.test @@ -0,0 +1,20 @@ +# source: test/sql/types/variant/variant_object_key_order_json.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT variant_typeof(v), CAST(v AS VARCHAR), CAST(v AS JSON), CAST(variant_keys(v) AS VARCHAR) +FROM (SELECT {'o': {'x': 42}, 'l': [42]}::VARIANT AS v); +-- +ok +== +SELECT CAST(v AS JSON) +FROM (SELECT {'o': {'y': 1, 'x': 2}, 'l': [42]}::VARIANT AS v); +-- +ok +== +SELECT CAST(v AS JSON) +FROM (SELECT {'a': [2], 'B': 1}::VARIANT AS v); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_stats_merge_decimal.test b/parser/testdata/corpus/sql/types/variant/variant_stats_merge_decimal.test new file mode 100644 index 0000000..c515e41 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_stats_merge_decimal.test @@ -0,0 +1,45 @@ +# source: test/sql/types/variant/variant_stats_merge_decimal.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT v::VARCHAR FROM (SELECT i::DECIMAL(4,1)::VARIANT v FROM range(2) r(i) UNION ALL SELECT i::DECIMAL(9,3)::VARIANT FROM range(2) r(i)) ORDER BY 1 +-- +ok +== +SELECT (CASE WHEN i % 2 = 0 THEN i::DECIMAL(4,1)::VARIANT ELSE i::DECIMAL(4,2)::VARIANT END)::VARCHAR FROM range(2) r(i) ORDER BY 1 +-- +ok +== +CREATE TABLE t (id BIGINT, v VARIANT) +-- +ok +== +INSERT INTO t SELECT i, (i % 10)::DECIMAL(4,1)::VARIANT FROM range(122880) r(i) +-- +ok +== +INSERT INTO t SELECT i, ((i % 10) / 1000)::DECIMAL(9,3)::VARIANT FROM range(122880, 200000) r(i) +-- +ok +== +CREATE TABLE t2 (v VARIANT) +-- +ok +== +INSERT INTO t2 SELECT (i % 10)::DECIMAL(4,1)::VARIANT FROM range(122880) r(i) +-- +ok +== +INSERT INTO t2 SELECT (i % 10)::DECIMAL(4,2)::VARIANT FROM range(122880, 200000) r(i) +-- +ok +== +SELECT count(*), count(DISTINCT v::VARCHAR) FROM t +-- +ok +== +SELECT count(*) FROM t2 WHERE v::DECIMAL(4,2) = 9.00 +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_struct_cast_parent_projection.test b/parser/testdata/corpus/sql/types/variant/variant_struct_cast_parent_projection.test new file mode 100644 index 0000000..d67e886 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_struct_cast_parent_projection.test @@ -0,0 +1,13 @@ +# source: test/sql/types/variant/variant_struct_cast_parent_projection.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT n.x::STRUCT(a BIGINT), n.x.a FROM cast_parent; +-- +ok +== +SELECT n.x::STRUCT(a BIGINT), n.x.a FROM (SELECT * FROM cast_parent); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_struct_field_subquery.test b/parser/testdata/corpus/sql/types/variant/variant_struct_field_subquery.test new file mode 100644 index 0000000..96c9fef --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_struct_field_subquery.test @@ -0,0 +1,151 @@ +# source: test/sql/types/variant/variant_struct_field_subquery.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t AS SELECT * FROM (VALUES + (9, {'x': {'a': 1}::VARIANT}), + (10, {'x': {'a': 2, 'b': 'two'}::VARIANT}) +) v(id, nested); +-- +ok +== +CREATE VIEW s AS SELECT * FROM t; +-- +ok +== +SELECT nested.x.a FROM t WHERE id = 9; +-- +ok +== +SELECT nested.x.a FROM (SELECT * FROM t) WHERE id = 9; +-- +ok +== +SELECT nested.x.a FROM (SELECT * FROM t WHERE id < 30) WHERE id = 9; +-- +ok +== +SELECT nested.x.a, nested.x.b FROM (SELECT * FROM t WHERE id < 30) ORDER BY id; +-- +ok +== +SELECT nested.x.a FROM s WHERE id = 9; +-- +ok +== +SELECT id FROM (SELECT * FROM t WHERE id < 30) WHERE nested.x.a = 1; +-- +ok +== +SELECT id FROM s WHERE nested.x.b = 'two'; +-- +ok +== +SELECT renamed.x.a::INTEGER, renamed.x.b::VARCHAR +FROM (SELECT id, nested AS renamed FROM (SELECT * FROM s)) ORDER BY id; +-- +ok +== +SELECT nested.x, nested.x.a, nested.x.b FROM s ORDER BY id; +-- +ok +== +SELECT nested.x.a, nested.x.b, nested.x FROM s ORDER BY id; +-- +ok +== +SELECT nested, nested.x.a FROM s ORDER BY id; +-- +ok +== +CREATE TABLE nested_variant ( + id INTEGER, + nested STRUCT(unused VARCHAR, inner_struct STRUCT(tag INTEGER, payload VARIANT)) +); +-- +ok +== +INSERT INTO nested_variant VALUES + (1, {'unused': 'ignore', 'inner_struct': {'tag': 101, 'payload': {'obj': {'a': 11, 'b': 'eleven'}, 'items': [31, 32], 'a.b': 41}::VARIANT}}), + (2, {'unused': 'ignore', 'inner_struct': {'tag': 102, 'payload': {'obj': {'a': 22}, 'items': [42], 'a.b': 52}::VARIANT}}), + (3, {'unused': 'ignore', 'inner_struct': {'tag': 103, 'payload': {'obj': {'a': NULL}}::VARIANT}}), + (4, {'unused': 'ignore', 'inner_struct': {'tag': 104, 'payload': NULL}}), + (5, {'unused': 'ignore', 'inner_struct': NULL}), + (6, NULL), + (7, {'unused': 'ignore', 'inner_struct': {'tag': 107, 'payload': 123::VARIANT}}); +-- +ok +== +SELECT id, nested.inner_struct.tag, nested.inner_struct.payload.obj.a::INTEGER, + nested.inner_struct.payload.obj.b::VARCHAR +FROM (SELECT * FROM nested_variant) ORDER BY id; +-- +ok +== +SELECT id, nested.inner_struct.payload['a.b']::INTEGER, nested.inner_struct.payload.items[2]::INTEGER +FROM (SELECT * FROM nested_variant) ORDER BY id; +-- +ok +== +SELECT id, nested.inner_struct.payload.obj.b::VARCHAR +FROM (SELECT * FROM nested_variant) +WHERE nested.inner_struct.payload.obj.a::INTEGER = 11; +-- +ok +== +SELECT count(*) FROM (SELECT * FROM nested_variant) WHERE nested.inner_struct.payload.obj.a IS NULL; +-- +ok +== +CREATE TABLE unnamed_variant AS SELECT id, row(999, nested) AS u FROM nested_variant; +-- +ok +== +SELECT id, u[2].inner_struct.payload.obj.a::INTEGER +FROM (SELECT * FROM unnamed_variant) ORDER BY id; +-- +ok +== +SELECT TRY_CAST(nested.inner_struct.payload.obj.b AS INTEGER) +FROM (SELECT * FROM nested_variant) ORDER BY id; +-- +ok +== +SELECT nested.inner_struct.payload.obj.b::INTEGER FROM (SELECT * FROM nested_variant) WHERE id = 1; +-- +ok +== +SELECT nested.inner_struct.payload.obj.a::INTEGER, nested.inner_struct.payload.obj.a::VARCHAR +FROM (SELECT * FROM nested_variant) WHERE id = 1; +-- +ok +== +SELECT (nested.inner_struct.payload.obj::STRUCT(b VARCHAR, a VARCHAR)).a +FROM (SELECT * FROM nested_variant) WHERE id = 1; +-- +ok +== +SELECT (nested.inner_struct.payload.obj::STRUCT(a INTEGER, b INTEGER)).a +FROM (SELECT * FROM nested_variant) WHERE id = 1; +-- +ok +== +WITH c AS MATERIALIZED (SELECT * FROM nested_variant) +SELECT l.nested.inner_struct.payload.obj.a::INTEGER, r.nested.inner_struct.payload.obj.b::VARCHAR +FROM c l JOIN c r USING (id) WHERE l.id = 1; +-- +ok +== +SET explain_output = 'physical_only'; +-- +ok +== +EXPLAIN SELECT nested.inner_struct.tag FROM (SELECT * FROM nested_variant); +-- +ok +== +EXPLAIN SELECT nested.inner_struct.payload FROM (SELECT * FROM nested_variant); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_struct_field_subquery_cast_parent.test b/parser/testdata/corpus/sql/types/variant/variant_struct_field_subquery_cast_parent.test new file mode 100644 index 0000000..172afbc --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_struct_field_subquery_cast_parent.test @@ -0,0 +1,17 @@ +# source: test/sql/types/variant/variant_struct_field_subquery_cast_parent.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +INSERT INTO cast_parent VALUES ({'x': {'a': 2}::VARIANT}); +-- +ok +== +SELECT n.x.a, n.x::STRUCT(a BIGINT) FROM (SELECT * FROM cast_parent); +-- +ok +== +SELECT count(*) FROM cast_parent; +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_to_array_try_cast.test b/parser/testdata/corpus/sql/types/variant/variant_to_array_try_cast.test new file mode 100644 index 0000000..508c7ed --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_to_array_try_cast.test @@ -0,0 +1,21 @@ +# source: test/sql/types/variant/variant_to_array_try_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT TRY_CAST('hello'::VARIANT AS INT[2]); +-- +ok +== +SELECT TRY_CAST(v AS INT[2]) FROM (VALUES ('[1, 2]'::VARIANT), ('[1, 2, 3]'::VARIANT), ('hello'::VARIANT), ([3, 4]::VARIANT)) t(v); +-- +ok +== +SELECT CAST('hello'::VARIANT AS INT[2]); +-- +ok +== +SELECT CAST('[1, 2, 3]'::VARIANT AS INT[2]); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_to_json_null.test b/parser/testdata/corpus/sql/types/variant/variant_to_json_null.test new file mode 100644 index 0000000..3d379c4 --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_to_json_null.test @@ -0,0 +1,45 @@ +# source: test/sql/types/variant/variant_to_json_null.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT (v::VARIANT::JSON) IS NULL, (v::VARIANT::JSON)::VARCHAR FROM (VALUES (NULL::INTEGER), (7)) t(v); +-- +ok +== +SELECT to_json(v::VARIANT) IS NULL FROM (VALUES (NULL::INTEGER), (7)) t(v); +-- +ok +== +SELECT count(j) FROM (SELECT (v::VARIANT::JSON) AS j FROM (VALUES (NULL::INTEGER)) t(v)); +-- +ok +== +SELECT coalesce(j::VARCHAR, 'fallback') FROM (SELECT (v::VARIANT::JSON) AS j FROM (VALUES (NULL::INTEGER)) t(v)); +-- +ok +== +SELECT ('{"a":null,"b":1}'::JSON::VARIANT::JSON)::VARCHAR; +-- +ok +== +SELECT ('[1,null,3]'::JSON::VARIANT::JSON)::VARCHAR; +-- +ok +== +SELECT ('{"a":{"b":[null]}}'::JSON::VARIANT::JSON)::VARCHAR; +-- +ok +== +SELECT ({'a': NULL::INTEGER, 'b': 1}::VARIANT::JSON)::VARCHAR; +-- +ok +== +SELECT ([1, NULL, 3]::VARIANT::JSON)::VARCHAR; +-- +ok +== +SELECT (v::VARIANT::VARCHAR) IS NULL FROM (VALUES (NULL::INTEGER), (7)) t(v); +-- +ok +== diff --git a/parser/testdata/corpus/sql/types/variant/variant_to_map_cast.test b/parser/testdata/corpus/sql/types/variant/variant_to_map_cast.test new file mode 100644 index 0000000..bc192bd --- /dev/null +++ b/parser/testdata/corpus/sql/types/variant/variant_to_map_cast.test @@ -0,0 +1,49 @@ +# source: test/sql/types/variant/variant_to_map_cast.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(TRY_CAST(MAP{'k': i}::VARIANT AS MAP(VARCHAR, TINYINT))) FROM range(129) t(i) +-- +ok +== +SELECT i, TRY_CAST(MAP{'k': i}::VARIANT AS MAP(VARCHAR, TINYINT)) FROM range(126, 130) t(i) ORDER BY i +-- +ok +== +SELECT CAST([{'key': NULL, 'value': 1}]::VARIANT AS MAP(VARCHAR, INT)) +-- +ok +== +SELECT CAST([{'value': 1}]::VARIANT AS MAP(VARCHAR, INT)) +-- +ok +== +SELECT CAST([{'key': 'a', 'value': 1}, {'key': 'a', 'value': 2}]::VARIANT AS MAP(VARCHAR, INT)) +-- +ok +== +SELECT TRY_CAST([{'key': 'a', 'value': 1}, {'key': 'a', 'value': 2}]::VARIANT AS MAP(VARCHAR, INT)), TRY_CAST([{'key': NULL, 'value': 1}]::VARIANT AS MAP(VARCHAR, INT)), CAST([{'key': 'a', 'value': 1}, {'key': 'b', 'value': 2}]::VARIANT AS MAP(VARCHAR, INT)), CAST(MAP{'x': 1}::VARIANT AS MAP(VARCHAR, INT)) +-- +ok +== +SELECT TRY_CAST(v AS MAP(VARCHAR, TINYINT)) FROM (VALUES (1, MAP{'a': 1}::VARIANT), (2, MAP{'a': 1000}::VARIANT), (3, [{'key': 'b', 'value': 2}, {'key': 'b', 'value': 3}]::VARIANT), (4, MAP{'c': 3}::VARIANT), (5, [{'key': NULL, 'value': 2}]::VARIANT)) t(i, v) ORDER BY i +-- +ok +== +SELECT TRY_CAST(x AS MAP(VARCHAR, INT)) FROM (VALUES ([NULL]::VARIANT), (1::VARIANT)) t(x); +-- +ok +== +SELECT TRY_CAST(x AS MAP(VARCHAR, INT)) FROM (VALUES ([{'key': 'a', 'value': 1}, NULL]::VARIANT), ([{'key': 'b', 'value': 2}]::VARIANT)) t(x); +-- +ok +== +SELECT CAST(x AS MAP(VARCHAR, INT)) FROM (VALUES ([{'key': 'b', 'value': 2}]::VARIANT), ([NULL]::VARIANT)) t(x); +-- +ok +== +SELECT CAST([NULL]::VARIANT AS MAP(VARCHAR, INT)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/unnest/list_constant_reference.test b/parser/testdata/corpus/sql/unnest/list_constant_reference.test new file mode 100644 index 0000000..c74a25b --- /dev/null +++ b/parser/testdata/corpus/sql/unnest/list_constant_reference.test @@ -0,0 +1,10 @@ +# source: test/sql/unnest/list_constant_reference.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT list(k ORDER BY id, n) +FROM (SELECT id, k, unnest([0,1]) AS n FROM list_probes) p; +-- +ok +== diff --git a/parser/testdata/corpus/sql/update/compact_update_allocation.test b/parser/testdata/corpus/sql/update/compact_update_allocation.test index c8e55e9..15ec192 100644 --- a/parser/testdata/corpus/sql/update/compact_update_allocation.test +++ b/parser/testdata/corpus/sql/update/compact_update_allocation.test @@ -1,6 +1,6 @@ # source: test/sql/update/compact_update_allocation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE mem_test (a INTEGER, b INTEGER, c INTEGER, d VARCHAR) diff --git a/parser/testdata/corpus/sql/update/force_update_to_del_and_insert.test b/parser/testdata/corpus/sql/update/force_update_to_del_and_insert.test index 94a6c32..b6eeed9 100644 --- a/parser/testdata/corpus/sql/update/force_update_to_del_and_insert.test +++ b/parser/testdata/corpus/sql/update/force_update_to_del_and_insert.test @@ -1,16 +1,12 @@ # source: test/sql/update/force_update_to_del_and_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT current_setting('force_update_to_del_and_insert') -- ok == -CREATE TABLE t(i INTEGER, j INTEGER, k INTEGER); --- -ok -== INSERT INTO t VALUES (1, 10, 100), (2, 20, 200), (3, 30, 300); -- ok diff --git a/parser/testdata/corpus/sql/update/issue_22392.test b/parser/testdata/corpus/sql/update/issue_22392.test index 65c96b8..605555e 100644 --- a/parser/testdata/corpus/sql/update/issue_22392.test +++ b/parser/testdata/corpus/sql/update/issue_22392.test @@ -1,6 +1,6 @@ # source: test/sql/update/issue_22392.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t (k INTEGER PRIMARY KEY, v INTEGER); diff --git a/parser/testdata/corpus/sql/update/null_update_merge.test b/parser/testdata/corpus/sql/update/null_update_merge.test index e66e219..7c53a29 100644 --- a/parser/testdata/corpus/sql/update/null_update_merge.test +++ b/parser/testdata/corpus/sql/update/null_update_merge.test @@ -1,6 +1,6 @@ # source: test/sql/update/null_update_merge.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id INTEGER, a INTEGER); diff --git a/parser/testdata/corpus/sql/update/null_update_merge_transaction.test b/parser/testdata/corpus/sql/update/null_update_merge_transaction.test index f87eb14..25ea8b0 100644 --- a/parser/testdata/corpus/sql/update/null_update_merge_transaction.test +++ b/parser/testdata/corpus/sql/update/null_update_merge_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/update/null_update_merge_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET a=CASE WHEN a IS NULL THEN 1 ELSE NULL END diff --git a/parser/testdata/corpus/sql/update/string_update_null_heap.test b/parser/testdata/corpus/sql/update/string_update_null_heap.test index 849e690..54f77e7 100644 --- a/parser/testdata/corpus/sql/update/string_update_null_heap.test +++ b/parser/testdata/corpus/sql/update/string_update_null_heap.test @@ -1,6 +1,6 @@ # source: test/sql/update/string_update_null_heap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (id INTEGER, s VARCHAR); diff --git a/parser/testdata/corpus/sql/update/string_update_transaction_local_7348.test b/parser/testdata/corpus/sql/update/string_update_transaction_local_7348.test index 9573b01..1a2582a 100644 --- a/parser/testdata/corpus/sql/update/string_update_transaction_local_7348.test +++ b/parser/testdata/corpus/sql/update/string_update_transaction_local_7348.test @@ -1,6 +1,6 @@ # source: test/sql/update/string_update_transaction_local_7348.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1(a VARCHAR(256) PRIMARY KEY, b INTEGER); diff --git a/parser/testdata/corpus/sql/update/test_big_string_update.test b/parser/testdata/corpus/sql/update/test_big_string_update.test index 62e0f80..ba7ce93 100644 --- a/parser/testdata/corpus/sql/update/test_big_string_update.test +++ b/parser/testdata/corpus/sql/update/test_big_string_update.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_big_string_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES ('abcdefghijklmnopqrstuvwxyz') diff --git a/parser/testdata/corpus/sql/update/test_cascading_updates.test b/parser/testdata/corpus/sql/update/test_cascading_updates.test index 8e345e6..ca18c64 100644 --- a/parser/testdata/corpus/sql/update/test_cascading_updates.test +++ b/parser/testdata/corpus/sql/update/test_cascading_updates.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_cascading_updates.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE integers(id INTEGER, val INTEGER); diff --git a/parser/testdata/corpus/sql/update/test_multiple_assignment.test b/parser/testdata/corpus/sql/update/test_multiple_assignment.test index 3f5c72a..2ffb0c8 100644 --- a/parser/testdata/corpus/sql/update/test_multiple_assignment.test +++ b/parser/testdata/corpus/sql/update/test_multiple_assignment.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_multiple_assignment.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (key INT, fruit VARCHAR, cost INT); diff --git a/parser/testdata/corpus/sql/update/test_null_update.test b/parser/testdata/corpus/sql/update/test_null_update.test index beac068..3a0f32b 100644 --- a/parser/testdata/corpus/sql/update/test_null_update.test +++ b/parser/testdata/corpus/sql/update/test_null_update.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_null_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (1), (2), (3), (NULL) diff --git a/parser/testdata/corpus/sql/update/test_repeated_string_update.test b/parser/testdata/corpus/sql/update/test_repeated_string_update.test index 327c121..0098573 100644 --- a/parser/testdata/corpus/sql/update/test_repeated_string_update.test +++ b/parser/testdata/corpus/sql/update/test_repeated_string_update.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_repeated_string_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES ('hello'), ('world') diff --git a/parser/testdata/corpus/sql/update/test_stress_update_issue_19688.test b/parser/testdata/corpus/sql/update/test_stress_update_issue_19688.test index d24c2f1..5a61bed 100644 --- a/parser/testdata/corpus/sql/update/test_stress_update_issue_19688.test +++ b/parser/testdata/corpus/sql/update/test_stress_update_issue_19688.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_stress_update_issue_19688.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DROP TABLE IF EXISTS test_stress_update_issue_19688 diff --git a/parser/testdata/corpus/sql/update/test_string_update.test b/parser/testdata/corpus/sql/update/test_string_update.test index b8ac27b..4c58700 100644 --- a/parser/testdata/corpus/sql/update/test_string_update.test +++ b/parser/testdata/corpus/sql/update/test_string_update.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_string_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit DELETE FROM test WHERE a='hello'; diff --git a/parser/testdata/corpus/sql/update/test_string_update_many_strings.test b/parser/testdata/corpus/sql/update/test_string_update_many_strings.test index a3ff0f2..034a380 100644 --- a/parser/testdata/corpus/sql/update/test_string_update_many_strings.test +++ b/parser/testdata/corpus/sql/update/test_string_update_many_strings.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_string_update_many_strings.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES ('a'), ('b'), ('c'), (NULL) diff --git a/parser/testdata/corpus/sql/update/test_string_update_null.test b/parser/testdata/corpus/sql/update/test_string_update_null.test index 204f797..5372a6a 100644 --- a/parser/testdata/corpus/sql/update/test_string_update_null.test +++ b/parser/testdata/corpus/sql/update/test_string_update_null.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_string_update_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET a=NULL where a='world'; diff --git a/parser/testdata/corpus/sql/update/test_string_update_rollback.test b/parser/testdata/corpus/sql/update/test_string_update_rollback.test index d76b8ee..e07ad24 100644 --- a/parser/testdata/corpus/sql/update/test_string_update_rollback.test +++ b/parser/testdata/corpus/sql/update/test_string_update_rollback.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_string_update_rollback.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET a='test2' WHERE a='test'; diff --git a/parser/testdata/corpus/sql/update/test_string_update_rollback_null.test b/parser/testdata/corpus/sql/update/test_string_update_rollback_null.test index 5fe369a..5b4aa99 100644 --- a/parser/testdata/corpus/sql/update/test_string_update_rollback_null.test +++ b/parser/testdata/corpus/sql/update/test_string_update_rollback_null.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_string_update_rollback_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES ('test'), ('world') diff --git a/parser/testdata/corpus/sql/update/test_update.test b/parser/testdata/corpus/sql/update/test_update.test index a638b17..dd4b502 100644 --- a/parser/testdata/corpus/sql/update/test_update.test +++ b/parser/testdata/corpus/sql/update/test_update.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM test WHERE a=3 diff --git a/parser/testdata/corpus/sql/update/test_update_delete_same_tuple.test b/parser/testdata/corpus/sql/update/test_update_delete_same_tuple.test index 826606a..b3cef73 100644 --- a/parser/testdata/corpus/sql/update/test_update_delete_same_tuple.test +++ b/parser/testdata/corpus/sql/update/test_update_delete_same_tuple.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_delete_same_tuple.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (1), (2), (3); diff --git a/parser/testdata/corpus/sql/update/test_update_from.test b/parser/testdata/corpus/sql/update/test_update_from.test index 6c1384a..8d3b406 100644 --- a/parser/testdata/corpus/sql/update/test_update_from.test +++ b/parser/testdata/corpus/sql/update/test_update_from.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_from.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE src (a INTEGER); diff --git a/parser/testdata/corpus/sql/update/test_update_issue_3170.test b/parser/testdata/corpus/sql/update/test_update_issue_3170.test index 75c6840..d3d5186 100644 --- a/parser/testdata/corpus/sql/update/test_update_issue_3170.test +++ b/parser/testdata/corpus/sql/update/test_update_issue_3170.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_issue_3170.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE student(id INTEGER, name VARCHAR, PRIMARY KEY(id)); diff --git a/parser/testdata/corpus/sql/update/test_update_many_updaters.test b/parser/testdata/corpus/sql/update/test_update_many_updaters.test index 809efc6..79a59c3 100644 --- a/parser/testdata/corpus/sql/update/test_update_many_updaters.test +++ b/parser/testdata/corpus/sql/update/test_update_many_updaters.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_many_updaters.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET a=4 WHERE a=1 diff --git a/parser/testdata/corpus/sql/update/test_update_many_updaters_nulls.test b/parser/testdata/corpus/sql/update/test_update_many_updaters_nulls.test index 787b4f6..b51082c 100644 --- a/parser/testdata/corpus/sql/update/test_update_many_updaters_nulls.test +++ b/parser/testdata/corpus/sql/update/test_update_many_updaters_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_many_updaters_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE test SET a=NULL WHERE a=1 diff --git a/parser/testdata/corpus/sql/update/test_update_mix.test b/parser/testdata/corpus/sql/update/test_update_mix.test index a5917d3..e1b83ee 100644 --- a/parser/testdata/corpus/sql/update/test_update_mix.test +++ b/parser/testdata/corpus/sql/update/test_update_mix.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_mix.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO test VALUES (4), (5), (6); diff --git a/parser/testdata/corpus/sql/update/test_update_same_value.test b/parser/testdata/corpus/sql/update/test_update_same_value.test index 5f58703..0b59ea1 100644 --- a/parser/testdata/corpus/sql/update/test_update_same_value.test +++ b/parser/testdata/corpus/sql/update/test_update_same_value.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_same_value.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM test WHERE a=4 diff --git a/parser/testdata/corpus/sql/update/test_update_with_non_regular_type.test b/parser/testdata/corpus/sql/update/test_update_with_non_regular_type.test index 8d8c0bb..8ce28fe 100644 --- a/parser/testdata/corpus/sql/update/test_update_with_non_regular_type.test +++ b/parser/testdata/corpus/sql/update/test_update_with_non_regular_type.test @@ -1,6 +1,6 @@ # source: test/sql/update/test_update_with_non_regular_type.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id VARCHAR, new_id VARCHAR, tags VARCHAR[], g GEOMETRY); diff --git a/parser/testdata/corpus/sql/update/update_after_commit.test b/parser/testdata/corpus/sql/update/update_after_commit.test index 6643931..9956164 100644 --- a/parser/testdata/corpus/sql/update/update_after_commit.test +++ b/parser/testdata/corpus/sql/update/update_after_commit.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_after_commit.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE a (b int); diff --git a/parser/testdata/corpus/sql/update/update_default.test b/parser/testdata/corpus/sql/update/update_default.test index 5c6b083..fdaf69d 100644 --- a/parser/testdata/corpus/sql/update/update_default.test +++ b/parser/testdata/corpus/sql/update/update_default.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE t1 SET c0 = DEFAULT; diff --git a/parser/testdata/corpus/sql/update/update_delete_wal.test b/parser/testdata/corpus/sql/update/update_delete_wal.test index abaa85d..5cc1a60 100644 --- a/parser/testdata/corpus/sql/update/update_delete_wal.test +++ b/parser/testdata/corpus/sql/update/update_delete_wal.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_delete_wal.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table test (id bigint primary key, c1 text); diff --git a/parser/testdata/corpus/sql/update/update_error_suggestions.test b/parser/testdata/corpus/sql/update/update_error_suggestions.test index 88a7808..8390af8 100644 --- a/parser/testdata/corpus/sql/update/update_error_suggestions.test +++ b/parser/testdata/corpus/sql/update/update_error_suggestions.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_error_suggestions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(mycol INTEGER) diff --git a/parser/testdata/corpus/sql/update/update_from_multi_match.test b/parser/testdata/corpus/sql/update/update_from_multi_match.test index b65552c..93ef3a1 100644 --- a/parser/testdata/corpus/sql/update/update_from_multi_match.test +++ b/parser/testdata/corpus/sql/update/update_from_multi_match.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_from_multi_match.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO t VALUES (1, 0); @@ -47,10 +47,6 @@ UPDATE t2 SET v = s2.v FROM s2 WHERE t2.id = s2.id; -- ok == -SELECT count(*) FROM t2; --- -ok -== SELECT count(*) FROM t2 WHERE v = id * 10 OR v = id * 100; -- ok diff --git a/parser/testdata/corpus/sql/update/update_join_nulls.test b/parser/testdata/corpus/sql/update/update_join_nulls.test index 7611373..aa4e56a 100644 --- a/parser/testdata/corpus/sql/update/update_join_nulls.test +++ b/parser/testdata/corpus/sql/update/update_join_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_join_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(table_id BIGINT, val BOOLEAN); diff --git a/parser/testdata/corpus/sql/update/update_null_integers.test b/parser/testdata/corpus/sql/update/update_null_integers.test index a1930ae..c8409f1 100644 --- a/parser/testdata/corpus/sql/update/update_null_integers.test +++ b/parser/testdata/corpus/sql/update/update_null_integers.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_null_integers.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t(i int, j int); diff --git a/parser/testdata/corpus/sql/update/update_query_node.test b/parser/testdata/corpus/sql/update/update_query_node.test index 411d0c6..ec34bb1 100644 --- a/parser/testdata/corpus/sql/update/update_query_node.test +++ b/parser/testdata/corpus/sql/update/update_query_node.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_query_node.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit UPDATE t SET a = 10 WHERE a = 1; diff --git a/parser/testdata/corpus/sql/update/update_string_null_merge_dict_fsst.test b/parser/testdata/corpus/sql/update/update_string_null_merge_dict_fsst.test index 2ced80f..e794427 100644 --- a/parser/testdata/corpus/sql/update/update_string_null_merge_dict_fsst.test +++ b/parser/testdata/corpus/sql/update/update_string_null_merge_dict_fsst.test @@ -1,6 +1,6 @@ # source: test/sql/update/update_string_null_merge_dict_fsst.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t as select case when i = 0 or i = 2 then NULL else 'value_' || (i % 50) end s from range(5000) t(i) diff --git a/parser/testdata/corpus/sql/update/update_tuple.test b/parser/testdata/corpus/sql/update/update_tuple.test new file mode 100644 index 0000000..583b405 --- /dev/null +++ b/parser/testdata/corpus/sql/update/update_tuple.test @@ -0,0 +1,53 @@ +# source: test/sql/update/update_tuple.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE t1 (a INT, b INT, c INT, d INT, e VARCHAR); +-- +ok +== +INSERT INTO t1 VALUES (1, 2, 3, 4, 'FIVE') +-- +ok +== +UPDATE t1 + SET (a, b) = (10, 20), + c = 30, + (d, e) = (40, 'SIX') +-- +ok +== +UPDATE t1 SET (a, b) = (1, 2), a = 3 +-- +ok +== +UPDATE t1 SET (a, b) = (1, 2, 3), c = 3 +-- +error: Parser Error: Could not perform assignment, expected 2 values, got 3 +== +CREATE TABLE t2 (k INT PRIMARY KEY, a INT, b INT, c INT); +-- +ok +== +INSERT INTO t2 VALUES (1, 2, 3, 4) +-- +ok +== +INSERT INTO t2 VALUES (1, 20, 30, 40) ON CONFLICT DO UPDATE SET (a, b) = (excluded.a, excluded.b), c = excluded.c + 1 +-- +ok +== +CREATE TABLE src (k INT, a INT, b INT, c INT); +-- +ok +== +INSERT INTO src VALUES (1, 100, 200, 300) +-- +ok +== +MERGE INTO t2 USING src ON t2.k = src.k +WHEN MATCHED THEN UPDATE SET a = src.a, (b, c) = (src.b, src.c) +-- +ok +== diff --git a/parser/testdata/corpus/sql/upsert/concurrent_insert_or_replace.test b/parser/testdata/corpus/sql/upsert/concurrent_insert_or_replace.test index 7f18ba0..e6f02b5 100644 --- a/parser/testdata/corpus/sql/upsert/concurrent_insert_or_replace.test +++ b/parser/testdata/corpus/sql/upsert/concurrent_insert_or_replace.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/concurrent_insert_or_replace.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE SCHEMA IF NOT EXISTS schema__test diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/generated_column.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/generated_column.test new file mode 100644 index 0000000..35882ea --- /dev/null +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/generated_column.test @@ -0,0 +1,21 @@ +# source: test/sql/upsert/insert_or_replace/generated_column.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE tbl ( + g AS (x + 1), + x INTEGER, + y INTEGER UNIQUE +); +-- +ok +== +INSERT INTO tbl VALUES (1, 10); +-- +ok +== +INSERT OR REPLACE INTO tbl (x, y) VALUES (2, 10); +-- +ok +== diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/issue_20952_non_pk_index_column.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/issue_20952_non_pk_index_column.test index 2546c78..4fbb12e 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/issue_20952_non_pk_index_column.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/issue_20952_non_pk_index_column.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/issue_20952_non_pk_index_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table t( diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/pk_and_non_unique_index.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/pk_and_non_unique_index.test index 78c08d6..79c7696 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/pk_and_non_unique_index.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/pk_and_non_unique_index.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/pk_and_non_unique_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl( diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/returning.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/returning.test index 34ada61..09ed576 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/returning.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/returning.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table foo( diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/returning_nothing.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/returning_nothing.test index fb2b5df..537c28d 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/returning_nothing.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/returning_nothing.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/returning_nothing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE bug ( diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_and_non_unique_index.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_and_non_unique_index.test index 48bf5b0..ffb9f88 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_and_non_unique_index.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_and_non_unique_index.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/unique_and_non_unique_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl( diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_constraint.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_constraint.test index 648e367..1fdda93 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_constraint.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_constraint.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/unique_constraint.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl( diff --git a/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_index.test b/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_index.test index 885362d..81f1a33 100644 --- a/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_index.test +++ b/parser/testdata/corpus/sql/upsert/insert_or_replace/unique_index.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/insert_or_replace/unique_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl(a INT, b INT, c INT); diff --git a/parser/testdata/corpus/sql/upsert/minimal_reproducable_example.test b/parser/testdata/corpus/sql/upsert/minimal_reproducable_example.test index 7bce242..2006a46 100644 --- a/parser/testdata/corpus/sql/upsert/minimal_reproducable_example.test +++ b/parser/testdata/corpus/sql/upsert/minimal_reproducable_example.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/minimal_reproducable_example.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl( diff --git a/parser/testdata/corpus/sql/upsert/no_complex_default.test b/parser/testdata/corpus/sql/upsert/no_complex_default.test index 2b672e4..990b262 100644 --- a/parser/testdata/corpus/sql/upsert/no_complex_default.test +++ b/parser/testdata/corpus/sql/upsert/no_complex_default.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/no_complex_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl (a integer default 3); diff --git a/parser/testdata/corpus/sql/upsert/postgres/composite_key.test b/parser/testdata/corpus/sql/upsert/postgres/composite_key.test index 0219ca2..f448f37 100644 --- a/parser/testdata/corpus/sql/upsert/postgres/composite_key.test +++ b/parser/testdata/corpus/sql/upsert/postgres/composite_key.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/postgres/composite_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table insertconflicttest( diff --git a/parser/testdata/corpus/sql/upsert/postgres/non_spurious_duplicate_violation.test b/parser/testdata/corpus/sql/upsert/postgres/non_spurious_duplicate_violation.test index fc51dbb..ffe1e4e 100644 --- a/parser/testdata/corpus/sql/upsert/postgres/non_spurious_duplicate_violation.test +++ b/parser/testdata/corpus/sql/upsert/postgres/non_spurious_duplicate_violation.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/postgres/non_spurious_duplicate_violation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table insertconflicttest( diff --git a/parser/testdata/corpus/sql/upsert/postgres/planner_preprocessing.test b/parser/testdata/corpus/sql/upsert/postgres/planner_preprocessing.test index e132475..7e8b3dc 100644 --- a/parser/testdata/corpus/sql/upsert/postgres/planner_preprocessing.test +++ b/parser/testdata/corpus/sql/upsert/postgres/planner_preprocessing.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/postgres/planner_preprocessing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table cities ( diff --git a/parser/testdata/corpus/sql/upsert/postgres/single_key.test b/parser/testdata/corpus/sql/upsert/postgres/single_key.test index ffd185e..c3f7b83 100644 --- a/parser/testdata/corpus/sql/upsert/postgres/single_key.test +++ b/parser/testdata/corpus/sql/upsert/postgres/single_key.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/postgres/single_key.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table insertconflicttest( diff --git a/parser/testdata/corpus/sql/upsert/test_big_insert.test b/parser/testdata/corpus/sql/upsert/test_big_insert.test index 8c8282f..cddbacb 100644 --- a/parser/testdata/corpus/sql/upsert/test_big_insert.test +++ b/parser/testdata/corpus/sql/upsert/test_big_insert.test @@ -1,12 +1,8 @@ # source: test/sql/upsert/test_big_insert.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit -SET preserve_insertion_order = false; --- -ok -== CREATE TABLE integers( i INT UNIQUE, j INT DEFAULT 0, diff --git a/parser/testdata/corpus/sql/upsert/test_big_insert_no_vector_verification.test b/parser/testdata/corpus/sql/upsert/test_big_insert_no_vector_verification.test index c0e69b4..69347c8 100644 --- a/parser/testdata/corpus/sql/upsert/test_big_insert_no_vector_verification.test +++ b/parser/testdata/corpus/sql/upsert/test_big_insert_no_vector_verification.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/test_big_insert_no_vector_verification.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit INSERT INTO integers(i, j) diff --git a/parser/testdata/corpus/sql/upsert/test_generated_column.test b/parser/testdata/corpus/sql/upsert/test_generated_column.test index 013f6ba..8dfe65b 100644 --- a/parser/testdata/corpus/sql/upsert/test_generated_column.test +++ b/parser/testdata/corpus/sql/upsert/test_generated_column.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/test_generated_column.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 ( diff --git a/parser/testdata/corpus/sql/upsert/test_problematic_conditional_do_update.test b/parser/testdata/corpus/sql/upsert/test_problematic_conditional_do_update.test index def004d..4d50115 100644 --- a/parser/testdata/corpus/sql/upsert/test_problematic_conditional_do_update.test +++ b/parser/testdata/corpus/sql/upsert/test_problematic_conditional_do_update.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/test_problematic_conditional_do_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE users ( @@ -19,6 +19,19 @@ VALUES ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email WHERE EXCLUDED.email != 'filtered_out' +RETURNING id; +-- +ok +== +SELECT count(*), count(*) FILTER (WHERE (username, email) IN ( + ('inner_conflict', 'test'), + ('inner_conflict2', 'other_test'), + ('inner_conflict3', 'filtered_out') +)) FROM users +-- +ok +== +UPDATE users SET username = 'existing_user', email = 'test' -- ok == @@ -31,7 +44,42 @@ VALUES ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email WHERE email != 'other_test' OR EXCLUDED.email == 'dont_skip_me' +RETURNING id, username; +-- +ok +== +SELECT count(*), count(*) FILTER (WHERE username = 'existing_user' AND email IN + ('test', 'other_test', 'yet_another_test', 'dont_skip_me')) FROM users +-- +ok +== +UPDATE users SET email = 'other_test' +-- +ok +== +INSERT INTO users VALUES + (3, 'unused_username', 'yet_another_test'), + (3, 'unused_username', 'yet_another_test') +ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email +WHERE email != 'other_test' OR EXCLUDED.email = 'dont_skip_me' +RETURNING *; +-- +ok +== +SELECT * FROM users +-- +ok +== +INSERT INTO users VALUES + (3, 'unused_username', 'dont_skip_me'), + (3, 'unused_username', 'dont_skip_me') +ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email +WHERE email != 'other_test' OR EXCLUDED.email = 'dont_skip_me' RETURNING *; -- ok == +DROP TABLE users +-- +ok +== diff --git a/parser/testdata/corpus/sql/upsert/upsert_aliased.test b/parser/testdata/corpus/sql/upsert/upsert_aliased.test index b6a9b45..d64d519 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_aliased.test +++ b/parser/testdata/corpus/sql/upsert/upsert_aliased.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_aliased.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_basic.test b/parser/testdata/corpus/sql/upsert/upsert_basic.test index 925fbb3..9524ee3 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_basic.test +++ b/parser/testdata/corpus/sql/upsert/upsert_basic.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_basic.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl( diff --git a/parser/testdata/corpus/sql/upsert/upsert_conflict_target.test b/parser/testdata/corpus/sql/upsert/upsert_conflict_target.test index 6428c4a..51b849d 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_conflict_target.test +++ b/parser/testdata/corpus/sql/upsert/upsert_conflict_target.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_conflict_target.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE tbl (a INT, b INT, c INT, PRIMARY KEY (a, b)); diff --git a/parser/testdata/corpus/sql/upsert/upsert_conflict_target_index.test b/parser/testdata/corpus/sql/upsert/upsert_conflict_target_index.test index 309feca..1bfff58 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_conflict_target_index.test +++ b/parser/testdata/corpus/sql/upsert/upsert_conflict_target_index.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_conflict_target_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table index_tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_coverage.test b/parser/testdata/corpus/sql/upsert/upsert_coverage.test index e35459a..4f27095 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_coverage.test +++ b/parser/testdata/corpus/sql/upsert/upsert_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (a INT, b INT UNIQUE, c INT UNIQUE, d INT UNIQUE); diff --git a/parser/testdata/corpus/sql/upsert/upsert_default.test b/parser/testdata/corpus/sql/upsert/upsert_default.test index fd2ef62..7a968eb 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_default.test +++ b/parser/testdata/corpus/sql/upsert/upsert_default.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_default.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_default_expressions.test b/parser/testdata/corpus/sql/upsert/upsert_default_expressions.test index 1675a69..444a85f 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_default_expressions.test +++ b/parser/testdata/corpus/sql/upsert/upsert_default_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_default_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_default_value_causes_conflict.test b/parser/testdata/corpus/sql/upsert/upsert_default_value_causes_conflict.test index 455d033..1979d18 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_default_value_causes_conflict.test +++ b/parser/testdata/corpus/sql/upsert/upsert_default_value_causes_conflict.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_default_value_causes_conflict.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_default_values.test b/parser/testdata/corpus/sql/upsert/upsert_default_values.test index b515437..3650f1b 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_default_values.test +++ b/parser/testdata/corpus/sql/upsert/upsert_default_values.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_default_values.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_distinct_bug.test b/parser/testdata/corpus/sql/upsert/upsert_distinct_bug.test index 92189bb..c0d9c6c 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_distinct_bug.test +++ b/parser/testdata/corpus/sql/upsert/upsert_distinct_bug.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_distinct_bug.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test_table_raw(id VARCHAR, name VARCHAR); diff --git a/parser/testdata/corpus/sql/upsert/upsert_duplicates_issue.test b/parser/testdata/corpus/sql/upsert/upsert_duplicates_issue.test index c0c78d1..06c673a 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_duplicates_issue.test +++ b/parser/testdata/corpus/sql/upsert/upsert_duplicates_issue.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_duplicates_issue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tmp_edges(from_v VARCHAR, to_v VARCHAR, PRIMARY KEY(from_v, to_v)); diff --git a/parser/testdata/corpus/sql/upsert/upsert_excluded_references.test b/parser/testdata/corpus/sql/upsert/upsert_excluded_references.test index f603809..86112da 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_excluded_references.test +++ b/parser/testdata/corpus/sql/upsert/upsert_excluded_references.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_excluded_references.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_explicit_index.test b/parser/testdata/corpus/sql/upsert/upsert_explicit_index.test index 7166a00..d324c79 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_explicit_index.test +++ b/parser/testdata/corpus/sql/upsert/upsert_explicit_index.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_explicit_index.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl (i INT, j INT); diff --git a/parser/testdata/corpus/sql/upsert/upsert_global_mixed_conflicts.test b/parser/testdata/corpus/sql/upsert/upsert_global_mixed_conflicts.test index 40135c0..b2713f9 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_global_mixed_conflicts.test +++ b/parser/testdata/corpus/sql/upsert/upsert_global_mixed_conflicts.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_global_mixed_conflicts.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_inner_conflict_do_nothing.test b/parser/testdata/corpus/sql/upsert/upsert_inner_conflict_do_nothing.test index f0fc93f..cd3bd5f 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_inner_conflict_do_nothing.test +++ b/parser/testdata/corpus/sql/upsert/upsert_inner_conflict_do_nothing.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_inner_conflict_do_nothing.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl( diff --git a/parser/testdata/corpus/sql/upsert/upsert_lambda.test b/parser/testdata/corpus/sql/upsert/upsert_lambda.test index afa7a44..11ffaa6 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_lambda.test +++ b/parser/testdata/corpus/sql/upsert/upsert_lambda.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_lambda.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE foo ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_local_no_tuples.test b/parser/testdata/corpus/sql/upsert/upsert_local_no_tuples.test index 594adfd..53355ae 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_local_no_tuples.test +++ b/parser/testdata/corpus/sql/upsert/upsert_local_no_tuples.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_local_no_tuples.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_multiple_constraints.test b/parser/testdata/corpus/sql/upsert/upsert_multiple_constraints.test index ff88585..da1cdd3 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_multiple_constraints.test +++ b/parser/testdata/corpus/sql/upsert/upsert_multiple_constraints.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_multiple_constraints.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE IF NOT EXISTS tbl (id INTEGER PRIMARY KEY, uniq INTEGER, UNIQUE(uniq)); diff --git a/parser/testdata/corpus/sql/upsert/upsert_order_coverage.test b/parser/testdata/corpus/sql/upsert/upsert_order_coverage.test index b7a8fb0..d55eb74 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_order_coverage.test +++ b/parser/testdata/corpus/sql/upsert/upsert_order_coverage.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_order_coverage.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl( diff --git a/parser/testdata/corpus/sql/upsert/upsert_partial_update.test b/parser/testdata/corpus/sql/upsert/upsert_partial_update.test index b494630..79d1179 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_partial_update.test +++ b/parser/testdata/corpus/sql/upsert/upsert_partial_update.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_partial_update.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl (a integer primary key, b integer); diff --git a/parser/testdata/corpus/sql/upsert/upsert_returning.test b/parser/testdata/corpus/sql/upsert/upsert_returning.test index 2f78603..6437c03 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_returning.test +++ b/parser/testdata/corpus/sql/upsert/upsert_returning.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_returning.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE users ( @@ -44,11 +44,11 @@ VALUES (4, 'a', ''), (5, 'b', ''), (6, 'c', ''), - (3, 'inner_conflict2', 'other_test'), + (3, 'inner_conflict', 'test'), (7, 'd', ''), (8, 'e', ''), (9, 'f', ''), - (3, 'inner_conflict3', 'yet_another_test') + (3, 'inner_conflict', 'test') ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email WHERE EXCLUDED.email != 'test' @@ -56,3 +56,25 @@ RETURNING *; -- ok == +INSERT INTO users VALUES + (3, 'unused_username', 'updated'), + (3, 'unused_username', 'updated') +ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email +WHERE EXCLUDED.email != 'test' +RETURNING *; +-- +ok +== +INSERT INTO users VALUES + (3, 'unused_username', 'test'), + (3, 'unused_username', 'test') +ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email +WHERE EXCLUDED.email != 'test' +RETURNING *; +-- +ok +== +SELECT * FROM users ORDER BY id +-- +ok +== diff --git a/parser/testdata/corpus/sql/upsert/upsert_set_expressions.test b/parser/testdata/corpus/sql/upsert/upsert_set_expressions.test index 1bcf65c..c8c9cde 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_set_expressions.test +++ b/parser/testdata/corpus/sql/upsert/upsert_set_expressions.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_set_expressions.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit insert into tbl VALUES diff --git a/parser/testdata/corpus/sql/upsert/upsert_shorthand.test b/parser/testdata/corpus/sql/upsert/upsert_shorthand.test index 1eb6165..6a4a897 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_shorthand.test +++ b/parser/testdata/corpus/sql/upsert/upsert_shorthand.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_shorthand.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tbl (a integer, b integer unique); diff --git a/parser/testdata/corpus/sql/upsert/upsert_transaction.test b/parser/testdata/corpus/sql/upsert/upsert_transaction.test index 6961dff..ae003b6 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_transaction.test +++ b/parser/testdata/corpus/sql/upsert/upsert_transaction.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_transaction.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl ( diff --git a/parser/testdata/corpus/sql/upsert/upsert_unique_null.test b/parser/testdata/corpus/sql/upsert/upsert_unique_null.test index e8c2ec9..bd08e1c 100644 --- a/parser/testdata/corpus/sql/upsert/upsert_unique_null.test +++ b/parser/testdata/corpus/sql/upsert/upsert_unique_null.test @@ -1,6 +1,6 @@ # source: test/sql/upsert/upsert_unique_null.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create or replace table tbl ( diff --git a/parser/testdata/corpus/sql/vacuum/test_analyze.test b/parser/testdata/corpus/sql/vacuum/test_analyze.test index 4f45aa3..5884e2d 100644 --- a/parser/testdata/corpus/sql/vacuum/test_analyze.test +++ b/parser/testdata/corpus/sql/vacuum/test_analyze.test @@ -1,6 +1,6 @@ # source: test/sql/vacuum/test_analyze.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit ANALYZE; diff --git a/parser/testdata/corpus/sql/vacuum/vacuum_nested_types.test b/parser/testdata/corpus/sql/vacuum/vacuum_nested_types.test index 65930de..81f24a4 100644 --- a/parser/testdata/corpus/sql/vacuum/vacuum_nested_types.test +++ b/parser/testdata/corpus/sql/vacuum/vacuum_nested_types.test @@ -1,6 +1,6 @@ # source: test/sql/vacuum/vacuum_nested_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE test (x INT[], y AS (x || [100])); diff --git a/parser/testdata/corpus/sql/variables/test_variable_syntax.test b/parser/testdata/corpus/sql/variables/test_variable_syntax.test index c71ac04..346da92 100644 --- a/parser/testdata/corpus/sql/variables/test_variable_syntax.test +++ b/parser/testdata/corpus/sql/variables/test_variable_syntax.test @@ -1,6 +1,6 @@ # source: test/sql/variables/test_variable_syntax.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SET VARIABLE animal = 'duck' diff --git a/parser/testdata/corpus/sql/variables/test_variables.test b/parser/testdata/corpus/sql/variables/test_variables.test index a2451ec..bf55e0d 100644 --- a/parser/testdata/corpus/sql/variables/test_variables.test +++ b/parser/testdata/corpus/sql/variables/test_variables.test @@ -1,6 +1,6 @@ # source: test/sql/variables/test_variables.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT GETVARIABLE('animal') diff --git a/parser/testdata/corpus/sql/variant/variant_comparator.test b/parser/testdata/corpus/sql/variant/variant_comparator.test index 5020296..30e70fb 100644 --- a/parser/testdata/corpus/sql/variant/variant_comparator.test +++ b/parser/testdata/corpus/sql/variant/variant_comparator.test @@ -1,6 +1,6 @@ # source: test/sql/variant/variant_comparator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT v::INT FROM (VALUES (-123), (5), (-1), (100), (0)) t(v) diff --git a/parser/testdata/corpus/sql/variant/variant_nested_arrays.test b/parser/testdata/corpus/sql/variant/variant_nested_arrays.test new file mode 100644 index 0000000..2aa2f99 --- /dev/null +++ b/parser/testdata/corpus/sql/variant/variant_nested_arrays.test @@ -0,0 +1,23 @@ +# source: test/sql/variant/variant_nested_arrays.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT variant_to_parquet_variant( +variant_bytes_to_variant(X'1100000301001903010015030100110301000d03010009030100050301000100') +) IS NOT NULL +-- +ok +== +SELECT variant_to_parquet_variant( +variant_bytes_to_variant(X'1100000301001d0301001903010015030100110301000d03010009030100050301000100') +) IS NOT NULL +-- +ok +== +SELECT variant_to_parquet_variant( +variant_bytes_to_variant(X'110000030100210301001d0301001903010015030100110301000d03010009030100050301000100') +) IS NOT NULL +-- +ok +== diff --git a/parser/testdata/corpus/sql/vector_types/list_vector_types.test b/parser/testdata/corpus/sql/vector_types/list_vector_types.test index af0a5be..7a3e75c 100644 --- a/parser/testdata/corpus/sql/vector_types/list_vector_types.test +++ b/parser/testdata/corpus/sql/vector_types/list_vector_types.test @@ -1,6 +1,6 @@ # source: test/sql/vector_types/list_vector_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT * FROM test_vector_types(NULL::INT[], all_flat={all_flat}); diff --git a/parser/testdata/corpus/sql/vector_types/vector_types_errors.test b/parser/testdata/corpus/sql/vector_types/vector_types_errors.test index ad96d83..fea6208 100644 --- a/parser/testdata/corpus/sql/vector_types/vector_types_errors.test +++ b/parser/testdata/corpus/sql/vector_types/vector_types_errors.test @@ -1,6 +1,6 @@ # source: test/sql/vector_types/vector_types_errors.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit FROM test_vector_types(NULL::VARIANT); diff --git a/parser/testdata/corpus/sql/window/parallel_collection_combine.test b/parser/testdata/corpus/sql/window/parallel_collection_combine.test new file mode 100644 index 0000000..8df5fd9 --- /dev/null +++ b/parser/testdata/corpus/sql/window/parallel_collection_combine.test @@ -0,0 +1,40 @@ +# source: test/sql/window/parallel_collection_combine.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE collection_input AS +SELECT i, CASE WHEN i % 4 = 0 THEN i END AS v, + CASE WHEN i % 4 = 0 THEN i::VARCHAR END AS s, + NULL::BIGINT AS null_v +FROM range(65536) t(i); +-- +ok +== +SELECT count(*), count(*) FILTER ( + WHERE last_v IS DISTINCT FROM i - i % 4 + OR last_s IS DISTINCT FROM (i - i % 4)::VARCHAR + OR first_i IS DISTINCT FROM 0 + OR last_null IS NOT NULL + OR n IS DISTINCT FROM i + 1 +) +FROM ( + SELECT i, + last_value(v IGNORE NULLS) OVER w AS last_v, + last_value(s IGNORE NULLS) OVER w AS last_s, + first_value(i) OVER w AS first_i, + last_value(null_v IGNORE NULLS) OVER w AS last_null, + count(*) OVER w AS n + FROM collection_input + WINDOW w AS (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) +) t; +-- +ok +== +SELECT count(*) FROM ( + SELECT i, count(*) OVER (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS n + FROM collection_input +) t WHERE n IS DISTINCT FROM i + 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/segment_tree_leaf_batches.test b/parser/testdata/corpus/sql/window/segment_tree_leaf_batches.test new file mode 100644 index 0000000..f76187c --- /dev/null +++ b/parser/testdata/corpus/sql/window/segment_tree_leaf_batches.test @@ -0,0 +1,56 @@ +# source: test/sql/window/segment_tree_leaf_batches.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE MACRO triangular(n) AS n * (n + 1) // 2 +-- +ok +== +CREATE MACRO filtered_prefix(n) AS triangular(n) - 3 * triangular(n // 3) - 7 * triangular(n // 7) + 21 * triangular(n // 21) +-- +ok +== +SELECT count(*) FROM ( + SELECT i, sum(i) OVER (ORDER BY i ROWS BETWEEN 17 PRECEDING AND 33 FOLLOWING) AS actual + FROM range({count}) t(i) +) t +WHERE actual IS DISTINCT FROM triangular(least(i + 33, {count} - 1)) - triangular(greatest(i - 17, 0) - 1) +-- +error: Parser Error: syntax error at or near "}" +== +WITH input AS ( + SELECT i // 2053 AS p, i % 2053 AS j, + CASE WHEN i % 2053 % 7 <> 0 THEN i % 2053 END AS v + FROM range(131392) t(i) +), windowed AS ( + SELECT *, sum(v) FILTER (WHERE j % 3 <> 0) OVER ( + PARTITION BY p ORDER BY j ROWS BETWEEN 35 PRECEDING AND 17 FOLLOWING EXCLUDE CURRENT ROW + ) AS actual + FROM input +) +SELECT count(*) FROM windowed +WHERE coalesce(actual, 0) <> filtered_prefix(least(j + 17, 2052)) - filtered_prefix(greatest(j - 35, 0) - 1) + - CASE WHEN j % 3 <> 0 AND j % 7 <> 0 THEN j ELSE 0 END +-- +ok +== +SELECT count(*) FROM ( + SELECT i, min(i, (i // 2053) % 3 + 1) OVER (PARTITION BY i // 2053 ORDER BY i) AS actual + FROM range(131392) t(i) +) t +WHERE actual IS DISTINCT FROM list_transform(range(least((i // 2053) % 3 + 1, i % 2053 + 1)), lambda x: (i // 2053) * 2053 + x) +-- +ok +== +SELECT count(*) FROM ( + SELECT i, string_agg(lpad(i::VARCHAR, 20, '0'), '|') OVER ( + ORDER BY i ROWS BETWEEN 17 PRECEDING AND 33 FOLLOWING + ) AS actual + FROM range(8195) t(i) +) t +WHERE actual IS DISTINCT FROM array_to_string(list_transform( + range(greatest(i - 17, 0), least(i + 33, 8194) + 1), lambda x: lpad(x::VARCHAR, 20, '0')), '|') +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_basic_window.test b/parser/testdata/corpus/sql/window/test_basic_window.test index 5f389fe..d1919f8 100644 --- a/parser/testdata/corpus/sql/window/test_basic_window.test +++ b/parser/testdata/corpus/sql/window/test_basic_window.test @@ -1,8 +1,16 @@ # source: test/sql/window/test_basic_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit +SELECT x, MAX(x) OVER none FROM (VALUES (1)) t(x); +-- +error: Parser Error: window "none" does not exist +== +SELECT x, MAX(x) OVER "has""quote" FROM (VALUES (1)) t(x); +-- +error: Parser Error: window "has""quote" does not exist +== CREATE TABLE empsalary (depname varchar, empno bigint, salary int, enroll_date date) -- ok diff --git a/parser/testdata/corpus/sql/window/test_boundary_expr.test b/parser/testdata/corpus/sql/window/test_boundary_expr.test index 4bc2612..ffb972a 100644 --- a/parser/testdata/corpus/sql/window/test_boundary_expr.test +++ b/parser/testdata/corpus/sql/window/test_boundary_expr.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_boundary_expr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tenk1 ( unique1 int4, unique2 int4, two int4, four int4, ten int4, twenty int4, hundred int4, thousand int4, twothousand int4, fivethous int4, tenthous int4, odd int4, even int4, stringu1 string, stringu2 string, string4 string ) @@ -117,3 +117,47 @@ FROM (VALUES (1, NULL::INTEGER)) AS src(id, off); -- ok == +SELECT + i, + count(*) OVER ( + ORDER BY i + ROWS BETWEEN 9223372036854775807 FOLLOWING + AND 9223372036854775807 FOLLOWING + ) AS cnt, + list(i) OVER ( + ORDER BY i + ROWS BETWEEN 9223372036854775807 FOLLOWING + AND 9223372036854775807 FOLLOWING + ) AS members +FROM range(3) t(i); +-- +ok +== +SELECT COUNT(*) OVER ( + ORDER BY id ROWS BETWEEN off PRECEDING AND CURRENT ROW +) +FROM (VALUES (1, -1)) AS src(id, off); +-- +ok +== +SELECT COUNT(*) OVER ( + ORDER BY id ROWS BETWEEN off FOLLOWING AND UNBOUNDED FOLLOWING +) +FROM (VALUES (1, -1)) AS src(id, off); +-- +ok +== +SELECT COUNT(*) OVER ( + ORDER BY id ROWS BETWEEN UNBOUNDED PRECEDING AND off PRECEDING +) +FROM (VALUES (1, -1)) AS src(id, off); +-- +ok +== +SELECT COUNT(*) OVER ( + ORDER BY id ROWS BETWEEN CURRENT ROW AND off FOLLOWING +) +FROM (VALUES (1, -1)) AS src(id, off); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_constant_orderby.test b/parser/testdata/corpus/sql/window/test_constant_orderby.test index 84dab5b..f2dd44f 100644 --- a/parser/testdata/corpus/sql/window/test_constant_orderby.test +++ b/parser/testdata/corpus/sql/window/test_constant_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_constant_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/window/test_cume_dist_orderby.test b/parser/testdata/corpus/sql/window/test_cume_dist_orderby.test index 3999a01..b4cbf40 100644 --- a/parser/testdata/corpus/sql/window/test_cume_dist_orderby.test +++ b/parser/testdata/corpus/sql/window/test_cume_dist_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_cume_dist_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/window/test_dense_rank.test b/parser/testdata/corpus/sql/window/test_dense_rank.test index 6f6e750..8c5dd77 100644 --- a/parser/testdata/corpus/sql/window/test_dense_rank.test +++ b/parser/testdata/corpus/sql/window/test_dense_rank.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_dense_rank.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t AS ( diff --git a/parser/testdata/corpus/sql/window/test_duplicate_partition.test b/parser/testdata/corpus/sql/window/test_duplicate_partition.test index 899fadf..186120b 100644 --- a/parser/testdata/corpus/sql/window/test_duplicate_partition.test +++ b/parser/testdata/corpus/sql/window/test_duplicate_partition.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_duplicate_partition.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE src(a INTEGER, b INTEGER, v INTEGER); @@ -27,6 +27,40 @@ ORDER BY b; -- ok == +SELECT + SUM(v) OVER (PARTITION BY a, a), + MAX(v) OVER (PARTITION BY a) +FROM src +ORDER BY b; +-- +ok +== +SELECT + MAX(v) OVER (PARTITION BY a), + SUM(v) OVER (PARTITION BY a, a) +FROM src +ORDER BY b; +-- +ok +== +SELECT + SUM(v) OVER (PARTITION BY a, a ORDER BY b, v), + SUM(v) OVER (PARTITION BY a ORDER BY b), + MAX(v) OVER (PARTITION BY a) +FROM src +ORDER BY b; +-- +ok +== +SELECT + SUM(v) OVER (PARTITION BY a, a ORDER BY b), + SUM(v) OVER (PARTITION BY a ORDER BY b, v), + MAX(v) OVER (PARTITION BY a, a, a) +FROM src +ORDER BY b; +-- +ok +== SELECT SUM(v) OVER (PARTITION BY a, a) AS w_aa, SUM(v) OVER (PARTITION BY a) AS w_a diff --git a/parser/testdata/corpus/sql/window/test_empty_frames.test b/parser/testdata/corpus/sql/window/test_empty_frames.test index 358ff5c..e38bd35 100644 --- a/parser/testdata/corpus/sql/window/test_empty_frames.test +++ b/parser/testdata/corpus/sql/window/test_empty_frames.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_empty_frames.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t1 (id INTEGER, ch CHAR(1)) ; @@ -25,7 +25,7 @@ ORDER BY 1; -- error: Parser Error: syntax error at or near "}" == -SELECT {agg} OVER (ROWS BETWEEN 1 FOLLOWING AND 1 PRECEDING) AS actual +SELECT {agg} OVER (ROWS BETWEEN 1 PRECEDING AND 2 PRECEDING) AS actual FROM range(1); -- error: Parser Error: syntax error at or near "}" @@ -36,7 +36,7 @@ ORDER BY 1; -- ok == -SELECT {agg} OVER (ROWS BETWEEN 1 FOLLOWING AND 1 PRECEDING EXCLUDE TIES) AS actual +SELECT {agg} OVER (ROWS BETWEEN 1 PRECEDING AND 2 PRECEDING EXCLUDE TIES) AS actual FROM range(1); -- error: Parser Error: syntax error at or near "}" @@ -71,19 +71,19 @@ ORDER BY 1; -- ok == -SELECT id, {func}(ORDER BY id) OVER (ORDER BY ch ROWS BETWEEN 1 FOLLOWING AND CURRENT ROW) +SELECT id, {func}(ORDER BY id) OVER (ORDER BY ch ROWS BETWEEN 1 PRECEDING AND 2 PRECEDING) FROM t1 ORDER BY 1; -- error: Parser Error: syntax error at or near "}" == -SELECT id, ntile(2 ORDER BY id) OVER (ORDER BY ch ROWS BETWEEN 1 FOLLOWING AND CURRENT ROW) +SELECT id, ntile(2 ORDER BY id) OVER (ORDER BY ch ROWS BETWEEN 1 PRECEDING AND 2 PRECEDING) FROM t1 ORDER BY 1; -- ok == -SELECT id, rank(ORDER BY id) OVER (ORDER BY ch ROWS BETWEEN 1 FOLLOWING AND CURRENT ROW) +SELECT id, rank(ORDER BY id) OVER (ORDER BY ch ROWS BETWEEN 1 PRECEDING AND 2 PRECEDING) FROM t1 ORDER BY 1; -- diff --git a/parser/testdata/corpus/sql/window/test_evil_window.test b/parser/testdata/corpus/sql/window/test_evil_window.test index 857a01f..057c1d3 100644 --- a/parser/testdata/corpus/sql/window/test_evil_window.test +++ b/parser/testdata/corpus/sql/window/test_evil_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_evil_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select * diff --git a/parser/testdata/corpus/sql/window/test_fill_orderby.test b/parser/testdata/corpus/sql/window/test_fill_orderby.test index 9b06a5f..31f1e9f 100644 --- a/parser/testdata/corpus/sql/window/test_fill_orderby.test +++ b/parser/testdata/corpus/sql/window/test_fill_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_fill_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select fill(i order by 10-i, i * i) over (order by i) from range(3) tbl(i); @@ -255,3 +255,23 @@ ORDER BY x; -- ok == +SELECT x, y, fill(y ORDER BY x) OVER () AS filled +FROM (VALUES + (1::BIGINT, 19::BIGINT), + (2::BIGINT, 5::BIGINT), + (3::BIGINT, NULL)) t(x, y) +ORDER BY x; +-- +ok +== +SELECT x, + -fill(y ORDER BY x) OVER () AS neg_fill, + fill(-y ORDER BY x) OVER () AS fill_neg +FROM (VALUES + (1::BIGINT, 19::BIGINT), + (2::BIGINT, 5::BIGINT), + (3::BIGINT, NULL)) t(x, y) +ORDER BY x; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_fill_physical_types.test b/parser/testdata/corpus/sql/window/test_fill_physical_types.test new file mode 100644 index 0000000..19b1168 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_fill_physical_types.test @@ -0,0 +1,45 @@ +# source: test/sql/window/test_fill_physical_types.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT i, fill(CASE WHEN i = 1 THEN NULL ELSE i END::{type}) OVER (ORDER BY i::{type}) AS filled +FROM range(3) r(i) +QUALIFY i IS DISTINCT FROM filled; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT i, fill(CASE WHEN i = 0 THEN NULL ELSE i END::{type}) OVER (ORDER BY i::{type}) AS filled +FROM range(3) r(i) +QUALIFY i IS DISTINCT FROM filled; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT i, fill(CASE WHEN i = 2 THEN NULL ELSE i END) OVER (ORDER BY CASE WHEN i < 4 THEN NULL ELSE i END) AS filled +FROM range(8) r(i) +QUALIFY i IS DISTINCT FROM filled +ORDER BY i; +-- +ok +== +SELECT i, fill(CASE WHEN i < 4 THEN NULL ELSE i END) OVER (PARTITION BY i // 2 ORDER BY i) AS filled +FROM range(8) r(i) +QUALIFY i IS DISTINCT FROM filled +ORDER BY i; +-- +ok +== +SELECT i, fill(value) OVER (ORDER BY i) AS filled +FROM (VALUES (0, NULL::INTEGER), (1, 1), (2, NULL::INTEGER)) t(i, value) +ORDER BY i; +-- +ok +== +SELECT count(*) FILTER (WHERE filled IS NULL) +FROM ( + SELECT fill(CASE WHEN i = 2 THEN NULL ELSE i END) OVER (ORDER BY i) AS filled + FROM (SELECT i::DOUBLE AS i FROM range(5) r(i) UNION ALL SELECT 'infinity'::DOUBLE) t +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_fill_prefix_order.test b/parser/testdata/corpus/sql/window/test_fill_prefix_order.test new file mode 100644 index 0000000..5419103 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_fill_prefix_order.test @@ -0,0 +1,13 @@ +# source: test/sql/window/test_fill_prefix_order.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT k, fill(v ORDER BY k) OVER (ORDER BY k, i) FROM (VALUES (0, 1, 1), (1, 2, NULL), (2, 3, 3)) t(k, i, v) ORDER BY k; +-- +ok +== +SELECT k, fill(v ORDER BY k) OVER (PARTITION BY g ORDER BY k, i) FROM (VALUES (0, 1, 1, 0), (1, 2, NULL, 0), (2, 3, 5, 0), (0, 1, 10, 1), (1, 1, NULL, 1), (2, 1, 30, 1)) t(k, i, v, g) ORDER BY g, k; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_ignore_nulls.test b/parser/testdata/corpus/sql/window/test_ignore_nulls.test index 856f370..b7eff05 100644 --- a/parser/testdata/corpus/sql/window/test_ignore_nulls.test +++ b/parser/testdata/corpus/sql/window/test_ignore_nulls.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_ignore_nulls.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE issue2549 AS SELECT * FROM (VALUES diff --git a/parser/testdata/corpus/sql/window/test_invalid_window.test b/parser/testdata/corpus/sql/window/test_invalid_window.test index 8af492f..8ef7a71 100644 --- a/parser/testdata/corpus/sql/window/test_invalid_window.test +++ b/parser/testdata/corpus/sql/window/test_invalid_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_invalid_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT depname, min(salary) OVER (PARTITION BY depname ORDER BY salary, empno) m1 FROM empsalary GROUP BY m1 ORDER BY depname, empno @@ -15,6 +15,21 @@ select row_number() over (range between unbounded preceding and unbounded preced -- error: Parser Error: Frame end cannot be UNBOUNDED PRECEDING == +SELECT sum(a) OVER (ORDER BY a {framing} BETWEEN CURRENT ROW AND 1 PRECEDING) +FROM (VALUES (1), (2)) t(a); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT sum(a) OVER (ORDER BY a {framing} BETWEEN 1 FOLLOWING AND CURRENT ROW) +FROM (VALUES (1), (2)) t(a); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT sum(a) OVER (ORDER BY a {framing} BETWEEN 1 FOLLOWING AND 1 PRECEDING) +FROM (VALUES (1), (2)) t(a); +-- +error: Parser Error: syntax error at or near "{" +== select LIST(salary ORDER BY enroll_date, salary) OVER (PARTITION BY depname) FROM empsalary ORDER BY ALL DESC -- diff --git a/parser/testdata/corpus/sql/window/test_last_ignore_nulls_large_partition.test b/parser/testdata/corpus/sql/window/test_last_ignore_nulls_large_partition.test new file mode 100644 index 0000000..dc4614d --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_last_ignore_nulls_large_partition.test @@ -0,0 +1,32 @@ +# source: test/sql/window/test_last_ignore_nulls_large_partition.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(x), count(*) FILTER (x IS DISTINCT FROM m) FROM ( + SELECT last(CASE WHEN i != 3 THEN i END ORDER BY i IGNORE NULLS) + OVER (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) x, + max(CASE WHEN i != 3 THEN i END) + OVER (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) m + FROM range(1, 33000) t(i)); +-- +ok +== +SELECT count(x), count(*) FILTER (x IS DISTINCT FROM m) FROM ( + SELECT last(CASE WHEN i % 1000 != 3 THEN i END ORDER BY i DESC IGNORE NULLS) + OVER (PARTITION BY i % 2 ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) x, + min(CASE WHEN i % 1000 != 3 THEN i END) + OVER (PARTITION BY i % 2 ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) m + FROM range(1, 100000) t(i)); +-- +ok +== +SELECT count(x), count(*) FILTER (x IS DISTINCT FROM m) FROM ( + SELECT last(CASE WHEN i % 7 = 0 AND i > 500 THEN i END ORDER BY i IGNORE NULLS) + OVER (ORDER BY i ROWS BETWEEN 2000 PRECEDING AND CURRENT ROW) x, + max(CASE WHEN i % 7 = 0 AND i > 500 THEN i END) + OVER (ORDER BY i ROWS BETWEEN 2000 PRECEDING AND CURRENT ROW) m + FROM range(1, 200000) t(i)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_lead_lag.test b/parser/testdata/corpus/sql/window/test_lead_lag.test index 88b77ab..82405a8 100644 --- a/parser/testdata/corpus/sql/window/test_lead_lag.test +++ b/parser/testdata/corpus/sql/window/test_lead_lag.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_lead_lag.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select c1, lead(c1, 2) over (order by c0 rows between 2 preceding and 4 preceding) as b diff --git a/parser/testdata/corpus/sql/window/test_lead_lag_offset_overflow.test b/parser/testdata/corpus/sql/window/test_lead_lag_offset_overflow.test new file mode 100644 index 0000000..0c4dcfe --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_lead_lag_offset_overflow.test @@ -0,0 +1,25 @@ +# source: test/sql/window/test_lead_lag_offset_overflow.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(*) = {rows}, count(l) FROM (SELECT {fun}(i, ({offset})::BIGINT) OVER () AS l FROM range({rows}) t(i)) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FILTER (l = -1) = {rows} FROM (SELECT {fun}(i, ({offset})::BIGINT, -1) OVER () AS l FROM range({rows}) t(i)) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FILTER (l = -1) = {rows} FROM (SELECT {fun}(i, ({offset})::BIGINT, -1) OVER (PARTITION BY i % 3) AS l FROM range({rows}) t(i)) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FILTER (l = -1) = {rows} FROM (SELECT {fun}(i, ({offset})::BIGINT, -1 ORDER BY i DESC) OVER () AS l FROM range({rows}) t(i)) +-- +error: Parser Error: syntax error at or near "}" +== +SELECT count(*) FILTER (l = -1) = {rows} FROM (SELECT {fun}(i, o, -1) OVER () AS l FROM (SELECT i, ({offset})::BIGINT + 0 * i AS o FROM range({rows}) t(i))) +-- +error: Parser Error: syntax error at or near "}" +== diff --git a/parser/testdata/corpus/sql/window/test_leadlag_orderby.test b/parser/testdata/corpus/sql/window/test_leadlag_orderby.test index 620a2f3..5f244fc 100644 --- a/parser/testdata/corpus/sql/window/test_leadlag_orderby.test +++ b/parser/testdata/corpus/sql/window/test_leadlag_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_leadlag_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT @@ -62,3 +62,66 @@ ORDER BY c1; -- ok == +CREATE TABLE issue25699(id INTEGER, x VARCHAR); +-- +ok +== +INSERT INTO issue25699 VALUES (1, 'b'), (2, 'a'); +-- +ok +== +SELECT + id, + x, + LEAD(x ORDER BY x DESC, id DESC) OVER w, + LEAD(x ORDER BY x DESC, id ASC) OVER w +FROM issue25699 +WINDOW w AS (ORDER BY x DESC, id ASC ROWS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING) +ORDER BY id; +-- +ok +== +CREATE TABLE leadlag_frames(id INTEGER, x VARCHAR); +-- +ok +== +INSERT INTO leadlag_frames VALUES (1, 'e'), (2, 'd'), (3, 'c'), (4, 'b'), (5, 'a'); +-- +ok +== +SELECT + id, + LEAD(x ORDER BY x DESC, id ASC, id ASC) OVER w1, + LEAD(x, 2 ORDER BY x DESC, id ASC, id ASC) OVER w1, + LEAD(x, 0 ORDER BY x DESC, id ASC, id ASC) OVER w1, + LAG(x ORDER BY x DESC, id ASC, id ASC) OVER w1, + LEAD(x ORDER BY x DESC, id ASC, id ASC) OVER w2, + LAG(x ORDER BY x DESC, id ASC, id ASC) OVER w2, + LEAD(x ORDER BY x DESC, id ASC, id ASC) OVER w3, + LAG(x, 2 ORDER BY x DESC, id ASC, id ASC) OVER w3 +FROM leadlag_frames +WINDOW w1 AS (ORDER BY x DESC, id ASC ROWS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING), + w2 AS (ORDER BY x DESC, id ASC ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING), + w3 AS (ORDER BY x DESC, id ASC ROWS BETWEEN 2 FOLLOWING AND 4 FOLLOWING) +ORDER BY id; +-- +ok +== +SELECT + id, + LEAD(x ORDER BY x DESC, id ASC) OVER w1, + LEAD(x, 2 ORDER BY x DESC, id ASC) OVER w1, + LEAD(x, 0 ORDER BY x DESC, id ASC) OVER w1, + LAG(x ORDER BY x DESC, id ASC) OVER w1, + LEAD(x ORDER BY x DESC, id ASC) OVER w2, + LAG(x ORDER BY x DESC, id ASC) OVER w2, + LEAD(x ORDER BY x DESC, id ASC) OVER w3, + LAG(x, 2 ORDER BY x DESC, id ASC) OVER w3 +FROM leadlag_frames +WINDOW w1 AS (ORDER BY x DESC, id ASC ROWS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING), + w2 AS (ORDER BY x DESC, id ASC ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING), + w3 AS (ORDER BY x DESC, id ASC ROWS BETWEEN 2 FOLLOWING AND 4 FOLLOWING) +ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_list_window.test b/parser/testdata/corpus/sql/window/test_list_window.test index 17cc198..581a6fe 100644 --- a/parser/testdata/corpus/sql/window/test_list_window.test +++ b/parser/testdata/corpus/sql/window/test_list_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_list_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE list_extract_test(i INTEGER, g INTEGER); diff --git a/parser/testdata/corpus/sql/window/test_mad_window.test b/parser/testdata/corpus/sql/window/test_mad_window.test index c78c4f7..c46d015 100644 --- a/parser/testdata/corpus/sql/window/test_mad_window.test +++ b/parser/testdata/corpus/sql/window/test_mad_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_mad_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table mads as select range r from range(20) union all values (NULL), (NULL), (NULL); diff --git a/parser/testdata/corpus/sql/window/test_mode_window.test b/parser/testdata/corpus/sql/window/test_mode_window.test index 68c00ad..4da12e5 100644 --- a/parser/testdata/corpus/sql/window/test_mode_window.test +++ b/parser/testdata/corpus/sql/window/test_mode_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_mode_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table modes as select range r from range(10) union all values (NULL), (NULL), (NULL); @@ -64,3 +64,31 @@ FROM src; -- ok == +WITH t(id, x) AS (VALUES (1, 'A'), (2, 'B'), (3, 'A'), (4, 'B'), (5, 'A')) +SELECT id, MODE(x ORDER BY id) OVER (ORDER BY id ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) +FROM t +ORDER BY id +-- +ok +== +WITH t(id, x) AS (VALUES (1, 'B'), (2, 'A'), (3, 'A'), (4, 'B')) +SELECT id, MODE(x ORDER BY id) OVER (ORDER BY id ROWS UNBOUNDED PRECEDING) +FROM t +ORDER BY id +-- +ok +== +WITH t(id, x) AS (VALUES (1, 'A'), (2, 'B'), (3, 'A'), (4, 'B'), (5, 'A')) +SELECT id, MODE(x ORDER BY id) OVER (ORDER BY id ROWS BETWEEN 3 PRECEDING AND CURRENT ROW EXCLUDE CURRENT ROW) +FROM t +ORDER BY id +-- +ok +== +WITH t(id, x) AS (VALUES (1, 10), (2, 20), (3, 10), (4, 20), (5, 10)) +SELECT id, MODE(x ORDER BY id) OVER (ORDER BY id ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) +FROM t +ORDER BY id +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_mode_window_varlen.test b/parser/testdata/corpus/sql/window/test_mode_window_varlen.test new file mode 100644 index 0000000..ff5c392 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_mode_window_varlen.test @@ -0,0 +1,29 @@ +# source: test/sql/window/test_mode_window_varlen.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE modes_str AS +SELECT i AS r, + CASE + WHEN i < 3 THEN repeat('x', 50) + WHEN i < 6 THEN repeat('y', 5) + WHEN i < 9 THEN repeat('z', 100) + ELSE repeat('y', 5) + END AS v +FROM range(12) t(i); +-- +ok +== +SELECT r, substr(m, 1, 1) AS ch, length(m) AS len +FROM (SELECT r, mode(v) OVER (ORDER BY r ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS m FROM modes_str) +ORDER BY r; +-- +ok +== +SELECT count(*) FROM ( + SELECT mode(v) OVER (ORDER BY r ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS m FROM modes_str +) WHERE m NOT IN (repeat('x', 50), repeat('y', 5), repeat('z', 100)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_naive_aggregation.test b/parser/testdata/corpus/sql/window/test_naive_aggregation.test index c76df7b..d42dd29 100644 --- a/parser/testdata/corpus/sql/window/test_naive_aggregation.test +++ b/parser/testdata/corpus/sql/window/test_naive_aggregation.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_naive_aggregation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA debug_window_mode=separate diff --git a/parser/testdata/corpus/sql/window/test_negative_range.test b/parser/testdata/corpus/sql/window/test_negative_range.test index 168574b..3c75764 100644 --- a/parser/testdata/corpus/sql/window/test_negative_range.test +++ b/parser/testdata/corpus/sql/window/test_negative_range.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_negative_range.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE OR REPLACE TABLE issue10855(i INTEGER, v FLOAT); diff --git a/parser/testdata/corpus/sql/window/test_no_default_window_spec.test b/parser/testdata/corpus/sql/window/test_no_default_window_spec.test index acf9e5b..605ad03 100644 --- a/parser/testdata/corpus/sql/window/test_no_default_window_spec.test +++ b/parser/testdata/corpus/sql/window/test_no_default_window_spec.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_no_default_window_spec.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table tenk1d(ten int4, four int4) diff --git a/parser/testdata/corpus/sql/window/test_nthvalue.test b/parser/testdata/corpus/sql/window/test_nthvalue.test index 12fd292..d63af73 100644 --- a/parser/testdata/corpus/sql/window/test_nthvalue.test +++ b/parser/testdata/corpus/sql/window/test_nthvalue.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_nthvalue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE empsalary (depname varchar, empno bigint, salary int, enroll_date date); diff --git a/parser/testdata/corpus/sql/window/test_ntile.test b/parser/testdata/corpus/sql/window/test_ntile.test index 8a5e8b1..e9a6907 100644 --- a/parser/testdata/corpus/sql/window/test_ntile.test +++ b/parser/testdata/corpus/sql/window/test_ntile.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_ntile.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE Scoreboard(TeamName VARCHAR, Player VARCHAR, Score INTEGER); diff --git a/parser/testdata/corpus/sql/window/test_order_by_all.test b/parser/testdata/corpus/sql/window/test_order_by_all.test index ac43896..f8b76b3 100644 --- a/parser/testdata/corpus/sql/window/test_order_by_all.test +++ b/parser/testdata/corpus/sql/window/test_order_by_all.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_order_by_all.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT i, j, ROW_NUMBER() OVER (ORDER BY ALL) AS rn diff --git a/parser/testdata/corpus/sql/window/test_parallel_group_cleanup.test b/parser/testdata/corpus/sql/window/test_parallel_group_cleanup.test new file mode 100644 index 0000000..a83eeeb --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_parallel_group_cleanup.test @@ -0,0 +1,60 @@ +# source: test/sql/window/test_parallel_group_cleanup.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE cleanup_input AS +SELECT p, j, lpad((p * 521 + j)::VARCHAR, 20, '0') AS s +FROM range(257) parts(p), range(521) rows(j) +-- +ok +== +CREATE TABLE retained AS +SELECT p, j, list(s) OVER w AS items, string_agg(s, '|') OVER w AS joined, + row_number() OVER w AS rn, count(*) OVER w AS n +FROM cleanup_input +WINDOW w AS (PARTITION BY p ORDER BY j ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) +ORDER BY p, j +-- +ok +== +SELECT count(*), count(*) FILTER ( + WHERE items IS DISTINCT FROM expected + OR joined IS DISTINCT FROM array_to_string(expected, '|') + OR rn <> j + 1 OR n <> len(expected) +) +FROM ( + SELECT *, list_transform(range(greatest(j - 1, 0), least(j + 1, 520) + 1), + lambda k: lpad((p * 521 + k)::VARCHAR, 20, '0')) AS expected + FROM retained +) t +-- +ok +== +DROP TABLE retained +-- +ok +== +SELECT count(*), count(*) FILTER (WHERE first_s IS DISTINCT FROM lpad((p * 521)::VARCHAR, 20, '0')) +FROM ( + SELECT p, first_value(s) OVER (PARTITION BY p ORDER BY j) AS first_s + FROM cleanup_input + LIMIT 1000 +) t +-- +ok +== +SELECT CASE WHEN p = 128 AND len(items) > 0 THEN error('window cleanup cancellation') ELSE len(items) END +FROM ( + SELECT p, list(s) OVER (PARTITION BY p ORDER BY j ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS items + FROM cleanup_input +) t +-- +ok +== +SELECT count(*) FROM ( + SELECT row_number() OVER (PARTITION BY p ORDER BY j) AS rn FROM cleanup_input +) t WHERE rn = 1 +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_partition_constant_arguments.test b/parser/testdata/corpus/sql/window/test_partition_constant_arguments.test new file mode 100644 index 0000000..26fdadb --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_partition_constant_arguments.test @@ -0,0 +1,15 @@ +# source: test/sql/window/test_partition_constant_arguments.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT i, + MIN(i, i // 13 + 1) OVER ( + PARTITION BY i // 13 + ORDER BY i + ) AS window_result +FROM range(17) AS t(i) +ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_quantile_skip_list.test b/parser/testdata/corpus/sql/window/test_quantile_skip_list.test new file mode 100644 index 0000000..b79bd7f --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_quantile_skip_list.test @@ -0,0 +1,24 @@ +# source: test/sql/window/test_quantile_skip_list.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SET debug_window_mode='window'; +-- +ok +== +WITH t(i, v) AS ( + SELECT i, CASE WHEN i = 3 THEN NULL ELSE i * 10 END + FROM range(12) r(i) +) +SELECT i, + quantile_disc(v, 0.5) OVER w, + quantile_cont(v, 0.5) OVER w, + quantile_disc(v, [0.25, 0.75]) OVER w, + mad(v) OVER w +FROM t +WINDOW w AS (ORDER BY i ROWS BETWEEN 10 PRECEDING AND 1 PRECEDING) +ORDER BY i; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_quantile_window.test b/parser/testdata/corpus/sql/window/test_quantile_window.test index cd559fc..32e33fc 100644 --- a/parser/testdata/corpus/sql/window/test_quantile_window.test +++ b/parser/testdata/corpus/sql/window/test_quantile_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_quantile_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table quantiles as select range r from range(10) union all values (NULL), (NULL), (NULL); diff --git a/parser/testdata/corpus/sql/window/test_range_optimisation.test b/parser/testdata/corpus/sql/window/test_range_optimisation.test index 7b0950e..e9c82f0 100644 --- a/parser/testdata/corpus/sql/window/test_range_optimisation.test +++ b/parser/testdata/corpus/sql/window/test_range_optimisation.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_range_optimisation.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE rides ( diff --git a/parser/testdata/corpus/sql/window/test_rank.test b/parser/testdata/corpus/sql/window/test_rank.test index 084f460..06916e0 100644 --- a/parser/testdata/corpus/sql/window/test_rank.test +++ b/parser/testdata/corpus/sql/window/test_rank.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_rank.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH t AS ( diff --git a/parser/testdata/corpus/sql/window/test_rank_orderby.test b/parser/testdata/corpus/sql/window/test_rank_orderby.test index 8a18121..5f0232d 100644 --- a/parser/testdata/corpus/sql/window/test_rank_orderby.test +++ b/parser/testdata/corpus/sql/window/test_rank_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_rank_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/window/test_rownumber_orderby.test b/parser/testdata/corpus/sql/window/test_rownumber_orderby.test index 0d08bb7..4c0c64b 100644 --- a/parser/testdata/corpus/sql/window/test_rownumber_orderby.test +++ b/parser/testdata/corpus/sql/window/test_rownumber_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_rownumber_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT @@ -16,3 +16,22 @@ ORDER BY 2 -- ok == +SELECT + id, + NTILE(2 ORDER BY y) OVER ( + ORDER BY y + ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING + ) AS ntile_following, + NTILE(2 ORDER BY y) OVER ( + ORDER BY y + ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING + ) AS ntile_preceding, + ROW_NUMBER(ORDER BY y) OVER ( + ORDER BY y + ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING + ) AS row_following +FROM (VALUES (1, 1), (2, 2)) AS t(id, y) +ORDER BY id; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_scalar_window.test b/parser/testdata/corpus/sql/window/test_scalar_window.test index 8c351ce..2b89c56 100644 --- a/parser/testdata/corpus/sql/window/test_scalar_window.test +++ b/parser/testdata/corpus/sql/window/test_scalar_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_scalar_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT row_number() OVER () diff --git a/parser/testdata/corpus/sql/window/test_single_following_frame.test b/parser/testdata/corpus/sql/window/test_single_following_frame.test new file mode 100644 index 0000000..ce09a83 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_single_following_frame.test @@ -0,0 +1,27 @@ +# source: test/sql/window/test_single_following_frame.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT COUNT(*) OVER (ORDER BY x {framing} 1 FOLLOWING) +FROM (VALUES (1)) t(x); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT COUNT(*) OVER (ORDER BY x {framing} 0 FOLLOWING) +FROM (VALUES (1)) t(x); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT x, COUNT(*) OVER (ORDER BY x {framing} BETWEEN CURRENT ROW AND 1 FOLLOWING) +FROM (VALUES (1), (2)) t(x) +ORDER BY x; +-- +error: Parser Error: syntax error at or near "{" +== +SELECT x, COUNT(*) OVER (ORDER BY x {framing} 1 PRECEDING) +FROM (VALUES (1), (2)) t(x) +ORDER BY x; +-- +error: Parser Error: syntax error at or near "{" +== diff --git a/parser/testdata/corpus/sql/window/test_split_partition_heap.test b/parser/testdata/corpus/sql/window/test_split_partition_heap.test index 1070c3a..bdbbc50 100644 --- a/parser/testdata/corpus/sql/window/test_split_partition_heap.test +++ b/parser/testdata/corpus/sql/window/test_split_partition_heap.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_split_partition_heap.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table partsupp as select uuid()::varchar as c5 from range(8000); diff --git a/parser/testdata/corpus/sql/window/test_streaming_lead_lag.test b/parser/testdata/corpus/sql/window/test_streaming_lead_lag.test index ee5b728..e1bbec8 100644 --- a/parser/testdata/corpus/sql/window/test_streaming_lead_lag.test +++ b/parser/testdata/corpus/sql/window/test_streaming_lead_lag.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_streaming_lead_lag.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit EXPLAIN @@ -150,3 +150,21 @@ FROM VALUES -- ok == +SELECT LEAD(i, (-9223372036854775808)::BIGINT) OVER () FROM range(3) t(i); +-- +ok +== +SELECT LAG(i, (-9223372036854775808)::BIGINT) OVER () FROM range(3) t(i); +-- +ok +== +WITH t AS ( + SELECT range AS i FROM range(3) + UNION ALL + SELECT range AS i FROM range(3) +) +SELECT i, lead(i, 1) OVER () AS next_i +FROM t; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_streaming_nthvalue.test b/parser/testdata/corpus/sql/window/test_streaming_nthvalue.test index a25457f..4ca527c 100644 --- a/parser/testdata/corpus/sql/window/test_streaming_nthvalue.test +++ b/parser/testdata/corpus/sql/window/test_streaming_nthvalue.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_streaming_nthvalue.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit explain select nth_value(i, 1) over () @@ -39,6 +39,14 @@ FROM (VALUES -- ok == +WITH src(id, x) AS (VALUES (1, 10), (2, 20), (3, NULL), (4, 30)) +SELECT id, NTH_VALUE(x, 2 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW +) AS actual +FROM src ORDER BY id +-- +ok +== select i, nth_value(i, 2049) over(ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) n from range(2049) tbl(i) QUALIFY n IS NOT NULL; diff --git a/parser/testdata/corpus/sql/window/test_streaming_window.test b/parser/testdata/corpus/sql/window/test_streaming_window.test index 540122e..c41b4c2 100644 --- a/parser/testdata/corpus/sql/window/test_streaming_window.test +++ b/parser/testdata/corpus/sql/window/test_streaming_window.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_streaming_window.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers (i int, j int) @@ -419,3 +419,269 @@ FROM start_and_inputs; -- ok == +EXPLAIN +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 1 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 1 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(4096) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(4096) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(4096) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(4096) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 1 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(4096) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 1 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(4096) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(6144) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(6144) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(6144) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(6144) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 1 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(6144) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 1 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(6144) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i < 2048 THEN NULL WHEN i % 2 = 0 THEN i ELSE -i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, FIRST_VALUE(CASE WHEN i < 2048 THEN NULL WHEN i % 2 = 0 THEN i ELSE -i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i < 2048 THEN 42 WHEN i % 2 = 0 THEN i ELSE -i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i < 2048 THEN 42 WHEN i % 2 = 0 THEN i ELSE -i END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i < 2048 THEN 42 WHEN i % 2 = 0 THEN i ELSE -i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i < 2048 THEN 42 WHEN i % 2 = 0 THEN i ELSE -i END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i < 2048 THEN 42 WHEN i % 2 = 0 THEN i ELSE -i END, 2049 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i < 2048 THEN 42 WHEN i % 2 = 0 THEN i ELSE -i END, 2049 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 2048 THEN 2048 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 100 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 100 THEN 100 END) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, LAST_VALUE(CASE WHEN i = 100 THEN i END IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i >= 100 THEN 100 END) FROM w; +-- +ok +== +EXPLAIN +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 99999 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS NOT NULL) FROM w; +-- +ok +== +WITH w AS ( + SELECT i, NTH_VALUE(CASE WHEN i = 2048 THEN i END, 99999 IGNORE NULLS) OVER ( + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(2051) AS r(i) +) +SELECT COUNT(*), COUNT(*) FILTER (WHERE x IS NOT NULL) FROM w; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_streaming_window_distinct.test b/parser/testdata/corpus/sql/window/test_streaming_window_distinct.test index 7836e2e..3c5cd65 100644 --- a/parser/testdata/corpus/sql/window/test_streaming_window_distinct.test +++ b/parser/testdata/corpus/sql/window/test_streaming_window_distinct.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_streaming_window_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit explain diff --git a/parser/testdata/corpus/sql/window/test_thread_count.test b/parser/testdata/corpus/sql/window/test_thread_count.test index fbfc305..40b11ca 100644 --- a/parser/testdata/corpus/sql/window/test_thread_count.test +++ b/parser/testdata/corpus/sql/window/test_thread_count.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_thread_count.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select row_number() over () diff --git a/parser/testdata/corpus/sql/window/test_tpcc_results.test b/parser/testdata/corpus/sql/window/test_tpcc_results.test index 14d7734..6a0e413 100644 --- a/parser/testdata/corpus/sql/window/test_tpcc_results.test +++ b/parser/testdata/corpus/sql/window/test_tpcc_results.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_tpcc_results.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select diff --git a/parser/testdata/corpus/sql/window/test_tpcds_q49.test b/parser/testdata/corpus/sql/window/test_tpcds_q49.test index 30e7d81..ea8c951 100644 --- a/parser/testdata/corpus/sql/window/test_tpcds_q49.test +++ b/parser/testdata/corpus/sql/window/test_tpcds_q49.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_tpcds_q49.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table wintest( item integer, return_ratio numeric, currency_ratio numeric) diff --git a/parser/testdata/corpus/sql/window/test_value_exclude.test b/parser/testdata/corpus/sql/window/test_value_exclude.test index f26a676..6a1f74a 100644 --- a/parser/testdata/corpus/sql/window/test_value_exclude.test +++ b/parser/testdata/corpus/sql/window/test_value_exclude.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_value_exclude.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH src(id, v) AS ( diff --git a/parser/testdata/corpus/sql/window/test_value_orderby.test b/parser/testdata/corpus/sql/window/test_value_orderby.test index 849a78b..26f0cd8 100644 --- a/parser/testdata/corpus/sql/window/test_value_orderby.test +++ b/parser/testdata/corpus/sql/window/test_value_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_value_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/window/test_volatile_independence.test b/parser/testdata/corpus/sql/window/test_volatile_independence.test index 58f9cc5..3c3a126 100644 --- a/parser/testdata/corpus/sql/window/test_volatile_independence.test +++ b/parser/testdata/corpus/sql/window/test_volatile_independence.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_volatile_independence.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT diff --git a/parser/testdata/corpus/sql/window/test_wide_orderby.test b/parser/testdata/corpus/sql/window/test_wide_orderby.test index 1766a3a..bf9e9d7 100644 --- a/parser/testdata/corpus/sql/window/test_wide_orderby.test +++ b/parser/testdata/corpus/sql/window/test_wide_orderby.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_wide_orderby.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA debug_force_external={forced} diff --git a/parser/testdata/corpus/sql/window/test_window_agg_stats_propagation.test b/parser/testdata/corpus/sql/window/test_window_agg_stats_propagation.test new file mode 100644 index 0000000..d9628af --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_window_agg_stats_propagation.test @@ -0,0 +1,47 @@ +# source: test/sql/window/test_window_agg_stats_propagation.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE bt AS SELECT * FROM (VALUES (1)) AS v(id); +-- +ok +== +SELECT BITSTRING_AGG(id)::VARCHAR AS regular FROM bt; +-- +ok +== +SELECT id, BITSTRING_AGG(id) OVER (ORDER BY id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)::VARCHAR AS w +FROM bt +ORDER BY id; +-- +ok +== +CREATE TABLE bt3 AS SELECT * FROM (VALUES (1),(2),(3)) AS v(id); +-- +ok +== +SELECT id, BITSTRING_AGG(id) OVER ()::VARCHAR AS w FROM bt3 ORDER BY id; +-- +ok +== +CREATE TABLE cnt AS SELECT * FROM (VALUES (1), (2), (3)) AS v(id); +-- +ok +== +SELECT id, COUNT(id) OVER () FROM cnt ORDER BY id; +-- +ok +== +SELECT id, COUNT(id) OVER (ORDER BY id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM cnt ORDER BY id; +-- +ok +== +CREATE TABLE cntn AS SELECT * FROM (VALUES (1), (NULL), (3)) AS v(id); +-- +ok +== +SELECT id, COUNT(id) OVER () FROM cntn ORDER BY id NULLS LAST; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_window_aggregate_macro.test b/parser/testdata/corpus/sql/window/test_window_aggregate_macro.test index c5cb3a1..aa56d8f 100644 --- a/parser/testdata/corpus/sql/window/test_window_aggregate_macro.test +++ b/parser/testdata/corpus/sql/window/test_window_aggregate_macro.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_aggregate_macro.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE MACRO tinyint_min(a) as cast(min(a) as tinyint); diff --git a/parser/testdata/corpus/sql/window/test_window_binding.test b/parser/testdata/corpus/sql/window/test_window_binding.test index 4cccded..f898d84 100644 --- a/parser/testdata/corpus/sql/window/test_window_binding.test +++ b/parser/testdata/corpus/sql/window/test_window_binding.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_binding.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT MIN(a) OVER (PARTITION BY i ORDER BY i) FROM integers @@ -27,3 +27,25 @@ SELECT MIN(i) OVER (PARTITION BY i ORDER BY i) FROM integers -- ok == +CREATE SEQUENCE w2nw_val024_seq START 1; +-- +ok +== +SELECT SUM(x) OVER ( + PARTITION BY (nextval('w2nw_val024_seq') % 2 = 0), x + ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING +) AS actual +FROM (VALUES (1), (2), (3), (4), (5)) AS t(x) +LIMIT 1; +-- +ok +== +SELECT LIST(x) OVER ( + ORDER BY (nextval('w2nw_val024_seq') % 2 = 0), x + ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING +) AS actual +FROM (VALUES (1), (2), (3), (4), (5)) AS t(x) +LIMIT 1; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_window_binding_ctes.test b/parser/testdata/corpus/sql/window/test_window_binding_ctes.test index 8821fe7..9414eb3 100644 --- a/parser/testdata/corpus/sql/window/test_window_binding_ctes.test +++ b/parser/testdata/corpus/sql/window/test_window_binding_ctes.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_binding_ctes.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select i, lag(i) over named_window from (values (1), (2), (3)) as t (i) window named_window as (order by i); diff --git a/parser/testdata/corpus/sql/window/test_window_bool.test b/parser/testdata/corpus/sql/window/test_window_bool.test index fbd56e1..c686e5f 100644 --- a/parser/testdata/corpus/sql/window/test_window_bool.test +++ b/parser/testdata/corpus/sql/window/test_window_bool.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_bool.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a as select range%2==0 j, range::integer AS i from range(1, 5, 1) diff --git a/parser/testdata/corpus/sql/window/test_window_clause.test b/parser/testdata/corpus/sql/window/test_window_clause.test index 10f6e6c..724022f 100644 --- a/parser/testdata/corpus/sql/window/test_window_clause.test +++ b/parser/testdata/corpus/sql/window/test_window_clause.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_clause.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table integers as select range i from range(0,16); diff --git a/parser/testdata/corpus/sql/window/test_window_clause_scope.test b/parser/testdata/corpus/sql/window/test_window_clause_scope.test new file mode 100644 index 0000000..4876418 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_window_clause_scope.test @@ -0,0 +1,59 @@ +# source: test/sql/window/test_window_clause_scope.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT (SELECT 1), sum(1) OVER w WINDOW w AS (ORDER BY 1) +-- +ok +== +SELECT sum(1) OVER w, (SELECT 1) WINDOW w AS (ORDER BY 1) +-- +ok +== +SELECT a FROM (SELECT 1) t(a) WINDOW w AS () QUALIFY sum(a) OVER w > 0 +-- +ok +== +SELECT count(*) FROM (SELECT * FROM range(3) WHERE (SELECT true) WINDOW w AS () QUALIFY sum(1) OVER w > 0) +-- +ok +== +SELECT (SELECT (SELECT 1)), (SELECT 2 WHERE (SELECT true)), sum(i) OVER w +FROM range(3) t(i) +WINDOW w AS (ORDER BY i ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) +ORDER BY 3 +-- +ok +== +SELECT sum(1) OVER w, (SELECT sum(2) OVER w WINDOW w AS ()) WINDOW w AS () +-- +ok +== +SELECT (SELECT sum(2) OVER w WINDOW w AS ()), sum(1) OVER w WINDOW w AS () +-- +ok +== +SELECT (SELECT sum(i) OVER w FROM range(3) t(i) WINDOW w AS () LIMIT 1), sum(j) OVER w +FROM range(2) t(j) +WINDOW w AS (ORDER BY j ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) +ORDER BY 2 +-- +ok +== +SELECT (SELECT sum(1) OVER w) WINDOW w AS () +-- +error: Parser Error: window "w" does not exist +== +SELECT * FROM (SELECT sum(1) OVER w) WINDOW w AS () +-- +error: Parser Error: window "w" does not exist +== +SELECT (SELECT sum(1) OVER w WINDOW w AS ()), sum(1) OVER w +-- +error: Parser Error: window "w" does not exist +== +SELECT (SELECT 1), sum(1) OVER w WINDOW w AS (), w AS (ORDER BY 1) +-- +error: Parser Error: window "w" is already defined +== diff --git a/parser/testdata/corpus/sql/window/test_window_constant_aggregate.test b/parser/testdata/corpus/sql/window/test_window_constant_aggregate.test index 4deb5c6..ed8f9c4 100644 --- a/parser/testdata/corpus/sql/window/test_window_constant_aggregate.test +++ b/parser/testdata/corpus/sql/window/test_window_constant_aggregate.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_constant_aggregate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT part, id, sum(val) OVER(PARTITION BY part ORDER BY id), lead(val) OVER(PARTITION BY part ORDER BY id) diff --git a/parser/testdata/corpus/sql/window/test_window_constant_allocator.test b/parser/testdata/corpus/sql/window/test_window_constant_allocator.test index f044b9b..c66efa7 100644 --- a/parser/testdata/corpus/sql/window/test_window_constant_allocator.test +++ b/parser/testdata/corpus/sql/window/test_window_constant_allocator.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_constant_allocator.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit WITH cte AS ( diff --git a/parser/testdata/corpus/sql/window/test_window_cse.test b/parser/testdata/corpus/sql/window/test_window_cse.test index 1f7944c..e755b0c 100644 --- a/parser/testdata/corpus/sql/window/test_window_cse.test +++ b/parser/testdata/corpus/sql/window/test_window_cse.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_cse.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE eventlog AS diff --git a/parser/testdata/corpus/sql/window/test_window_dbplyr.test b/parser/testdata/corpus/sql/window/test_window_dbplyr.test index 2e5da3e..f730006 100644 --- a/parser/testdata/corpus/sql/window/test_window_dbplyr.test +++ b/parser/testdata/corpus/sql/window/test_window_dbplyr.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_dbplyr.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE dbplyr_052 (x INTEGER, g DOUBLE, w int) diff --git a/parser/testdata/corpus/sql/window/test_window_distinct.test b/parser/testdata/corpus/sql/window/test_window_distinct.test index f6900ad..e5519a8 100644 --- a/parser/testdata/corpus/sql/window/test_window_distinct.test +++ b/parser/testdata/corpus/sql/window/test_window_distinct.test @@ -1,12 +1,20 @@ # source: test/sql/window/test_window_distinct.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(DISTINCT 42) OVER () -- ok == +SELECT COUNT(DISTINCT) OVER () FROM range(3) +-- +error: Parser Error: DISTINCT requires at least one argument +== +SELECT COUNT(ALL) OVER () FROM range(3) +-- +error: Parser Error: ALL requires at least one argument +== WITH src(c) AS ( SELECT range % 2 FROM range(33) diff --git a/parser/testdata/corpus/sql/window/test_window_exclude_state_destructor.test b/parser/testdata/corpus/sql/window/test_window_exclude_state_destructor.test new file mode 100644 index 0000000..ea4aab9 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_window_exclude_state_destructor.test @@ -0,0 +1,26 @@ +# source: test/sql/window/test_window_exclude_state_destructor.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT count(x) FROM ( + SELECT histogram(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) x + FROM range(3) t(i) +); +-- +ok +== +SELECT count(x) FROM ( + SELECT reservoir_quantile(i, 0.5) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) x + FROM range(2000) t(i) +); +-- +ok +== +SELECT count(x) FROM ( + SELECT entropy(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE TIES) x + FROM range(500) t(i) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_window_filter.test b/parser/testdata/corpus/sql/window/test_window_filter.test index 3d06da7..62d5b72 100644 --- a/parser/testdata/corpus/sql/window/test_window_filter.test +++ b/parser/testdata/corpus/sql/window/test_window_filter.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_filter.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE testing AS diff --git a/parser/testdata/corpus/sql/window/test_window_finalize_race.test b/parser/testdata/corpus/sql/window/test_window_finalize_race.test index 20346f2..c7e5be3 100644 --- a/parser/testdata/corpus/sql/window/test_window_finalize_race.test +++ b/parser/testdata/corpus/sql/window/test_window_finalize_race.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_finalize_race.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit PRAGMA threads=2 diff --git a/parser/testdata/corpus/sql/window/test_window_fusion.test b/parser/testdata/corpus/sql/window/test_window_fusion.test index 2db9693..e6f946c 100644 --- a/parser/testdata/corpus/sql/window/test_window_fusion.test +++ b/parser/testdata/corpus/sql/window/test_window_fusion.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_fusion.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table lineitem ( diff --git a/parser/testdata/corpus/sql/window/test_window_interval.test b/parser/testdata/corpus/sql/window/test_window_interval.test index 5aa944a..ccdcdf2 100644 --- a/parser/testdata/corpus/sql/window/test_window_interval.test +++ b/parser/testdata/corpus/sql/window/test_window_interval.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_interval.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a as select case when range%2==0 then interval '1 year' else interval '2 years' end j, range::integer AS i from range(1, 5, 1) diff --git a/parser/testdata/corpus/sql/window/test_window_order_collate.test b/parser/testdata/corpus/sql/window/test_window_order_collate.test index 6953d01..9feaeaf 100644 --- a/parser/testdata/corpus/sql/window/test_window_order_collate.test +++ b/parser/testdata/corpus/sql/window/test_window_order_collate.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_order_collate.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit select diff --git a/parser/testdata/corpus/sql/window/test_window_rows.test b/parser/testdata/corpus/sql/window/test_window_rows.test index 022f266..cd175af 100644 --- a/parser/testdata/corpus/sql/window/test_window_rows.test +++ b/parser/testdata/corpus/sql/window/test_window_rows.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_rows.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE t3(a TEXT, b TEXT, c INTEGER); diff --git a/parser/testdata/corpus/sql/window/test_window_segment_tree_error.test b/parser/testdata/corpus/sql/window/test_window_segment_tree_error.test new file mode 100644 index 0000000..d533f11 --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_window_segment_tree_error.test @@ -0,0 +1,25 @@ +# source: test/sql/window/test_window_segment_tree_error.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +SELECT max(x) FROM ( + SELECT sum(CASE WHEN i IN (5, 6) THEN 170141183460469231731687303715884105727::HUGEINT ELSE 0 END) + OVER (ORDER BY i ROWS BETWEEN 100 PRECEDING AND CURRENT ROW) x + FROM range(100000) r(i)); +-- +ok +== +SELECT max(x) FROM ( + SELECT avg(CASE WHEN i IN (5, 6) THEN INTERVAL '178000000 years' ELSE INTERVAL 0 days END) + OVER (ORDER BY i ROWS BETWEEN 100 PRECEDING AND CURRENT ROW) x + FROM range(100000) r(i)); +-- +ok +== +SELECT max(x) FROM ( + SELECT sum(i) OVER (ORDER BY i ROWS BETWEEN 100 PRECEDING AND CURRENT ROW) x + FROM range(100000) r(i)); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_window_string_agg.test b/parser/testdata/corpus/sql/window/test_window_string_agg.test index 508c40b..ce496aa 100644 --- a/parser/testdata/corpus/sql/window/test_window_string_agg.test +++ b/parser/testdata/corpus/sql/window/test_window_string_agg.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_string_agg.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a as select range%3 j, range::varchar AS s, case when range%3=0 then '-' else '|' end sep from range(1, 7, 1) diff --git a/parser/testdata/corpus/sql/window/test_window_tpcds.test b/parser/testdata/corpus/sql/window/test_window_tpcds.test index 4cf8cc3..b9f1485 100644 --- a/parser/testdata/corpus/sql/window/test_window_tpcds.test +++ b/parser/testdata/corpus/sql/window/test_window_tpcds.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_tpcds.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE item(i_category VARCHAR, i_brand VARCHAR, i_price INTEGER) diff --git a/parser/testdata/corpus/sql/window/test_window_types.test b/parser/testdata/corpus/sql/window/test_window_types.test index cc41f85..9867779 100644 --- a/parser/testdata/corpus/sql/window/test_window_types.test +++ b/parser/testdata/corpus/sql/window/test_window_types.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_types.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit create table a as select range%3::{type} j, range::{type} AS i from range(1, 7, 1) diff --git a/parser/testdata/corpus/sql/window/test_window_unnest_error.test b/parser/testdata/corpus/sql/window/test_window_unnest_error.test index e0b29f9..dcb1906 100644 --- a/parser/testdata/corpus/sql/window/test_window_unnest_error.test +++ b/parser/testdata/corpus/sql/window/test_window_unnest_error.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_unnest_error.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE tbl AS SELECT 42 AS i; diff --git a/parser/testdata/corpus/sql/window/test_window_value_edges.test b/parser/testdata/corpus/sql/window/test_window_value_edges.test new file mode 100644 index 0000000..1d9351b --- /dev/null +++ b/parser/testdata/corpus/sql/window/test_window_value_edges.test @@ -0,0 +1,150 @@ +# source: test/sql/window/test_window_value_edges.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE value_edges(i INTEGER, peer INTEGER, v INTEGER); +-- +ok +== +INSERT INTO value_edges VALUES + (0, 0, NULL), (1, 0, 10), (2, 0, NULL), + (3, 1, 20), (4, 1, NULL), (5, 1, 30), + (6, 2, NULL), (7, 2, 40), (8, 3, 50), (9, 3, NULL); +-- +ok +== +SELECT first_value(peer) OVER ( + ORDER BY peer ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW EXCLUDE GROUP + ), peer +FROM value_edges ORDER BY peer, i; +-- +ok +== +SELECT last_value(peer) OVER ( + ORDER BY peer ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW + ), peer +FROM value_edges ORDER BY peer, i; +-- +ok +== +SELECT nth_value(peer, 5) OVER ( + ORDER BY peer ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES + ), peer +FROM value_edges ORDER BY peer, i; +-- +ok +== +SELECT nth_value(v, 3 IGNORE NULLS) OVER ( + ORDER BY peer ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE CURRENT ROW + ), peer, v +FROM value_edges ORDER BY peer, v; +-- +ok +== +CREATE TABLE range_edges(i INTEGER, v INTEGER); +-- +ok +== +INSERT INTO range_edges VALUES (1, 10), (2, 20), (4, 40); +-- +ok +== +SELECT list(s ORDER BY i) FROM ( + SELECT i, sum(v) OVER ( + ORDER BY i::{type} + RANGE BETWEEN 1::{type} PRECEDING AND 1::{type} FOLLOWING + ) AS s + FROM range_edges +); +-- +error: Parser Error: syntax error at or near "{" +== +SELECT i, + lead(v, i % 3, -i ORDER BY peer DESC, i) OVER ( + ORDER BY i ROWS BETWEEN 2 PRECEDING AND 3 FOLLOWING + ), + lag(v, i % 2, i + 100 ORDER BY peer, i DESC) OVER ( + ORDER BY i ROWS BETWEEN 3 PRECEDING AND 2 FOLLOWING + ) +FROM value_edges; +-- +ok +== +SELECT count(x) FROM (SELECT lead(i, i) OVER () AS x FROM range(3) r(i)); +-- +ok +== +SELECT count(x) FROM ( + SELECT lead(i, try_cast('bad' AS BIGINT)) OVER () AS x FROM range(3) r(i) +); +-- +ok +== +SELECT count(x) FROM (SELECT lead(i) OVER () AS x FROM range(3) r(i)); +-- +ok +== +SELECT count(x) FROM (SELECT lead(i, 1, i * 10) OVER () AS x FROM range(3) r(i)); +-- +ok +== +SELECT count(x) FROM (SELECT lead(i IGNORE NULLS) OVER () AS x FROM range(3) r(i)); +-- +ok +== +SELECT count(x) FROM ( + SELECT nth_value(i, i + 1) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(3) r(i) +); +-- +ok +== +SELECT count(x) FROM ( + SELECT nth_value(i, NULL) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(3) r(i) +); +-- +ok +== +SELECT count(x) FROM ( + SELECT last_value(i) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x + FROM range(3) r(i) +); +-- +ok +== +SELECT count(x) FROM ( + SELECT first_value(v ORDER BY i) OVER ( + ORDER BY peer ROWS BETWEEN CURRENT ROW AND CURRENT ROW EXCLUDE GROUP + ) AS x + FROM value_edges +); +-- +ok +== +SELECT count(x) FROM ( + SELECT last_value(v ORDER BY i) OVER ( + ORDER BY peer ROWS BETWEEN CURRENT ROW AND CURRENT ROW EXCLUDE GROUP + ) AS x + FROM value_edges +); +-- +ok +== +SELECT count(x) FROM ( + SELECT nth_value(v, 99 ORDER BY i) OVER ( + ORDER BY peer ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING + ) AS x + FROM value_edges +); +-- +ok +== +SELECT count(x) FROM ( + SELECT lead(i ORDER BY i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS x + FROM range(3) r(i) +); +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/test_window_wisconsin.test b/parser/testdata/corpus/sql/window/test_window_wisconsin.test index 498e852..c747315 100644 --- a/parser/testdata/corpus/sql/window/test_window_wisconsin.test +++ b/parser/testdata/corpus/sql/window/test_window_wisconsin.test @@ -1,6 +1,6 @@ # source: test/sql/window/test_window_wisconsin.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit SELECT COUNT(*) OVER () FROM tenk1 diff --git a/parser/testdata/corpus/sql/window/window_distinct_memory_limit.test b/parser/testdata/corpus/sql/window/window_distinct_memory_limit.test new file mode 100644 index 0000000..76efa78 --- /dev/null +++ b/parser/testdata/corpus/sql/window/window_distinct_memory_limit.test @@ -0,0 +1,17 @@ +# source: test/sql/window/window_distinct_memory_limit.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +PRAGMA memory_limit='64MB' +-- +ok +== +SELECT sum(c) FROM (SELECT count(DISTINCT i % 1000) OVER (ORDER BY i ROWS BETWEEN 100 PRECEDING AND CURRENT ROW) c FROM range(1000000) t(i)) +-- +ok +== +SELECT sum(c) FROM (SELECT count(DISTINCT i % 1000) OVER (ORDER BY i ROWS BETWEEN 100 PRECEDING AND CURRENT ROW) c FROM range(30000) t(i)) +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/window_expression_comparison.test b/parser/testdata/corpus/sql/window/window_expression_comparison.test new file mode 100644 index 0000000..ea9ede2 --- /dev/null +++ b/parser/testdata/corpus/sql/window/window_expression_comparison.test @@ -0,0 +1,72 @@ +# source: test/sql/window/window_expression_comparison.test +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 +# generated by cmd/regenerate - do not edit + +CREATE TABLE window_input(p INTEGER, q INTEGER, v INTEGER); +-- +ok +== +INSERT INTO window_input VALUES (1, 1, 1), (1, 1, NULL), (1, 2, 3), (2, 1, 4); +-- +ok +== +CREATE TABLE window_results AS +SELECT + first_value(v) OVER common_window AS plain_first, + first_value(v IGNORE NULLS) OVER common_window AS nonnull_first, + sum(v) OVER common_window AS plain_sum, + sum(DISTINCT v) OVER common_window AS distinct_sum, + sum(v) FILTER (WHERE v > 1) OVER common_window AS filtered_sum, + sum(v ORDER BY q DESC) OVER common_window AS argument_order_sum, + sum(v ORDER BY q ASC) OVER common_window AS argument_order_asc, + sum(v ORDER BY q DESC) OVER common_window AS argument_order_desc, + sum(v) OVER ( + PARTITION BY p + ORDER BY v + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW + ) AS partition_p_sum, + sum(v) OVER ( + PARTITION BY q + ORDER BY v + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW + ) AS partition_q_sum, + sum(v) OVER ( + PARTITION BY p, q + ORDER BY v + ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING + ) AS included_sum, + sum(v) OVER ( + PARTITION BY p, q + ORDER BY v + ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING + EXCLUDE CURRENT ROW + ) AS excluded_sum, + sum(v) OVER ( + ORDER BY v + ROWS BETWEEN p PRECEDING AND CURRENT ROW + ) AS dynamic_p_sum, + sum(v) OVER ( + ORDER BY v + ROWS BETWEEN q PRECEDING AND CURRENT ROW + ) AS dynamic_q_sum, + sum(v) OVER ( + PARTITION BY q, p + ORDER BY v + RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING + ) AS reordered_partition_sum, + lead(v, 1, -1) OVER common_window AS next_value, + lag(v, 1, -1) OVER common_window AS previous_value +FROM window_input +WINDOW common_window AS ( + PARTITION BY p, q + ORDER BY v + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW +); +-- +ok +== +SELECT count(*) FROM window_results; +-- +ok +== diff --git a/parser/testdata/corpus/sql/window/window_mtcars.test b/parser/testdata/corpus/sql/window/window_mtcars.test index e0872d7..7fb9641 100644 --- a/parser/testdata/corpus/sql/window/window_mtcars.test +++ b/parser/testdata/corpus/sql/window/window_mtcars.test @@ -1,6 +1,6 @@ # source: test/sql/window/window_mtcars.test -# pin: 8cbdaba6acb50db7780d22a65dd131584d472262 -# oracle: v2.0.0-alpha38195 +# pin: d54cbbe3df17e8e5ce68312f483b4155836112aa +# oracle: v2.0.0 # generated by cmd/regenerate - do not edit CREATE TABLE mtcars (mpg DECIMAL, cyl INTEGER, disp DECIMAL, hp INTEGER, drat DECIMAL, wt DECIMAL, qsec DECIMAL, vs INTEGER, am INTEGER, gear INTEGER, carb INTEGER); diff --git a/parser/testdata/serialize/README.md b/parser/testdata/serialize/README.md index e483677..55d8db5 100644 --- a/parser/testdata/serialize/README.md +++ b/parser/testdata/serialize/README.md @@ -25,8 +25,9 @@ DARKWING_DUCKDB=/path/to/duckdb-cli go run ./cmd/serialize-diff -corpus The pinned binary is the one recorded in `internal/grammar/README.md`; goldens, grammar and corpus expectations must come from the same pin. -At the time of writing (milestone 4) the full sweep covers 25,974 -SELECT-subset statements: 25,846 match, 0 mismatch, 128 skipped +At the v2.0.0 pin (milestone 7) the full sweep covers 31,618 +SELECT-subset statements: 31,515 match, 0 mismatch, 103 skipped (statements the pinned binary itself refuses to serialize, e.g. PIVOT-with-enum-discovery forms that upstream turns into multi-statement -plans, or literals it prints as bare Infinity tokens). +plans, or literals it prints as bare Infinity tokens). The goldens hold +2,626 of the matching statements (every 12th). diff --git a/parser/testdata/serialize/goldens.jsonl b/parser/testdata/serialize/goldens.jsonl index 9e16ac9..daee7a7 100644 --- a/parser/testdata/serialize/goldens.jsonl +++ b/parser/testdata/serialize/goldens.jsonl @@ -1,2153 +1,2626 @@ -{"sql":"SELECT c0 FROM generate_series(0, 0, NULL) t3(c0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["c0"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t3","sample":null,"query_location":15,"query_location_length":34,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]},"column_name_alias":["c0"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x x WHERE x = 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":17,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT c50 FROM array_tbl GROUP BY ALL USING SAMPLE 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["c50"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":9,"schema_name":"","table_name":"array_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["array_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":{"sample_size":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":3},"is_percentage":false,"method":"Reservoir","seed":-1,"repeatable":false,"sample_rate":-1.0},"qualify":null},"named_param_map":[]}]}} -{"sql":"select bitstring_agg(4741, 1706, -128);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4741}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1706}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-128}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL FROM integers AS t1 RIGHT JOIN integers AS t2 ON (NULL) WHERE EXISTS(SELECT NULL FROM integers AS t3 INNER JOIN integers ON ((t3.i + t1.i)) , (SELECT t2.i AS c0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":35,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":17,"query_location_length":14,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":43,"query_location_length":14,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":74,"query_location_length":100,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":93,"query_location_length":80,"left":{"type":"JOIN","alias":"","sample":null,"query_location":113,"query_location_length":38,"left":{"type":"BASE_TABLE","alias":"t3","sample":null,"query_location":98,"query_location_length":14,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":124,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":143,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":4,"column_names":["t3","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":4,"column_names":["t1","i"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":154,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":162,"query_location_length":4,"column_names":["t2","i"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\tNULL\nFROM\nmain.partsupp AS ref_1\nINNER JOIN main.region ON (NULL)\nINNER JOIN main.customer AS ref_3 ON\n(EXISTS(SELECT NULL FROM (SELECT ref_3.c_acctbal AS c0)))\nINNER JOIN\n(SELECT\n\tref_9.s_phone AS c0,\n\tref_8.r_regionkey AS c1,\n\tref_9.s_phone AS c2\nFROM main.region AS ref_8\nRIGHT JOIN\n\tmain.supplier AS ref_9 ON ((1 AND (ref_9.s_comment ~~ ref_9.s_address) AND 0 AND (ref_9.s_name !~~ ref_9.s_name)))\nLEFT JOIN main.customer AS ref_10 ON ((ref_10.c_address ~~* ref_10.c_comment))\nWHERE (ref_9.s_phone IS NOT NULL) LIMIT 53) AS subq_2\nON ((CASE WHEN (1) THEN (subq_2.c2) ELSE subq_2.c2 END !~~ ref_1.ps_comment))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":169,"query_location_length":452,"left":{"type":"JOIN","alias":"","sample":null,"query_location":74,"query_location_length":94,"left":{"type":"JOIN","alias":"","sample":null,"query_location":41,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"ref_1","sample":null,"query_location":18,"query_location_length":22,"schema_name":"main","table_name":"partsupp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","partsupp"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":11,"schema_name":"main","table_name":"region","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","region"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"ref_3","sample":null,"query_location":85,"query_location_length":22,"schema_name":"main","table_name":"customer","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","customer"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":112,"query_location_length":55,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":136,"query_location_length":30,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":144,"query_location_length":15,"column_names":["ref_3","c_acctbal"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"subq_2","sample":null,"query_location":180,"query_location_length":352,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":529,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":53}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":189,"query_location_length":13,"column_names":["ref_9","s_phone"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":211,"query_location_length":17,"column_names":["ref_8","r_regionkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c2","query_location":237,"query_location_length":13,"column_names":["ref_9","s_phone"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":410,"query_location_length":78,"left":{"type":"JOIN","alias":"","sample":null,"query_location":283,"query_location_length":126,"left":{"type":"BASE_TABLE","alias":"ref_8","sample":null,"query_location":262,"query_location_length":20,"schema_name":"main","table_name":"region","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","region"]}},"right":{"type":"BASE_TABLE","alias":"ref_9","sample":null,"query_location":295,"query_location_length":22,"schema_name":"main","table_name":"supplier","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","supplier"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":323,"query_location_length":84,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":323,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":346,"query_location_length":18,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":330,"query_location_length":15,"column_names":["ref_9","s_comment"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":349,"query_location_length":15,"column_names":["ref_9","s_address"]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":370,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":390,"query_location_length":16,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":377,"query_location_length":12,"column_names":["ref_9","s_name"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":394,"query_location_length":12,"column_names":["ref_9","s_name"]}}]}]},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"ref_10","sample":null,"query_location":420,"query_location_length":23,"schema_name":"main","table_name":"customer","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","customer"]}},"condition":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":466,"query_location_length":20,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":449,"query_location_length":16,"column_names":["ref_10","c_address"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":470,"query_location_length":16,"column_names":["ref_10","c_comment"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":510,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":496,"query_location_length":13,"column_names":["ref_9","s_phone"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":599,"query_location_length":20,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":548,"query_location_length":50,"case_checks":[{"when_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":560,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":569,"query_location_length":9,"column_names":["subq_2","c2"]}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":585,"query_location_length":9,"column_names":["subq_2","c2"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":603,"query_location_length":16,"column_names":["ref_1","ps_comment"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT make_time(-1, 64, 157);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"make_time","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":64}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":157}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_extract('{\"duck\": 42}', NULL::VARCHAR)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"duck\": 42}"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT map_concat(42, 42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"map_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv_auto([42])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL FROM repeat(1050, -128)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1050}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-128}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT vector_type(42::INTEGER)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"vector_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT max(c34) FILTER (WHERE c26) OVER (PARTITION BY c23 ROWS BETWEEN COALESCE(c5, 0) PRECEDING AND CURRENT ROW)\nFROM all_types AS t43(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43)\nORDER BY ALL NULLS LAST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":106,"function_name":"max","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["c23"]}],"orders":[],"start":"EXPR_PRECEDING_ROWS","end":"CURRENT_ROW_ROWS","start_expr":{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":71,"query_location_length":15,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":2,"column_names":["c5"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":3,"column_names":["c26"]},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["c34"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"t43","sample":null,"query_location":119,"query_location_length":222,"schema_name":"","table_name":"all_types","column_name_alias":["c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","c11","c12","c13","c14","c15","c16","c17","c18","c19","c20","c21","c22","c23","c24","c25","c26","c27","c28","c29","c30","c31","c32","c33","c34","c35","c36","c37","c38","c39","c40","c41","c42","c43"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT construct_array(*COLUMNS(*)) FROM v00;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":7,"query_location_length":28,"children":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":23,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":32,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":3,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT mode((c0, 0)) FROM (SELECT 1 c0), (SELECT 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":7,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":2,"column_names":["c0"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":21,"query_location_length":30,"left":{"type":"SUBQUERY","alias":"","sample":null,"query_location":26,"query_location_length":13,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c0","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":41,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select (select 1) a where (select (select 3) b where (select b) \u003e (select a));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"a","query_location":7,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":26,"query_location_length":51,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"b","query_location":34,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":53,"query_location_length":23,"left":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":53,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":66,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 FROM t1 WHERE NOT ('\\x96'::BLOB IN (1));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":23,"query_location_length":25,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":44,"query_location_length":3,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\x96"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT 1 LIMIT t1.rowid) FROM t1 NATURAL JOIN t0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":25,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":8,"column_names":["t1","rowid"]},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":41,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from tbl t1 join tbl t2 using (i, j) join tbl t3 using (i, j);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":46,"query_location_length":24,"left":{"type":"JOIN","alias":"","sample":null,"query_location":21,"query_location_length":24,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":26,"query_location_length":6,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i","j"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"t3","sample":null,"query_location":51,"query_location_length":6,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i","j"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 18446744073709550591::DOUBLE::UBIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":0,"lower":18446744073709550591}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 FROM (SELECT 1) t0(c0) GROUP BY CUBE (1) HAVING (currval('seq') IS NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"SUBQUERY","alias":"t0","sample":null,"query_location":14,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c0"]},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"group_sets":[[],[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":73,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":14,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}}]}]},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t2 WHERE c1\u003e1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":23,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":2,"column_names":["c1"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1' LIKE [];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":7,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 * (1 \u003c 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":12,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 FROM range((SELECT 1) - 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":20,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '552.123242346e+11'::DECIMAL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"552.123242346e+11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 FROM t1 WHERE NOT (-9223372036854775808 \u003e= (6892203265207104503 - (-7595956987701092486)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":23,"query_location_length":76,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":28,"query_location_length":70,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775808}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":6892203265207104503}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-7595956987701092486}}}]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ((SELECT 0) UNION (SELECT t1.c0) ORDER BY 1 NULLS LAST OFFSET 1) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":64,"subquery_type":"SCALAR","subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"type":"LIMIT_MODIFIER","limit":null,"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["t1","c0"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT decode('\\xF6\\x96\\xB0\\x85'::BLOB)::VARCHAR ILIKE '1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":9,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\xF6\\x96\\xB0\\x85"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT upper(decode('\\xE0\\x9F\\x98\\x84'::BLOB)::VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":32,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\xE0\\x9F\\x98\\x84"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s.min, s.max, s.has_null, s.has_no_null FROM (SELECT stats(y) s FROM test LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["s","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["s","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":13,"column_names":["s","has_no_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":60,"query_location_length":8,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["y"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t1, t0 JOIN LATERAL (SELECT t1.c1 AS col0) _subq ON true;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":61,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"JOIN","alias":"","sample":null,"query_location":21,"query_location_length":49,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"right":{"type":"SUBQUERY","alias":"_subq","sample":null,"query_location":34,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"col0","query_location":42,"query_location_length":5,"column_names":["t1","c1"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t1.c02, t2.c02, ta04.c02\nFROM (\n\tv00 AS t1\n\tNATURAL JOIN\n\tv00 AS t2 ),\n\t( v00 AS ta04\n\tSEMI JOIN v00 AS ta05\n\tUSING ( c02 ) ) ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["t1","c02"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["t2","c02"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":8,"column_names":["ta04","c02"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":100,"left":{"type":"JOIN","alias":"","sample":null,"query_location":51,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":40,"query_location_length":9,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":65,"query_location_length":9,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"JOIN","alias":"","sample":null,"query_location":94,"query_location_length":36,"left":{"type":"BASE_TABLE","alias":"ta04","sample":null,"query_location":81,"query_location_length":11,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"right":{"type":"BASE_TABLE","alias":"ta05","sample":null,"query_location":104,"query_location_length":11,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"condition":null,"join_type":"SEMI","ref_type":"REGULAR","using_columns":["c02"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT current_schemas(ref_0.bool) AS c4 FROM booleans AS ref_0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"c4","query_location":7,"query_location_length":27,"function_name":"current_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":10,"column_names":["ref_0","bool"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"ref_0","sample":null,"query_location":46,"query_location_length":17,"schema_name":"","table_name":"booleans","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["booleans"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH cte AS (\n SELECT NULL::VARCHAR j\n FROM range(1)\n)\nSELECT json_contains(j, j)\nFROM cte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"j","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":50,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":19,"function_name":"json_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":93,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(COALESCE(CAST(NULL AS STRUCT(a INTEGER, b VARCHAR)), CAST(NULL AS STRUCT(a INTEGER, b VARCHAR))) AS STRUCT(a INTEGER, b VARCHAR))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":134,"child":{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":12,"query_location_length":96,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":42,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":28,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":42,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":28,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":87,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":98,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":28,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":121,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":132,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT nth_value(1929, 42) OVER (\n\tPARTITION BY (\n\t\t\"usmallint\" \u003e \"smallint\"\n\t), 747 ROWS BETWEEN 1 PRECEDING AND COALESCE(\"bigint\", 0) PRECEDING\n)\nFROM all_types;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"","query_location":7,"query_location_length":140,"function_name":"nth_value","schema":"","catalog":"","partitions":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":52,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":11,"column_names":["usmallint"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":10,"column_names":["smallint"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":747}}],"orders":[],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_PRECEDING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"end_expr":{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":114,"query_location_length":21,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":8,"column_names":["bigint"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1929}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":153,"query_location_length":9,"schema_name":"","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(approx_quantile(d, 0.5) EXPORT_STATE) = approx_quantile(d, 0.5) FROM (VALUES (1.5::DECIMAL(4,1)), (4.5::DECIMAL(4,1)), (2.5::DECIMAL(4,1))) t(d);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":72,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":36,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":85,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":15}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":118,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":45}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":120,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":139,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":25}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":141,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["d"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (approx_top_k(x, 2) EXPORT_STATE)::STRUCT(k UBIGINT, \"values\" STRUCT(\"value\" INTEGER, \"count\" UBIGINT)[], \"filter\" UBIGINT[]).\"values\" FROM (VALUES (5), (5), (6)) t(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":134,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":92,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":31,"function_name":"approx_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":90,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"k","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]},{"class":"TYPE","type":"TYPE","alias":"values","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":40,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"value","query_location":84,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"count","query_location":101,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}]}]},{"class":"TYPE","type":"TYPE","alias":"filter","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":122,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}]}]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"values"}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":147,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(combine(approx_top_k(x, 2) EXPORT_STATE, (SELECT approx_top_k(y, 3) EXPORT_STATE FROM (VALUES ('a')) s(y)))) FROM (VALUES ('a')) t(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":117,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":107,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":31,"function_name":"approx_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":57,"query_location_length":65,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":31,"function_name":"approx_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"SUBQUERY","alias":"s","sample":null,"query_location":102,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":130,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(arg_min(a, b) EXPORT_STATE) FROM (VALUES ([1, 2], 10), ([3], 5)) t(a, b);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":26,"function_name":"arg_min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["b"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":49,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT arg_min(COLUMNS(*), COLUMNS(*)) EXPORT_STATE FROM test_all_types();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"arg_min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":23,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":35,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(combine_aggr(s)) FROM (\n SELECT bool_and(v) EXPORT_STATE AS s FROM (VALUES (NULL::bool)) t(v)\n UNION ALL\n SELECT bool_and(v) EXPORT_STATE AS s FROM (VALUES (true)) t(v)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":15,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":38,"query_location_length":157,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":51,"query_location_length":24,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":86,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":99,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":101,"query_location_length":4,"catalog":"","schema":"","type_name":"bool","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":138,"query_location_length":24,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":173,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":182,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (first(42) EXPORT_STATE)::STRUCT(value INTEGER);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":23,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":22,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":21,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"value","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(first(l) EXPORT_STATE) FROM (VALUES ([['a'], ['bb', NULL]]), ([[]])) t(l);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":21,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["l"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":44,"query_location_length":40,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bb"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["l"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM legacy.t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":8,"schema_name":"legacy","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["legacy","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(list(s) EXPORT_STATE) FROM (VALUES ({'l': [1, 2], 'v': 'abc'}), ({'l': NULL, 'v': NULL})) t(s);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":20,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":43,"query_location_length":62,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"l","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":58,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"v","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v","query_location":71,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"l","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"l","query_location":87,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"v","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v","query_location":98,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_sort(finalize(combine_aggr(s))) FROM (\n SELECT list(v) EXPORT_STATE AS s FROM (VALUES ([1, 2]), ([NULL])) t(v)\n UNION ALL\n SELECT list(v) EXPORT_STATE AS s FROM (VALUES ([]::INTEGER[]), ([3])) t(v)\n) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":25,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":15,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["s"]}}]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":49,"query_location_length":171,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":62,"query_location_length":20,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":93,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":151,"query_location_length":20,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":182,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":193,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":191,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":195,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":208,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":209,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(combine(max('apple'::varchar) EXPORT_STATE, max('cherry'::varchar) EXPORT_STATE));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":90,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":80,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":34,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"apple"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":35,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"cherry"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(list(i ORDER BY i) EXPORT_STATE) FROM (VALUES (1), (3), (2)) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":31,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":54,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM (\n SELECT g, approx_quantile(v, 0.5 ORDER BY v) AS direct FROM approx_t GROUP BY g\n) d JOIN (\n SELECT g, finalize(approx_quantile(v, 0.5 ORDER BY v) EXPORT_STATE) AS exported FROM approx_t GROUP BY g\n) e USING (g)\nWHERE d.direct IS DISTINCT FROM e.exported;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":111,"query_location_length":129,"left":{"type":"SUBQUERY","alias":"d","sample":null,"query_location":21,"query_location_length":87,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"direct","query_location":37,"query_location_length":34,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["v"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":8,"schema_name":"","table_name":"approx_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["approx_t"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"e","sample":null,"query_location":116,"query_location_length":112,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"exported","query_location":132,"query_location_length":57,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":141,"query_location_length":47,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":1,"column_names":["v"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":207,"query_location_length":8,"schema_name":"","table_name":"approx_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["approx_t"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["g"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":247,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":247,"query_location_length":8,"column_names":["d","direct"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":273,"query_location_length":10,"column_names":["e","exported"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM (\n SELECT finalize(combine(a.s, b.s)) AS combined FROM\n (SELECT list(x ORDER BY y, x) EXPORT_STATE AS s FROM parts WHERE part = 0) a,\n (SELECT list(x ORDER BY y, x) EXPORT_STATE AS s FROM parts WHERE part = 1) b\n) c, (SELECT list(x ORDER BY y, x) AS direct FROM parts) d\nWHERE c.combined IS DISTINCT FROM d.direct;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":292,"left":{"type":"SUBQUERY","alias":"c","sample":null,"query_location":21,"query_location_length":230,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"combined","query_location":34,"query_location_length":27,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":17,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":3,"column_names":["a","s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["b","s"]}}]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":74,"query_location_length":175,"left":{"type":"SUBQUERY","alias":"a","sample":null,"query_location":87,"query_location_length":74,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":95,"query_location_length":34,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["y"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":140,"query_location_length":5,"schema_name":"","table_name":"parts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parts"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":152,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":4,"column_names":["part"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":173,"query_location_length":74,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":181,"query_location_length":34,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":1,"column_names":["y"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":186,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":226,"query_location_length":5,"schema_name":"","table_name":"parts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parts"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":238,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":238,"query_location_length":4,"column_names":["part"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":245,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"d","sample":null,"query_location":255,"query_location_length":51,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"direct","query_location":263,"query_location_length":21,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":279,"query_location_length":1,"column_names":["y"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":282,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":268,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":300,"query_location_length":5,"schema_name":"","table_name":"parts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parts"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":315,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":315,"query_location_length":10,"column_names":["c","combined"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":343,"query_location_length":8,"column_names":["d","direct"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(combine_aggr(s)) FROM (\n SELECT product(v) EXPORT_STATE AS s FROM (VALUES (2.0), (3.0)) t(v)\n UNION ALL\n SELECT product(v) EXPORT_STATE AS s FROM (VALUES (4.0), (5.0)) t(v)\n) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":15,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":38,"query_location_length":161,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":51,"query_location_length":23,"function_name":"product","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":85,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":20}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":30}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":137,"query_location_length":23,"function_name":"product","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":171,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":40}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":50}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT kahan_sum(NULL::double) EXPORT_STATE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"kahan_sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (avg(42) export_state)::struct(count ubigint, \"value\" integer);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":40,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":20,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":38,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"count","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"ubigint","children":[]},{"class":"TYPE","type":"TYPE","alias":"value","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(combine(state, state)) FROM t3_product;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":21,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":5,"column_names":["state"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":5,"column_names":["state"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":10,"schema_name":"","table_name":"t3_product","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3_product"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(regr_syy(1.0, 2.0) EXPORT_STATE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":31,"function_name":"regr_syy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":20}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH states AS (\n SELECT sum(v) EXPORT_STATE AS s\n FROM (VALUES (2::BIGINT)) t(v)\n)\nSELECT\n finalize(combine_aggr(s, 3::INTEGER)),\n finalize(combine_aggr(s, 3::UINTEGER)),\n finalize(combine_aggr(s, 3::SMALLINT))\nFROM states;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"states","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":28,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":62,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":37,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":110,"query_location_length":27,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":127,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":129,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":144,"query_location_length":38,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":153,"query_location_length":28,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":170,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":172,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":188,"query_location_length":38,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":197,"query_location_length":28,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":210,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":214,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":216,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":232,"query_location_length":6,"schema_name":"","table_name":"states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["states"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT corr(d, d+1) export_state FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"corr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, skewness(d) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":11,"function_name":"skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(quantile_disc(d, 0.5) EXPORT_STATE) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":34,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, finalize(quantile_cont(d, 0.5) EXPORT_STATE) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":44,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":34,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(quantile_disc({'a': d, 'b': d::VARCHAR}, 0.5) EXPORT_STATE) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":58,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":36,"query_location_length":1,"column_names":["d"]}},{"name":"b","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":45,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["d"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, quantile_cont(d, [0.25, 0.75]) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":30,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":25}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":75}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT string_agg(d, '''' || chr(10) || '🦆') FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":25,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"'"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🦆"}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(sum(d) EXPORT_STATE), finalize(avg(d) EXPORT_STATE)::integer, finalize(count(d) EXPORT_STATE), finalize(min(d) EXPORT_STATE), finalize(max(d) EXPORT_STATE), finalize(first(d) EXPORT_STATE), finalize(last(d) EXPORT_STATE), finalize(kurtosis(d) EXPORT_STATE), finalize(kurtosis_pop(d) EXPORT_STATE) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":19,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["d"]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":31,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":21,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":120,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":142,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":151,"query_location_length":19,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":173,"query_location_length":31,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":182,"query_location_length":21,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":206,"query_location_length":30,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":215,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":220,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":238,"query_location_length":34,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":247,"query_location_length":24,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":256,"query_location_length":1,"column_names":["d"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":274,"query_location_length":38,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":283,"query_location_length":28,"function_name":"kurtosis_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":296,"query_location_length":1,"column_names":["d"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":318,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regr_avgy(d, d+1) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"regr_avgy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regr_sxy(d, d+1) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"regr_sxy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select g, finalize(combine(sum(d) EXPORT_STATE, sum_state)) combined_sum from dummy join state using (g) group by g, sum_state ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"combined_sum","query_location":10,"query_location_length":49,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":39,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["d"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":9,"column_names":["sum_state"]}}]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":84,"query_location_length":20,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":5,"schema_name":"","table_name":"state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["state"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["g"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":9,"column_names":["sum_state"]}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select FINALIZE(argmin(a,b) EXPORT_STATE), FINALIZE(argmax(a,b) EXPORT_STATE) from (values (1,1), (2,2), (8,8), (10,10)) s(a,b);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":24,"function_name":"argmin","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["b"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":34,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":24,"function_name":"argmax","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"s","sample":null,"query_location":83,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT kurtosis_pop(d) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"kurtosis_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(finalize(avg(d) EXPORT_STATE)) from dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":19,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["d"]}}]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \n g,\n finalize(combined_state) as finalized_combined\nFROM combined_big_string_state\nORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"finalized_combined","query_location":19,"query_location_length":24,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":14,"column_names":["combined_state"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":71,"query_location_length":25,"schema_name":"","table_name":"combined_big_string_state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["combined_big_string_state"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(min(v) EXPORT_STATE) FROM (SELECT NULL::struct(a int, b varchar) AS v WHERE false) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["v"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":42,"query_location_length":56,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":54,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":24,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":65,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":72,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT finalize(combine_aggr(s)) FROM (\n SELECT max({'a': v}) EXPORT_STATE AS s FROM (VALUES (3), (4)) t(v)\n UNION ALL\n SELECT max({'a': v}) EXPORT_STATE AS s FROM (VALUES (5), (1)) t(v)\n) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":15,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":38,"query_location_length":159,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":51,"query_location_length":26,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":61,"query_location_length":1,"column_names":["v"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":88,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":136,"query_location_length":26,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":140,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":146,"query_location_length":1,"column_names":["v"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":173,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":182,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select approx_top_k(i, NULL) from range(5) t(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"approx_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":34,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM compute_top_k(lineitem, l_returnflag, l_orderkey, 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":52,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"compute_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":8,"column_names":["lineitem"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":12,"column_names":["l_returnflag"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":10,"column_names":["l_orderkey"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT grp, arg_min_nulls_last(arg, val) FROM tbl GROUP BY grp ORDER BY grp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":3,"column_names":["grp"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["grp"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":28,"function_name":"arg_min_nulls_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["arg"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":3,"column_names":["val"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":3,"column_names":["grp"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT equi_width_bins(0, 1734, 10, true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1734}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT unnest(equi_width_bins(0.0, 9.0, 7, false));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":35,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":90}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select equi_width_bins(0.0, 3.974, 10, true) AS boundaries;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"boundaries","query_location":7,"query_location_length":37,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":3}},"is_null":false,"value":3974}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT equi_width_bins(timestamp '1992-01-01 01:23:37.999', timestamp '1992-01-01 01:53:21.3', 4, true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":96,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01 01:23:37.999"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":60,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01 01:53:21.3"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT equi_width_bins(0.0, 1.0, 99999999, true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":8,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":99999999}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT histogram_exact(n, [10, 10, 20]) FROM obs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"histogram_exact","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":3,"schema_name":"","table_name":"obs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["obs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM histogram_values(integers, (i%2)::VARCHAR)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"histogram_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":8,"column_names":["integers"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT lttb(x::DOUBLE, y::DOUBLE, 2 ORDER BY x)\nFROM (SELECT i AS x, i::DOUBLE AS y FROM range(10) t(i))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"lttb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["x"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["y"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":53,"query_location_length":51,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":61,"query_location_length":1,"column_names":["i"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"y","query_location":70,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":89,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH data AS (\n SELECT i,\n (CASE WHEN i = 37 THEN 1000 ELSE i % 7 END)::DOUBLE AS y,\n make_timestamp_ns(1577836800000000000 + i) AS ts\n FROM range(100) t(i)\n),\nnum AS (\n SELECT UNNEST(lttb(i::DOUBLE, y, 10 ORDER BY i)) AS p\n FROM data\n),\nns AS (\n SELECT UNNEST(lttb(ts, y, 10 ORDER BY ts)) AS p\n FROM data\n)\nSELECT (SELECT list(p.x ORDER BY p.x) FROM num)\n = (SELECT list((epoch_ns(p.x) - 1577836800000000000)::DOUBLE ORDER BY epoch_ns(p.x)) FROM ns)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"data","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"y","query_location":83,"query_location_length":8,"child":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":41,"query_location_length":41,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":37}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":85,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"ts","query_location":109,"query_location_length":42,"function_name":"make_timestamp_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":147,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1577836800000000000}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":1,"column_names":["i"]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":167,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"num","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":206,"query_location_length":41,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":213,"query_location_length":33,"function_name":"lttb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":244,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":219,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":221,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":229,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":232,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":262,"query_location_length":4,"schema_name":"","table_name":"data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"ns","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":289,"query_location_length":35,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":296,"query_location_length":27,"function_name":"lttb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":320,"query_location_length":2,"column_names":["ts"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":301,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":305,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":308,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":339,"query_location_length":4,"schema_name":"","table_name":"data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":353,"query_location_length":141,"left":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":353,"query_location_length":40,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":361,"query_location_length":22,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":379,"query_location_length":3,"column_names":["p","x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":366,"query_location_length":3,"column_names":["p","x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":389,"query_location_length":3,"schema_name":"","table_name":"num","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["num"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":403,"query_location_length":91,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":411,"query_location_length":74,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":471,"query_location_length":13,"function_name":"epoch_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":480,"query_location_length":3,"column_names":["p","x"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":453,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":431,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":417,"query_location_length":13,"function_name":"epoch_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":426,"query_location_length":3,"column_names":["p","x"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":433,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1577836800000000000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":455,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":491,"query_location_length":2,"schema_name":"","table_name":"ns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ns"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT * FROM window_table ORDER BY rowid) EXCEPT SELECT * FROM (SELECT * FROM agg_table ORDER BY rowid);","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":43,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":5,"column_names":["rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":22,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":12,"schema_name":"","table_name":"window_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["window_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":72,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":79,"query_location_length":40,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":5,"column_names":["rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":87,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":9,"schema_name":"","table_name":"agg_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["agg_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT list_mode(values)::VARCHAR, round(list_entropy(values), 6)::VARCHAR\nFROM (VALUES (['nan'::DOUBLE, 'nan'::DOUBLE, 'nan'::DOUBLE, 1.0, 1.0])) t(values);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"list_mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":6,"column_names":["values"]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":30,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":20,"function_name":"list_entropy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":6,"column_names":["values"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":80,"query_location_length":66,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":55,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nan"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":110,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nan"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":125,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nan"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":127,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["values"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT currval('mode_rewrite_order_seq');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"mode_rewrite_order_seq"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MIN(s), MAX(s) FROM test_strings;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["s"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":12,"schema_name":"","table_name":"test_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, COUNT(*), COUNT(b), MIN(b), MAX(b) FROM booleans GROUP BY g ORDER BY g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"booleans","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["booleans"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM('hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FIRST(1, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT STRING_AGG()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ANY_VALUE(d ORDER BY 5-i), ANY_VALUE(dt ORDER BY 5-i), ANY_VALUE(t ORDER BY 5-i), ANY_VALUE(s ORDER BY 5-i) FROM five_dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["d"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":26,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["dt"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["t"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":120,"query_location_length":10,"schema_name":"","table_name":"five_dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ANY_VALUE(b) FROM tbl WHERE a=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":35,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CASE\n\t WHEN ( approx_quantile between (true_quantile - 100) and (true_quantile + 100) )\n\t\t THEN TRUE\n\t\t ELSE FALSE\n\t END\n\t FROM (SELECT approx_quantile(42, 0.5) as approx_quantile ,quantile(42, 0.5) as true_quantile) AS T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":124,"case_checks":[{"when_expr":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":38,"query_location_length":55,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":15,"column_names":["approx_quantile"]},"lower":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":13,"column_names":["true_quantile"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"upper":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":13,"column_names":["true_quantile"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":140,"query_location_length":90,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"approx_quantile","query_location":148,"query_location_length":24,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"true_quantile","query_location":194,"query_location_length":17,"function_name":"quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":203,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":207,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT approx_quantile(r, 1.1) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":11}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT reservoir_quantile(r, 0.9) from quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"reservoir_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":9}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT RESERVOIR_QUANTILE(0., 0.9, 1000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"reservoir_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":1,"scale":0}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT( t),approx_count_distinct(t) from timestamp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["t"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":24,"function_name":"approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["t"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select argmax(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"argmax","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select argmin(name,salary),argmax(name,salary) from names;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"argmin","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":4,"column_names":["name"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":6,"column_names":["salary"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":19,"function_name":"argmax","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":4,"column_names":["name"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":6,"column_names":["salary"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":5,"schema_name":"","table_name":"names","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["names"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select arg_min_null(i,i) from range (100) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"arg_min_null","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":30,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select arg_min_null(a,b) over ( partition by a%2) from args;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":42,"function_name":"arg_min_null","schema":"","catalog":"","partitions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":4,"schema_name":"","table_name":"args","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["args"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT AVG(1, 2, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT histogram(n, []) FROM obs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":3,"schema_name":"","table_name":"obs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["obs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_aggregate(map_values(histogram(n, [10, 10, 10, 10])), 'sum') FROM obs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"list_aggregate","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":42,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":30,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"sum"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":3,"schema_name":"","table_name":"obs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["obs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT BIT_AND('010110'::BIT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"bit_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"010110"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT BIT_XOR(nextval('seq'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"bit_xor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT BITSTRING_AGG(i) FROM smallints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT bit_count(BITSTRING_AGG(i)) FROM bigints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"bit_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":16,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT BITSTRING_AGG(i) FROM null_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":10,"schema_name":"","table_name":"null_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select bool_and()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select corr(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"corr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, COUNT(*) FROM integers GROUP BY i ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COVAR_SAMP(x,y), COVAR_SAMP(x,1), COVAR_SAMP(1,y), COVAR_SAMP(x,NULL), COVAR_SAMP(NULL,y) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"covar_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["y"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":15,"function_name":"covar_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":15,"function_name":"covar_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["y"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":18,"function_name":"covar_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":18,"function_name":"covar_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["y"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select entropy(k) from aggr group by k%2 order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"entropy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["k"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["k"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ANY_VALUE(i ORDER BY grp DESC NULLS FIRST) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":3,"column_names":["grp"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FIRST(i) FROM (VALUES (NULL::INT32)) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":21,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":5,"catalog":"","schema":"","type_name":"INT32","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select histogram(1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT histogram(CAST('2021-08-20' AS TIMESTAMP_MS));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":34,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-08-20"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(1, 2, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MIN(MIN(1))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select kurtosis(k), kurtosis(v), kurtosis(v2) from aggr;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["k"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":11,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["v"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":12,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":2,"column_names":["v2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LAST(d ORDER BY 5-i), LAST(dt ORDER BY 5-i), LAST(t ORDER BY 5-i), LAST(s ORDER BY 5-i) FROM five_dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["d"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":21,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["dt"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["t"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["i"]}}]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":100,"query_location_length":10,"schema_name":"","table_name":"five_dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LAST(b) FROM tbl WHERE a=1 GROUP BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["a"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select mad(x) from (values ('2147483647'::DECIMAL(10,0)), ('-2147483648'::DECIMAL(10,0))) tbl(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":19,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2147483647"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-2147483648"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT median(r::bigint)::VARCHAR FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["r"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MEDIAN(x)\nFROM (VALUES\n\t(INTERVAL '1 day'),\n\t(INTERVAL '10 days')\n) v(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":22,"query_location_length":52,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 day"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10 days"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select mode(name) from names;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":4,"column_names":["name"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":5,"schema_name":"","table_name":"names","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["names"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select mode(v) from intervals;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FIRST(i ORDER BY i DESC) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \"dest\", percentile_disc([0.25, 0.5, 0.75]) WITHIN GROUP (ORDER BY \"arr_delay\") AS \"iqr_delay\"\nFROM \"flights\"\nGROUP BY \"dest\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["dest"]},{"class":"FUNCTION","type":"FUNCTION","alias":"iqr_delay","query_location":15,"query_location_length":70,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":11,"column_names":["arr_delay"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":25}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":75}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":106,"query_location_length":9,"schema_name":"","table_name":"flights","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["flights"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":6,"column_names":["dest"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT percentile_disc(sum(1)) WITHIN GROUP (ORDER BY 1 DESC);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select extract(year from d), extract(month from d) from dates group by 1, 2 ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"YEAR"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["d"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":21,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MONTH"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_cont(r, 0.5) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_cont('00:00:00'::TIME + interval (r/100) second, 0.5) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":62,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":23,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":75,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_cont(r, 0.1, 50) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_cont('2021-01-01'::TIMESTAMP + interval (r/100) hour, [0.25, 0.5, 0.75]) FROM quantiles","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":21,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":25}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":75}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_cont(r, [0.25, 0.5, NULL]) FROM quantiles","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":25}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_disc(NULL, 0.5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_disc('1990-01-01'::DATE + interval (r) day, 0.5) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1990-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["r"]},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":70,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_cont(r, q) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["q"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile_disc('00:00:00'::TIME + interval (r) second, [0.1, 0.5, 0.9]) FROM quantiles","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":70,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":19,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["r"]},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":9}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":83,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regr_avgx(1,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"regr_avgx","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regr_slope(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"regr_slope","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regr_syy(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"regr_syy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select k, regr_avgy(v, v2) from aggr group by k ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":16,"function_name":"regr_avgy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":2,"column_names":["v2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regr_r2(v, v2) from aggr ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"regr_r2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":2,"column_names":["v2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regr_sxy(v, v2) over (partition by k)\n from aggr;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":8,"query_location_length":37,"function_name":"regr_sxy","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["k"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["v2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select sem(*)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sem","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select skewness(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select grp, sum(val), round(stddev_samp(val), 1), min(val) from stddev_test group by grp order by grp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":3,"column_names":["grp"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["grp"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["val"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":26,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":16,"function_name":"stddev_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":3,"column_names":["val"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":8,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["val"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":11,"schema_name":"","table_name":"stddev_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stddev_test"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":3,"column_names":["grp"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select round(var_pop(val), 1) from stddev_test where val is not null","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":12,"function_name":"var_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":3,"column_names":["val"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"stddev_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stddev_test"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":58,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["val"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT STRING_AGG('a',',')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, STRING_AGG(x ORDER BY x DESC), STRING_AGG(x, '|' ORDER BY x DESC) FROM strings GROUP BY g ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":29,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":34,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"|"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM (SELECT g, STRING_AGG(x,',') FROM strings GROUP BY g) t1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":21,"query_location_length":53,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":17,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT weighted_avg(3, 0), weighted_avg(3, 0.0), weighted_avg(0, 3), weighted_avg(0.0, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"weighted_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":20,"function_name":"weighted_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":18,"function_name":"weighted_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":20,"function_name":"weighted_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM (SELECT DISTINCT i FROM empty_table LIMIT 10)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":11,"schema_name":"","table_name":"empty_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empty_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT ON (i) i, j FROM integers ORDER BY i, j;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["j"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select distinct on(a) a, b from foo order by b desc;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":3,"schema_name":"","table_name":"foo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["foo"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT GROUPING(course), GROUPING(value), course, sum(distinct value), COUNT(*) FROM students GROUP BY CUBE(course, value) HAVING GROUPING(course)=0 ORDER BY all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":7,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":6,"column_names":["course"]}]},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":25,"query_location_length":15,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":5,"column_names":["value"]}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":6,"column_names":["course"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":5,"column_names":["value"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":85,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":5,"column_names":["value"]}],"group_sets":[[],[0],[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":130,"query_location_length":18,"left":{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":130,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":6,"column_names":["course"]}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select sum(distinct value), count(*), course, type\n\tfrom students\n\tgroup by grouping sets((course, type), (course))\n\torder by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":5,"column_names":["value"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["type"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":4,"column_names":["type"]}],"group_sets":[[0,1],[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, STRING_AGG(DISTINCT y ORDER BY y, '_' ) FILTER (WHERE g \u003c 4)\nFROM strings\nGROUP BY g\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":60,"function_name":"string_agg","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":64,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["g"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["y"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"_"}}}]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["y"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, count(DISTINCT x), count(DISTINCT y), sum(DISTINCT x), sum(y)\nFROM distinct_rewrite_nulls\nGROUP BY g\nORDER BY g NULLS FIRST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["x"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["y"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["x"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["y"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":22,"schema_name":"","table_name":"distinct_rewrite_nulls","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_rewrite_nulls"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(DISTINCT value::INTEGER) FILTER (WHERE keep)\nFROM distinct_rewrite_filter_errors;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"count","schema":"","filter":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":4,"column_names":["keep"]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":5,"column_names":["value"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":30,"schema_name":"","table_name":"distinct_rewrite_filter_errors","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_rewrite_filter_errors"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(DISTINCT nextval('distinct_rewrite_seq_filtered_arg')) FILTER (WHERE false)\nFROM range(4);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"count","schema":"","filter":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":44,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"distinct_rewrite_seq_filtered_arg"}}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":94,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT ON (i) i, j FROM integers WHERE i \u003c\u003e 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":48,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT ON (2) j, (SELECT DISTINCT ON (i) i FROM integers ORDER BY 1 LIMIT 1) FROM integers ORDER BY 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["j"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":26,"query_location_length":59,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["i"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":91,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM (VALUES (1,1,2),(1,1,3),(2,1,4)) AS t(key1,key2,v)\nSELECT DISTINCT ON (COLUMNS('key'), v) key1, key2, v ORDER BY key1, v","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"STAR","type":"STAR","alias":"","query_location":76,"query_location_length":14,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"key"}},"qualified_exclude_list":[],"rename_list":[]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["v"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":4,"column_names":["key1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":4,"column_names":["key1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":4,"column_names":["key2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":5,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["key1","key2","v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM (VALUES (1,1,2),(1,1,3)) AS t(key1,key2,v)\nSELECT DISTINCT ON (COLUMNS(['key1', 'key2'])) * ORDER BY key1, key2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"STAR","type":"STAR","alias":"","query_location":68,"query_location_length":25,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"key1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"key2"}}}]},"qualified_exclude_list":[],"rename_list":[]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":4,"column_names":["key1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":4,"column_names":["key2"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":95,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":5,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["key1","key2","v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select\n\tsum(i),\n\tsum(distinct i),\n\tsum(j)\nfrom tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(distinct i), min(distinct i), max(distinct i), sum(distinct i), product(distinct i) from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":15,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":15,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":19,"function_name":"product","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (g+i)%2, SUM(i), SUM(g) FROM integers GROUP BY g, i ORDER BY 1 NULLS FIRST, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["g"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["g"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g, SUM(i) FROM integers GROUP BY ALL ORDER BY g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT b % 2 AS f, SUM(a) FROM test GROUP BY f ORDER BY f;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["f"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"f","query_location":7,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["f"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 AS k, SUM(i) FROM integers GROUP BY k+1 ORDER BY 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"k","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["k"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (10-i) AS k, SUM(i) FROM integers GROUP BY k ORDER BY FIRST(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":8,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]}}]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":10,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT k, SUM(v) FROM struct_lint_lstr\nGROUP BY k\nORDER BY 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":16,"schema_name":"","table_name":"struct_lint_lstr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_lint_lstr"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL FROM t0 GROUP BY NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select course as crs, type, count(*) from students group by cube (crs), (), type order by 1, 2, 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"crs","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":3,"column_names":["crs"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":4,"column_names":["type"]}],"group_sets":[[1],[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT GROUPING(students.course), GROUPING(students.type), GROUPING(course)+GROUPING(type), course, type, COUNT(*) FROM students GROUP BY CUBE(course, type) ORDER BY 1, 2, 3, 4, 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":7,"query_location_length":25,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":15,"column_names":["students","course"]}]},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":34,"query_location_length":23,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":13,"column_names":["students","type"]}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":59,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":6,"column_names":["course"]}]}},{"name":"","expression":{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":76,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":4,"column_names":["type"]}]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":106,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":120,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":4,"column_names":["type"]}],"group_sets":[[],[0],[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT GROUPING(course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course, course), course, type, COUNT(*) FROM students GROUP BY CUBE(course, type) ORDER BY 1, 2, 3, 4;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":731,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":734,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":737,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":740,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":7,"query_location_length":648,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":176,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":192,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":208,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":216,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":240,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":248,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":256,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":264,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":272,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":280,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":288,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":296,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":304,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":312,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":320,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":328,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":336,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":344,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":352,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":360,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":368,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":376,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":384,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":392,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":400,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":408,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":416,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":424,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":432,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":440,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":448,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":456,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":464,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":472,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":480,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":488,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":496,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":504,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":512,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":520,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":528,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":536,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":544,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":552,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":560,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":568,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":576,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":584,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":592,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":600,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":608,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":616,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":624,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":632,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":640,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":648,"query_location_length":6,"column_names":["course"]}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":657,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":665,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":671,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":685,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":708,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":716,"query_location_length":4,"column_names":["type"]}],"group_sets":[[],[0],[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*), course, type\n from students\n group by grouping sets (grouping sets(course, ()), grouping sets(type))\n order by 1, 2, 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":4,"column_names":["type"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":4,"column_names":["type"]}],"group_sets":[[0],[],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT course, COUNT(*) FROM students GROUP BY GROUPING SETS ((), (course)) HAVING random()\u003e1000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":6,"column_names":["course"]}],"group_sets":[[],[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":83,"query_location_length":13,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select course, count(*) from students group by rollup (grouping_sets (course)) order by 1, 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":22,"function_name":"grouping_sets","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":6,"column_names":["course"]}}]}],"group_sets":[[],[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT b, SUM(a) AS sum FROM test GROUP BY b HAVING COUNT(*) = 1 ORDER BY b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]},{"class":"FUNCTION","type":"FUNCTION","alias":"sum","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(42) HAVING (SELECT SUM(42)) \u003e SUM(80)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":22,"query_location_length":26,"left":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":22,"query_location_length":16,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":80}}}]}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM exam QUALIFY rank() OVER (PARTITION BY student ORDER BY mark DESC) = 2 ORDER BY student","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":7,"column_names":["student"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"exam","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["exam"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":27,"query_location_length":57,"left":{"class":"WINDOW","type":"WINDOW_RANK","alias":"","query_location":27,"query_location_length":53,"function_name":"rank","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":7,"column_names":["student"]}],"orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":4,"column_names":["mark"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}},"named_param_map":[]}]}} -{"sql":"SELECT * \nFROM (\n\tSELECT b FROM test as t \n\tGROUP BY b \n\tQUALIFY rank() OVER (PARTITION BY t.b) = 1\n) \nQUALIFY row_number() OVER (PARTITION BY b) = 1\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":15,"query_location_length":86,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":32,"query_location_length":9,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":34,"left":{"class":"WINDOW","type":"WINDOW_RANK","alias":"","query_location":65,"query_location_length":30,"function_name":"rank","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":3,"column_names":["t","b"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":111,"query_location_length":38,"left":{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":111,"query_location_length":34,"function_name":"row_number","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":1,"column_names":["b"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},"named_param_map":[]}]}} -{"sql":"SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY \"l_extendedprice\") FROM lineitem;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":62,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":17,"column_names":["l_extendedprice"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":75,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT table_name, database_name, temporary FROM duckdb_tables() WHERE table_name='temp_drop_not_null_test'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["table_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":9,"column_names":["temporary"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":49,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"temp_drop_not_null_test"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test WHERE i = 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c0 FROM generate_series(0, 0, NULL) t3(c0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["c0"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t3","sample":null,"query_location":15,"query_location_length":34,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["c0"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 LIMIT CAST('NaN' AS REAL)%;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"literal":{"kind":"STRING","text":"NaN"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":4,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},"offset":null,"limit_type":"PERCENTAGE"}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_distance('asdf', [42]::INTEGER[1]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"array_distance","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"literal":{"kind":"STRING","text":"asdf"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["array"]}}}}],"qualified_name":{"path":["array_distance"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select array_pop_front(i) from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"array_pop_front","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["array_pop_front"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bitstring_agg(i, 0, (100 + random())::BIGINT) FROM range(10) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["random"]}}}],"qualified_name":{"path":["+"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["bitstring_agg"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":58,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT any_value(NULL ORDER BY c38 ASC) FROM t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["c38"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["any_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c1, #2 FROM integers GROUP BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["c1"]},{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":11,"query_location_length":2,"index":2}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_extract('hello world', CAST(NULL AS json)) AS c1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"c1","query_location":7,"query_location_length":47,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":4,"catalog":"","schema":"","type_name":"json","children":[],"qualified_name":{"path":["json"]}}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS TIMESTAMP WITH TIME ZONE[]) FROM integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":41,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":24,"catalog":"","schema":"","type_name":"TIMESTAMP WITH TIME ZONE","children":[],"qualified_name":{"path":["TIMESTAMP WITH TIME ZONE"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cume_dist() OVER (ROWS \n\tBETWEEN UNBOUNDED PRECEDING \n\tAND regr_sxx(6311, 8320 \n\t\tORDER BY 1726 ASC NULLS FIRST, \n\t\t\t10101, \n\t\t\t(946 BETWEEN 2053 AND 182) DESC NULLS LAST)\n\t\tFILTER (WHERE 118) PRECEDING\n\t)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_CUME_DIST","alias":"","query_location":7,"query_location_length":205,"function_name":"cume_dist","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"EXPR_PRECEDING_ROWS","start_expr":null,"end_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":133,"function_name":"regr_sxx","schema":"","filter":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":3,"literal":{"kind":"INTEGER","text":"118"}},"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1726"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10101"}}},{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":140,"query_location_length":20,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":3,"literal":{"kind":"INTEGER","text":"946"}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2053"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":3,"literal":{"kind":"INTEGER","text":"182"}}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":4,"literal":{"kind":"INTEGER","text":"6311"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":4,"literal":{"kind":"INTEGER","text":"8320"}}}],"qualified_name":{"path":["regr_sxx"]}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["cume_dist"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM repeat(42, 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["repeat"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_weeks(#4) \nFROM all_types AS t43(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42) \nWHERE c9","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"to_weeks","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":16,"query_location_length":2,"index":4}}],"qualified_name":{"path":["to_weeks"]}}],"from_table":{"type":"BASE_TABLE","alias":"t43","sample":null,"query_location":26,"query_location_length":217,"schema_name":"","table_name":"all_types","column_name_alias":["c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","c11","c12","c13","c14","c15","c16","c17","c18","c19","c20","c21","c22","c23","c24","c25","c26","c27","c28","c29","c30","c31","c32","c33","c34","c35","c36","c37","c38","c39","c40","c41","c42"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types"]}},"where_clause":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":251,"query_location_length":2,"column_names":["c9"]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT subq_0.c4 AS c1 FROM (SELECT ref_5.varchar_array AS c4, ref_2.usmallint AS c5 FROM main.all_types AS ref_0 INNER JOIN main.all_types AS ref_1 ON ((ref_1.\"varchar\" !~~* ref_0.\"varchar\")) LEFT JOIN main.all_types AS ref_2 RIGHT JOIN main.all_types AS ref_3 ON ((ref_2.\"bigint\" = ref_3.\"bigint\")) ON ((ref_0.timestamp_tz = ref_2.timestamp_tz)) INNER JOIN main.all_types AS ref_4 ON ((ref_3.dec_18_6 IS NOT NULL)) INNER JOIN main.all_types AS ref_5 ON ((ref_3.\"varchar\" ^@ ref_1.\"varchar\")) WHERE EXISTS(SELECT ref_5.blob AS c0, ref_3.ubigint AS c1 FROM main.all_types AS ref_6 WHERE (ref_2.\"varchar\" !~~* ref_4.\"varchar\") LIMIT 120)) AS subq_0 WHERE EXISTS(SELECT ref_7.\"map\" AS c0, subq_0.c5 AS c1 FROM main.all_types AS ref_7 WHERE (ref_7.\"varchar\" ~~~ ref_7.\"varchar\") LIMIT 118)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":7,"query_location_length":9,"column_names":["subq_0","c4"]}],"from_table":{"type":"SUBQUERY","alias":"subq_0","sample":null,"query_location":28,"query_location_length":609,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c4","query_location":36,"query_location_length":19,"column_names":["ref_5","varchar_array"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c5","query_location":63,"query_location_length":15,"column_names":["ref_2","usmallint"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":417,"query_location_length":76,"left":{"type":"JOIN","alias":"","sample":null,"query_location":348,"query_location_length":68,"left":{"type":"JOIN","alias":"","sample":null,"query_location":193,"query_location_length":154,"left":{"type":"JOIN","alias":"","sample":null,"query_location":114,"query_location_length":78,"left":{"type":"BASE_TABLE","alias":"ref_0","sample":null,"query_location":90,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"right":{"type":"BASE_TABLE","alias":"ref_1","sample":null,"query_location":125,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"condition":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":20,"function_name":"!~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":15,"column_names":["ref_1","varchar"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":15,"column_names":["ref_0","varchar"]}}],"qualified_name":{"path":["!~~*"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"JOIN","alias":"","sample":null,"query_location":227,"query_location_length":73,"left":{"type":"BASE_TABLE","alias":"ref_2","sample":null,"query_location":203,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"right":{"type":"BASE_TABLE","alias":"ref_3","sample":null,"query_location":238,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":267,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":267,"query_location_length":14,"column_names":["ref_2","bigint"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":284,"query_location_length":14,"column_names":["ref_3","bigint"]}},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":306,"query_location_length":39,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":306,"query_location_length":18,"column_names":["ref_0","timestamp_tz"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":327,"query_location_length":18,"column_names":["ref_2","timestamp_tz"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"ref_4","sample":null,"query_location":359,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"condition":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":403,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":388,"query_location_length":14,"column_names":["ref_3","dec_18_6"]}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"ref_5","sample":null,"query_location":428,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"condition":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":457,"query_location_length":34,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":457,"query_location_length":15,"column_names":["ref_3","varchar"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":476,"query_location_length":15,"column_names":["ref_1","varchar"]}}],"qualified_name":{"path":["^@"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":500,"query_location_length":136,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":632,"query_location_length":3,"literal":{"kind":"INTEGER","text":"120"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":514,"query_location_length":10,"column_names":["ref_5","blob"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":532,"query_location_length":13,"column_names":["ref_3","ubigint"]}],"from_table":{"type":"BASE_TABLE","alias":"ref_6","sample":null,"query_location":557,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":604,"query_location_length":20,"function_name":"!~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":588,"query_location_length":15,"column_names":["ref_2","varchar"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":609,"query_location_length":15,"column_names":["ref_4","varchar"]}}],"qualified_name":{"path":["!~~*"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":654,"query_location_length":132,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":782,"query_location_length":3,"literal":{"kind":"INTEGER","text":"118"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":668,"query_location_length":11,"column_names":["ref_7","map"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":687,"query_location_length":9,"column_names":["subq_0","c5"]}],"from_table":{"type":"BASE_TABLE","alias":"ref_7","sample":null,"query_location":708,"query_location_length":23,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":755,"query_location_length":19,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":739,"query_location_length":15,"column_names":["ref_7","varchar"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":759,"query_location_length":15,"column_names":["ref_7","varchar"]}}],"qualified_name":{"path":["~~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (*COLUMNS(*) IS NULL) FROM v00;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":20,"query_location_length":7,"children":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":8,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":17,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":3,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT reservoir_quantile(1, 1 ORDER BY 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"reservoir_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["reservoir_quantile"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 FROM (SELECT 1) t1(c0) JOIN t0 ON c1 BETWEEN c0 AND 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":30,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":14,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c0"]},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"condition":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":46,"query_location_length":16,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["c1"]},"lower":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":2,"column_names":["c0"]},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 0 c0 FROM t1 GROUP BY ALL HAVING c0 \u003c ALL(SELECT 0 FROM ((SELECT 2) UNION (SELECT 2)) t2 WHERE substr('b', 1, c0) GROUP BY ALL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c0","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":40,"query_location_length":94,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":63,"query_location_length":29,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":18,"function_name":"substr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":2,"column_names":["c0"]}}],"qualified_name":{"path":["substr"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["c0"]},"comparison_type":"COMPARE_GREATERTHANOREQUALTO"}]},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t0.*, min(1 ORDER BY ALL) FROM (VALUES ('1')) t0(c0) GROUP BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":4,"relation_name":"t0","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"SUBQUERY","alias":"t0","sample":null,"query_location":38,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c0"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SHOW","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"__show_tables_expanded","query":null,"show_type":"SHOW_SPECIAL","catalog_name":"","schema_name":"","qualified_name":{"path":["__show_tables_expanded"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (t1 JOIN t1 t2 USING (c0)), (SELECT 42)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":44,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":23,"query_location_length":5,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["c0"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":42,"query_location_length":11,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 4294967295::DOUBLE::UINTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"INTEGER","text":"4294967295"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT rowid c2 FROM t0 GROUP BY ALL ORDER BY (t0.rowid, c2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":14,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":8,"column_names":["t0","rowid"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":2,"column_names":["c2"]}}],"qualified_name":{"path":["row"]}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c2","query_location":7,"query_location_length":5,"column_names":["rowid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c1 FROM ((SELECT 1 AS c1) UNION (SELECT id AS c1 FROM t0 limit 1)) A where c1 IN (1, 2, 3, 4);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["c1"]}],"from_table":{"type":"SUBQUERY","alias":"A","sample":null,"query_location":15,"query_location_length":58,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c1","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":47,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":88,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":2,"column_names":["c1"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE 8 WHEN(0 IS DISTINCT FROM 0) THEN 2 END;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":44,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}},"right":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":19,"query_location_length":20,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 FROM t1 t2(c1) NATURAL INNER JOIN t0, t2 t1(c0) WHERE t2.c2 \u003e= c0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":47,"left":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"t1","column_name_alias":["c1"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":47,"query_location_length":9,"schema_name":"","table_name":"t2","column_name_alias":["c0"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":63,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":5,"column_names":["t2","c2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":2,"column_names":["c0"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 FROM (SELECT 1) t0(c0) WHERE (SELECT (SELECT c0));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"SUBQUERY","alias":"t0","sample":null,"query_location":14,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c0"]},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":38,"query_location_length":20,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":46,"query_location_length":11,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":2,"column_names":["c0"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '-9223372036854775807' MICROSECONDS;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"to_microseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":22,"literal":{"kind":"STRING","text":"-9223372036854775807"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_microseconds"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 FROM t2 WHERE currval('t0') BETWEEN TRY_CAST(0 AS TIMESTAMP WITH TIME ZONE) AND 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":37,"query_location_length":53,"input":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":13,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"STRING","text":"t0"}}}],"qualified_name":{"path":["currval"]}},"lower":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":39,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":24,"catalog":"","schema":"","type_name":"TIMESTAMP WITH TIME ZONE","children":[],"qualified_name":{"path":["TIMESTAMP WITH TIME ZONE"]}}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (WITH RECURSIVE t1 AS (SELECT 1 UNION SELECT 1 FROM t1 WHERE c2 \u003c 3) SELECT 2 FROM t1) FROM (SELECT 1 c2) t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":86,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t1","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":68,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":2,"column_names":["c2"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":90,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":99,"query_location_length":13,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c2","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 FROM (SELECT 1 ORDER BY ALL LIMIT 514322393620248226) USING SAMPLE SYSTEM (36%);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":48,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":18,"literal":{"kind":"INTEGER","text":"514322393620248226"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":{"sample_size":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":36.0},"is_percentage":true,"method":"System","seed":-1,"repeatable":false,"sample_rate":-1.0},"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT nextval('s0');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"s0"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT decode('\\xC2\\xA3'::BLOB)::VARCHAR ILIKE '£';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":10,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":10,"literal":{"kind":"STRING","text":"\\xC2\\xA3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"qualified_name":{"path":["decode"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":4,"literal":{"kind":"STRING","text":"£"}}}],"qualified_name":{"path":["~~*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT upper(decode('\\xc1\\x81'::BLOB)::VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":24,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":10,"literal":{"kind":"STRING","text":"\\xc1\\x81"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"qualified_name":{"path":["decode"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["upper"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON ('string') 'x' AS c02;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":8,"literal":{"kind":"STRING","text":"string"}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c02","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM v00 WHERE concat(c01 IS NOT NULL, 'string') SIMILAR TO 'string';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"v00","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v00"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":19,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":33,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":35,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["c01"]}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":8,"literal":{"kind":"STRING","text":"string"}}}],"qualified_name":{"path":["concat"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":8,"literal":{"kind":"STRING","text":"string"}}}],"qualified_name":{"path":["regexp_full_match"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bitstring_agg(\"{small_type}\") FROM all_types;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":14,"column_names":["{small_type}"]}}],"qualified_name":{"path":["bitstring_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":9,"schema_name":"","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT subtract(\n\tCAST(main.all_types.\"interval\" AS INTERVAL), \n\tCAST(to_days(CAST(main.all_types.\"int\" AS INTEGER)) AS INTERVAL))\nFROM main.all_types ","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":123,"function_name":"subtract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":43,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":25,"column_names":["main","all_types","interval"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":64,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":46,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":37,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":20,"column_names":["main","all_types","int"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":107,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":120,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["subtract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":136,"query_location_length":14,"schema_name":"main","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","all_types"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM\n t AS ref_2,\n LATERAL (SELECT (SELECT NULL\n FROM (SELECT * FROM t AS ref_5,\n LATERAL (SELECT ref_5.ps_supplycost AS c0,\n ref_2.n_name AS c1) AS alias1) AS alias2) AS alias3) AS alias4;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":236,"left":{"type":"BASE_TABLE","alias":"ref_2","sample":null,"query_location":18,"query_location_length":10,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"SUBQUERY","alias":"alias4","sample":null,"query_location":42,"query_location_length":193,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"alias3","query_location":50,"query_location_length":174,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"SUBQUERY","alias":"alias2","sample":null,"query_location":77,"query_location_length":136,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":85,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":87,"query_location_length":125,"left":{"type":"BASE_TABLE","alias":"ref_5","sample":null,"query_location":92,"query_location_length":10,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"SUBQUERY","alias":"alias1","sample":null,"query_location":126,"query_location_length":76,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":134,"query_location_length":19,"column_names":["ref_5","ps_supplycost"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":183,"query_location_length":12,"column_names":["ref_2","n_name"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH all_types AS (\n\tselect * exclude(small_enum, medium_enum, large_enum) from test_all_types()\n)\nSELECT lag(c16, COLUMNS(*)) OVER (ROWS BETWEEN 1768 FOLLOWING AND UNBOUNDED FOLLOWING) \nFROM all_types AS t42(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"all_types","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":28,"query_location_length":46,"relation_name":"","exclude_list":["small_enum","medium_enum","large_enum"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":80,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"WINDOW","type":"WINDOW_LAG","alias":"","query_location":106,"query_location_length":79,"function_name":"lag","schema":"","catalog":"","partitions":[],"orders":[],"start":"EXPR_FOLLOWING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1768"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":3,"column_names":["c16"]}},{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":123,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["lag"]}}],"from_table":{"type":"BASE_TABLE","alias":"t42","sample":null,"query_location":192,"query_location_length":212,"schema_name":"","table_name":"all_types","column_name_alias":["c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","c11","c12","c13","c14","c15","c16","c17","c18","c19","c20","c21","c22","c23","c24","c25","c26","c27","c28","c29","c30","c31","c32","c33","c34","c35","c36","c37","c38","c39","c40","c41"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(combine_aggr(s)) FROM (SELECT approx_count_distinct('v' || (i % 500)::VARCHAR) EXPORT_STATE AS s FROM range(5000) r(i) GROUP BY i % 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":15,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["combine_aggr"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":38,"query_location_length":112,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":46,"query_location_length":61,"function_name":"approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":25,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":3,"literal":{"kind":"STRING","text":"v"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":84,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":3,"literal":{"kind":"INTEGER","text":"500"}}}],"qualified_name":{"path":["%"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":86,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["approx_count_distinct"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":118,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":144,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["%"]}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(to_aggregate_state({'precision': 10, 'registers': list_resize([]::UTINYINT[], 1024, 56)}, 'approx_count_distinct', ['BIGINT']));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":136,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":126,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":69,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"precision","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"precision","query_location":49,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"registers","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"registers","query_location":66,"query_location_length":37,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":80,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":82,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}],"qualified_name":{"path":["list"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1024"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":2,"literal":{"kind":"INTEGER","text":"56"}}}],"qualified_name":{"path":["list_resize"]}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":23,"literal":{"kind":"STRING","text":"approx_count_distinct"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":131,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(approx_quantile(d, 0.5) EXPORT_STATE) = approx_quantile(d, 0.5) FROM (SELECT range / 100.0 AS d FROM range(1000)) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":72,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":36,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}}}],"qualified_name":{"path":["finalize"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":85,"query_location_length":44,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"d","query_location":93,"query_location_length":13,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":5,"column_names":["range"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"100.0"}}}],"qualified_name":{"path":["/"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":117,"query_location_length":11,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(to_aggregate_state(\n {'count': 2::UBIGINT, 'min': 0.0::DOUBLE, 'max': 1.0::DOUBLE,\n 'centroids': [{'mean': 0.0::DOUBLE, 'weight': 1e308::DOUBLE}, {'mean': 1.0::DOUBLE, 'weight': 1e308::DOUBLE}]},\n 'approx_quantile', ['DOUBLE', 'FLOAT'], [NULL, 0.5::FLOAT]\n));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":277,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":267,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":177,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"count","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"count","query_location":51,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}},{"name":"min","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"min","query_location":72,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"max","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"max","query_location":92,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":94,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"centroids","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"centroids","query_location":120,"query_location_length":96,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":121,"query_location_length":46,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"mean","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"mean","query_location":133,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":135,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"weight","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"weight","query_location":158,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":153,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1e308"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":160,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":169,"query_location_length":46,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"mean","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"mean","query_location":181,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":183,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"weight","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"weight","query_location":206,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":201,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1e308"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":208,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":17,"literal":{"kind":"STRING","text":"approx_quantile"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":242,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":243,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":253,"query_location_length":7,"literal":{"kind":"STRING","text":"FLOAT"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":263,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":264,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":273,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":270,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":275,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (approx_top_k(x, 1) EXPORT_STATE)::STRUCT(k UBIGINT, \"values\" STRUCT(\"value\" VARCHAR, \"count\" UBIGINT)[], \"filter\" UBIGINT[]).k FROM (VALUES ('a'), ('a'), ('b')) t(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":127,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":92,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":31,"function_name":"approx_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["approx_top_k"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":90,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"k","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"values","query_location":69,"query_location_length":42,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":40,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"value","query_location":84,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"count","query_location":101,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["list"]}},{"class":"TYPE","type":"TYPE","alias":"filter","query_location":122,"query_location_length":9,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":122,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["STRUCT"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":2,"literal":{"kind":"STRING","text":"k"}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":140,"query_location_length":28,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT arg_min(a, b) EXPORT_STATE FROM (SELECT 1 a, 1 b WHERE false) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"arg_min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["arg_min"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":39,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (arg_min(a, b) EXPORT_STATE)::STRUCT(arg INTEGER[], \"by\" INTEGER[]) FROM (VALUES ([1, 2], [10]), ([3], [5])) t(a, b);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":39,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":26,"function_name":"arg_min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["arg_min"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":37,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"arg","query_location":48,"query_location_length":9,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}},{"class":"TYPE","type":"TYPE","alias":"by","query_location":64,"query_location_length":9,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":80,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":110,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_bool_and([*COLUMNS(*)]) FROM (SELECT finalize(arg_min(COLUMNS(*), COLUMNS(*)) EXPORT_STATE) = min(COLUMNS(*)) FROM test_all_types());","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"list_bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":22,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_bool_and"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":41,"query_location_length":103,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":49,"query_location_length":72,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":54,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":44,"function_name":"arg_min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":74,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":86,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["arg_min"]}}}],"qualified_name":{"path":["finalize"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":106,"query_location_length":15,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":118,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["min"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":127,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(bool_and(NULL) EXPORT_STATE)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":27,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["bool_and"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bool_or(v) EXPORT_STATE FROM (VALUES (NULL::bool)) t(v)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["bool_or"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":36,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":4,"catalog":"","schema":"","type_name":"bool","children":[],"qualified_name":{"path":["bool"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT combine(to_aggregate_state(1::BIGINT, 'count', ['ANY']),\n to_aggregate_state(1::BIGINT, 'count_star', []));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":120,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":47,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":7,"literal":{"kind":"STRING","text":"count"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":5,"literal":{"kind":"STRING","text":"ANY"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":47,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":99,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":101,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":12,"literal":{"kind":"STRING","text":"count_star"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":123,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}}],"qualified_name":{"path":["combine"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (last(d) EXPORT_STATE)::STRUCT(value DECIMAL(4,1)) FROM (VALUES (1.5), (4.2)) t(d);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":28,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["last"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":26,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"value","query_location":44,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":63,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"4.2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["d"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, finalize(f), finalize(l) FROM first_state ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":11,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["f"]}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":11,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":11,"schema_name":"","table_name":"first_state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["first_state"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(list(i) EXPORT_STATE) FROM (VALUES (1), (NULL), (3)) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":20,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["list"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":43,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, list_sort(list(d)) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":18,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["list"]}}}],"qualified_name":{"path":["list_sort"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT min(v) EXPORT_STATE FROM (SELECT NULL::varchar AS v WHERE false) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":32,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":44,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof((min(v) EXPORT_STATE)::BLOB) FROM (VALUES ('\\xAA\\xBB'::BLOB)) t(v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":48,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":10,"literal":{"kind":"STRING","text":"\\xAA\\xBB"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(list(i ORDER BY i ASC NULLS FIRST) EXPORT_STATE) FROM (VALUES (1), (NULL), (2)) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":47,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["list"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":70,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(list(l ORDER BY k) EXPORT_STATE)\nFROM (VALUES (3, [3]), (1, [1, 2]), (2, NULL)) t(k, l);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":31,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["list"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":54,"query_location_length":41,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k","l"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(to_aggregate_state(\n (SELECT list(x ORDER BY y) EXPORT_STATE FROM (VALUES (10, 1), (30, 3), (20, 2)) t(x, y))::STRUCT(v0 INTEGER, v1 INTEGER)[],\n 'list', ['INTEGER'], [NULL], [{'column': 1, 'order': 'ASC NULLS LAST'}]\n));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":235,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":225,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":128,"query_location_length":34,"child":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":40,"query_location_length":88,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":31,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["y"]}}]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":85,"query_location_length":34,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":130,"query_location_length":30,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"v0","query_location":140,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"v1","query_location":152,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["list"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":6,"literal":{"kind":"STRING","text":"list"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":176,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":189,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":197,"query_location_length":42,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":198,"query_location_length":40,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column","query_location":209,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"order","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"order","query_location":221,"query_location_length":16,"literal":{"kind":"STRING","text":"ASC NULLS LAST"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(combine(product(2.0::double) EXPORT_STATE, product(3.0::double) EXPORT_STATE));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":87,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":77,"function_name":"combine","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":33,"function_name":"product","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}}}],"qualified_name":{"path":["product"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":33,"function_name":"product","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}}}],"qualified_name":{"path":["product"]}}}],"qualified_name":{"path":["combine"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(sum(1::SMALLINT) EXPORT_STATE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":29,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}}],"qualified_name":{"path":["sum"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(avg(TIME '12:00:00' ) EXPORT_STATE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":34,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"12:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}}],"qualified_name":{"path":["avg"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (any_value(42) export_state)::struct(\"value\" integer);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":25,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":26,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["any_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":23,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"value","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(regr_intercept(1.0, 2.0) EXPORT_STATE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":37,"function_name":"regr_intercept","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.0"}}}],"qualified_name":{"path":["regr_intercept"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select finalize(combine_aggr(state)) from states where false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":19,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":5,"column_names":["state"]}}],"qualified_name":{"path":["combine_aggr"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":6,"schema_name":"","table_name":"states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["states"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH states AS (\n SELECT sum(v) EXPORT_STATE AS s FROM (VALUES (1), (2)) t(v)\n)\nSELECT finalize(combine_aggr(s, -1)) FROM states;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"states","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":28,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":58,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":19,"function_name":"combine_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["combine_aggr"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":125,"query_location_length":6,"schema_name":"","table_name":"states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["states"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT samp_state::STRUCT(count UBIGINT, meanx DECIMAL(18,2), meany DECIMAL(18,2), co_moment DOUBLE) FROM covar_state;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":83,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["samp_state"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":81,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"count","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"meanx","query_location":47,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}},{"class":"TYPE","type":"TYPE","alias":"meany","query_location":68,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}},{"class":"TYPE","type":"TYPE","alias":"co_moment","query_location":93,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":106,"query_location_length":11,"schema_name":"","table_name":"covar_state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["covar_state"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(to_aggregate_state([{'v0': 3}, {'v0': 1}], 'list', ['BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":123,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":113,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":22,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v0","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v0","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":6,"literal":{"kind":"STRING","text":"list"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":43,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":41,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"order","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"order","query_location":109,"query_location_length":17,"literal":{"kind":"STRING","text":"ASC NULLS FIRST"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, finalize(skewness(d) EXPORT_STATE) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":34,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":24,"function_name":"skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["skewness"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_cont(d, 0.5) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, finalize(quantile_cont(d, 0.5) EXPORT_STATE) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":44,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":34,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_cont"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(quantile_disc({'a': d, 'b': d::VARCHAR}, 0.5) EXPORT_STATE) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":58,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":36,"query_location_length":1,"column_names":["d"]}},{"name":"b","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":45,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_disc"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, quantile_cont(d, [0.25, 0.75]) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":30,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.25"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.75"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, finalize(string_agg(d, '-') EXPORT_STATE) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":41,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":31,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}}],"qualified_name":{"path":["string_agg"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, string_agg(d, '-') || '-' || string_agg(d, '-') FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":47,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":18,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}}],"qualified_name":{"path":["string_agg"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":18,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}}],"qualified_name":{"path":["string_agg"]}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT var_pop(d) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"var_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["var_pop"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regr_r2(d, d+1) FROM dummy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"regr_r2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["regr_r2"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (regr_count(1, 2) export_state)::ubigint","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":29,"function_name":"regr_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["regr_count"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"ubigint","children":[],"qualified_name":{"path":["ubigint"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(avg(d) EXPORT_STATE)::integer, finalize(count(d) EXPORT_STATE), finalize(first(d) EXPORT_STATE), finalize(last(d) EXPORT_STATE), finalize(min(d) EXPORT_STATE), finalize(max(d) EXPORT_STATE), finalize(kurtosis(d) EXPORT_STATE), finalize(kurtosis_pop(d) EXPORT_STATE) FROM (SELECT NULL::integer d);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":19,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["avg"]}}}],"qualified_name":{"path":["finalize"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":31,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":21,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["count"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":31,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":21,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["first"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":113,"query_location_length":30,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["last"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":145,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":154,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":158,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["min"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":176,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":185,"query_location_length":19,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["max"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":207,"query_location_length":34,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":216,"query_location_length":24,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["kurtosis"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":243,"query_location_length":38,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":252,"query_location_length":28,"function_name":"kurtosis_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":265,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["kurtosis_pop"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":287,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"d","query_location":299,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":295,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":301,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, bit_and(d), bit_or(d), bit_xor(d) FROM dummy GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":10,"function_name":"bit_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["bit_and"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"bit_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["bit_or"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":10,"function_name":"bit_xor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["bit_xor"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT st.n, st.mean, st.m2, st.m3, st.m4\nFROM (SELECT (kurtosis(d) EXPORT_STATE)::STRUCT(n UBIGINT, mean DOUBLE, m2 DOUBLE, m3 DOUBLE, m4 DOUBLE) st FROM dummy);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["st","n"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":7,"column_names":["st","mean"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":5,"column_names":["st","m2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":5,"column_names":["st","m3"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":5,"column_names":["st","m4"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":47,"query_location_length":114,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"st","query_location":81,"query_location_length":65,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":24,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["kurtosis"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":63,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"n","query_location":92,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"mean","query_location":106,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"TYPE","type":"TYPE","alias":"m2","query_location":117,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"TYPE","type":"TYPE","alias":"m3","query_location":128,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"TYPE","type":"TYPE","alias":"m4","query_location":139,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":155,"query_location_length":5,"schema_name":"","table_name":"dummy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, finalize(avg_state)::integer, finalize(count_state), finalize(min_state), finalize(max_state), finalize(first_state), finalize(last_state) FROM state ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":19,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":9,"column_names":["avg_state"]}}],"qualified_name":{"path":["finalize"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":21,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":11,"column_names":["count_state"]}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":19,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":9,"column_names":["min_state"]}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":19,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":9,"column_names":["max_state"]}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":21,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":11,"column_names":["first_state"]}}],"qualified_name":{"path":["finalize"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":128,"query_location_length":20,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":10,"column_names":["last_state"]}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":154,"query_location_length":5,"schema_name":"","table_name":"state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["state"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_aggregate_state(s1, g::VARCHAR, ['DOUBLE']) FROM '{TEST_DIR}/avg_state.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":2,"column_names":["s1"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["g"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":30,"schema_name":"","table_name":"{TEST_DIR}/avg_state.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/avg_state.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_aggregate_state(0::HUGEINT, 'sum', [42]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":5,"literal":{"kind":"STRING","text":"sum"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(to_aggregate_state([{'v0': 1}], 'approx_top_k', ['INTEGER', 'BIGINT'], NULL, [{'column': 0, 'order': 'ASC NULLS FIRST'}]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":131,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":121,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v0","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":14,"literal":{"kind":"STRING","text":"approx_top_k"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":43,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":41,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"order","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"order","query_location":117,"query_location_length":17,"literal":{"kind":"STRING","text":"ASC NULLS FIRST"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_aggregate_state(0::BIGINT, 'count', ['ANY', 'ANY']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"to_aggregate_state","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":7,"literal":{"kind":"STRING","text":"count"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"literal":{"kind":"STRING","text":"ANY"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":5,"literal":{"kind":"STRING","text":"ANY"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["to_aggregate_state"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(max({'a': v}) EXPORT_STATE) FROM (VALUES (3), (1), (5)) t(v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":26,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":26,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["max"]}}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":49,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT approx_quantile(x, 0.5), typeof(approx_quantile(x, 0.5)), approx_quantile(x, [0.5]), quantile_cont(x, 0.5)\nFROM (VALUES (1.5::DECIMAL(4,1)), (2.5), (3.5)) v(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":31,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":25,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["approx_quantile"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":21,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":119,"query_location_length":42,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":131,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":133,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.5"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.5"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT approx_top_k([skewed_groups], 5) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"approx_top_k","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":13,"column_names":["skewed_groups"]}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["approx_top_k"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT arg_max(arg, val, 2 ORDER BY arg) FROM t1 GROUP BY val;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"arg_max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":3,"column_names":["arg"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["arg"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":3,"column_names":["val"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["arg_max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":3,"column_names":["val"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT arg_max_nulls_last(val, val, 4) FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"arg_max_nulls_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":3,"column_names":["val"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["val"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["arg_max_nulls_last"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT avg(x) FROM (VALUES (INTERVAL 1 DAY), (INTERVAL 0 DAY), (INTERVAL 1 MONTH)) v(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":19,"query_location_length":63,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":16,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT equi_width_bins(0, 1724, 10, true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1724"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["equi_width_bins"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT equi_width_bins(0.0, 90.0, 5, true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"90.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["equi_width_bins"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select equi_width_bins(0.0, 3.974, 10, true) AS boundaries;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"boundaries","query_location":7,"query_location_length":37,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"3.974"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["equi_width_bins"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT equi_width_bins(timestamp '1992-01-01 01:23:37.999', timestamp '1992-01-01 01:53:21.3', 4, true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":96,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01 01:23:37.999"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":60,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01 01:53:21.3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["equi_width_bins"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT equi_width_bins(TIMESTAMP '2000-01-01', TIMESTAMP '2000-01-01 00:00:00.000001', 1000000, false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":95,"function_name":"equi_width_bins","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2000-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":38,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2000-01-01 00:00:00.000001"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":7,"literal":{"kind":"INTEGER","text":"1000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"qualified_name":{"path":["equi_width_bins"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT k, bitstring_agg(idx)\nFROM t1_v\nJOIN el_ids USING (el)\nGROUP BY k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":18,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":3,"column_names":["idx"]}}],"qualified_name":{"path":["bitstring_agg"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":47,"query_location_length":27,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":4,"schema_name":"","table_name":"t1_v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1_v"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":6,"schema_name":"","table_name":"el_ids","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["el_ids"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["el"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT length(max(s)) FROM (SELECT repeat('y', CASE WHEN i % 2 = 0 THEN 50000 ELSE 10 END) AS s FROM range(41) t(i));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["max"]}}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":27,"query_location_length":89,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":35,"query_location_length":55,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"STRING","text":"y"}}},{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":47,"query_location_length":42,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"literal":{"kind":"INTEGER","text":"50000"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}}],"qualified_name":{"path":["repeat"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":101,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":2,"literal":{"kind":"INTEGER","text":"41"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT histogram_exact(r, [0, 1, 2, 3]) FROM range(4) t(r);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"histogram_exact","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["histogram_exact"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":45,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["r"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM histogram_values(integers, i%2, technique := 'sample')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"histogram_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":8,"column_names":["integers"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}},{"name":"technique","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"technique","query_location":59,"query_location_length":8,"literal":{"kind":"STRING","text":"sample"}}}],"qualified_name":{"path":["histogram_values"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lttb(x::DOUBLE, y::DOUBLE, 100 ORDER BY x)\nFROM (SELECT i AS x, i::DOUBLE AS y FROM range(4) t(i))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"lttb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["y"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["lttb"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":55,"query_location_length":50,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":63,"query_location_length":1,"column_names":["i"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"y","query_location":72,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":91,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lttb(ts, y, 3 ORDER BY ts)\nFROM (\n VALUES\n (TIMESTAMPTZ '2020-01-01 00:00:00+00', 0::DOUBLE),\n (TIMESTAMPTZ '2020-01-01 01:00:00+00', 1::DOUBLE),\n (TIMESTAMPTZ '2020-01-01 02:00:00+00', 2::DOUBLE),\n (TIMESTAMPTZ '2020-01-01 03:00:00+00', 3::DOUBLE),\n (TIMESTAMPTZ '2020-01-01 04:00:00+00', 4::DOUBLE)\n) t(ts, y);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"lttb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":2,"column_names":["ts"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["lttb"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":39,"query_location_length":308,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01 00:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":100,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":102,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":120,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01 01:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":120,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":159,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":161,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":179,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01 02:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":179,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":218,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":217,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":220,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":238,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01 03:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":238,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":277,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":276,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":279,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":297,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01 04:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":297,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":336,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":335,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":338,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["ts","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(st) FROM lttb_states","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["st"]}}],"qualified_name":{"path":["finalize"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":11,"schema_name":"","table_name":"lttb_states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lttb_states"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH d(i, v) AS (\n\tVALUES (1, 'nan'::DOUBLE), (2, 'nan'::DOUBLE), (3, 1.0), (4, 1.0), (5, 'nan'::DOUBLE)\n)\nSELECT i, mode(v) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING AND CURRENT ROW)::VARCHAR\nFROM d\nORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":209,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[{"key":"d","value":{"aliases":["i","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":5,"literal":{"kind":"STRING","text":"nan"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":5,"literal":{"kind":"STRING","text":"nan"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":5,"literal":{"kind":"STRING","text":"nan"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["i"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":183,"query_location_length":9,"child":{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":117,"query_location_length":66,"function_name":"mode","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"CURRENT_ROW_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["mode"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":185,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":198,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT mode(v ORDER BY nextval('mode_rewrite_order_seq'))\nFROM (VALUES ('b'), ('a')) tbl(v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":33,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":24,"literal":{"kind":"STRING","text":"mode_rewrite_order_seq"}}}],"qualified_name":{"path":["nextval"]}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["mode"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":63,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), COUNT(s), COUNT(DISTINCT s) FROM test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT AVG(s) FROM strings GROUP BY g ORDER BY g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(1, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAX(1, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT AVG(1, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::INTEGER % 3 AS g, ANY_VALUE(i ORDER BY 5-i) FROM five GROUP BY 1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":7,"query_location_length":14,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["-"]}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["any_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":4,"schema_name":"","table_name":"five","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i % 3 AS g, ANY_VALUE(s ORDER BY 5-i), ANY_VALUE(l ORDER BY 5-i), ANY_VALUE(r ORDER BY 5-i)\nFROM five_complex\nGROUP BY 1\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":7,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["-"]}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["any_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["-"]}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["any_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":25,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["-"]}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["r"]}}],"qualified_name":{"path":["any_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":104,"query_location_length":12,"schema_name":"","table_name":"five_complex","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_complex"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE\n\t WHEN ( approx_quantile between (true_quantile - 100) and (true_quantile + 100) )\n\t\t THEN TRUE\n\t\t ELSE FALSE\n\t END\n\t FROM (SELECT approx_quantile(r, 1.0) as approx_quantile ,quantile(r, 1.0) as true_quantile FROM quantile) AS T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":124,"case_checks":[{"when_expr":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":38,"query_location_length":55,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":15,"column_names":["approx_quantile"]},"lower":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":13,"column_names":["true_quantile"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["-"]}},"upper":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":13,"column_names":["true_quantile"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["+"]}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":140,"query_location_length":100,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"approx_quantile","query_location":148,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}}],"qualified_name":{"path":["approx_quantile"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"true_quantile","query_location":192,"query_location_length":16,"function_name":"quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":201,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":204,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}}],"qualified_name":{"path":["quantile"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":231,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT approx_quantile(col, [0.5, 0.4, 0.1]) AS percentile \nFROM VALUES (0), (1), (2), (10) AS tab(col);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"percentile","query_location":7,"query_location_length":37,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":3,"column_names":["col"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["approx_quantile"]}}],"from_table":{"type":"SUBQUERY","alias":"tab","sample":null,"query_location":65,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["col"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE\n\t WHEN (approx_quantile between (true_quantile - (sumr * 0.01)) and (true_quantile + (sumr * 0.01)))\n\t\t THEN TRUE\n\t\t ELSE FALSE\n\t END\n\t FROM (SELECT approx_quantile(r, 0.9) as approx_quantile, quantile(r, 0.9) as true_quantile, SUM(r) as sumr from quantile) AS T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":142,"case_checks":[{"when_expr":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":37,"query_location_length":75,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":15,"column_names":["approx_quantile"]},"lower":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":13,"column_names":["true_quantile"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":11,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":4,"column_names":["sumr"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.01"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["-"]}},"upper":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":13,"column_names":["true_quantile"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":11,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":4,"column_names":["sumr"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.01"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["+"]}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":158,"query_location_length":116,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"approx_quantile","query_location":166,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.9"}}}],"qualified_name":{"path":["approx_quantile"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"true_quantile","query_location":210,"query_location_length":16,"function_name":"quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":219,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":222,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.9"}}}],"qualified_name":{"path":["quantile"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"sumr","query_location":245,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":249,"query_location_length":1,"column_names":["r"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":265,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT reservoir_quantile(r, [0.5, 'nan'::DOUBLE]) from quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"reservoir_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":5,"literal":{"kind":"STRING","text":"nan"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["reservoir_quantile"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT approx_quantile(1.55::DECIMAL(18,2), 0.5), typeof(approx_quantile(1.55::DECIMAL(18,2), 0.5));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"1.55"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":49,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":41,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":77,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"1.55"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":79,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT approx_quantile(t, 0.5) FROM (VALUES (TIMESTAMP '2020-01-01'), (TIMESTAMP '2020-01-02'), (TIMESTAMP '2020-01-03')) v(t)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"approx_quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["approx_quantile"]}}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":36,"query_location_length":85,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":71,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-03"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["t"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT( t),approx_count_distinct(t) from timestamp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":24,"function_name":"approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["approx_count_distinct"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select argmax(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"argmax","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["argmax"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select argmin(name,salary),argmax(name,salary) from names;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"argmin","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":4,"column_names":["name"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":6,"column_names":["salary"]}}],"qualified_name":{"path":["argmin"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":19,"function_name":"argmax","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":4,"column_names":["name"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":6,"column_names":["salary"]}}],"qualified_name":{"path":["argmax"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":5,"schema_name":"","table_name":"names","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["names"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select arg_min_null(i,i) from range (100) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"arg_min_null","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["arg_min_null"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":30,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select arg_min_null(a,b) over ( partition by a%2) from args;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":42,"function_name":"arg_min_null","schema":"","catalog":"","partitions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["arg_min_null"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":4,"schema_name":"","table_name":"args","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["args"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT AVG(1, 2, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT histogram(n::double, [10, 20, 30, 40]) FROM obs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["histogram"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":3,"schema_name":"","table_name":"obs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["obs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT histogram([n], [[x] for x in [10, 20, 30, 40, 50]]) FROM obs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":35,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["list_value"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}}}],"qualified_name":{"path":["histogram"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":3,"schema_name":"","table_name":"obs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["obs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT BIT_AND(b) FROM bits","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"bit_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["bit_and"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"bits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bits"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT BIT_OR('111010'::BIT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"bit_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":8,"literal":{"kind":"STRING","text":"111010"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}}],"qualified_name":{"path":["bit_or"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT BITSTRING_AGG(i) FROM tinyints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["bitstring_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bit_count(BITSTRING_AGG(i)) FROM ints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"bit_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":16,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["bitstring_agg"]}}}],"qualified_name":{"path":["bit_count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":4,"schema_name":"","table_name":"ints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT BITSTRING_AGG(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["bitstring_agg"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bit_length(bitstring_agg(v, (-128)::TINYINT, 127::TINYINT)) FROM bt;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":59,"function_name":"bit_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":47,"function_name":"bitstring_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-128"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"literal":{"kind":"INTEGER","text":"127"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["bitstring_agg"]}}}],"qualified_name":{"path":["bit_length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":2,"schema_name":"","table_name":"bt","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bt"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bool_or(True) FROM range(100) tbl(i) WHERE 1=0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["bool_or"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":26,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select corr(v, v2) over (partition by k)\n from aggr;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":8,"query_location_length":33,"function_name":"corr","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["k"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["v2"]}}],"qualified_name":{"path":["corr"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), COUNT(a.*), COUNT(b.*), COUNT(b.id) FROM b FULL OUTER JOIN a ON a.id = b.id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":23,"query_location_length":3,"relation_name":"a","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":35,"query_location_length":3,"relation_name":"b","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":11,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":4,"column_names":["b","id"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":60,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":4,"column_names":["a","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":4,"column_names":["b","id"]}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(r.*) FILTER (WHERE l.id \u003e 2) FROM l LEFT JOIN r ON l.id = r.id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"count","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":32,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":13,"query_location_length":3,"relation_name":"r","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":49,"query_location_length":26,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":1,"schema_name":"","table_name":"l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["l"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":4,"column_names":["r","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.id, count(r.*), count(s.*) FROM l LEFT JOIN r ON l.id = r.id LEFT JOIN s ON l.id = s.id GROUP BY l.id ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["l","id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":19,"query_location_length":3,"relation_name":"r","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":3,"relation_name":"s","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":70,"query_location_length":26,"left":{"type":"JOIN","alias":"","sample":null,"query_location":43,"query_location_length":26,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":1,"schema_name":"","table_name":"l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["l"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":4,"column_names":["r","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":80,"query_location_length":1,"schema_name":"","table_name":"s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":4,"column_names":["s","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":4,"column_names":["l","id"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(st.*) FROM (SELECT {'x': 1, 'y': 2} AS st) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":13,"query_location_length":4,"relation_name":"st","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":24,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"st","query_location":32,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(* RENAME (y AS z)) FROM r;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":13,"query_location_length":17,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[{"key":{"catalog":"","schema":"","table":"","column":"y"},"value":"z"}]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COVAR_POP(nextval('seqx'),nextval('seqy'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"covar_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":15,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":6,"literal":{"kind":"STRING","text":"seqx"}}}],"qualified_name":{"path":["nextval"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":15,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":6,"literal":{"kind":"STRING","text":"seqy"}}}],"qualified_name":{"path":["nextval"]}}}],"qualified_name":{"path":["covar_pop"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select entropy(k) from aggr ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"entropy","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["entropy"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ARG_MIN(i, grp) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"arg_min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["grp"]}}],"qualified_name":{"path":["arg_min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT FIRST(b) FROM tbl WHERE a=0 GROUP BY b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["first"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":31,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select histogram(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["histogram"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select histogram(name) from names;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["name"]}}],"qualified_name":{"path":["histogram"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":5,"schema_name":"","table_name":"names","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["names"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT histogram(DISTINCT e) FILTER (WHERE g \u003c 3)::VARCHAR FROM hist_data;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"histogram","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":43,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["g"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["e"]}}],"qualified_name":{"path":["histogram"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":9,"schema_name":"","table_name":"hist_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hist_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAX(MAX(1))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["max"]}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select kurtosis()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"kurtosis","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["kurtosis"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select kurtosis(v2) over (partition by v)\n from aggr;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":34,"function_name":"kurtosis","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["v"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["v2"]}}],"qualified_name":{"path":["kurtosis"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LAST(dt::TIMESTAMPTZ), LAST(t::TIMETZ) FROM five_dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":13,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":2,"column_names":["dt"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["last"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":15,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["t"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}}],"qualified_name":{"path":["last"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":10,"schema_name":"","table_name":"five_dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LAST(b) FROM tbl WHERE a=0 GROUP BY b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["last"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select mad(x) from (values ('294247-01-10'::date), ('290309-12-22 (BC)'::date)) tbl(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["mad"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":19,"query_location_length":60,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":14,"literal":{"kind":"STRING","text":"294247-01-10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":71,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":19,"literal":{"kind":"STRING","text":"290309-12-22 (BC)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":73,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT median(r::integer)::VARCHAR FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["r"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["median"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MEDIAN(ttz::TIMETZ)\nFROM (VALUES \n\t('00:00:00-09'),\n\t('00:00:00-08'),\n\t('00:00:00-07'),\n\t('00:00:00-06'),\n\t('00:00:00-05'),\n\t('00:00:00-04'),\n\t('00:00:00-03'),\n\t('00:00:00-02'),\n\t('00:00:00-01'),\n\t('00:00:00+00'),\n) tbl(ttz);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["ttz"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}}],"qualified_name":{"path":["median"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":32,"query_location_length":190,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-09"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-08"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-07"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-06"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-04"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-03"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-02"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00-01"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":13,"literal":{"kind":"STRING","text":"00:00:00+00"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["ttz"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select k, mode(v)\n from aggr\n group by k\n order by k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":7,"function_name":"mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["mode"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select k, v, mode(v) over (partition by k)\n from timestamps\n order by k, v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["k"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":29,"function_name":"mode","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["k"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["mode"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT FIRST(i ORDER BY i, i DESC, i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["first"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"dest\", mode() WITHIN GROUP (ORDER BY \"arr_delay\") AS \"median_delay\"\nFROM \"flights\"\nGROUP BY \"dest\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["dest"]},{"class":"FUNCTION","type":"FUNCTION","alias":"median_delay","query_location":15,"query_location_length":42,"function_name":"mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":11,"column_names":["arr_delay"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["mode"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":9,"schema_name":"","table_name":"flights","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["flights"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":6,"column_names":["dest"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT percentile_disc(CAST('NaN' AS REAL)) WITHIN GROUP (ORDER BY 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":62,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"literal":{"kind":"STRING","text":"NaN"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":4,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT year, LIST(val), STRING_AGG(val::VARCHAR, ',') FROM timeseries GROUP BY year ORDER BY year;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":4,"column_names":["year"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["year"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":9,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["list"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":29,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":3,"column_names":["val"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":10,"schema_name":"","table_name":"timeseries","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timeseries"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":4,"column_names":["year"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select product(i) from integers group by i%2 order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"product","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["product"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_cont(r, 0.25), quantile_cont(r, 0.5), quantile_cont(r, 0.75) from quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.25"}}}],"qualified_name":{"path":["quantile_cont"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":21,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_cont"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":22,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.75"}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_cont(r, -1.1) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"-1.1"}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_cont(t, 0.5) FROM (VALUES (9223372036854775794::BIGINT), (9223372036854775796::BIGINT)) tbl(t)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":34,"query_location_length":69,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775794"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":93,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775796"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["t"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_cont(1, [0.25, 0.5, 0.75]) FROM quantiles","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"quantile_cont","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.25"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.75"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["quantile_cont"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_disc(case when r is null then null else {'i': r} end, 0.5) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":21,"query_location_length":47,"case_checks":[{"when_expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":33,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["r"]}]},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"i","query_location":62,"query_location_length":1,"column_names":["r"]}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":80,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_disc(NULL::VARCHAR, 0.1)\nFROM range(0,100) tbl(d)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.1"}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":46,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["d"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_disc(r, -1.1) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"-1.1"}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT mod(r,10) as g, quantile_disc(r, [0.1, 0.5, 0.9]) FROM quantiles GROUP BY 1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":7,"query_location_length":9,"function_name":"mod","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["mod"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":33,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.9"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":62,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_disc(r, [-0.1, 0.5, 0.9]) FROM quantiles","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"-0.1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.9"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regr_avgx()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"regr_avgx","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["regr_avgx"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regr_slope(1,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"regr_slope","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["regr_slope"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regr_sxx(2e230*i, 0) from range(5) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"regr_sxx","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":7,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"2e230"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["regr_sxx"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":33,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regr_intercept(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"regr_intercept","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["regr_intercept"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regr_avgx(v, v2) from aggr ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"regr_avgx","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["v2"]}}],"qualified_name":{"path":["regr_avgx"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regr_slope(v, v2) over (partition by k)\n from aggr;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":8,"query_location_length":39,"function_name":"regr_slope","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["k"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["v2"]}}],"qualified_name":{"path":["regr_slope"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL as a, NULL as b, 1 as id UNION SELECT CAST('00:00:00' AS TIME) as a, CAST('12:34:56' AS TIME) as b, 2 as id ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"id","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":50,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":10,"literal":{"kind":"STRING","text":"00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":81,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":10,"literal":{"kind":"STRING","text":"12:34:56"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":100,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"id","query_location":112,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT\n count(*) FILTER (WHERE i \u003c= 5) as lte_five,\n count(*) FILTER (WHERE i % 2 = 1) as odds,\n count(*) as total_rows\nFROM generate_series(1,11) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"lte_five","query_location":11,"query_location_length":30,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":34,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"odds","query_location":59,"query_location_length":33,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"total_rows","query_location":106,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":134,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select skewness(k), skewness(v), skewness(v2) from aggr","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["skewness"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":11,"function_name":"skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["skewness"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":12,"function_name":"skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":2,"column_names":["v2"]}}],"qualified_name":{"path":["skewness"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"aggr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggr"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select round(stddev_pop(val), 1) from stddev_test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":15,"function_name":"stddev_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["stddev_pop"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":11,"schema_name":"","table_name":"stddev_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stddev_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select grp, sum(val), round(var_pop(val), 2), min(val) from stddev_test where val is not null group by grp order by grp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":3,"column_names":["grp"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["grp"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":22,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":12,"function_name":"var_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["var_pop"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["round"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":8,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":11,"schema_name":"","table_name":"stddev_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stddev_test"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":82,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":3,"column_names":["val"]}]},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":3,"column_names":["grp"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT STRING_AGG('a', 'b', 'c')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT STRING_AGG(x ORDER BY x DESC), STRING_AGG(x,'|' ORDER BY x DESC) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["string_agg"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":33,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT first(DISTINCT i ORDER BY random() * i)\nFROM (VALUES \n\t(900),\n\t(2600),\n\t(2100),\n\t(2100),\n\t(1800)\n\t) AS t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":12,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["random"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["*"]}}}]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["first"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":52,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"INTEGER","text":"900"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2600"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2100"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2100"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1800"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(n ORDER BY ABS(n))::BIGINT FROM doubles;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["abs"]}}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["sum"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":7,"schema_name":"","table_name":"doubles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["doubles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(i) FROM range(-9007199254740992, -9007199254738944) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":19,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":17,"literal":{"kind":"INTEGER","text":"-9007199254740992"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":17,"literal":{"kind":"INTEGER","text":"-9007199254738944"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM (SELECT DISTINCT i, j FROM t1 LIMIT 15)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON (key) * FROM distinct_on_test ORDER BY key, v1, v2, v3","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":3,"column_names":["key"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":3,"column_names":["key"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":2,"column_names":["v1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":2,"column_names":["v2"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":2,"column_names":["v3"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":25,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":16,"schema_name":"","table_name":"distinct_on_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_on_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON(i) i, j, k FROM integers ORDER BY i, j ASC, k DESC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}},{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["j"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(distinct value), GROUPING(course, type), course, type, COUNT(*), sum(distinct value), FROM students GROUP BY CUBE(course, type) ORDER BY all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["sum"]}},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":28,"query_location_length":22,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":4,"column_names":["type"]}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":4,"column_names":["type"]}],"group_sets":[[],[0],[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select course, count(*), sum(distinct value) from students group by (), course, () order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":6,"column_names":["course"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*), sum(distinct value), course, type\n from students\n group by grouping sets((3, 4), (4))\n order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["sum"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["type"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}],"group_sets":[[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from (select distinct on (a) a, b from foo order by a, b desc) sub where b \u003c\u003e 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"sub","sample":null,"query_location":14,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["a"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["a"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":3,"schema_name":"","table_name":"foo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["foo"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":82,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(DISTINCT s) FILTER (WHERE keep),\n string_agg(DISTINCT s, ',' ORDER BY s DESC) FILTER (WHERE keep)\nFROM distinct_rewrite_order;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"count","schema":"","filter":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":4,"column_names":["keep"]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":63,"function_name":"string_agg","schema":"","filter":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":4,"column_names":["keep"]},"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["s"]}}]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":122,"query_location_length":22,"schema_name":"","table_name":"distinct_rewrite_order","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_rewrite_order"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT course, type, finalize(sum(DISTINCT value) EXPORT_STATE), GROUPING(course), GROUPING(type)\nFROM distinct_rewrite_grouping_sets\nGROUP BY CUBE(course, type)\nORDER BY GROUPING(course), GROUPING(type), course, type NULLS FIRST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":171,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":180,"query_location_length":6,"column_names":["course"]}]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":189,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":198,"query_location_length":4,"column_names":["type"]}]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":205,"query_location_length":6,"column_names":["course"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":213,"query_location_length":4,"column_names":["type"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":42,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":32,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["sum"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":65,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":6,"column_names":["course"]}]},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":83,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":4,"column_names":["type"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":103,"query_location_length":30,"schema_name":"","table_name":"distinct_rewrite_grouping_sets","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_rewrite_grouping_sets"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":4,"column_names":["type"]}],"group_sets":[[],[0],[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT a, b FROM test ORDER BY a, b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON (1) i, j FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON (integers.i) i, j FROM integers ORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":10,"column_names":["integers","i"]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM (VALUES (1,1,2),(1,1,3)) AS t(key1,key2,v)\nSELECT DISTINCT ON (COLUMNS(* EXCLUDE (v))) * ORDER BY key1, key2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"STAR","type":"STAR","alias":"","query_location":76,"query_location_length":13,"relation_name":"","exclude_list":["v"],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":4,"column_names":["key1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":4,"column_names":["key2"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":92,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":5,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["key1","key2","v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT i % 2 FROM integers WHERE i\u003c3 ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":42,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n\tcount(distinct i) FILTER (WHERE i \u003e= 20)\nfrom tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":40,"function_name":"count","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":40,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT first(x), last(x), any_value(x)\nFROM (VALUES (NULL::INTEGER[]), ([1, 2]), ([3])) t(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["last"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":12,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["any_value"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":44,"query_location_length":43,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (g+i)%2, SUM(i), SUM(g) FROM integers GROUP BY g, i ORDER BY 1 NULLS FIRST, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["g"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["g"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, SUM(i) FROM integers GROUP BY ALL ORDER BY g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(a), COUNT(*), AVG(a) FROM test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, i + 10 FROM integers GROUP BY i ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i % 2 AS k, SUM(i) FROM integers WHERE i IS NOT NULL GROUP BY k HAVING i%2\u003e0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":7,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":48,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":78,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n v4,\n TRY(v5 / v5) AS result\nFROM v3\nGROUP BY v4\nHAVING (\n SELECT SUM(v5)\n FROM v3\n WHERE v5 IS NOT NULL\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["v4"]},{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"result","query_location":19,"query_location_length":12,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":7,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":2,"column_names":["v5"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["v5"]}}],"qualified_name":{"path":["/"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":2,"schema_name":"","table_name":"v3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v3"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":2,"column_names":["v4"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":69,"query_location_length":59,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":2,"column_names":["v5"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":2,"schema_name":"","table_name":"v3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v3"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":115,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":2,"column_names":["v5"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT k, LEAST(v, 21) as c, SUM(v) FROM r2l3r4l5i4i2l3v\nGROUP BY k, c\nORDER BY 2, 3","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"c","query_location":10,"query_location_length":12,"function_name":"least","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"literal":{"kind":"INTEGER","text":"21"}}}],"qualified_name":{"path":["least"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":15,"schema_name":"","table_name":"r2l3r4l5i4i2l3v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r2l3r4l5i4i2l3v"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["c"]}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LENGTH(NULL::VARCHAR) FROM t0 GROUP BY NULL::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select course, count(*) from students group by cube (cube (course)) order by 1, 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":13,"function_name":"cube","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":6,"column_names":["course"]}}],"qualified_name":{"path":["cube"]}}],"group_sets":[[],[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT GROUPING(course), GROUPING(type), course, type, COUNT(*) FROM students GROUP BY CUBE(course, type) HAVING GROUPING(course)=0 ORDER BY 1, 2, 3, 4, 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":153,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":7,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":6,"column_names":["course"]}]},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":25,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":4,"column_names":["type"]}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":4,"column_names":["type"]}],"group_sets":[[],[0],[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":113,"query_location_length":18,"left":{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":113,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":6,"column_names":["course"]}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from students group by ();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[],"group_sets":[[]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*), course, type\n from students\n group by grouping sets(course, ()), grouping sets(type)\n order by 1, 2, 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":4,"column_names":["type"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":4,"column_names":["type"]}],"group_sets":[[0,1],[1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(DISTINCT g) FROM (SELECT grouping(c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11) g FROM t GROUP BY CUBE (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["g"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":30,"query_location_length":119,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"g","query_location":38,"query_location_length":47,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":2,"column_names":["c0"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["c1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":2,"column_names":["c2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":2,"column_names":["c3"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":2,"column_names":["c4"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":2,"column_names":["c5"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":2,"column_names":["c6"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":2,"column_names":["c7"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":2,"column_names":["c8"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":2,"column_names":["c9"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["c10"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":3,"column_names":["c11"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":93,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":2,"column_names":["c0"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":2,"column_names":["c1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":2,"column_names":["c2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":2,"column_names":["c3"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":2,"column_names":["c4"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":2,"column_names":["c5"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":2,"column_names":["c6"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":2,"column_names":["c7"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":2,"column_names":["c8"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":2,"column_names":["c9"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":3,"column_names":["c10"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":3,"column_names":["c11"]}],"group_sets":[[],[0],[0,1],[0,1,2],[0,1,2,3],[0,1,2,3,4],[0,1,2,3,4,5],[0,1,2,3,4,5,6],[0,1,2,3,4,5,6,7],[0,1,2,3,4,5,6,7,8],[0,1,2,3,4,5,6,7,8,9],[0,1,2,3,4,5,6,7,8,9,10],[0,1,2,3,4,5,6,7,8,9,10,11],[0,1,2,3,4,5,6,7,8,9,11],[0,1,2,3,4,5,6,7,8,10],[0,1,2,3,4,5,6,7,8,10,11],[0,1,2,3,4,5,6,7,8,11],[0,1,2,3,4,5,6,7,9],[0,1,2,3,4,5,6,7,9,10],[0,1,2,3,4,5,6,7,9,10,11],[0,1,2,3,4,5,6,7,9,11],[0,1,2,3,4,5,6,7,10],[0,1,2,3,4,5,6,7,10,11],[0,1,2,3,4,5,6,7,11],[0,1,2,3,4,5,6,8],[0,1,2,3,4,5,6,8,9],[0,1,2,3,4,5,6,8,9,10],[0,1,2,3,4,5,6,8,9,10,11],[0,1,2,3,4,5,6,8,9,11],[0,1,2,3,4,5,6,8,10],[0,1,2,3,4,5,6,8,10,11],[0,1,2,3,4,5,6,8,11],[0,1,2,3,4,5,6,9],[0,1,2,3,4,5,6,9,10],[0,1,2,3,4,5,6,9,10,11],[0,1,2,3,4,5,6,9,11],[0,1,2,3,4,5,6,10],[0,1,2,3,4,5,6,10,11],[0,1,2,3,4,5,6,11],[0,1,2,3,4,5,7],[0,1,2,3,4,5,7,8],[0,1,2,3,4,5,7,8,9],[0,1,2,3,4,5,7,8,9,10],[0,1,2,3,4,5,7,8,9,10,11],[0,1,2,3,4,5,7,8,9,11],[0,1,2,3,4,5,7,8,10],[0,1,2,3,4,5,7,8,10,11],[0,1,2,3,4,5,7,8,11],[0,1,2,3,4,5,7,9],[0,1,2,3,4,5,7,9,10],[0,1,2,3,4,5,7,9,10,11],[0,1,2,3,4,5,7,9,11],[0,1,2,3,4,5,7,10],[0,1,2,3,4,5,7,10,11],[0,1,2,3,4,5,7,11],[0,1,2,3,4,5,8],[0,1,2,3,4,5,8,9],[0,1,2,3,4,5,8,9,10],[0,1,2,3,4,5,8,9,10,11],[0,1,2,3,4,5,8,9,11],[0,1,2,3,4,5,8,10],[0,1,2,3,4,5,8,10,11],[0,1,2,3,4,5,8,11],[0,1,2,3,4,5,9],[0,1,2,3,4,5,9,10],[0,1,2,3,4,5,9,10,11],[0,1,2,3,4,5,9,11],[0,1,2,3,4,5,10],[0,1,2,3,4,5,10,11],[0,1,2,3,4,5,11],[0,1,2,3,4,6],[0,1,2,3,4,6,7],[0,1,2,3,4,6,7,8],[0,1,2,3,4,6,7,8,9],[0,1,2,3,4,6,7,8,9,10],[0,1,2,3,4,6,7,8,9,10,11],[0,1,2,3,4,6,7,8,9,11],[0,1,2,3,4,6,7,8,10],[0,1,2,3,4,6,7,8,10,11],[0,1,2,3,4,6,7,8,11],[0,1,2,3,4,6,7,9],[0,1,2,3,4,6,7,9,10],[0,1,2,3,4,6,7,9,10,11],[0,1,2,3,4,6,7,9,11],[0,1,2,3,4,6,7,10],[0,1,2,3,4,6,7,10,11],[0,1,2,3,4,6,7,11],[0,1,2,3,4,6,8],[0,1,2,3,4,6,8,9],[0,1,2,3,4,6,8,9,10],[0,1,2,3,4,6,8,9,10,11],[0,1,2,3,4,6,8,9,11],[0,1,2,3,4,6,8,10],[0,1,2,3,4,6,8,10,11],[0,1,2,3,4,6,8,11],[0,1,2,3,4,6,9],[0,1,2,3,4,6,9,10],[0,1,2,3,4,6,9,10,11],[0,1,2,3,4,6,9,11],[0,1,2,3,4,6,10],[0,1,2,3,4,6,10,11],[0,1,2,3,4,6,11],[0,1,2,3,4,7],[0,1,2,3,4,7,8],[0,1,2,3,4,7,8,9],[0,1,2,3,4,7,8,9,10],[0,1,2,3,4,7,8,9,10,11],[0,1,2,3,4,7,8,9,11],[0,1,2,3,4,7,8,10],[0,1,2,3,4,7,8,10,11],[0,1,2,3,4,7,8,11],[0,1,2,3,4,7,9],[0,1,2,3,4,7,9,10],[0,1,2,3,4,7,9,10,11],[0,1,2,3,4,7,9,11],[0,1,2,3,4,7,10],[0,1,2,3,4,7,10,11],[0,1,2,3,4,7,11],[0,1,2,3,4,8],[0,1,2,3,4,8,9],[0,1,2,3,4,8,9,10],[0,1,2,3,4,8,9,10,11],[0,1,2,3,4,8,9,11],[0,1,2,3,4,8,10],[0,1,2,3,4,8,10,11],[0,1,2,3,4,8,11],[0,1,2,3,4,9],[0,1,2,3,4,9,10],[0,1,2,3,4,9,10,11],[0,1,2,3,4,9,11],[0,1,2,3,4,10],[0,1,2,3,4,10,11],[0,1,2,3,4,11],[0,1,2,3,5],[0,1,2,3,5,6],[0,1,2,3,5,6,7],[0,1,2,3,5,6,7,8],[0,1,2,3,5,6,7,8,9],[0,1,2,3,5,6,7,8,9,10],[0,1,2,3,5,6,7,8,9,10,11],[0,1,2,3,5,6,7,8,9,11],[0,1,2,3,5,6,7,8,10],[0,1,2,3,5,6,7,8,10,11],[0,1,2,3,5,6,7,8,11],[0,1,2,3,5,6,7,9],[0,1,2,3,5,6,7,9,10],[0,1,2,3,5,6,7,9,10,11],[0,1,2,3,5,6,7,9,11],[0,1,2,3,5,6,7,10],[0,1,2,3,5,6,7,10,11],[0,1,2,3,5,6,7,11],[0,1,2,3,5,6,8],[0,1,2,3,5,6,8,9],[0,1,2,3,5,6,8,9,10],[0,1,2,3,5,6,8,9,10,11],[0,1,2,3,5,6,8,9,11],[0,1,2,3,5,6,8,10],[0,1,2,3,5,6,8,10,11],[0,1,2,3,5,6,8,11],[0,1,2,3,5,6,9],[0,1,2,3,5,6,9,10],[0,1,2,3,5,6,9,10,11],[0,1,2,3,5,6,9,11],[0,1,2,3,5,6,10],[0,1,2,3,5,6,10,11],[0,1,2,3,5,6,11],[0,1,2,3,5,7],[0,1,2,3,5,7,8],[0,1,2,3,5,7,8,9],[0,1,2,3,5,7,8,9,10],[0,1,2,3,5,7,8,9,10,11],[0,1,2,3,5,7,8,9,11],[0,1,2,3,5,7,8,10],[0,1,2,3,5,7,8,10,11],[0,1,2,3,5,7,8,11],[0,1,2,3,5,7,9],[0,1,2,3,5,7,9,10],[0,1,2,3,5,7,9,10,11],[0,1,2,3,5,7,9,11],[0,1,2,3,5,7,10],[0,1,2,3,5,7,10,11],[0,1,2,3,5,7,11],[0,1,2,3,5,8],[0,1,2,3,5,8,9],[0,1,2,3,5,8,9,10],[0,1,2,3,5,8,9,10,11],[0,1,2,3,5,8,9,11],[0,1,2,3,5,8,10],[0,1,2,3,5,8,10,11],[0,1,2,3,5,8,11],[0,1,2,3,5,9],[0,1,2,3,5,9,10],[0,1,2,3,5,9,10,11],[0,1,2,3,5,9,11],[0,1,2,3,5,10],[0,1,2,3,5,10,11],[0,1,2,3,5,11],[0,1,2,3,6],[0,1,2,3,6,7],[0,1,2,3,6,7,8],[0,1,2,3,6,7,8,9],[0,1,2,3,6,7,8,9,10],[0,1,2,3,6,7,8,9,10,11],[0,1,2,3,6,7,8,9,11],[0,1,2,3,6,7,8,10],[0,1,2,3,6,7,8,10,11],[0,1,2,3,6,7,8,11],[0,1,2,3,6,7,9],[0,1,2,3,6,7,9,10],[0,1,2,3,6,7,9,10,11],[0,1,2,3,6,7,9,11],[0,1,2,3,6,7,10],[0,1,2,3,6,7,10,11],[0,1,2,3,6,7,11],[0,1,2,3,6,8],[0,1,2,3,6,8,9],[0,1,2,3,6,8,9,10],[0,1,2,3,6,8,9,10,11],[0,1,2,3,6,8,9,11],[0,1,2,3,6,8,10],[0,1,2,3,6,8,10,11],[0,1,2,3,6,8,11],[0,1,2,3,6,9],[0,1,2,3,6,9,10],[0,1,2,3,6,9,10,11],[0,1,2,3,6,9,11],[0,1,2,3,6,10],[0,1,2,3,6,10,11],[0,1,2,3,6,11],[0,1,2,3,7],[0,1,2,3,7,8],[0,1,2,3,7,8,9],[0,1,2,3,7,8,9,10],[0,1,2,3,7,8,9,10,11],[0,1,2,3,7,8,9,11],[0,1,2,3,7,8,10],[0,1,2,3,7,8,10,11],[0,1,2,3,7,8,11],[0,1,2,3,7,9],[0,1,2,3,7,9,10],[0,1,2,3,7,9,10,11],[0,1,2,3,7,9,11],[0,1,2,3,7,10],[0,1,2,3,7,10,11],[0,1,2,3,7,11],[0,1,2,3,8],[0,1,2,3,8,9],[0,1,2,3,8,9,10],[0,1,2,3,8,9,10,11],[0,1,2,3,8,9,11],[0,1,2,3,8,10],[0,1,2,3,8,10,11],[0,1,2,3,8,11],[0,1,2,3,9],[0,1,2,3,9,10],[0,1,2,3,9,10,11],[0,1,2,3,9,11],[0,1,2,3,10],[0,1,2,3,10,11],[0,1,2,3,11],[0,1,2,4],[0,1,2,4,5],[0,1,2,4,5,6],[0,1,2,4,5,6,7],[0,1,2,4,5,6,7,8],[0,1,2,4,5,6,7,8,9],[0,1,2,4,5,6,7,8,9,10],[0,1,2,4,5,6,7,8,9,10,11],[0,1,2,4,5,6,7,8,9,11],[0,1,2,4,5,6,7,8,10],[0,1,2,4,5,6,7,8,10,11],[0,1,2,4,5,6,7,8,11],[0,1,2,4,5,6,7,9],[0,1,2,4,5,6,7,9,10],[0,1,2,4,5,6,7,9,10,11],[0,1,2,4,5,6,7,9,11],[0,1,2,4,5,6,7,10],[0,1,2,4,5,6,7,10,11],[0,1,2,4,5,6,7,11],[0,1,2,4,5,6,8],[0,1,2,4,5,6,8,9],[0,1,2,4,5,6,8,9,10],[0,1,2,4,5,6,8,9,10,11],[0,1,2,4,5,6,8,9,11],[0,1,2,4,5,6,8,10],[0,1,2,4,5,6,8,10,11],[0,1,2,4,5,6,8,11],[0,1,2,4,5,6,9],[0,1,2,4,5,6,9,10],[0,1,2,4,5,6,9,10,11],[0,1,2,4,5,6,9,11],[0,1,2,4,5,6,10],[0,1,2,4,5,6,10,11],[0,1,2,4,5,6,11],[0,1,2,4,5,7],[0,1,2,4,5,7,8],[0,1,2,4,5,7,8,9],[0,1,2,4,5,7,8,9,10],[0,1,2,4,5,7,8,9,10,11],[0,1,2,4,5,7,8,9,11],[0,1,2,4,5,7,8,10],[0,1,2,4,5,7,8,10,11],[0,1,2,4,5,7,8,11],[0,1,2,4,5,7,9],[0,1,2,4,5,7,9,10],[0,1,2,4,5,7,9,10,11],[0,1,2,4,5,7,9,11],[0,1,2,4,5,7,10],[0,1,2,4,5,7,10,11],[0,1,2,4,5,7,11],[0,1,2,4,5,8],[0,1,2,4,5,8,9],[0,1,2,4,5,8,9,10],[0,1,2,4,5,8,9,10,11],[0,1,2,4,5,8,9,11],[0,1,2,4,5,8,10],[0,1,2,4,5,8,10,11],[0,1,2,4,5,8,11],[0,1,2,4,5,9],[0,1,2,4,5,9,10],[0,1,2,4,5,9,10,11],[0,1,2,4,5,9,11],[0,1,2,4,5,10],[0,1,2,4,5,10,11],[0,1,2,4,5,11],[0,1,2,4,6],[0,1,2,4,6,7],[0,1,2,4,6,7,8],[0,1,2,4,6,7,8,9],[0,1,2,4,6,7,8,9,10],[0,1,2,4,6,7,8,9,10,11],[0,1,2,4,6,7,8,9,11],[0,1,2,4,6,7,8,10],[0,1,2,4,6,7,8,10,11],[0,1,2,4,6,7,8,11],[0,1,2,4,6,7,9],[0,1,2,4,6,7,9,10],[0,1,2,4,6,7,9,10,11],[0,1,2,4,6,7,9,11],[0,1,2,4,6,7,10],[0,1,2,4,6,7,10,11],[0,1,2,4,6,7,11],[0,1,2,4,6,8],[0,1,2,4,6,8,9],[0,1,2,4,6,8,9,10],[0,1,2,4,6,8,9,10,11],[0,1,2,4,6,8,9,11],[0,1,2,4,6,8,10],[0,1,2,4,6,8,10,11],[0,1,2,4,6,8,11],[0,1,2,4,6,9],[0,1,2,4,6,9,10],[0,1,2,4,6,9,10,11],[0,1,2,4,6,9,11],[0,1,2,4,6,10],[0,1,2,4,6,10,11],[0,1,2,4,6,11],[0,1,2,4,7],[0,1,2,4,7,8],[0,1,2,4,7,8,9],[0,1,2,4,7,8,9,10],[0,1,2,4,7,8,9,10,11],[0,1,2,4,7,8,9,11],[0,1,2,4,7,8,10],[0,1,2,4,7,8,10,11],[0,1,2,4,7,8,11],[0,1,2,4,7,9],[0,1,2,4,7,9,10],[0,1,2,4,7,9,10,11],[0,1,2,4,7,9,11],[0,1,2,4,7,10],[0,1,2,4,7,10,11],[0,1,2,4,7,11],[0,1,2,4,8],[0,1,2,4,8,9],[0,1,2,4,8,9,10],[0,1,2,4,8,9,10,11],[0,1,2,4,8,9,11],[0,1,2,4,8,10],[0,1,2,4,8,10,11],[0,1,2,4,8,11],[0,1,2,4,9],[0,1,2,4,9,10],[0,1,2,4,9,10,11],[0,1,2,4,9,11],[0,1,2,4,10],[0,1,2,4,10,11],[0,1,2,4,11],[0,1,2,5],[0,1,2,5,6],[0,1,2,5,6,7],[0,1,2,5,6,7,8],[0,1,2,5,6,7,8,9],[0,1,2,5,6,7,8,9,10],[0,1,2,5,6,7,8,9,10,11],[0,1,2,5,6,7,8,9,11],[0,1,2,5,6,7,8,10],[0,1,2,5,6,7,8,10,11],[0,1,2,5,6,7,8,11],[0,1,2,5,6,7,9],[0,1,2,5,6,7,9,10],[0,1,2,5,6,7,9,10,11],[0,1,2,5,6,7,9,11],[0,1,2,5,6,7,10],[0,1,2,5,6,7,10,11],[0,1,2,5,6,7,11],[0,1,2,5,6,8],[0,1,2,5,6,8,9],[0,1,2,5,6,8,9,10],[0,1,2,5,6,8,9,10,11],[0,1,2,5,6,8,9,11],[0,1,2,5,6,8,10],[0,1,2,5,6,8,10,11],[0,1,2,5,6,8,11],[0,1,2,5,6,9],[0,1,2,5,6,9,10],[0,1,2,5,6,9,10,11],[0,1,2,5,6,9,11],[0,1,2,5,6,10],[0,1,2,5,6,10,11],[0,1,2,5,6,11],[0,1,2,5,7],[0,1,2,5,7,8],[0,1,2,5,7,8,9],[0,1,2,5,7,8,9,10],[0,1,2,5,7,8,9,10,11],[0,1,2,5,7,8,9,11],[0,1,2,5,7,8,10],[0,1,2,5,7,8,10,11],[0,1,2,5,7,8,11],[0,1,2,5,7,9],[0,1,2,5,7,9,10],[0,1,2,5,7,9,10,11],[0,1,2,5,7,9,11],[0,1,2,5,7,10],[0,1,2,5,7,10,11],[0,1,2,5,7,11],[0,1,2,5,8],[0,1,2,5,8,9],[0,1,2,5,8,9,10],[0,1,2,5,8,9,10,11],[0,1,2,5,8,9,11],[0,1,2,5,8,10],[0,1,2,5,8,10,11],[0,1,2,5,8,11],[0,1,2,5,9],[0,1,2,5,9,10],[0,1,2,5,9,10,11],[0,1,2,5,9,11],[0,1,2,5,10],[0,1,2,5,10,11],[0,1,2,5,11],[0,1,2,6],[0,1,2,6,7],[0,1,2,6,7,8],[0,1,2,6,7,8,9],[0,1,2,6,7,8,9,10],[0,1,2,6,7,8,9,10,11],[0,1,2,6,7,8,9,11],[0,1,2,6,7,8,10],[0,1,2,6,7,8,10,11],[0,1,2,6,7,8,11],[0,1,2,6,7,9],[0,1,2,6,7,9,10],[0,1,2,6,7,9,10,11],[0,1,2,6,7,9,11],[0,1,2,6,7,10],[0,1,2,6,7,10,11],[0,1,2,6,7,11],[0,1,2,6,8],[0,1,2,6,8,9],[0,1,2,6,8,9,10],[0,1,2,6,8,9,10,11],[0,1,2,6,8,9,11],[0,1,2,6,8,10],[0,1,2,6,8,10,11],[0,1,2,6,8,11],[0,1,2,6,9],[0,1,2,6,9,10],[0,1,2,6,9,10,11],[0,1,2,6,9,11],[0,1,2,6,10],[0,1,2,6,10,11],[0,1,2,6,11],[0,1,2,7],[0,1,2,7,8],[0,1,2,7,8,9],[0,1,2,7,8,9,10],[0,1,2,7,8,9,10,11],[0,1,2,7,8,9,11],[0,1,2,7,8,10],[0,1,2,7,8,10,11],[0,1,2,7,8,11],[0,1,2,7,9],[0,1,2,7,9,10],[0,1,2,7,9,10,11],[0,1,2,7,9,11],[0,1,2,7,10],[0,1,2,7,10,11],[0,1,2,7,11],[0,1,2,8],[0,1,2,8,9],[0,1,2,8,9,10],[0,1,2,8,9,10,11],[0,1,2,8,9,11],[0,1,2,8,10],[0,1,2,8,10,11],[0,1,2,8,11],[0,1,2,9],[0,1,2,9,10],[0,1,2,9,10,11],[0,1,2,9,11],[0,1,2,10],[0,1,2,10,11],[0,1,2,11],[0,1,3],[0,1,3,4],[0,1,3,4,5],[0,1,3,4,5,6],[0,1,3,4,5,6,7],[0,1,3,4,5,6,7,8],[0,1,3,4,5,6,7,8,9],[0,1,3,4,5,6,7,8,9,10],[0,1,3,4,5,6,7,8,9,10,11],[0,1,3,4,5,6,7,8,9,11],[0,1,3,4,5,6,7,8,10],[0,1,3,4,5,6,7,8,10,11],[0,1,3,4,5,6,7,8,11],[0,1,3,4,5,6,7,9],[0,1,3,4,5,6,7,9,10],[0,1,3,4,5,6,7,9,10,11],[0,1,3,4,5,6,7,9,11],[0,1,3,4,5,6,7,10],[0,1,3,4,5,6,7,10,11],[0,1,3,4,5,6,7,11],[0,1,3,4,5,6,8],[0,1,3,4,5,6,8,9],[0,1,3,4,5,6,8,9,10],[0,1,3,4,5,6,8,9,10,11],[0,1,3,4,5,6,8,9,11],[0,1,3,4,5,6,8,10],[0,1,3,4,5,6,8,10,11],[0,1,3,4,5,6,8,11],[0,1,3,4,5,6,9],[0,1,3,4,5,6,9,10],[0,1,3,4,5,6,9,10,11],[0,1,3,4,5,6,9,11],[0,1,3,4,5,6,10],[0,1,3,4,5,6,10,11],[0,1,3,4,5,6,11],[0,1,3,4,5,7],[0,1,3,4,5,7,8],[0,1,3,4,5,7,8,9],[0,1,3,4,5,7,8,9,10],[0,1,3,4,5,7,8,9,10,11],[0,1,3,4,5,7,8,9,11],[0,1,3,4,5,7,8,10],[0,1,3,4,5,7,8,10,11],[0,1,3,4,5,7,8,11],[0,1,3,4,5,7,9],[0,1,3,4,5,7,9,10],[0,1,3,4,5,7,9,10,11],[0,1,3,4,5,7,9,11],[0,1,3,4,5,7,10],[0,1,3,4,5,7,10,11],[0,1,3,4,5,7,11],[0,1,3,4,5,8],[0,1,3,4,5,8,9],[0,1,3,4,5,8,9,10],[0,1,3,4,5,8,9,10,11],[0,1,3,4,5,8,9,11],[0,1,3,4,5,8,10],[0,1,3,4,5,8,10,11],[0,1,3,4,5,8,11],[0,1,3,4,5,9],[0,1,3,4,5,9,10],[0,1,3,4,5,9,10,11],[0,1,3,4,5,9,11],[0,1,3,4,5,10],[0,1,3,4,5,10,11],[0,1,3,4,5,11],[0,1,3,4,6],[0,1,3,4,6,7],[0,1,3,4,6,7,8],[0,1,3,4,6,7,8,9],[0,1,3,4,6,7,8,9,10],[0,1,3,4,6,7,8,9,10,11],[0,1,3,4,6,7,8,9,11],[0,1,3,4,6,7,8,10],[0,1,3,4,6,7,8,10,11],[0,1,3,4,6,7,8,11],[0,1,3,4,6,7,9],[0,1,3,4,6,7,9,10],[0,1,3,4,6,7,9,10,11],[0,1,3,4,6,7,9,11],[0,1,3,4,6,7,10],[0,1,3,4,6,7,10,11],[0,1,3,4,6,7,11],[0,1,3,4,6,8],[0,1,3,4,6,8,9],[0,1,3,4,6,8,9,10],[0,1,3,4,6,8,9,10,11],[0,1,3,4,6,8,9,11],[0,1,3,4,6,8,10],[0,1,3,4,6,8,10,11],[0,1,3,4,6,8,11],[0,1,3,4,6,9],[0,1,3,4,6,9,10],[0,1,3,4,6,9,10,11],[0,1,3,4,6,9,11],[0,1,3,4,6,10],[0,1,3,4,6,10,11],[0,1,3,4,6,11],[0,1,3,4,7],[0,1,3,4,7,8],[0,1,3,4,7,8,9],[0,1,3,4,7,8,9,10],[0,1,3,4,7,8,9,10,11],[0,1,3,4,7,8,9,11],[0,1,3,4,7,8,10],[0,1,3,4,7,8,10,11],[0,1,3,4,7,8,11],[0,1,3,4,7,9],[0,1,3,4,7,9,10],[0,1,3,4,7,9,10,11],[0,1,3,4,7,9,11],[0,1,3,4,7,10],[0,1,3,4,7,10,11],[0,1,3,4,7,11],[0,1,3,4,8],[0,1,3,4,8,9],[0,1,3,4,8,9,10],[0,1,3,4,8,9,10,11],[0,1,3,4,8,9,11],[0,1,3,4,8,10],[0,1,3,4,8,10,11],[0,1,3,4,8,11],[0,1,3,4,9],[0,1,3,4,9,10],[0,1,3,4,9,10,11],[0,1,3,4,9,11],[0,1,3,4,10],[0,1,3,4,10,11],[0,1,3,4,11],[0,1,3,5],[0,1,3,5,6],[0,1,3,5,6,7],[0,1,3,5,6,7,8],[0,1,3,5,6,7,8,9],[0,1,3,5,6,7,8,9,10],[0,1,3,5,6,7,8,9,10,11],[0,1,3,5,6,7,8,9,11],[0,1,3,5,6,7,8,10],[0,1,3,5,6,7,8,10,11],[0,1,3,5,6,7,8,11],[0,1,3,5,6,7,9],[0,1,3,5,6,7,9,10],[0,1,3,5,6,7,9,10,11],[0,1,3,5,6,7,9,11],[0,1,3,5,6,7,10],[0,1,3,5,6,7,10,11],[0,1,3,5,6,7,11],[0,1,3,5,6,8],[0,1,3,5,6,8,9],[0,1,3,5,6,8,9,10],[0,1,3,5,6,8,9,10,11],[0,1,3,5,6,8,9,11],[0,1,3,5,6,8,10],[0,1,3,5,6,8,10,11],[0,1,3,5,6,8,11],[0,1,3,5,6,9],[0,1,3,5,6,9,10],[0,1,3,5,6,9,10,11],[0,1,3,5,6,9,11],[0,1,3,5,6,10],[0,1,3,5,6,10,11],[0,1,3,5,6,11],[0,1,3,5,7],[0,1,3,5,7,8],[0,1,3,5,7,8,9],[0,1,3,5,7,8,9,10],[0,1,3,5,7,8,9,10,11],[0,1,3,5,7,8,9,11],[0,1,3,5,7,8,10],[0,1,3,5,7,8,10,11],[0,1,3,5,7,8,11],[0,1,3,5,7,9],[0,1,3,5,7,9,10],[0,1,3,5,7,9,10,11],[0,1,3,5,7,9,11],[0,1,3,5,7,10],[0,1,3,5,7,10,11],[0,1,3,5,7,11],[0,1,3,5,8],[0,1,3,5,8,9],[0,1,3,5,8,9,10],[0,1,3,5,8,9,10,11],[0,1,3,5,8,9,11],[0,1,3,5,8,10],[0,1,3,5,8,10,11],[0,1,3,5,8,11],[0,1,3,5,9],[0,1,3,5,9,10],[0,1,3,5,9,10,11],[0,1,3,5,9,11],[0,1,3,5,10],[0,1,3,5,10,11],[0,1,3,5,11],[0,1,3,6],[0,1,3,6,7],[0,1,3,6,7,8],[0,1,3,6,7,8,9],[0,1,3,6,7,8,9,10],[0,1,3,6,7,8,9,10,11],[0,1,3,6,7,8,9,11],[0,1,3,6,7,8,10],[0,1,3,6,7,8,10,11],[0,1,3,6,7,8,11],[0,1,3,6,7,9],[0,1,3,6,7,9,10],[0,1,3,6,7,9,10,11],[0,1,3,6,7,9,11],[0,1,3,6,7,10],[0,1,3,6,7,10,11],[0,1,3,6,7,11],[0,1,3,6,8],[0,1,3,6,8,9],[0,1,3,6,8,9,10],[0,1,3,6,8,9,10,11],[0,1,3,6,8,9,11],[0,1,3,6,8,10],[0,1,3,6,8,10,11],[0,1,3,6,8,11],[0,1,3,6,9],[0,1,3,6,9,10],[0,1,3,6,9,10,11],[0,1,3,6,9,11],[0,1,3,6,10],[0,1,3,6,10,11],[0,1,3,6,11],[0,1,3,7],[0,1,3,7,8],[0,1,3,7,8,9],[0,1,3,7,8,9,10],[0,1,3,7,8,9,10,11],[0,1,3,7,8,9,11],[0,1,3,7,8,10],[0,1,3,7,8,10,11],[0,1,3,7,8,11],[0,1,3,7,9],[0,1,3,7,9,10],[0,1,3,7,9,10,11],[0,1,3,7,9,11],[0,1,3,7,10],[0,1,3,7,10,11],[0,1,3,7,11],[0,1,3,8],[0,1,3,8,9],[0,1,3,8,9,10],[0,1,3,8,9,10,11],[0,1,3,8,9,11],[0,1,3,8,10],[0,1,3,8,10,11],[0,1,3,8,11],[0,1,3,9],[0,1,3,9,10],[0,1,3,9,10,11],[0,1,3,9,11],[0,1,3,10],[0,1,3,10,11],[0,1,3,11],[0,1,4],[0,1,4,5],[0,1,4,5,6],[0,1,4,5,6,7],[0,1,4,5,6,7,8],[0,1,4,5,6,7,8,9],[0,1,4,5,6,7,8,9,10],[0,1,4,5,6,7,8,9,10,11],[0,1,4,5,6,7,8,9,11],[0,1,4,5,6,7,8,10],[0,1,4,5,6,7,8,10,11],[0,1,4,5,6,7,8,11],[0,1,4,5,6,7,9],[0,1,4,5,6,7,9,10],[0,1,4,5,6,7,9,10,11],[0,1,4,5,6,7,9,11],[0,1,4,5,6,7,10],[0,1,4,5,6,7,10,11],[0,1,4,5,6,7,11],[0,1,4,5,6,8],[0,1,4,5,6,8,9],[0,1,4,5,6,8,9,10],[0,1,4,5,6,8,9,10,11],[0,1,4,5,6,8,9,11],[0,1,4,5,6,8,10],[0,1,4,5,6,8,10,11],[0,1,4,5,6,8,11],[0,1,4,5,6,9],[0,1,4,5,6,9,10],[0,1,4,5,6,9,10,11],[0,1,4,5,6,9,11],[0,1,4,5,6,10],[0,1,4,5,6,10,11],[0,1,4,5,6,11],[0,1,4,5,7],[0,1,4,5,7,8],[0,1,4,5,7,8,9],[0,1,4,5,7,8,9,10],[0,1,4,5,7,8,9,10,11],[0,1,4,5,7,8,9,11],[0,1,4,5,7,8,10],[0,1,4,5,7,8,10,11],[0,1,4,5,7,8,11],[0,1,4,5,7,9],[0,1,4,5,7,9,10],[0,1,4,5,7,9,10,11],[0,1,4,5,7,9,11],[0,1,4,5,7,10],[0,1,4,5,7,10,11],[0,1,4,5,7,11],[0,1,4,5,8],[0,1,4,5,8,9],[0,1,4,5,8,9,10],[0,1,4,5,8,9,10,11],[0,1,4,5,8,9,11],[0,1,4,5,8,10],[0,1,4,5,8,10,11],[0,1,4,5,8,11],[0,1,4,5,9],[0,1,4,5,9,10],[0,1,4,5,9,10,11],[0,1,4,5,9,11],[0,1,4,5,10],[0,1,4,5,10,11],[0,1,4,5,11],[0,1,4,6],[0,1,4,6,7],[0,1,4,6,7,8],[0,1,4,6,7,8,9],[0,1,4,6,7,8,9,10],[0,1,4,6,7,8,9,10,11],[0,1,4,6,7,8,9,11],[0,1,4,6,7,8,10],[0,1,4,6,7,8,10,11],[0,1,4,6,7,8,11],[0,1,4,6,7,9],[0,1,4,6,7,9,10],[0,1,4,6,7,9,10,11],[0,1,4,6,7,9,11],[0,1,4,6,7,10],[0,1,4,6,7,10,11],[0,1,4,6,7,11],[0,1,4,6,8],[0,1,4,6,8,9],[0,1,4,6,8,9,10],[0,1,4,6,8,9,10,11],[0,1,4,6,8,9,11],[0,1,4,6,8,10],[0,1,4,6,8,10,11],[0,1,4,6,8,11],[0,1,4,6,9],[0,1,4,6,9,10],[0,1,4,6,9,10,11],[0,1,4,6,9,11],[0,1,4,6,10],[0,1,4,6,10,11],[0,1,4,6,11],[0,1,4,7],[0,1,4,7,8],[0,1,4,7,8,9],[0,1,4,7,8,9,10],[0,1,4,7,8,9,10,11],[0,1,4,7,8,9,11],[0,1,4,7,8,10],[0,1,4,7,8,10,11],[0,1,4,7,8,11],[0,1,4,7,9],[0,1,4,7,9,10],[0,1,4,7,9,10,11],[0,1,4,7,9,11],[0,1,4,7,10],[0,1,4,7,10,11],[0,1,4,7,11],[0,1,4,8],[0,1,4,8,9],[0,1,4,8,9,10],[0,1,4,8,9,10,11],[0,1,4,8,9,11],[0,1,4,8,10],[0,1,4,8,10,11],[0,1,4,8,11],[0,1,4,9],[0,1,4,9,10],[0,1,4,9,10,11],[0,1,4,9,11],[0,1,4,10],[0,1,4,10,11],[0,1,4,11],[0,1,5],[0,1,5,6],[0,1,5,6,7],[0,1,5,6,7,8],[0,1,5,6,7,8,9],[0,1,5,6,7,8,9,10],[0,1,5,6,7,8,9,10,11],[0,1,5,6,7,8,9,11],[0,1,5,6,7,8,10],[0,1,5,6,7,8,10,11],[0,1,5,6,7,8,11],[0,1,5,6,7,9],[0,1,5,6,7,9,10],[0,1,5,6,7,9,10,11],[0,1,5,6,7,9,11],[0,1,5,6,7,10],[0,1,5,6,7,10,11],[0,1,5,6,7,11],[0,1,5,6,8],[0,1,5,6,8,9],[0,1,5,6,8,9,10],[0,1,5,6,8,9,10,11],[0,1,5,6,8,9,11],[0,1,5,6,8,10],[0,1,5,6,8,10,11],[0,1,5,6,8,11],[0,1,5,6,9],[0,1,5,6,9,10],[0,1,5,6,9,10,11],[0,1,5,6,9,11],[0,1,5,6,10],[0,1,5,6,10,11],[0,1,5,6,11],[0,1,5,7],[0,1,5,7,8],[0,1,5,7,8,9],[0,1,5,7,8,9,10],[0,1,5,7,8,9,10,11],[0,1,5,7,8,9,11],[0,1,5,7,8,10],[0,1,5,7,8,10,11],[0,1,5,7,8,11],[0,1,5,7,9],[0,1,5,7,9,10],[0,1,5,7,9,10,11],[0,1,5,7,9,11],[0,1,5,7,10],[0,1,5,7,10,11],[0,1,5,7,11],[0,1,5,8],[0,1,5,8,9],[0,1,5,8,9,10],[0,1,5,8,9,10,11],[0,1,5,8,9,11],[0,1,5,8,10],[0,1,5,8,10,11],[0,1,5,8,11],[0,1,5,9],[0,1,5,9,10],[0,1,5,9,10,11],[0,1,5,9,11],[0,1,5,10],[0,1,5,10,11],[0,1,5,11],[0,1,6],[0,1,6,7],[0,1,6,7,8],[0,1,6,7,8,9],[0,1,6,7,8,9,10],[0,1,6,7,8,9,10,11],[0,1,6,7,8,9,11],[0,1,6,7,8,10],[0,1,6,7,8,10,11],[0,1,6,7,8,11],[0,1,6,7,9],[0,1,6,7,9,10],[0,1,6,7,9,10,11],[0,1,6,7,9,11],[0,1,6,7,10],[0,1,6,7,10,11],[0,1,6,7,11],[0,1,6,8],[0,1,6,8,9],[0,1,6,8,9,10],[0,1,6,8,9,10,11],[0,1,6,8,9,11],[0,1,6,8,10],[0,1,6,8,10,11],[0,1,6,8,11],[0,1,6,9],[0,1,6,9,10],[0,1,6,9,10,11],[0,1,6,9,11],[0,1,6,10],[0,1,6,10,11],[0,1,6,11],[0,1,7],[0,1,7,8],[0,1,7,8,9],[0,1,7,8,9,10],[0,1,7,8,9,10,11],[0,1,7,8,9,11],[0,1,7,8,10],[0,1,7,8,10,11],[0,1,7,8,11],[0,1,7,9],[0,1,7,9,10],[0,1,7,9,10,11],[0,1,7,9,11],[0,1,7,10],[0,1,7,10,11],[0,1,7,11],[0,1,8],[0,1,8,9],[0,1,8,9,10],[0,1,8,9,10,11],[0,1,8,9,11],[0,1,8,10],[0,1,8,10,11],[0,1,8,11],[0,1,9],[0,1,9,10],[0,1,9,10,11],[0,1,9,11],[0,1,10],[0,1,10,11],[0,1,11],[0,2],[0,2,3],[0,2,3,4],[0,2,3,4,5],[0,2,3,4,5,6],[0,2,3,4,5,6,7],[0,2,3,4,5,6,7,8],[0,2,3,4,5,6,7,8,9],[0,2,3,4,5,6,7,8,9,10],[0,2,3,4,5,6,7,8,9,10,11],[0,2,3,4,5,6,7,8,9,11],[0,2,3,4,5,6,7,8,10],[0,2,3,4,5,6,7,8,10,11],[0,2,3,4,5,6,7,8,11],[0,2,3,4,5,6,7,9],[0,2,3,4,5,6,7,9,10],[0,2,3,4,5,6,7,9,10,11],[0,2,3,4,5,6,7,9,11],[0,2,3,4,5,6,7,10],[0,2,3,4,5,6,7,10,11],[0,2,3,4,5,6,7,11],[0,2,3,4,5,6,8],[0,2,3,4,5,6,8,9],[0,2,3,4,5,6,8,9,10],[0,2,3,4,5,6,8,9,10,11],[0,2,3,4,5,6,8,9,11],[0,2,3,4,5,6,8,10],[0,2,3,4,5,6,8,10,11],[0,2,3,4,5,6,8,11],[0,2,3,4,5,6,9],[0,2,3,4,5,6,9,10],[0,2,3,4,5,6,9,10,11],[0,2,3,4,5,6,9,11],[0,2,3,4,5,6,10],[0,2,3,4,5,6,10,11],[0,2,3,4,5,6,11],[0,2,3,4,5,7],[0,2,3,4,5,7,8],[0,2,3,4,5,7,8,9],[0,2,3,4,5,7,8,9,10],[0,2,3,4,5,7,8,9,10,11],[0,2,3,4,5,7,8,9,11],[0,2,3,4,5,7,8,10],[0,2,3,4,5,7,8,10,11],[0,2,3,4,5,7,8,11],[0,2,3,4,5,7,9],[0,2,3,4,5,7,9,10],[0,2,3,4,5,7,9,10,11],[0,2,3,4,5,7,9,11],[0,2,3,4,5,7,10],[0,2,3,4,5,7,10,11],[0,2,3,4,5,7,11],[0,2,3,4,5,8],[0,2,3,4,5,8,9],[0,2,3,4,5,8,9,10],[0,2,3,4,5,8,9,10,11],[0,2,3,4,5,8,9,11],[0,2,3,4,5,8,10],[0,2,3,4,5,8,10,11],[0,2,3,4,5,8,11],[0,2,3,4,5,9],[0,2,3,4,5,9,10],[0,2,3,4,5,9,10,11],[0,2,3,4,5,9,11],[0,2,3,4,5,10],[0,2,3,4,5,10,11],[0,2,3,4,5,11],[0,2,3,4,6],[0,2,3,4,6,7],[0,2,3,4,6,7,8],[0,2,3,4,6,7,8,9],[0,2,3,4,6,7,8,9,10],[0,2,3,4,6,7,8,9,10,11],[0,2,3,4,6,7,8,9,11],[0,2,3,4,6,7,8,10],[0,2,3,4,6,7,8,10,11],[0,2,3,4,6,7,8,11],[0,2,3,4,6,7,9],[0,2,3,4,6,7,9,10],[0,2,3,4,6,7,9,10,11],[0,2,3,4,6,7,9,11],[0,2,3,4,6,7,10],[0,2,3,4,6,7,10,11],[0,2,3,4,6,7,11],[0,2,3,4,6,8],[0,2,3,4,6,8,9],[0,2,3,4,6,8,9,10],[0,2,3,4,6,8,9,10,11],[0,2,3,4,6,8,9,11],[0,2,3,4,6,8,10],[0,2,3,4,6,8,10,11],[0,2,3,4,6,8,11],[0,2,3,4,6,9],[0,2,3,4,6,9,10],[0,2,3,4,6,9,10,11],[0,2,3,4,6,9,11],[0,2,3,4,6,10],[0,2,3,4,6,10,11],[0,2,3,4,6,11],[0,2,3,4,7],[0,2,3,4,7,8],[0,2,3,4,7,8,9],[0,2,3,4,7,8,9,10],[0,2,3,4,7,8,9,10,11],[0,2,3,4,7,8,9,11],[0,2,3,4,7,8,10],[0,2,3,4,7,8,10,11],[0,2,3,4,7,8,11],[0,2,3,4,7,9],[0,2,3,4,7,9,10],[0,2,3,4,7,9,10,11],[0,2,3,4,7,9,11],[0,2,3,4,7,10],[0,2,3,4,7,10,11],[0,2,3,4,7,11],[0,2,3,4,8],[0,2,3,4,8,9],[0,2,3,4,8,9,10],[0,2,3,4,8,9,10,11],[0,2,3,4,8,9,11],[0,2,3,4,8,10],[0,2,3,4,8,10,11],[0,2,3,4,8,11],[0,2,3,4,9],[0,2,3,4,9,10],[0,2,3,4,9,10,11],[0,2,3,4,9,11],[0,2,3,4,10],[0,2,3,4,10,11],[0,2,3,4,11],[0,2,3,5],[0,2,3,5,6],[0,2,3,5,6,7],[0,2,3,5,6,7,8],[0,2,3,5,6,7,8,9],[0,2,3,5,6,7,8,9,10],[0,2,3,5,6,7,8,9,10,11],[0,2,3,5,6,7,8,9,11],[0,2,3,5,6,7,8,10],[0,2,3,5,6,7,8,10,11],[0,2,3,5,6,7,8,11],[0,2,3,5,6,7,9],[0,2,3,5,6,7,9,10],[0,2,3,5,6,7,9,10,11],[0,2,3,5,6,7,9,11],[0,2,3,5,6,7,10],[0,2,3,5,6,7,10,11],[0,2,3,5,6,7,11],[0,2,3,5,6,8],[0,2,3,5,6,8,9],[0,2,3,5,6,8,9,10],[0,2,3,5,6,8,9,10,11],[0,2,3,5,6,8,9,11],[0,2,3,5,6,8,10],[0,2,3,5,6,8,10,11],[0,2,3,5,6,8,11],[0,2,3,5,6,9],[0,2,3,5,6,9,10],[0,2,3,5,6,9,10,11],[0,2,3,5,6,9,11],[0,2,3,5,6,10],[0,2,3,5,6,10,11],[0,2,3,5,6,11],[0,2,3,5,7],[0,2,3,5,7,8],[0,2,3,5,7,8,9],[0,2,3,5,7,8,9,10],[0,2,3,5,7,8,9,10,11],[0,2,3,5,7,8,9,11],[0,2,3,5,7,8,10],[0,2,3,5,7,8,10,11],[0,2,3,5,7,8,11],[0,2,3,5,7,9],[0,2,3,5,7,9,10],[0,2,3,5,7,9,10,11],[0,2,3,5,7,9,11],[0,2,3,5,7,10],[0,2,3,5,7,10,11],[0,2,3,5,7,11],[0,2,3,5,8],[0,2,3,5,8,9],[0,2,3,5,8,9,10],[0,2,3,5,8,9,10,11],[0,2,3,5,8,9,11],[0,2,3,5,8,10],[0,2,3,5,8,10,11],[0,2,3,5,8,11],[0,2,3,5,9],[0,2,3,5,9,10],[0,2,3,5,9,10,11],[0,2,3,5,9,11],[0,2,3,5,10],[0,2,3,5,10,11],[0,2,3,5,11],[0,2,3,6],[0,2,3,6,7],[0,2,3,6,7,8],[0,2,3,6,7,8,9],[0,2,3,6,7,8,9,10],[0,2,3,6,7,8,9,10,11],[0,2,3,6,7,8,9,11],[0,2,3,6,7,8,10],[0,2,3,6,7,8,10,11],[0,2,3,6,7,8,11],[0,2,3,6,7,9],[0,2,3,6,7,9,10],[0,2,3,6,7,9,10,11],[0,2,3,6,7,9,11],[0,2,3,6,7,10],[0,2,3,6,7,10,11],[0,2,3,6,7,11],[0,2,3,6,8],[0,2,3,6,8,9],[0,2,3,6,8,9,10],[0,2,3,6,8,9,10,11],[0,2,3,6,8,9,11],[0,2,3,6,8,10],[0,2,3,6,8,10,11],[0,2,3,6,8,11],[0,2,3,6,9],[0,2,3,6,9,10],[0,2,3,6,9,10,11],[0,2,3,6,9,11],[0,2,3,6,10],[0,2,3,6,10,11],[0,2,3,6,11],[0,2,3,7],[0,2,3,7,8],[0,2,3,7,8,9],[0,2,3,7,8,9,10],[0,2,3,7,8,9,10,11],[0,2,3,7,8,9,11],[0,2,3,7,8,10],[0,2,3,7,8,10,11],[0,2,3,7,8,11],[0,2,3,7,9],[0,2,3,7,9,10],[0,2,3,7,9,10,11],[0,2,3,7,9,11],[0,2,3,7,10],[0,2,3,7,10,11],[0,2,3,7,11],[0,2,3,8],[0,2,3,8,9],[0,2,3,8,9,10],[0,2,3,8,9,10,11],[0,2,3,8,9,11],[0,2,3,8,10],[0,2,3,8,10,11],[0,2,3,8,11],[0,2,3,9],[0,2,3,9,10],[0,2,3,9,10,11],[0,2,3,9,11],[0,2,3,10],[0,2,3,10,11],[0,2,3,11],[0,2,4],[0,2,4,5],[0,2,4,5,6],[0,2,4,5,6,7],[0,2,4,5,6,7,8],[0,2,4,5,6,7,8,9],[0,2,4,5,6,7,8,9,10],[0,2,4,5,6,7,8,9,10,11],[0,2,4,5,6,7,8,9,11],[0,2,4,5,6,7,8,10],[0,2,4,5,6,7,8,10,11],[0,2,4,5,6,7,8,11],[0,2,4,5,6,7,9],[0,2,4,5,6,7,9,10],[0,2,4,5,6,7,9,10,11],[0,2,4,5,6,7,9,11],[0,2,4,5,6,7,10],[0,2,4,5,6,7,10,11],[0,2,4,5,6,7,11],[0,2,4,5,6,8],[0,2,4,5,6,8,9],[0,2,4,5,6,8,9,10],[0,2,4,5,6,8,9,10,11],[0,2,4,5,6,8,9,11],[0,2,4,5,6,8,10],[0,2,4,5,6,8,10,11],[0,2,4,5,6,8,11],[0,2,4,5,6,9],[0,2,4,5,6,9,10],[0,2,4,5,6,9,10,11],[0,2,4,5,6,9,11],[0,2,4,5,6,10],[0,2,4,5,6,10,11],[0,2,4,5,6,11],[0,2,4,5,7],[0,2,4,5,7,8],[0,2,4,5,7,8,9],[0,2,4,5,7,8,9,10],[0,2,4,5,7,8,9,10,11],[0,2,4,5,7,8,9,11],[0,2,4,5,7,8,10],[0,2,4,5,7,8,10,11],[0,2,4,5,7,8,11],[0,2,4,5,7,9],[0,2,4,5,7,9,10],[0,2,4,5,7,9,10,11],[0,2,4,5,7,9,11],[0,2,4,5,7,10],[0,2,4,5,7,10,11],[0,2,4,5,7,11],[0,2,4,5,8],[0,2,4,5,8,9],[0,2,4,5,8,9,10],[0,2,4,5,8,9,10,11],[0,2,4,5,8,9,11],[0,2,4,5,8,10],[0,2,4,5,8,10,11],[0,2,4,5,8,11],[0,2,4,5,9],[0,2,4,5,9,10],[0,2,4,5,9,10,11],[0,2,4,5,9,11],[0,2,4,5,10],[0,2,4,5,10,11],[0,2,4,5,11],[0,2,4,6],[0,2,4,6,7],[0,2,4,6,7,8],[0,2,4,6,7,8,9],[0,2,4,6,7,8,9,10],[0,2,4,6,7,8,9,10,11],[0,2,4,6,7,8,9,11],[0,2,4,6,7,8,10],[0,2,4,6,7,8,10,11],[0,2,4,6,7,8,11],[0,2,4,6,7,9],[0,2,4,6,7,9,10],[0,2,4,6,7,9,10,11],[0,2,4,6,7,9,11],[0,2,4,6,7,10],[0,2,4,6,7,10,11],[0,2,4,6,7,11],[0,2,4,6,8],[0,2,4,6,8,9],[0,2,4,6,8,9,10],[0,2,4,6,8,9,10,11],[0,2,4,6,8,9,11],[0,2,4,6,8,10],[0,2,4,6,8,10,11],[0,2,4,6,8,11],[0,2,4,6,9],[0,2,4,6,9,10],[0,2,4,6,9,10,11],[0,2,4,6,9,11],[0,2,4,6,10],[0,2,4,6,10,11],[0,2,4,6,11],[0,2,4,7],[0,2,4,7,8],[0,2,4,7,8,9],[0,2,4,7,8,9,10],[0,2,4,7,8,9,10,11],[0,2,4,7,8,9,11],[0,2,4,7,8,10],[0,2,4,7,8,10,11],[0,2,4,7,8,11],[0,2,4,7,9],[0,2,4,7,9,10],[0,2,4,7,9,10,11],[0,2,4,7,9,11],[0,2,4,7,10],[0,2,4,7,10,11],[0,2,4,7,11],[0,2,4,8],[0,2,4,8,9],[0,2,4,8,9,10],[0,2,4,8,9,10,11],[0,2,4,8,9,11],[0,2,4,8,10],[0,2,4,8,10,11],[0,2,4,8,11],[0,2,4,9],[0,2,4,9,10],[0,2,4,9,10,11],[0,2,4,9,11],[0,2,4,10],[0,2,4,10,11],[0,2,4,11],[0,2,5],[0,2,5,6],[0,2,5,6,7],[0,2,5,6,7,8],[0,2,5,6,7,8,9],[0,2,5,6,7,8,9,10],[0,2,5,6,7,8,9,10,11],[0,2,5,6,7,8,9,11],[0,2,5,6,7,8,10],[0,2,5,6,7,8,10,11],[0,2,5,6,7,8,11],[0,2,5,6,7,9],[0,2,5,6,7,9,10],[0,2,5,6,7,9,10,11],[0,2,5,6,7,9,11],[0,2,5,6,7,10],[0,2,5,6,7,10,11],[0,2,5,6,7,11],[0,2,5,6,8],[0,2,5,6,8,9],[0,2,5,6,8,9,10],[0,2,5,6,8,9,10,11],[0,2,5,6,8,9,11],[0,2,5,6,8,10],[0,2,5,6,8,10,11],[0,2,5,6,8,11],[0,2,5,6,9],[0,2,5,6,9,10],[0,2,5,6,9,10,11],[0,2,5,6,9,11],[0,2,5,6,10],[0,2,5,6,10,11],[0,2,5,6,11],[0,2,5,7],[0,2,5,7,8],[0,2,5,7,8,9],[0,2,5,7,8,9,10],[0,2,5,7,8,9,10,11],[0,2,5,7,8,9,11],[0,2,5,7,8,10],[0,2,5,7,8,10,11],[0,2,5,7,8,11],[0,2,5,7,9],[0,2,5,7,9,10],[0,2,5,7,9,10,11],[0,2,5,7,9,11],[0,2,5,7,10],[0,2,5,7,10,11],[0,2,5,7,11],[0,2,5,8],[0,2,5,8,9],[0,2,5,8,9,10],[0,2,5,8,9,10,11],[0,2,5,8,9,11],[0,2,5,8,10],[0,2,5,8,10,11],[0,2,5,8,11],[0,2,5,9],[0,2,5,9,10],[0,2,5,9,10,11],[0,2,5,9,11],[0,2,5,10],[0,2,5,10,11],[0,2,5,11],[0,2,6],[0,2,6,7],[0,2,6,7,8],[0,2,6,7,8,9],[0,2,6,7,8,9,10],[0,2,6,7,8,9,10,11],[0,2,6,7,8,9,11],[0,2,6,7,8,10],[0,2,6,7,8,10,11],[0,2,6,7,8,11],[0,2,6,7,9],[0,2,6,7,9,10],[0,2,6,7,9,10,11],[0,2,6,7,9,11],[0,2,6,7,10],[0,2,6,7,10,11],[0,2,6,7,11],[0,2,6,8],[0,2,6,8,9],[0,2,6,8,9,10],[0,2,6,8,9,10,11],[0,2,6,8,9,11],[0,2,6,8,10],[0,2,6,8,10,11],[0,2,6,8,11],[0,2,6,9],[0,2,6,9,10],[0,2,6,9,10,11],[0,2,6,9,11],[0,2,6,10],[0,2,6,10,11],[0,2,6,11],[0,2,7],[0,2,7,8],[0,2,7,8,9],[0,2,7,8,9,10],[0,2,7,8,9,10,11],[0,2,7,8,9,11],[0,2,7,8,10],[0,2,7,8,10,11],[0,2,7,8,11],[0,2,7,9],[0,2,7,9,10],[0,2,7,9,10,11],[0,2,7,9,11],[0,2,7,10],[0,2,7,10,11],[0,2,7,11],[0,2,8],[0,2,8,9],[0,2,8,9,10],[0,2,8,9,10,11],[0,2,8,9,11],[0,2,8,10],[0,2,8,10,11],[0,2,8,11],[0,2,9],[0,2,9,10],[0,2,9,10,11],[0,2,9,11],[0,2,10],[0,2,10,11],[0,2,11],[0,3],[0,3,4],[0,3,4,5],[0,3,4,5,6],[0,3,4,5,6,7],[0,3,4,5,6,7,8],[0,3,4,5,6,7,8,9],[0,3,4,5,6,7,8,9,10],[0,3,4,5,6,7,8,9,10,11],[0,3,4,5,6,7,8,9,11],[0,3,4,5,6,7,8,10],[0,3,4,5,6,7,8,10,11],[0,3,4,5,6,7,8,11],[0,3,4,5,6,7,9],[0,3,4,5,6,7,9,10],[0,3,4,5,6,7,9,10,11],[0,3,4,5,6,7,9,11],[0,3,4,5,6,7,10],[0,3,4,5,6,7,10,11],[0,3,4,5,6,7,11],[0,3,4,5,6,8],[0,3,4,5,6,8,9],[0,3,4,5,6,8,9,10],[0,3,4,5,6,8,9,10,11],[0,3,4,5,6,8,9,11],[0,3,4,5,6,8,10],[0,3,4,5,6,8,10,11],[0,3,4,5,6,8,11],[0,3,4,5,6,9],[0,3,4,5,6,9,10],[0,3,4,5,6,9,10,11],[0,3,4,5,6,9,11],[0,3,4,5,6,10],[0,3,4,5,6,10,11],[0,3,4,5,6,11],[0,3,4,5,7],[0,3,4,5,7,8],[0,3,4,5,7,8,9],[0,3,4,5,7,8,9,10],[0,3,4,5,7,8,9,10,11],[0,3,4,5,7,8,9,11],[0,3,4,5,7,8,10],[0,3,4,5,7,8,10,11],[0,3,4,5,7,8,11],[0,3,4,5,7,9],[0,3,4,5,7,9,10],[0,3,4,5,7,9,10,11],[0,3,4,5,7,9,11],[0,3,4,5,7,10],[0,3,4,5,7,10,11],[0,3,4,5,7,11],[0,3,4,5,8],[0,3,4,5,8,9],[0,3,4,5,8,9,10],[0,3,4,5,8,9,10,11],[0,3,4,5,8,9,11],[0,3,4,5,8,10],[0,3,4,5,8,10,11],[0,3,4,5,8,11],[0,3,4,5,9],[0,3,4,5,9,10],[0,3,4,5,9,10,11],[0,3,4,5,9,11],[0,3,4,5,10],[0,3,4,5,10,11],[0,3,4,5,11],[0,3,4,6],[0,3,4,6,7],[0,3,4,6,7,8],[0,3,4,6,7,8,9],[0,3,4,6,7,8,9,10],[0,3,4,6,7,8,9,10,11],[0,3,4,6,7,8,9,11],[0,3,4,6,7,8,10],[0,3,4,6,7,8,10,11],[0,3,4,6,7,8,11],[0,3,4,6,7,9],[0,3,4,6,7,9,10],[0,3,4,6,7,9,10,11],[0,3,4,6,7,9,11],[0,3,4,6,7,10],[0,3,4,6,7,10,11],[0,3,4,6,7,11],[0,3,4,6,8],[0,3,4,6,8,9],[0,3,4,6,8,9,10],[0,3,4,6,8,9,10,11],[0,3,4,6,8,9,11],[0,3,4,6,8,10],[0,3,4,6,8,10,11],[0,3,4,6,8,11],[0,3,4,6,9],[0,3,4,6,9,10],[0,3,4,6,9,10,11],[0,3,4,6,9,11],[0,3,4,6,10],[0,3,4,6,10,11],[0,3,4,6,11],[0,3,4,7],[0,3,4,7,8],[0,3,4,7,8,9],[0,3,4,7,8,9,10],[0,3,4,7,8,9,10,11],[0,3,4,7,8,9,11],[0,3,4,7,8,10],[0,3,4,7,8,10,11],[0,3,4,7,8,11],[0,3,4,7,9],[0,3,4,7,9,10],[0,3,4,7,9,10,11],[0,3,4,7,9,11],[0,3,4,7,10],[0,3,4,7,10,11],[0,3,4,7,11],[0,3,4,8],[0,3,4,8,9],[0,3,4,8,9,10],[0,3,4,8,9,10,11],[0,3,4,8,9,11],[0,3,4,8,10],[0,3,4,8,10,11],[0,3,4,8,11],[0,3,4,9],[0,3,4,9,10],[0,3,4,9,10,11],[0,3,4,9,11],[0,3,4,10],[0,3,4,10,11],[0,3,4,11],[0,3,5],[0,3,5,6],[0,3,5,6,7],[0,3,5,6,7,8],[0,3,5,6,7,8,9],[0,3,5,6,7,8,9,10],[0,3,5,6,7,8,9,10,11],[0,3,5,6,7,8,9,11],[0,3,5,6,7,8,10],[0,3,5,6,7,8,10,11],[0,3,5,6,7,8,11],[0,3,5,6,7,9],[0,3,5,6,7,9,10],[0,3,5,6,7,9,10,11],[0,3,5,6,7,9,11],[0,3,5,6,7,10],[0,3,5,6,7,10,11],[0,3,5,6,7,11],[0,3,5,6,8],[0,3,5,6,8,9],[0,3,5,6,8,9,10],[0,3,5,6,8,9,10,11],[0,3,5,6,8,9,11],[0,3,5,6,8,10],[0,3,5,6,8,10,11],[0,3,5,6,8,11],[0,3,5,6,9],[0,3,5,6,9,10],[0,3,5,6,9,10,11],[0,3,5,6,9,11],[0,3,5,6,10],[0,3,5,6,10,11],[0,3,5,6,11],[0,3,5,7],[0,3,5,7,8],[0,3,5,7,8,9],[0,3,5,7,8,9,10],[0,3,5,7,8,9,10,11],[0,3,5,7,8,9,11],[0,3,5,7,8,10],[0,3,5,7,8,10,11],[0,3,5,7,8,11],[0,3,5,7,9],[0,3,5,7,9,10],[0,3,5,7,9,10,11],[0,3,5,7,9,11],[0,3,5,7,10],[0,3,5,7,10,11],[0,3,5,7,11],[0,3,5,8],[0,3,5,8,9],[0,3,5,8,9,10],[0,3,5,8,9,10,11],[0,3,5,8,9,11],[0,3,5,8,10],[0,3,5,8,10,11],[0,3,5,8,11],[0,3,5,9],[0,3,5,9,10],[0,3,5,9,10,11],[0,3,5,9,11],[0,3,5,10],[0,3,5,10,11],[0,3,5,11],[0,3,6],[0,3,6,7],[0,3,6,7,8],[0,3,6,7,8,9],[0,3,6,7,8,9,10],[0,3,6,7,8,9,10,11],[0,3,6,7,8,9,11],[0,3,6,7,8,10],[0,3,6,7,8,10,11],[0,3,6,7,8,11],[0,3,6,7,9],[0,3,6,7,9,10],[0,3,6,7,9,10,11],[0,3,6,7,9,11],[0,3,6,7,10],[0,3,6,7,10,11],[0,3,6,7,11],[0,3,6,8],[0,3,6,8,9],[0,3,6,8,9,10],[0,3,6,8,9,10,11],[0,3,6,8,9,11],[0,3,6,8,10],[0,3,6,8,10,11],[0,3,6,8,11],[0,3,6,9],[0,3,6,9,10],[0,3,6,9,10,11],[0,3,6,9,11],[0,3,6,10],[0,3,6,10,11],[0,3,6,11],[0,3,7],[0,3,7,8],[0,3,7,8,9],[0,3,7,8,9,10],[0,3,7,8,9,10,11],[0,3,7,8,9,11],[0,3,7,8,10],[0,3,7,8,10,11],[0,3,7,8,11],[0,3,7,9],[0,3,7,9,10],[0,3,7,9,10,11],[0,3,7,9,11],[0,3,7,10],[0,3,7,10,11],[0,3,7,11],[0,3,8],[0,3,8,9],[0,3,8,9,10],[0,3,8,9,10,11],[0,3,8,9,11],[0,3,8,10],[0,3,8,10,11],[0,3,8,11],[0,3,9],[0,3,9,10],[0,3,9,10,11],[0,3,9,11],[0,3,10],[0,3,10,11],[0,3,11],[0,4],[0,4,5],[0,4,5,6],[0,4,5,6,7],[0,4,5,6,7,8],[0,4,5,6,7,8,9],[0,4,5,6,7,8,9,10],[0,4,5,6,7,8,9,10,11],[0,4,5,6,7,8,9,11],[0,4,5,6,7,8,10],[0,4,5,6,7,8,10,11],[0,4,5,6,7,8,11],[0,4,5,6,7,9],[0,4,5,6,7,9,10],[0,4,5,6,7,9,10,11],[0,4,5,6,7,9,11],[0,4,5,6,7,10],[0,4,5,6,7,10,11],[0,4,5,6,7,11],[0,4,5,6,8],[0,4,5,6,8,9],[0,4,5,6,8,9,10],[0,4,5,6,8,9,10,11],[0,4,5,6,8,9,11],[0,4,5,6,8,10],[0,4,5,6,8,10,11],[0,4,5,6,8,11],[0,4,5,6,9],[0,4,5,6,9,10],[0,4,5,6,9,10,11],[0,4,5,6,9,11],[0,4,5,6,10],[0,4,5,6,10,11],[0,4,5,6,11],[0,4,5,7],[0,4,5,7,8],[0,4,5,7,8,9],[0,4,5,7,8,9,10],[0,4,5,7,8,9,10,11],[0,4,5,7,8,9,11],[0,4,5,7,8,10],[0,4,5,7,8,10,11],[0,4,5,7,8,11],[0,4,5,7,9],[0,4,5,7,9,10],[0,4,5,7,9,10,11],[0,4,5,7,9,11],[0,4,5,7,10],[0,4,5,7,10,11],[0,4,5,7,11],[0,4,5,8],[0,4,5,8,9],[0,4,5,8,9,10],[0,4,5,8,9,10,11],[0,4,5,8,9,11],[0,4,5,8,10],[0,4,5,8,10,11],[0,4,5,8,11],[0,4,5,9],[0,4,5,9,10],[0,4,5,9,10,11],[0,4,5,9,11],[0,4,5,10],[0,4,5,10,11],[0,4,5,11],[0,4,6],[0,4,6,7],[0,4,6,7,8],[0,4,6,7,8,9],[0,4,6,7,8,9,10],[0,4,6,7,8,9,10,11],[0,4,6,7,8,9,11],[0,4,6,7,8,10],[0,4,6,7,8,10,11],[0,4,6,7,8,11],[0,4,6,7,9],[0,4,6,7,9,10],[0,4,6,7,9,10,11],[0,4,6,7,9,11],[0,4,6,7,10],[0,4,6,7,10,11],[0,4,6,7,11],[0,4,6,8],[0,4,6,8,9],[0,4,6,8,9,10],[0,4,6,8,9,10,11],[0,4,6,8,9,11],[0,4,6,8,10],[0,4,6,8,10,11],[0,4,6,8,11],[0,4,6,9],[0,4,6,9,10],[0,4,6,9,10,11],[0,4,6,9,11],[0,4,6,10],[0,4,6,10,11],[0,4,6,11],[0,4,7],[0,4,7,8],[0,4,7,8,9],[0,4,7,8,9,10],[0,4,7,8,9,10,11],[0,4,7,8,9,11],[0,4,7,8,10],[0,4,7,8,10,11],[0,4,7,8,11],[0,4,7,9],[0,4,7,9,10],[0,4,7,9,10,11],[0,4,7,9,11],[0,4,7,10],[0,4,7,10,11],[0,4,7,11],[0,4,8],[0,4,8,9],[0,4,8,9,10],[0,4,8,9,10,11],[0,4,8,9,11],[0,4,8,10],[0,4,8,10,11],[0,4,8,11],[0,4,9],[0,4,9,10],[0,4,9,10,11],[0,4,9,11],[0,4,10],[0,4,10,11],[0,4,11],[0,5],[0,5,6],[0,5,6,7],[0,5,6,7,8],[0,5,6,7,8,9],[0,5,6,7,8,9,10],[0,5,6,7,8,9,10,11],[0,5,6,7,8,9,11],[0,5,6,7,8,10],[0,5,6,7,8,10,11],[0,5,6,7,8,11],[0,5,6,7,9],[0,5,6,7,9,10],[0,5,6,7,9,10,11],[0,5,6,7,9,11],[0,5,6,7,10],[0,5,6,7,10,11],[0,5,6,7,11],[0,5,6,8],[0,5,6,8,9],[0,5,6,8,9,10],[0,5,6,8,9,10,11],[0,5,6,8,9,11],[0,5,6,8,10],[0,5,6,8,10,11],[0,5,6,8,11],[0,5,6,9],[0,5,6,9,10],[0,5,6,9,10,11],[0,5,6,9,11],[0,5,6,10],[0,5,6,10,11],[0,5,6,11],[0,5,7],[0,5,7,8],[0,5,7,8,9],[0,5,7,8,9,10],[0,5,7,8,9,10,11],[0,5,7,8,9,11],[0,5,7,8,10],[0,5,7,8,10,11],[0,5,7,8,11],[0,5,7,9],[0,5,7,9,10],[0,5,7,9,10,11],[0,5,7,9,11],[0,5,7,10],[0,5,7,10,11],[0,5,7,11],[0,5,8],[0,5,8,9],[0,5,8,9,10],[0,5,8,9,10,11],[0,5,8,9,11],[0,5,8,10],[0,5,8,10,11],[0,5,8,11],[0,5,9],[0,5,9,10],[0,5,9,10,11],[0,5,9,11],[0,5,10],[0,5,10,11],[0,5,11],[0,6],[0,6,7],[0,6,7,8],[0,6,7,8,9],[0,6,7,8,9,10],[0,6,7,8,9,10,11],[0,6,7,8,9,11],[0,6,7,8,10],[0,6,7,8,10,11],[0,6,7,8,11],[0,6,7,9],[0,6,7,9,10],[0,6,7,9,10,11],[0,6,7,9,11],[0,6,7,10],[0,6,7,10,11],[0,6,7,11],[0,6,8],[0,6,8,9],[0,6,8,9,10],[0,6,8,9,10,11],[0,6,8,9,11],[0,6,8,10],[0,6,8,10,11],[0,6,8,11],[0,6,9],[0,6,9,10],[0,6,9,10,11],[0,6,9,11],[0,6,10],[0,6,10,11],[0,6,11],[0,7],[0,7,8],[0,7,8,9],[0,7,8,9,10],[0,7,8,9,10,11],[0,7,8,9,11],[0,7,8,10],[0,7,8,10,11],[0,7,8,11],[0,7,9],[0,7,9,10],[0,7,9,10,11],[0,7,9,11],[0,7,10],[0,7,10,11],[0,7,11],[0,8],[0,8,9],[0,8,9,10],[0,8,9,10,11],[0,8,9,11],[0,8,10],[0,8,10,11],[0,8,11],[0,9],[0,9,10],[0,9,10,11],[0,9,11],[0,10],[0,10,11],[0,11],[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5],[1,2,3,4,5,6],[1,2,3,4,5,6,7],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10,11],[1,2,3,4,5,6,7,8,9,11],[1,2,3,4,5,6,7,8,10],[1,2,3,4,5,6,7,8,10,11],[1,2,3,4,5,6,7,8,11],[1,2,3,4,5,6,7,9],[1,2,3,4,5,6,7,9,10],[1,2,3,4,5,6,7,9,10,11],[1,2,3,4,5,6,7,9,11],[1,2,3,4,5,6,7,10],[1,2,3,4,5,6,7,10,11],[1,2,3,4,5,6,7,11],[1,2,3,4,5,6,8],[1,2,3,4,5,6,8,9],[1,2,3,4,5,6,8,9,10],[1,2,3,4,5,6,8,9,10,11],[1,2,3,4,5,6,8,9,11],[1,2,3,4,5,6,8,10],[1,2,3,4,5,6,8,10,11],[1,2,3,4,5,6,8,11],[1,2,3,4,5,6,9],[1,2,3,4,5,6,9,10],[1,2,3,4,5,6,9,10,11],[1,2,3,4,5,6,9,11],[1,2,3,4,5,6,10],[1,2,3,4,5,6,10,11],[1,2,3,4,5,6,11],[1,2,3,4,5,7],[1,2,3,4,5,7,8],[1,2,3,4,5,7,8,9],[1,2,3,4,5,7,8,9,10],[1,2,3,4,5,7,8,9,10,11],[1,2,3,4,5,7,8,9,11],[1,2,3,4,5,7,8,10],[1,2,3,4,5,7,8,10,11],[1,2,3,4,5,7,8,11],[1,2,3,4,5,7,9],[1,2,3,4,5,7,9,10],[1,2,3,4,5,7,9,10,11],[1,2,3,4,5,7,9,11],[1,2,3,4,5,7,10],[1,2,3,4,5,7,10,11],[1,2,3,4,5,7,11],[1,2,3,4,5,8],[1,2,3,4,5,8,9],[1,2,3,4,5,8,9,10],[1,2,3,4,5,8,9,10,11],[1,2,3,4,5,8,9,11],[1,2,3,4,5,8,10],[1,2,3,4,5,8,10,11],[1,2,3,4,5,8,11],[1,2,3,4,5,9],[1,2,3,4,5,9,10],[1,2,3,4,5,9,10,11],[1,2,3,4,5,9,11],[1,2,3,4,5,10],[1,2,3,4,5,10,11],[1,2,3,4,5,11],[1,2,3,4,6],[1,2,3,4,6,7],[1,2,3,4,6,7,8],[1,2,3,4,6,7,8,9],[1,2,3,4,6,7,8,9,10],[1,2,3,4,6,7,8,9,10,11],[1,2,3,4,6,7,8,9,11],[1,2,3,4,6,7,8,10],[1,2,3,4,6,7,8,10,11],[1,2,3,4,6,7,8,11],[1,2,3,4,6,7,9],[1,2,3,4,6,7,9,10],[1,2,3,4,6,7,9,10,11],[1,2,3,4,6,7,9,11],[1,2,3,4,6,7,10],[1,2,3,4,6,7,10,11],[1,2,3,4,6,7,11],[1,2,3,4,6,8],[1,2,3,4,6,8,9],[1,2,3,4,6,8,9,10],[1,2,3,4,6,8,9,10,11],[1,2,3,4,6,8,9,11],[1,2,3,4,6,8,10],[1,2,3,4,6,8,10,11],[1,2,3,4,6,8,11],[1,2,3,4,6,9],[1,2,3,4,6,9,10],[1,2,3,4,6,9,10,11],[1,2,3,4,6,9,11],[1,2,3,4,6,10],[1,2,3,4,6,10,11],[1,2,3,4,6,11],[1,2,3,4,7],[1,2,3,4,7,8],[1,2,3,4,7,8,9],[1,2,3,4,7,8,9,10],[1,2,3,4,7,8,9,10,11],[1,2,3,4,7,8,9,11],[1,2,3,4,7,8,10],[1,2,3,4,7,8,10,11],[1,2,3,4,7,8,11],[1,2,3,4,7,9],[1,2,3,4,7,9,10],[1,2,3,4,7,9,10,11],[1,2,3,4,7,9,11],[1,2,3,4,7,10],[1,2,3,4,7,10,11],[1,2,3,4,7,11],[1,2,3,4,8],[1,2,3,4,8,9],[1,2,3,4,8,9,10],[1,2,3,4,8,9,10,11],[1,2,3,4,8,9,11],[1,2,3,4,8,10],[1,2,3,4,8,10,11],[1,2,3,4,8,11],[1,2,3,4,9],[1,2,3,4,9,10],[1,2,3,4,9,10,11],[1,2,3,4,9,11],[1,2,3,4,10],[1,2,3,4,10,11],[1,2,3,4,11],[1,2,3,5],[1,2,3,5,6],[1,2,3,5,6,7],[1,2,3,5,6,7,8],[1,2,3,5,6,7,8,9],[1,2,3,5,6,7,8,9,10],[1,2,3,5,6,7,8,9,10,11],[1,2,3,5,6,7,8,9,11],[1,2,3,5,6,7,8,10],[1,2,3,5,6,7,8,10,11],[1,2,3,5,6,7,8,11],[1,2,3,5,6,7,9],[1,2,3,5,6,7,9,10],[1,2,3,5,6,7,9,10,11],[1,2,3,5,6,7,9,11],[1,2,3,5,6,7,10],[1,2,3,5,6,7,10,11],[1,2,3,5,6,7,11],[1,2,3,5,6,8],[1,2,3,5,6,8,9],[1,2,3,5,6,8,9,10],[1,2,3,5,6,8,9,10,11],[1,2,3,5,6,8,9,11],[1,2,3,5,6,8,10],[1,2,3,5,6,8,10,11],[1,2,3,5,6,8,11],[1,2,3,5,6,9],[1,2,3,5,6,9,10],[1,2,3,5,6,9,10,11],[1,2,3,5,6,9,11],[1,2,3,5,6,10],[1,2,3,5,6,10,11],[1,2,3,5,6,11],[1,2,3,5,7],[1,2,3,5,7,8],[1,2,3,5,7,8,9],[1,2,3,5,7,8,9,10],[1,2,3,5,7,8,9,10,11],[1,2,3,5,7,8,9,11],[1,2,3,5,7,8,10],[1,2,3,5,7,8,10,11],[1,2,3,5,7,8,11],[1,2,3,5,7,9],[1,2,3,5,7,9,10],[1,2,3,5,7,9,10,11],[1,2,3,5,7,9,11],[1,2,3,5,7,10],[1,2,3,5,7,10,11],[1,2,3,5,7,11],[1,2,3,5,8],[1,2,3,5,8,9],[1,2,3,5,8,9,10],[1,2,3,5,8,9,10,11],[1,2,3,5,8,9,11],[1,2,3,5,8,10],[1,2,3,5,8,10,11],[1,2,3,5,8,11],[1,2,3,5,9],[1,2,3,5,9,10],[1,2,3,5,9,10,11],[1,2,3,5,9,11],[1,2,3,5,10],[1,2,3,5,10,11],[1,2,3,5,11],[1,2,3,6],[1,2,3,6,7],[1,2,3,6,7,8],[1,2,3,6,7,8,9],[1,2,3,6,7,8,9,10],[1,2,3,6,7,8,9,10,11],[1,2,3,6,7,8,9,11],[1,2,3,6,7,8,10],[1,2,3,6,7,8,10,11],[1,2,3,6,7,8,11],[1,2,3,6,7,9],[1,2,3,6,7,9,10],[1,2,3,6,7,9,10,11],[1,2,3,6,7,9,11],[1,2,3,6,7,10],[1,2,3,6,7,10,11],[1,2,3,6,7,11],[1,2,3,6,8],[1,2,3,6,8,9],[1,2,3,6,8,9,10],[1,2,3,6,8,9,10,11],[1,2,3,6,8,9,11],[1,2,3,6,8,10],[1,2,3,6,8,10,11],[1,2,3,6,8,11],[1,2,3,6,9],[1,2,3,6,9,10],[1,2,3,6,9,10,11],[1,2,3,6,9,11],[1,2,3,6,10],[1,2,3,6,10,11],[1,2,3,6,11],[1,2,3,7],[1,2,3,7,8],[1,2,3,7,8,9],[1,2,3,7,8,9,10],[1,2,3,7,8,9,10,11],[1,2,3,7,8,9,11],[1,2,3,7,8,10],[1,2,3,7,8,10,11],[1,2,3,7,8,11],[1,2,3,7,9],[1,2,3,7,9,10],[1,2,3,7,9,10,11],[1,2,3,7,9,11],[1,2,3,7,10],[1,2,3,7,10,11],[1,2,3,7,11],[1,2,3,8],[1,2,3,8,9],[1,2,3,8,9,10],[1,2,3,8,9,10,11],[1,2,3,8,9,11],[1,2,3,8,10],[1,2,3,8,10,11],[1,2,3,8,11],[1,2,3,9],[1,2,3,9,10],[1,2,3,9,10,11],[1,2,3,9,11],[1,2,3,10],[1,2,3,10,11],[1,2,3,11],[1,2,4],[1,2,4,5],[1,2,4,5,6],[1,2,4,5,6,7],[1,2,4,5,6,7,8],[1,2,4,5,6,7,8,9],[1,2,4,5,6,7,8,9,10],[1,2,4,5,6,7,8,9,10,11],[1,2,4,5,6,7,8,9,11],[1,2,4,5,6,7,8,10],[1,2,4,5,6,7,8,10,11],[1,2,4,5,6,7,8,11],[1,2,4,5,6,7,9],[1,2,4,5,6,7,9,10],[1,2,4,5,6,7,9,10,11],[1,2,4,5,6,7,9,11],[1,2,4,5,6,7,10],[1,2,4,5,6,7,10,11],[1,2,4,5,6,7,11],[1,2,4,5,6,8],[1,2,4,5,6,8,9],[1,2,4,5,6,8,9,10],[1,2,4,5,6,8,9,10,11],[1,2,4,5,6,8,9,11],[1,2,4,5,6,8,10],[1,2,4,5,6,8,10,11],[1,2,4,5,6,8,11],[1,2,4,5,6,9],[1,2,4,5,6,9,10],[1,2,4,5,6,9,10,11],[1,2,4,5,6,9,11],[1,2,4,5,6,10],[1,2,4,5,6,10,11],[1,2,4,5,6,11],[1,2,4,5,7],[1,2,4,5,7,8],[1,2,4,5,7,8,9],[1,2,4,5,7,8,9,10],[1,2,4,5,7,8,9,10,11],[1,2,4,5,7,8,9,11],[1,2,4,5,7,8,10],[1,2,4,5,7,8,10,11],[1,2,4,5,7,8,11],[1,2,4,5,7,9],[1,2,4,5,7,9,10],[1,2,4,5,7,9,10,11],[1,2,4,5,7,9,11],[1,2,4,5,7,10],[1,2,4,5,7,10,11],[1,2,4,5,7,11],[1,2,4,5,8],[1,2,4,5,8,9],[1,2,4,5,8,9,10],[1,2,4,5,8,9,10,11],[1,2,4,5,8,9,11],[1,2,4,5,8,10],[1,2,4,5,8,10,11],[1,2,4,5,8,11],[1,2,4,5,9],[1,2,4,5,9,10],[1,2,4,5,9,10,11],[1,2,4,5,9,11],[1,2,4,5,10],[1,2,4,5,10,11],[1,2,4,5,11],[1,2,4,6],[1,2,4,6,7],[1,2,4,6,7,8],[1,2,4,6,7,8,9],[1,2,4,6,7,8,9,10],[1,2,4,6,7,8,9,10,11],[1,2,4,6,7,8,9,11],[1,2,4,6,7,8,10],[1,2,4,6,7,8,10,11],[1,2,4,6,7,8,11],[1,2,4,6,7,9],[1,2,4,6,7,9,10],[1,2,4,6,7,9,10,11],[1,2,4,6,7,9,11],[1,2,4,6,7,10],[1,2,4,6,7,10,11],[1,2,4,6,7,11],[1,2,4,6,8],[1,2,4,6,8,9],[1,2,4,6,8,9,10],[1,2,4,6,8,9,10,11],[1,2,4,6,8,9,11],[1,2,4,6,8,10],[1,2,4,6,8,10,11],[1,2,4,6,8,11],[1,2,4,6,9],[1,2,4,6,9,10],[1,2,4,6,9,10,11],[1,2,4,6,9,11],[1,2,4,6,10],[1,2,4,6,10,11],[1,2,4,6,11],[1,2,4,7],[1,2,4,7,8],[1,2,4,7,8,9],[1,2,4,7,8,9,10],[1,2,4,7,8,9,10,11],[1,2,4,7,8,9,11],[1,2,4,7,8,10],[1,2,4,7,8,10,11],[1,2,4,7,8,11],[1,2,4,7,9],[1,2,4,7,9,10],[1,2,4,7,9,10,11],[1,2,4,7,9,11],[1,2,4,7,10],[1,2,4,7,10,11],[1,2,4,7,11],[1,2,4,8],[1,2,4,8,9],[1,2,4,8,9,10],[1,2,4,8,9,10,11],[1,2,4,8,9,11],[1,2,4,8,10],[1,2,4,8,10,11],[1,2,4,8,11],[1,2,4,9],[1,2,4,9,10],[1,2,4,9,10,11],[1,2,4,9,11],[1,2,4,10],[1,2,4,10,11],[1,2,4,11],[1,2,5],[1,2,5,6],[1,2,5,6,7],[1,2,5,6,7,8],[1,2,5,6,7,8,9],[1,2,5,6,7,8,9,10],[1,2,5,6,7,8,9,10,11],[1,2,5,6,7,8,9,11],[1,2,5,6,7,8,10],[1,2,5,6,7,8,10,11],[1,2,5,6,7,8,11],[1,2,5,6,7,9],[1,2,5,6,7,9,10],[1,2,5,6,7,9,10,11],[1,2,5,6,7,9,11],[1,2,5,6,7,10],[1,2,5,6,7,10,11],[1,2,5,6,7,11],[1,2,5,6,8],[1,2,5,6,8,9],[1,2,5,6,8,9,10],[1,2,5,6,8,9,10,11],[1,2,5,6,8,9,11],[1,2,5,6,8,10],[1,2,5,6,8,10,11],[1,2,5,6,8,11],[1,2,5,6,9],[1,2,5,6,9,10],[1,2,5,6,9,10,11],[1,2,5,6,9,11],[1,2,5,6,10],[1,2,5,6,10,11],[1,2,5,6,11],[1,2,5,7],[1,2,5,7,8],[1,2,5,7,8,9],[1,2,5,7,8,9,10],[1,2,5,7,8,9,10,11],[1,2,5,7,8,9,11],[1,2,5,7,8,10],[1,2,5,7,8,10,11],[1,2,5,7,8,11],[1,2,5,7,9],[1,2,5,7,9,10],[1,2,5,7,9,10,11],[1,2,5,7,9,11],[1,2,5,7,10],[1,2,5,7,10,11],[1,2,5,7,11],[1,2,5,8],[1,2,5,8,9],[1,2,5,8,9,10],[1,2,5,8,9,10,11],[1,2,5,8,9,11],[1,2,5,8,10],[1,2,5,8,10,11],[1,2,5,8,11],[1,2,5,9],[1,2,5,9,10],[1,2,5,9,10,11],[1,2,5,9,11],[1,2,5,10],[1,2,5,10,11],[1,2,5,11],[1,2,6],[1,2,6,7],[1,2,6,7,8],[1,2,6,7,8,9],[1,2,6,7,8,9,10],[1,2,6,7,8,9,10,11],[1,2,6,7,8,9,11],[1,2,6,7,8,10],[1,2,6,7,8,10,11],[1,2,6,7,8,11],[1,2,6,7,9],[1,2,6,7,9,10],[1,2,6,7,9,10,11],[1,2,6,7,9,11],[1,2,6,7,10],[1,2,6,7,10,11],[1,2,6,7,11],[1,2,6,8],[1,2,6,8,9],[1,2,6,8,9,10],[1,2,6,8,9,10,11],[1,2,6,8,9,11],[1,2,6,8,10],[1,2,6,8,10,11],[1,2,6,8,11],[1,2,6,9],[1,2,6,9,10],[1,2,6,9,10,11],[1,2,6,9,11],[1,2,6,10],[1,2,6,10,11],[1,2,6,11],[1,2,7],[1,2,7,8],[1,2,7,8,9],[1,2,7,8,9,10],[1,2,7,8,9,10,11],[1,2,7,8,9,11],[1,2,7,8,10],[1,2,7,8,10,11],[1,2,7,8,11],[1,2,7,9],[1,2,7,9,10],[1,2,7,9,10,11],[1,2,7,9,11],[1,2,7,10],[1,2,7,10,11],[1,2,7,11],[1,2,8],[1,2,8,9],[1,2,8,9,10],[1,2,8,9,10,11],[1,2,8,9,11],[1,2,8,10],[1,2,8,10,11],[1,2,8,11],[1,2,9],[1,2,9,10],[1,2,9,10,11],[1,2,9,11],[1,2,10],[1,2,10,11],[1,2,11],[1,3],[1,3,4],[1,3,4,5],[1,3,4,5,6],[1,3,4,5,6,7],[1,3,4,5,6,7,8],[1,3,4,5,6,7,8,9],[1,3,4,5,6,7,8,9,10],[1,3,4,5,6,7,8,9,10,11],[1,3,4,5,6,7,8,9,11],[1,3,4,5,6,7,8,10],[1,3,4,5,6,7,8,10,11],[1,3,4,5,6,7,8,11],[1,3,4,5,6,7,9],[1,3,4,5,6,7,9,10],[1,3,4,5,6,7,9,10,11],[1,3,4,5,6,7,9,11],[1,3,4,5,6,7,10],[1,3,4,5,6,7,10,11],[1,3,4,5,6,7,11],[1,3,4,5,6,8],[1,3,4,5,6,8,9],[1,3,4,5,6,8,9,10],[1,3,4,5,6,8,9,10,11],[1,3,4,5,6,8,9,11],[1,3,4,5,6,8,10],[1,3,4,5,6,8,10,11],[1,3,4,5,6,8,11],[1,3,4,5,6,9],[1,3,4,5,6,9,10],[1,3,4,5,6,9,10,11],[1,3,4,5,6,9,11],[1,3,4,5,6,10],[1,3,4,5,6,10,11],[1,3,4,5,6,11],[1,3,4,5,7],[1,3,4,5,7,8],[1,3,4,5,7,8,9],[1,3,4,5,7,8,9,10],[1,3,4,5,7,8,9,10,11],[1,3,4,5,7,8,9,11],[1,3,4,5,7,8,10],[1,3,4,5,7,8,10,11],[1,3,4,5,7,8,11],[1,3,4,5,7,9],[1,3,4,5,7,9,10],[1,3,4,5,7,9,10,11],[1,3,4,5,7,9,11],[1,3,4,5,7,10],[1,3,4,5,7,10,11],[1,3,4,5,7,11],[1,3,4,5,8],[1,3,4,5,8,9],[1,3,4,5,8,9,10],[1,3,4,5,8,9,10,11],[1,3,4,5,8,9,11],[1,3,4,5,8,10],[1,3,4,5,8,10,11],[1,3,4,5,8,11],[1,3,4,5,9],[1,3,4,5,9,10],[1,3,4,5,9,10,11],[1,3,4,5,9,11],[1,3,4,5,10],[1,3,4,5,10,11],[1,3,4,5,11],[1,3,4,6],[1,3,4,6,7],[1,3,4,6,7,8],[1,3,4,6,7,8,9],[1,3,4,6,7,8,9,10],[1,3,4,6,7,8,9,10,11],[1,3,4,6,7,8,9,11],[1,3,4,6,7,8,10],[1,3,4,6,7,8,10,11],[1,3,4,6,7,8,11],[1,3,4,6,7,9],[1,3,4,6,7,9,10],[1,3,4,6,7,9,10,11],[1,3,4,6,7,9,11],[1,3,4,6,7,10],[1,3,4,6,7,10,11],[1,3,4,6,7,11],[1,3,4,6,8],[1,3,4,6,8,9],[1,3,4,6,8,9,10],[1,3,4,6,8,9,10,11],[1,3,4,6,8,9,11],[1,3,4,6,8,10],[1,3,4,6,8,10,11],[1,3,4,6,8,11],[1,3,4,6,9],[1,3,4,6,9,10],[1,3,4,6,9,10,11],[1,3,4,6,9,11],[1,3,4,6,10],[1,3,4,6,10,11],[1,3,4,6,11],[1,3,4,7],[1,3,4,7,8],[1,3,4,7,8,9],[1,3,4,7,8,9,10],[1,3,4,7,8,9,10,11],[1,3,4,7,8,9,11],[1,3,4,7,8,10],[1,3,4,7,8,10,11],[1,3,4,7,8,11],[1,3,4,7,9],[1,3,4,7,9,10],[1,3,4,7,9,10,11],[1,3,4,7,9,11],[1,3,4,7,10],[1,3,4,7,10,11],[1,3,4,7,11],[1,3,4,8],[1,3,4,8,9],[1,3,4,8,9,10],[1,3,4,8,9,10,11],[1,3,4,8,9,11],[1,3,4,8,10],[1,3,4,8,10,11],[1,3,4,8,11],[1,3,4,9],[1,3,4,9,10],[1,3,4,9,10,11],[1,3,4,9,11],[1,3,4,10],[1,3,4,10,11],[1,3,4,11],[1,3,5],[1,3,5,6],[1,3,5,6,7],[1,3,5,6,7,8],[1,3,5,6,7,8,9],[1,3,5,6,7,8,9,10],[1,3,5,6,7,8,9,10,11],[1,3,5,6,7,8,9,11],[1,3,5,6,7,8,10],[1,3,5,6,7,8,10,11],[1,3,5,6,7,8,11],[1,3,5,6,7,9],[1,3,5,6,7,9,10],[1,3,5,6,7,9,10,11],[1,3,5,6,7,9,11],[1,3,5,6,7,10],[1,3,5,6,7,10,11],[1,3,5,6,7,11],[1,3,5,6,8],[1,3,5,6,8,9],[1,3,5,6,8,9,10],[1,3,5,6,8,9,10,11],[1,3,5,6,8,9,11],[1,3,5,6,8,10],[1,3,5,6,8,10,11],[1,3,5,6,8,11],[1,3,5,6,9],[1,3,5,6,9,10],[1,3,5,6,9,10,11],[1,3,5,6,9,11],[1,3,5,6,10],[1,3,5,6,10,11],[1,3,5,6,11],[1,3,5,7],[1,3,5,7,8],[1,3,5,7,8,9],[1,3,5,7,8,9,10],[1,3,5,7,8,9,10,11],[1,3,5,7,8,9,11],[1,3,5,7,8,10],[1,3,5,7,8,10,11],[1,3,5,7,8,11],[1,3,5,7,9],[1,3,5,7,9,10],[1,3,5,7,9,10,11],[1,3,5,7,9,11],[1,3,5,7,10],[1,3,5,7,10,11],[1,3,5,7,11],[1,3,5,8],[1,3,5,8,9],[1,3,5,8,9,10],[1,3,5,8,9,10,11],[1,3,5,8,9,11],[1,3,5,8,10],[1,3,5,8,10,11],[1,3,5,8,11],[1,3,5,9],[1,3,5,9,10],[1,3,5,9,10,11],[1,3,5,9,11],[1,3,5,10],[1,3,5,10,11],[1,3,5,11],[1,3,6],[1,3,6,7],[1,3,6,7,8],[1,3,6,7,8,9],[1,3,6,7,8,9,10],[1,3,6,7,8,9,10,11],[1,3,6,7,8,9,11],[1,3,6,7,8,10],[1,3,6,7,8,10,11],[1,3,6,7,8,11],[1,3,6,7,9],[1,3,6,7,9,10],[1,3,6,7,9,10,11],[1,3,6,7,9,11],[1,3,6,7,10],[1,3,6,7,10,11],[1,3,6,7,11],[1,3,6,8],[1,3,6,8,9],[1,3,6,8,9,10],[1,3,6,8,9,10,11],[1,3,6,8,9,11],[1,3,6,8,10],[1,3,6,8,10,11],[1,3,6,8,11],[1,3,6,9],[1,3,6,9,10],[1,3,6,9,10,11],[1,3,6,9,11],[1,3,6,10],[1,3,6,10,11],[1,3,6,11],[1,3,7],[1,3,7,8],[1,3,7,8,9],[1,3,7,8,9,10],[1,3,7,8,9,10,11],[1,3,7,8,9,11],[1,3,7,8,10],[1,3,7,8,10,11],[1,3,7,8,11],[1,3,7,9],[1,3,7,9,10],[1,3,7,9,10,11],[1,3,7,9,11],[1,3,7,10],[1,3,7,10,11],[1,3,7,11],[1,3,8],[1,3,8,9],[1,3,8,9,10],[1,3,8,9,10,11],[1,3,8,9,11],[1,3,8,10],[1,3,8,10,11],[1,3,8,11],[1,3,9],[1,3,9,10],[1,3,9,10,11],[1,3,9,11],[1,3,10],[1,3,10,11],[1,3,11],[1,4],[1,4,5],[1,4,5,6],[1,4,5,6,7],[1,4,5,6,7,8],[1,4,5,6,7,8,9],[1,4,5,6,7,8,9,10],[1,4,5,6,7,8,9,10,11],[1,4,5,6,7,8,9,11],[1,4,5,6,7,8,10],[1,4,5,6,7,8,10,11],[1,4,5,6,7,8,11],[1,4,5,6,7,9],[1,4,5,6,7,9,10],[1,4,5,6,7,9,10,11],[1,4,5,6,7,9,11],[1,4,5,6,7,10],[1,4,5,6,7,10,11],[1,4,5,6,7,11],[1,4,5,6,8],[1,4,5,6,8,9],[1,4,5,6,8,9,10],[1,4,5,6,8,9,10,11],[1,4,5,6,8,9,11],[1,4,5,6,8,10],[1,4,5,6,8,10,11],[1,4,5,6,8,11],[1,4,5,6,9],[1,4,5,6,9,10],[1,4,5,6,9,10,11],[1,4,5,6,9,11],[1,4,5,6,10],[1,4,5,6,10,11],[1,4,5,6,11],[1,4,5,7],[1,4,5,7,8],[1,4,5,7,8,9],[1,4,5,7,8,9,10],[1,4,5,7,8,9,10,11],[1,4,5,7,8,9,11],[1,4,5,7,8,10],[1,4,5,7,8,10,11],[1,4,5,7,8,11],[1,4,5,7,9],[1,4,5,7,9,10],[1,4,5,7,9,10,11],[1,4,5,7,9,11],[1,4,5,7,10],[1,4,5,7,10,11],[1,4,5,7,11],[1,4,5,8],[1,4,5,8,9],[1,4,5,8,9,10],[1,4,5,8,9,10,11],[1,4,5,8,9,11],[1,4,5,8,10],[1,4,5,8,10,11],[1,4,5,8,11],[1,4,5,9],[1,4,5,9,10],[1,4,5,9,10,11],[1,4,5,9,11],[1,4,5,10],[1,4,5,10,11],[1,4,5,11],[1,4,6],[1,4,6,7],[1,4,6,7,8],[1,4,6,7,8,9],[1,4,6,7,8,9,10],[1,4,6,7,8,9,10,11],[1,4,6,7,8,9,11],[1,4,6,7,8,10],[1,4,6,7,8,10,11],[1,4,6,7,8,11],[1,4,6,7,9],[1,4,6,7,9,10],[1,4,6,7,9,10,11],[1,4,6,7,9,11],[1,4,6,7,10],[1,4,6,7,10,11],[1,4,6,7,11],[1,4,6,8],[1,4,6,8,9],[1,4,6,8,9,10],[1,4,6,8,9,10,11],[1,4,6,8,9,11],[1,4,6,8,10],[1,4,6,8,10,11],[1,4,6,8,11],[1,4,6,9],[1,4,6,9,10],[1,4,6,9,10,11],[1,4,6,9,11],[1,4,6,10],[1,4,6,10,11],[1,4,6,11],[1,4,7],[1,4,7,8],[1,4,7,8,9],[1,4,7,8,9,10],[1,4,7,8,9,10,11],[1,4,7,8,9,11],[1,4,7,8,10],[1,4,7,8,10,11],[1,4,7,8,11],[1,4,7,9],[1,4,7,9,10],[1,4,7,9,10,11],[1,4,7,9,11],[1,4,7,10],[1,4,7,10,11],[1,4,7,11],[1,4,8],[1,4,8,9],[1,4,8,9,10],[1,4,8,9,10,11],[1,4,8,9,11],[1,4,8,10],[1,4,8,10,11],[1,4,8,11],[1,4,9],[1,4,9,10],[1,4,9,10,11],[1,4,9,11],[1,4,10],[1,4,10,11],[1,4,11],[1,5],[1,5,6],[1,5,6,7],[1,5,6,7,8],[1,5,6,7,8,9],[1,5,6,7,8,9,10],[1,5,6,7,8,9,10,11],[1,5,6,7,8,9,11],[1,5,6,7,8,10],[1,5,6,7,8,10,11],[1,5,6,7,8,11],[1,5,6,7,9],[1,5,6,7,9,10],[1,5,6,7,9,10,11],[1,5,6,7,9,11],[1,5,6,7,10],[1,5,6,7,10,11],[1,5,6,7,11],[1,5,6,8],[1,5,6,8,9],[1,5,6,8,9,10],[1,5,6,8,9,10,11],[1,5,6,8,9,11],[1,5,6,8,10],[1,5,6,8,10,11],[1,5,6,8,11],[1,5,6,9],[1,5,6,9,10],[1,5,6,9,10,11],[1,5,6,9,11],[1,5,6,10],[1,5,6,10,11],[1,5,6,11],[1,5,7],[1,5,7,8],[1,5,7,8,9],[1,5,7,8,9,10],[1,5,7,8,9,10,11],[1,5,7,8,9,11],[1,5,7,8,10],[1,5,7,8,10,11],[1,5,7,8,11],[1,5,7,9],[1,5,7,9,10],[1,5,7,9,10,11],[1,5,7,9,11],[1,5,7,10],[1,5,7,10,11],[1,5,7,11],[1,5,8],[1,5,8,9],[1,5,8,9,10],[1,5,8,9,10,11],[1,5,8,9,11],[1,5,8,10],[1,5,8,10,11],[1,5,8,11],[1,5,9],[1,5,9,10],[1,5,9,10,11],[1,5,9,11],[1,5,10],[1,5,10,11],[1,5,11],[1,6],[1,6,7],[1,6,7,8],[1,6,7,8,9],[1,6,7,8,9,10],[1,6,7,8,9,10,11],[1,6,7,8,9,11],[1,6,7,8,10],[1,6,7,8,10,11],[1,6,7,8,11],[1,6,7,9],[1,6,7,9,10],[1,6,7,9,10,11],[1,6,7,9,11],[1,6,7,10],[1,6,7,10,11],[1,6,7,11],[1,6,8],[1,6,8,9],[1,6,8,9,10],[1,6,8,9,10,11],[1,6,8,9,11],[1,6,8,10],[1,6,8,10,11],[1,6,8,11],[1,6,9],[1,6,9,10],[1,6,9,10,11],[1,6,9,11],[1,6,10],[1,6,10,11],[1,6,11],[1,7],[1,7,8],[1,7,8,9],[1,7,8,9,10],[1,7,8,9,10,11],[1,7,8,9,11],[1,7,8,10],[1,7,8,10,11],[1,7,8,11],[1,7,9],[1,7,9,10],[1,7,9,10,11],[1,7,9,11],[1,7,10],[1,7,10,11],[1,7,11],[1,8],[1,8,9],[1,8,9,10],[1,8,9,10,11],[1,8,9,11],[1,8,10],[1,8,10,11],[1,8,11],[1,9],[1,9,10],[1,9,10,11],[1,9,11],[1,10],[1,10,11],[1,11],[2],[2,3],[2,3,4],[2,3,4,5],[2,3,4,5,6],[2,3,4,5,6,7],[2,3,4,5,6,7,8],[2,3,4,5,6,7,8,9],[2,3,4,5,6,7,8,9,10],[2,3,4,5,6,7,8,9,10,11],[2,3,4,5,6,7,8,9,11],[2,3,4,5,6,7,8,10],[2,3,4,5,6,7,8,10,11],[2,3,4,5,6,7,8,11],[2,3,4,5,6,7,9],[2,3,4,5,6,7,9,10],[2,3,4,5,6,7,9,10,11],[2,3,4,5,6,7,9,11],[2,3,4,5,6,7,10],[2,3,4,5,6,7,10,11],[2,3,4,5,6,7,11],[2,3,4,5,6,8],[2,3,4,5,6,8,9],[2,3,4,5,6,8,9,10],[2,3,4,5,6,8,9,10,11],[2,3,4,5,6,8,9,11],[2,3,4,5,6,8,10],[2,3,4,5,6,8,10,11],[2,3,4,5,6,8,11],[2,3,4,5,6,9],[2,3,4,5,6,9,10],[2,3,4,5,6,9,10,11],[2,3,4,5,6,9,11],[2,3,4,5,6,10],[2,3,4,5,6,10,11],[2,3,4,5,6,11],[2,3,4,5,7],[2,3,4,5,7,8],[2,3,4,5,7,8,9],[2,3,4,5,7,8,9,10],[2,3,4,5,7,8,9,10,11],[2,3,4,5,7,8,9,11],[2,3,4,5,7,8,10],[2,3,4,5,7,8,10,11],[2,3,4,5,7,8,11],[2,3,4,5,7,9],[2,3,4,5,7,9,10],[2,3,4,5,7,9,10,11],[2,3,4,5,7,9,11],[2,3,4,5,7,10],[2,3,4,5,7,10,11],[2,3,4,5,7,11],[2,3,4,5,8],[2,3,4,5,8,9],[2,3,4,5,8,9,10],[2,3,4,5,8,9,10,11],[2,3,4,5,8,9,11],[2,3,4,5,8,10],[2,3,4,5,8,10,11],[2,3,4,5,8,11],[2,3,4,5,9],[2,3,4,5,9,10],[2,3,4,5,9,10,11],[2,3,4,5,9,11],[2,3,4,5,10],[2,3,4,5,10,11],[2,3,4,5,11],[2,3,4,6],[2,3,4,6,7],[2,3,4,6,7,8],[2,3,4,6,7,8,9],[2,3,4,6,7,8,9,10],[2,3,4,6,7,8,9,10,11],[2,3,4,6,7,8,9,11],[2,3,4,6,7,8,10],[2,3,4,6,7,8,10,11],[2,3,4,6,7,8,11],[2,3,4,6,7,9],[2,3,4,6,7,9,10],[2,3,4,6,7,9,10,11],[2,3,4,6,7,9,11],[2,3,4,6,7,10],[2,3,4,6,7,10,11],[2,3,4,6,7,11],[2,3,4,6,8],[2,3,4,6,8,9],[2,3,4,6,8,9,10],[2,3,4,6,8,9,10,11],[2,3,4,6,8,9,11],[2,3,4,6,8,10],[2,3,4,6,8,10,11],[2,3,4,6,8,11],[2,3,4,6,9],[2,3,4,6,9,10],[2,3,4,6,9,10,11],[2,3,4,6,9,11],[2,3,4,6,10],[2,3,4,6,10,11],[2,3,4,6,11],[2,3,4,7],[2,3,4,7,8],[2,3,4,7,8,9],[2,3,4,7,8,9,10],[2,3,4,7,8,9,10,11],[2,3,4,7,8,9,11],[2,3,4,7,8,10],[2,3,4,7,8,10,11],[2,3,4,7,8,11],[2,3,4,7,9],[2,3,4,7,9,10],[2,3,4,7,9,10,11],[2,3,4,7,9,11],[2,3,4,7,10],[2,3,4,7,10,11],[2,3,4,7,11],[2,3,4,8],[2,3,4,8,9],[2,3,4,8,9,10],[2,3,4,8,9,10,11],[2,3,4,8,9,11],[2,3,4,8,10],[2,3,4,8,10,11],[2,3,4,8,11],[2,3,4,9],[2,3,4,9,10],[2,3,4,9,10,11],[2,3,4,9,11],[2,3,4,10],[2,3,4,10,11],[2,3,4,11],[2,3,5],[2,3,5,6],[2,3,5,6,7],[2,3,5,6,7,8],[2,3,5,6,7,8,9],[2,3,5,6,7,8,9,10],[2,3,5,6,7,8,9,10,11],[2,3,5,6,7,8,9,11],[2,3,5,6,7,8,10],[2,3,5,6,7,8,10,11],[2,3,5,6,7,8,11],[2,3,5,6,7,9],[2,3,5,6,7,9,10],[2,3,5,6,7,9,10,11],[2,3,5,6,7,9,11],[2,3,5,6,7,10],[2,3,5,6,7,10,11],[2,3,5,6,7,11],[2,3,5,6,8],[2,3,5,6,8,9],[2,3,5,6,8,9,10],[2,3,5,6,8,9,10,11],[2,3,5,6,8,9,11],[2,3,5,6,8,10],[2,3,5,6,8,10,11],[2,3,5,6,8,11],[2,3,5,6,9],[2,3,5,6,9,10],[2,3,5,6,9,10,11],[2,3,5,6,9,11],[2,3,5,6,10],[2,3,5,6,10,11],[2,3,5,6,11],[2,3,5,7],[2,3,5,7,8],[2,3,5,7,8,9],[2,3,5,7,8,9,10],[2,3,5,7,8,9,10,11],[2,3,5,7,8,9,11],[2,3,5,7,8,10],[2,3,5,7,8,10,11],[2,3,5,7,8,11],[2,3,5,7,9],[2,3,5,7,9,10],[2,3,5,7,9,10,11],[2,3,5,7,9,11],[2,3,5,7,10],[2,3,5,7,10,11],[2,3,5,7,11],[2,3,5,8],[2,3,5,8,9],[2,3,5,8,9,10],[2,3,5,8,9,10,11],[2,3,5,8,9,11],[2,3,5,8,10],[2,3,5,8,10,11],[2,3,5,8,11],[2,3,5,9],[2,3,5,9,10],[2,3,5,9,10,11],[2,3,5,9,11],[2,3,5,10],[2,3,5,10,11],[2,3,5,11],[2,3,6],[2,3,6,7],[2,3,6,7,8],[2,3,6,7,8,9],[2,3,6,7,8,9,10],[2,3,6,7,8,9,10,11],[2,3,6,7,8,9,11],[2,3,6,7,8,10],[2,3,6,7,8,10,11],[2,3,6,7,8,11],[2,3,6,7,9],[2,3,6,7,9,10],[2,3,6,7,9,10,11],[2,3,6,7,9,11],[2,3,6,7,10],[2,3,6,7,10,11],[2,3,6,7,11],[2,3,6,8],[2,3,6,8,9],[2,3,6,8,9,10],[2,3,6,8,9,10,11],[2,3,6,8,9,11],[2,3,6,8,10],[2,3,6,8,10,11],[2,3,6,8,11],[2,3,6,9],[2,3,6,9,10],[2,3,6,9,10,11],[2,3,6,9,11],[2,3,6,10],[2,3,6,10,11],[2,3,6,11],[2,3,7],[2,3,7,8],[2,3,7,8,9],[2,3,7,8,9,10],[2,3,7,8,9,10,11],[2,3,7,8,9,11],[2,3,7,8,10],[2,3,7,8,10,11],[2,3,7,8,11],[2,3,7,9],[2,3,7,9,10],[2,3,7,9,10,11],[2,3,7,9,11],[2,3,7,10],[2,3,7,10,11],[2,3,7,11],[2,3,8],[2,3,8,9],[2,3,8,9,10],[2,3,8,9,10,11],[2,3,8,9,11],[2,3,8,10],[2,3,8,10,11],[2,3,8,11],[2,3,9],[2,3,9,10],[2,3,9,10,11],[2,3,9,11],[2,3,10],[2,3,10,11],[2,3,11],[2,4],[2,4,5],[2,4,5,6],[2,4,5,6,7],[2,4,5,6,7,8],[2,4,5,6,7,8,9],[2,4,5,6,7,8,9,10],[2,4,5,6,7,8,9,10,11],[2,4,5,6,7,8,9,11],[2,4,5,6,7,8,10],[2,4,5,6,7,8,10,11],[2,4,5,6,7,8,11],[2,4,5,6,7,9],[2,4,5,6,7,9,10],[2,4,5,6,7,9,10,11],[2,4,5,6,7,9,11],[2,4,5,6,7,10],[2,4,5,6,7,10,11],[2,4,5,6,7,11],[2,4,5,6,8],[2,4,5,6,8,9],[2,4,5,6,8,9,10],[2,4,5,6,8,9,10,11],[2,4,5,6,8,9,11],[2,4,5,6,8,10],[2,4,5,6,8,10,11],[2,4,5,6,8,11],[2,4,5,6,9],[2,4,5,6,9,10],[2,4,5,6,9,10,11],[2,4,5,6,9,11],[2,4,5,6,10],[2,4,5,6,10,11],[2,4,5,6,11],[2,4,5,7],[2,4,5,7,8],[2,4,5,7,8,9],[2,4,5,7,8,9,10],[2,4,5,7,8,9,10,11],[2,4,5,7,8,9,11],[2,4,5,7,8,10],[2,4,5,7,8,10,11],[2,4,5,7,8,11],[2,4,5,7,9],[2,4,5,7,9,10],[2,4,5,7,9,10,11],[2,4,5,7,9,11],[2,4,5,7,10],[2,4,5,7,10,11],[2,4,5,7,11],[2,4,5,8],[2,4,5,8,9],[2,4,5,8,9,10],[2,4,5,8,9,10,11],[2,4,5,8,9,11],[2,4,5,8,10],[2,4,5,8,10,11],[2,4,5,8,11],[2,4,5,9],[2,4,5,9,10],[2,4,5,9,10,11],[2,4,5,9,11],[2,4,5,10],[2,4,5,10,11],[2,4,5,11],[2,4,6],[2,4,6,7],[2,4,6,7,8],[2,4,6,7,8,9],[2,4,6,7,8,9,10],[2,4,6,7,8,9,10,11],[2,4,6,7,8,9,11],[2,4,6,7,8,10],[2,4,6,7,8,10,11],[2,4,6,7,8,11],[2,4,6,7,9],[2,4,6,7,9,10],[2,4,6,7,9,10,11],[2,4,6,7,9,11],[2,4,6,7,10],[2,4,6,7,10,11],[2,4,6,7,11],[2,4,6,8],[2,4,6,8,9],[2,4,6,8,9,10],[2,4,6,8,9,10,11],[2,4,6,8,9,11],[2,4,6,8,10],[2,4,6,8,10,11],[2,4,6,8,11],[2,4,6,9],[2,4,6,9,10],[2,4,6,9,10,11],[2,4,6,9,11],[2,4,6,10],[2,4,6,10,11],[2,4,6,11],[2,4,7],[2,4,7,8],[2,4,7,8,9],[2,4,7,8,9,10],[2,4,7,8,9,10,11],[2,4,7,8,9,11],[2,4,7,8,10],[2,4,7,8,10,11],[2,4,7,8,11],[2,4,7,9],[2,4,7,9,10],[2,4,7,9,10,11],[2,4,7,9,11],[2,4,7,10],[2,4,7,10,11],[2,4,7,11],[2,4,8],[2,4,8,9],[2,4,8,9,10],[2,4,8,9,10,11],[2,4,8,9,11],[2,4,8,10],[2,4,8,10,11],[2,4,8,11],[2,4,9],[2,4,9,10],[2,4,9,10,11],[2,4,9,11],[2,4,10],[2,4,10,11],[2,4,11],[2,5],[2,5,6],[2,5,6,7],[2,5,6,7,8],[2,5,6,7,8,9],[2,5,6,7,8,9,10],[2,5,6,7,8,9,10,11],[2,5,6,7,8,9,11],[2,5,6,7,8,10],[2,5,6,7,8,10,11],[2,5,6,7,8,11],[2,5,6,7,9],[2,5,6,7,9,10],[2,5,6,7,9,10,11],[2,5,6,7,9,11],[2,5,6,7,10],[2,5,6,7,10,11],[2,5,6,7,11],[2,5,6,8],[2,5,6,8,9],[2,5,6,8,9,10],[2,5,6,8,9,10,11],[2,5,6,8,9,11],[2,5,6,8,10],[2,5,6,8,10,11],[2,5,6,8,11],[2,5,6,9],[2,5,6,9,10],[2,5,6,9,10,11],[2,5,6,9,11],[2,5,6,10],[2,5,6,10,11],[2,5,6,11],[2,5,7],[2,5,7,8],[2,5,7,8,9],[2,5,7,8,9,10],[2,5,7,8,9,10,11],[2,5,7,8,9,11],[2,5,7,8,10],[2,5,7,8,10,11],[2,5,7,8,11],[2,5,7,9],[2,5,7,9,10],[2,5,7,9,10,11],[2,5,7,9,11],[2,5,7,10],[2,5,7,10,11],[2,5,7,11],[2,5,8],[2,5,8,9],[2,5,8,9,10],[2,5,8,9,10,11],[2,5,8,9,11],[2,5,8,10],[2,5,8,10,11],[2,5,8,11],[2,5,9],[2,5,9,10],[2,5,9,10,11],[2,5,9,11],[2,5,10],[2,5,10,11],[2,5,11],[2,6],[2,6,7],[2,6,7,8],[2,6,7,8,9],[2,6,7,8,9,10],[2,6,7,8,9,10,11],[2,6,7,8,9,11],[2,6,7,8,10],[2,6,7,8,10,11],[2,6,7,8,11],[2,6,7,9],[2,6,7,9,10],[2,6,7,9,10,11],[2,6,7,9,11],[2,6,7,10],[2,6,7,10,11],[2,6,7,11],[2,6,8],[2,6,8,9],[2,6,8,9,10],[2,6,8,9,10,11],[2,6,8,9,11],[2,6,8,10],[2,6,8,10,11],[2,6,8,11],[2,6,9],[2,6,9,10],[2,6,9,10,11],[2,6,9,11],[2,6,10],[2,6,10,11],[2,6,11],[2,7],[2,7,8],[2,7,8,9],[2,7,8,9,10],[2,7,8,9,10,11],[2,7,8,9,11],[2,7,8,10],[2,7,8,10,11],[2,7,8,11],[2,7,9],[2,7,9,10],[2,7,9,10,11],[2,7,9,11],[2,7,10],[2,7,10,11],[2,7,11],[2,8],[2,8,9],[2,8,9,10],[2,8,9,10,11],[2,8,9,11],[2,8,10],[2,8,10,11],[2,8,11],[2,9],[2,9,10],[2,9,10,11],[2,9,11],[2,10],[2,10,11],[2,11],[3],[3,4],[3,4,5],[3,4,5,6],[3,4,5,6,7],[3,4,5,6,7,8],[3,4,5,6,7,8,9],[3,4,5,6,7,8,9,10],[3,4,5,6,7,8,9,10,11],[3,4,5,6,7,8,9,11],[3,4,5,6,7,8,10],[3,4,5,6,7,8,10,11],[3,4,5,6,7,8,11],[3,4,5,6,7,9],[3,4,5,6,7,9,10],[3,4,5,6,7,9,10,11],[3,4,5,6,7,9,11],[3,4,5,6,7,10],[3,4,5,6,7,10,11],[3,4,5,6,7,11],[3,4,5,6,8],[3,4,5,6,8,9],[3,4,5,6,8,9,10],[3,4,5,6,8,9,10,11],[3,4,5,6,8,9,11],[3,4,5,6,8,10],[3,4,5,6,8,10,11],[3,4,5,6,8,11],[3,4,5,6,9],[3,4,5,6,9,10],[3,4,5,6,9,10,11],[3,4,5,6,9,11],[3,4,5,6,10],[3,4,5,6,10,11],[3,4,5,6,11],[3,4,5,7],[3,4,5,7,8],[3,4,5,7,8,9],[3,4,5,7,8,9,10],[3,4,5,7,8,9,10,11],[3,4,5,7,8,9,11],[3,4,5,7,8,10],[3,4,5,7,8,10,11],[3,4,5,7,8,11],[3,4,5,7,9],[3,4,5,7,9,10],[3,4,5,7,9,10,11],[3,4,5,7,9,11],[3,4,5,7,10],[3,4,5,7,10,11],[3,4,5,7,11],[3,4,5,8],[3,4,5,8,9],[3,4,5,8,9,10],[3,4,5,8,9,10,11],[3,4,5,8,9,11],[3,4,5,8,10],[3,4,5,8,10,11],[3,4,5,8,11],[3,4,5,9],[3,4,5,9,10],[3,4,5,9,10,11],[3,4,5,9,11],[3,4,5,10],[3,4,5,10,11],[3,4,5,11],[3,4,6],[3,4,6,7],[3,4,6,7,8],[3,4,6,7,8,9],[3,4,6,7,8,9,10],[3,4,6,7,8,9,10,11],[3,4,6,7,8,9,11],[3,4,6,7,8,10],[3,4,6,7,8,10,11],[3,4,6,7,8,11],[3,4,6,7,9],[3,4,6,7,9,10],[3,4,6,7,9,10,11],[3,4,6,7,9,11],[3,4,6,7,10],[3,4,6,7,10,11],[3,4,6,7,11],[3,4,6,8],[3,4,6,8,9],[3,4,6,8,9,10],[3,4,6,8,9,10,11],[3,4,6,8,9,11],[3,4,6,8,10],[3,4,6,8,10,11],[3,4,6,8,11],[3,4,6,9],[3,4,6,9,10],[3,4,6,9,10,11],[3,4,6,9,11],[3,4,6,10],[3,4,6,10,11],[3,4,6,11],[3,4,7],[3,4,7,8],[3,4,7,8,9],[3,4,7,8,9,10],[3,4,7,8,9,10,11],[3,4,7,8,9,11],[3,4,7,8,10],[3,4,7,8,10,11],[3,4,7,8,11],[3,4,7,9],[3,4,7,9,10],[3,4,7,9,10,11],[3,4,7,9,11],[3,4,7,10],[3,4,7,10,11],[3,4,7,11],[3,4,8],[3,4,8,9],[3,4,8,9,10],[3,4,8,9,10,11],[3,4,8,9,11],[3,4,8,10],[3,4,8,10,11],[3,4,8,11],[3,4,9],[3,4,9,10],[3,4,9,10,11],[3,4,9,11],[3,4,10],[3,4,10,11],[3,4,11],[3,5],[3,5,6],[3,5,6,7],[3,5,6,7,8],[3,5,6,7,8,9],[3,5,6,7,8,9,10],[3,5,6,7,8,9,10,11],[3,5,6,7,8,9,11],[3,5,6,7,8,10],[3,5,6,7,8,10,11],[3,5,6,7,8,11],[3,5,6,7,9],[3,5,6,7,9,10],[3,5,6,7,9,10,11],[3,5,6,7,9,11],[3,5,6,7,10],[3,5,6,7,10,11],[3,5,6,7,11],[3,5,6,8],[3,5,6,8,9],[3,5,6,8,9,10],[3,5,6,8,9,10,11],[3,5,6,8,9,11],[3,5,6,8,10],[3,5,6,8,10,11],[3,5,6,8,11],[3,5,6,9],[3,5,6,9,10],[3,5,6,9,10,11],[3,5,6,9,11],[3,5,6,10],[3,5,6,10,11],[3,5,6,11],[3,5,7],[3,5,7,8],[3,5,7,8,9],[3,5,7,8,9,10],[3,5,7,8,9,10,11],[3,5,7,8,9,11],[3,5,7,8,10],[3,5,7,8,10,11],[3,5,7,8,11],[3,5,7,9],[3,5,7,9,10],[3,5,7,9,10,11],[3,5,7,9,11],[3,5,7,10],[3,5,7,10,11],[3,5,7,11],[3,5,8],[3,5,8,9],[3,5,8,9,10],[3,5,8,9,10,11],[3,5,8,9,11],[3,5,8,10],[3,5,8,10,11],[3,5,8,11],[3,5,9],[3,5,9,10],[3,5,9,10,11],[3,5,9,11],[3,5,10],[3,5,10,11],[3,5,11],[3,6],[3,6,7],[3,6,7,8],[3,6,7,8,9],[3,6,7,8,9,10],[3,6,7,8,9,10,11],[3,6,7,8,9,11],[3,6,7,8,10],[3,6,7,8,10,11],[3,6,7,8,11],[3,6,7,9],[3,6,7,9,10],[3,6,7,9,10,11],[3,6,7,9,11],[3,6,7,10],[3,6,7,10,11],[3,6,7,11],[3,6,8],[3,6,8,9],[3,6,8,9,10],[3,6,8,9,10,11],[3,6,8,9,11],[3,6,8,10],[3,6,8,10,11],[3,6,8,11],[3,6,9],[3,6,9,10],[3,6,9,10,11],[3,6,9,11],[3,6,10],[3,6,10,11],[3,6,11],[3,7],[3,7,8],[3,7,8,9],[3,7,8,9,10],[3,7,8,9,10,11],[3,7,8,9,11],[3,7,8,10],[3,7,8,10,11],[3,7,8,11],[3,7,9],[3,7,9,10],[3,7,9,10,11],[3,7,9,11],[3,7,10],[3,7,10,11],[3,7,11],[3,8],[3,8,9],[3,8,9,10],[3,8,9,10,11],[3,8,9,11],[3,8,10],[3,8,10,11],[3,8,11],[3,9],[3,9,10],[3,9,10,11],[3,9,11],[3,10],[3,10,11],[3,11],[4],[4,5],[4,5,6],[4,5,6,7],[4,5,6,7,8],[4,5,6,7,8,9],[4,5,6,7,8,9,10],[4,5,6,7,8,9,10,11],[4,5,6,7,8,9,11],[4,5,6,7,8,10],[4,5,6,7,8,10,11],[4,5,6,7,8,11],[4,5,6,7,9],[4,5,6,7,9,10],[4,5,6,7,9,10,11],[4,5,6,7,9,11],[4,5,6,7,10],[4,5,6,7,10,11],[4,5,6,7,11],[4,5,6,8],[4,5,6,8,9],[4,5,6,8,9,10],[4,5,6,8,9,10,11],[4,5,6,8,9,11],[4,5,6,8,10],[4,5,6,8,10,11],[4,5,6,8,11],[4,5,6,9],[4,5,6,9,10],[4,5,6,9,10,11],[4,5,6,9,11],[4,5,6,10],[4,5,6,10,11],[4,5,6,11],[4,5,7],[4,5,7,8],[4,5,7,8,9],[4,5,7,8,9,10],[4,5,7,8,9,10,11],[4,5,7,8,9,11],[4,5,7,8,10],[4,5,7,8,10,11],[4,5,7,8,11],[4,5,7,9],[4,5,7,9,10],[4,5,7,9,10,11],[4,5,7,9,11],[4,5,7,10],[4,5,7,10,11],[4,5,7,11],[4,5,8],[4,5,8,9],[4,5,8,9,10],[4,5,8,9,10,11],[4,5,8,9,11],[4,5,8,10],[4,5,8,10,11],[4,5,8,11],[4,5,9],[4,5,9,10],[4,5,9,10,11],[4,5,9,11],[4,5,10],[4,5,10,11],[4,5,11],[4,6],[4,6,7],[4,6,7,8],[4,6,7,8,9],[4,6,7,8,9,10],[4,6,7,8,9,10,11],[4,6,7,8,9,11],[4,6,7,8,10],[4,6,7,8,10,11],[4,6,7,8,11],[4,6,7,9],[4,6,7,9,10],[4,6,7,9,10,11],[4,6,7,9,11],[4,6,7,10],[4,6,7,10,11],[4,6,7,11],[4,6,8],[4,6,8,9],[4,6,8,9,10],[4,6,8,9,10,11],[4,6,8,9,11],[4,6,8,10],[4,6,8,10,11],[4,6,8,11],[4,6,9],[4,6,9,10],[4,6,9,10,11],[4,6,9,11],[4,6,10],[4,6,10,11],[4,6,11],[4,7],[4,7,8],[4,7,8,9],[4,7,8,9,10],[4,7,8,9,10,11],[4,7,8,9,11],[4,7,8,10],[4,7,8,10,11],[4,7,8,11],[4,7,9],[4,7,9,10],[4,7,9,10,11],[4,7,9,11],[4,7,10],[4,7,10,11],[4,7,11],[4,8],[4,8,9],[4,8,9,10],[4,8,9,10,11],[4,8,9,11],[4,8,10],[4,8,10,11],[4,8,11],[4,9],[4,9,10],[4,9,10,11],[4,9,11],[4,10],[4,10,11],[4,11],[5],[5,6],[5,6,7],[5,6,7,8],[5,6,7,8,9],[5,6,7,8,9,10],[5,6,7,8,9,10,11],[5,6,7,8,9,11],[5,6,7,8,10],[5,6,7,8,10,11],[5,6,7,8,11],[5,6,7,9],[5,6,7,9,10],[5,6,7,9,10,11],[5,6,7,9,11],[5,6,7,10],[5,6,7,10,11],[5,6,7,11],[5,6,8],[5,6,8,9],[5,6,8,9,10],[5,6,8,9,10,11],[5,6,8,9,11],[5,6,8,10],[5,6,8,10,11],[5,6,8,11],[5,6,9],[5,6,9,10],[5,6,9,10,11],[5,6,9,11],[5,6,10],[5,6,10,11],[5,6,11],[5,7],[5,7,8],[5,7,8,9],[5,7,8,9,10],[5,7,8,9,10,11],[5,7,8,9,11],[5,7,8,10],[5,7,8,10,11],[5,7,8,11],[5,7,9],[5,7,9,10],[5,7,9,10,11],[5,7,9,11],[5,7,10],[5,7,10,11],[5,7,11],[5,8],[5,8,9],[5,8,9,10],[5,8,9,10,11],[5,8,9,11],[5,8,10],[5,8,10,11],[5,8,11],[5,9],[5,9,10],[5,9,10,11],[5,9,11],[5,10],[5,10,11],[5,11],[6],[6,7],[6,7,8],[6,7,8,9],[6,7,8,9,10],[6,7,8,9,10,11],[6,7,8,9,11],[6,7,8,10],[6,7,8,10,11],[6,7,8,11],[6,7,9],[6,7,9,10],[6,7,9,10,11],[6,7,9,11],[6,7,10],[6,7,10,11],[6,7,11],[6,8],[6,8,9],[6,8,9,10],[6,8,9,10,11],[6,8,9,11],[6,8,10],[6,8,10,11],[6,8,11],[6,9],[6,9,10],[6,9,10,11],[6,9,11],[6,10],[6,10,11],[6,11],[7],[7,8],[7,8,9],[7,8,9,10],[7,8,9,10,11],[7,8,9,11],[7,8,10],[7,8,10,11],[7,8,11],[7,9],[7,9,10],[7,9,10,11],[7,9,11],[7,10],[7,10,11],[7,11],[8],[8,9],[8,9,10],[8,9,10,11],[8,9,11],[8,10],[8,10,11],[8,11],[9],[9,10],[9,10,11],[9,11],[10],[10,11],[11]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select course, type, count(*) from students group by rollup (course, type, course) order by 1, 2, 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":4,"column_names":["type"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":6,"column_names":["course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["type"]}],"group_sets":[[],[0],[0,1],[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select a FROM (\n\tvalues\n\t(1,2),\n\t(3,2)\n) t(a, b)\nHAVING true","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT test.b, SUM(a) FROM test GROUP BY test.b ORDER BY (SELECT SUM(a) FROM test t WHERE test.b=t.b) DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":57,"query_location_length":44,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":77,"query_location_length":6,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":3,"column_names":["t","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["test","b"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":6,"column_names":["test","b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(a) FROM test HAVING SUM(a)\u003c10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":31,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT b, SUM(a) AS sum FROM test GROUP BY b QUALIFY row_number() OVER (PARTITION BY b) \u003e= 1 AND sum \u003c 20 ORDER BY b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]},{"class":"FUNCTION","type":"FUNCTION","alias":"sum","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":53,"query_location_length":52,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":53,"query_location_length":39,"left":{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":53,"query_location_length":34,"function_name":"row_number","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["b"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":97,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":3,"column_names":["sum"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}]}},"named_param_map":[]}]}} +{"sql":"SELECT plus1(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"plus1","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["plus1"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, sum(CASE WHEN i%4=0 THEN 9000000000000000000::BIGINT END),\n sum(CASE WHEN i%4=1 THEN -9000000000000000000::BIGINT END)\nFROM (SELECT i, (i//64)%2 AS g FROM range(8192) t(i)) t GROUP BY g ORDER BY g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":211,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":57,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":14,"query_location_length":52,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9000000000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":58,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":80,"query_location_length":53,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":28,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":121,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9000000000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":123,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["-"]}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":140,"query_location_length":48,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":151,"query_location_length":9,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":152,"query_location_length":5,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":2,"literal":{"kind":"INTEGER","text":"64"}}}],"qualified_name":{"path":["//"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":171,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":4,"literal":{"kind":"INTEGER","text":"8192"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_group_object(k, v) filter (where false)\nfrom (values ('filtered', 1::VARIANT)) t(k, v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"variant_group_object","schema":"","filter":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["k"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["variant_group_object"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":60,"query_location_length":33,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":10,"literal":{"kind":"STRING","text":"filtered"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k","v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_group_object(1, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"variant_group_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["variant_group_object"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test WHERE k=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM t WHERE j IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":24,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["j"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sql LIKE '%c VARCHAR COLLATE nocase%' FROM duckdb_tables() WHERE table_name = 't'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":33,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["sql"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":28,"literal":{"kind":"STRING","text":"%c VARCHAR COLLATE nocase%"}}}],"qualified_name":{"path":["~~"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":50,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_tables"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":3,"literal":{"kind":"STRING","text":"t"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT col FROM tbl ORDER BY col DESC LIMIT 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":3,"column_names":["col"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"select * from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"select * from my_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"my_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["my_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl4"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM test_db.sample","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"test_db","table_name":"sample","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_db","sample"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM glob('{TEST_DIR}/test6.db.wal')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/test6.db.wal"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from memory.main.ddb","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":15,"schema_name":"main","table_name":"ddb","column_name_alias":[],"catalog_name":"memory","at_clause":null,"qualified_name":{"path":["memory","main","ddb"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT database_name FROM duckdb_databases() WHERE database_name = 'first';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"first"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers ORDER BY i NULLS LAST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM attach_index_db.tbl_a WHERE a_id = 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":21,"schema_name":"attach_index_db","table_name":"tbl_a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["attach_index_db","tbl_a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":4,"column_names":["a_id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * EXCLUDE (DB1.S1.T.C) FROM db1.s1.t, db2.s1.t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":22,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[{"catalog":"DB1","schema":"S1","table":"T","column":"C"}],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"s1","table_name":"t","column_name_alias":[],"catalog_name":"db1","at_clause":null,"qualified_name":{"path":["db1","s1","t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":8,"schema_name":"s1","table_name":"t","column_name_alias":[],"catalog_name":"db2","at_clause":null,"qualified_name":{"path":["db2","s1","t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT database.schema.table.col FROM database.schema.table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":25,"column_names":["database","schema","table","col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":21,"schema_name":"schema","table_name":"table","column_name_alias":[],"catalog_name":"database","at_clause":null,"qualified_name":{"path":["database","schema","table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM glob('{TEST_DIR}/no_wal_writes.db.wal')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/no_wal_writes.db.wal"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a FROM c.file","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"c","table_name":"file","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c","file"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"DESCRIBE ALL TABLES","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"__show_tables_expanded","query":null,"show_type":"SHOW_UNQUALIFIED","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM view_search_path.my_view","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":24,"schema_name":"view_search_path","table_name":"my_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["view_search_path","my_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM new_database.main.integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":26,"schema_name":"main","table_name":"integers","column_name_alias":[],"catalog_name":"new_database","at_clause":null,"qualified_name":{"path":["new_database","main","integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM my_view","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"my_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["my_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SHOW SCHEMAS","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"\"schemas\"","query":null,"show_type":"SHOW_UNQUALIFIED","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a + 1 AS x, alias.x % 2 AS y, SUM(a) AS s\nFROM (VALUES (1),(2),(3),(4)) t(a)\nGROUP BY a\nHAVING alias.s \u003e 2\nORDER BY y;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":1,"column_names":["y"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":19,"query_location_length":11,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":7,"column_names":["alias","x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":37,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":54,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["a"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":102,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":7,"column_names":["alias","s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a AS \"MiXeD\", row_number() OVER (ORDER BY a) AS r\nFROM (VALUES (2),(1)) t(a)\nQUALIFY alias.r = 1\nORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"MiXeD","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"r","query_location":21,"query_location_length":30,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["a"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":62,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":92,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":7,"column_names":["alias","r"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},"named_param_map":[]}]}} -{"sql":"SELECT alias.col1, alias.col2 FROM alias;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["alias","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":10,"column_names":["alias","col2"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":5,"schema_name":"","table_name":"alias","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["alias"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select ss_items.item_id, cs_items.item_id\nfrom ss_items,cs_items\nwhere ss_items.item_id = cs_items.item_id\norder by item_id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":7,"column_names":["item_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":16,"column_names":["ss_items","item_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":16,"column_names":["cs_items","item_id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":22,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":8,"schema_name":"","table_name":"ss_items","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ss_items"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":8,"schema_name":"","table_name":"cs_items","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cs_items"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":16,"column_names":["ss_items","item_id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":16,"column_names":["cs_items","item_id"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_filter([[1, 2, 1], [1, 2, 3], [1, 1, 1]], lambda x: list_contains_macro(x, 3))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":83,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":33,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":54,"query_location_length":35,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":25,"function_name":"list_contains_macro","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(1 + 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i[1] FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, sum(a) AS total FROM test_alias GROUP BY a HAVING alias.total \u003e 1 ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"total","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":10,"schema_name":"","table_name":"test_alias","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_alias"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["a"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":60,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":11,"column_names":["alias","total"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT tbl.col FROM s1.tbl, s2.tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["tbl","col"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":15,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":6,"schema_name":"s1","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s1","tbl"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":6,"schema_name":"s2","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s2","tbl"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select date '1992-01-01'\u003e'1991-01-01';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":30,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1991-01-01"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select date '1992-01-01'\u003ei from (values ('1991-01-01')) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":19,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":32,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1991-01-01"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i + 1 + 1 + 1 AS k, abs(i) AS l FROM integers WHERE i=1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":27,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":59,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT HeLlO FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["HeLlO"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT test.\"HELLo\" FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["test","HELLo"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT test2.hello FROM test1, test2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["test2","hello"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":5,"schema_name":"","table_name":"test1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\tv.trim('\u003e\u003c') AS trim_inequality,\n\ttrim_inequality.replace('%', '') AS only_alphabet,\n\tonly_alphabet.lower() AS lower\nFROM varchars","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"trim_inequality","query_location":8,"query_location_length":12,"function_name":"trim","schema":"v","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\u003e\u003c"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"only_alphabet","query_location":42,"query_location_length":32,"function_name":"replace","schema":"trim_inequality","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"lower","query_location":94,"query_location_length":21,"function_name":"lower","schema":"only_alphabet","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":130,"query_location_length":8,"schema_name":"","table_name":"varchars","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["varchars"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(i) AS j FROM integers HAVING j=5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select t from (SELECT * FROM test) AS t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":22,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from tbl where str collate nocase not in ('abcde');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":24,"query_location_length":35,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":50,"query_location_length":9,"children":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":24,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":3,"column_names":["str"]},"collation":"nocase"},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcde"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT bool_and(i) FROM (SELECT * FROM (SELECT NULL::INTEGER) tbl(i) UNION ALL SELECT CAST(1 as BOOLEAN)) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":24,"query_location_length":81,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":32,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":39,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":96,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [NULL]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select\n split(from0, ' ') as expr_parts,\n case\n try(expr_parts[6][1]::int)\n when 1 \n then 'NOT'\n end as dayname,\nfrom (select '1 2 3 1 2 3 4 5 6' as from0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"expr_parts","query_location":11,"query_location_length":17,"function_name":"split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":5,"column_names":["from0"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}}}]},{"class":"CASE","type":"CASE_EXPR","alias":"dayname","query_location":48,"query_location_length":97,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":61,"query_location_length":26,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":81,"query_location_length":5,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":78,"query_location_length":3,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":75,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":10,"column_names":["expr_parts"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NOT"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":163,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"from0","query_location":171,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 2 3 1 2 3 4 5 6"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1=true;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":6,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT false='true';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":12,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"true"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [1000]::utinyint[]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":8,"catalog":"","schema":"","type_name":"utinyint","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT d::decimal(2,1) FROM cast_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":14,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":10,"schema_name":"","table_name":"cast_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cast_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '9.9000000000000000000000000000000000000'::DECIMAL(38,37)::DECIMAL(37,36);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":16,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9.9000000000000000000000000000000000000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":37}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":37}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":36}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT printf('%.9g', CAST(CAST('0.0000000000000001' AS DECIMAL(20,20)) AS FLOAT)),\n printf('%.9g', CAST('0.0000000000000001' AS FLOAT))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":75,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%.9g"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":59,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":44,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.0000000000000001"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":51,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%.9g"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":106,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.0000000000000001"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":135,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 43 - MAX( ALL - 87 + col1 ) FROM tab2 WHERE col1 * col1 * - CAST( - col2 AS SIGNED ) * + - col0 * + - 77 * - col0 IS NOT NULL AND NOT + col0 BETWEEN 35 * - col2 AND NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":43}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":22,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-87}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":4,"column_names":["col1"]}}]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":4,"schema_name":"","table_name":"tab2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tab2"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":51,"query_location_length":125,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":121,"query_location_length":11,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":69,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":4,"column_names":["col1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":4,"column_names":["col1"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":26,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":24,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":6,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":4,"column_names":["col2"]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":6,"catalog":"","schema":"","type_name":"SIGNED","children":[]}}},"try_cast":false}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":8,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":4,"column_names":["col0"]}}]}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-77}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":114,"query_location_length":6,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":4,"column_names":["col0"]}}]}}]}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":137,"query_location_length":39,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":148,"query_location_length":28,"input":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":141,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":4,"column_names":["col0"]}}]},"lower":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":156,"query_location_length":11,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":35}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":161,"query_location_length":6,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":4,"column_names":["col2"]}}]}}]},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '32767.5'::SMALLINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"32767.5"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '18446744073709551615.5'::UBIGINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"18446744073709551615.5"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '12.8e1'::TINYINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12.8e1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '429496729.6e1'::UINTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"429496729.6e1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('[Hello World!]' AS VARCHAR[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[Hello World!]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('[[ [🦆, 🦆, 🦆]], [[duck, db, 🦆], [🦆]], [[🦆, duck, db]]]' AS VARCHAR[][][]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":96,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":73,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[[ [🦆, 🦆, 🦆]], [[duck, db, 🦆], [🦆]], [[🦆, duck, db]]]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST($$[\"]\", \"hello\", \"world\"]$$ AS VARCHAR[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":46,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[\"]\", \"hello\", \"world\"]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT col1::INT[] FROM null_tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["col1"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"null_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('[3],[[]' AS INT[][]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[3],[[]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('[{a:[12,13,14], b:\"🦆\", c:{a:[[a], [b, c]], b:[123]}}]' AS STRUCT(a INT[], b VARCHAR, c STRUCT(a VARCHAR[][], b INT[]))[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":130,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":58,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[{a:[12,13,14], b:\"🦆\", c:{a:[[a], [b, c]], b:[123]}}]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":60,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":92,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]},{"class":"TYPE","type":"TYPE","alias":"c","query_location":103,"query_location_length":30,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":127,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select $$[\"\\ \\\\abc\\\\ \\ \", def, ghi]$$::VARCHAR[] a, a[1], len(a[1])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":38,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[\"\\ \\\\abc\\\\ \\ \", def, ghi]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false},{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":54,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":9,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":64,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT $$[nested[brackets], test]$$::VARCHAR[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[nested[brackets], test]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT $$[\" space at start\", \" leading space\"]$$::VARCHAR[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[\" space at start\", \" leading space\"]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT $$[\"\\\"quotes\\\" and \\ spaces \", \"\\ leading and trailing \\ \"]$$::VARCHAR[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":59,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[\"\\\"quotes\\\" and \\ spaces \", \"\\ leading and trailing \\ \"]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT $$[\\,]$$::VARCHAR[]; -- List with only a comma (not quoted)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[\\,]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{key_A: 2, key_B: 3, key_C: 8}'::STRUCT(key_A INT, key_B DOUBLE, key_C FLOAT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":46,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{key_A: 2, key_B: 3, key_C: 8}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":44,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"key_A","query_location":54,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"key_B","query_location":65,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]},{"class":"TYPE","type":"TYPE","alias":"key_C","query_location":79,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{key_A: [2, 3, 4], key_B: [Hello, World]}'::STRUCT(key_A INT[], key_B VARCHAR[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":38,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":43,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{key_A: [2, 3, 4], key_B: [Hello, World]}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":36,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"key_A","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]},{"class":"TYPE","type":"TYPE","alias":"key_B","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{ key_A: 2, key_B: {key_C: hello world } X }'::STRUCT(key_A INT, key_B STRUCT(key_C VARCHAR));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":48,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":60,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{ key_A: 2, key_B: {key_C: hello world } X }"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":46,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"key_A","query_location":82,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"key_B","query_location":93,"query_location_length":21,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"key_C","query_location":106,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{}'::STRUCT(a INT, b VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":24,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":22,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('{a:{a:3}, b:{{b:1}}}' AS STRUCT(a STRUCT(a INT), b STRUCT(b INT)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":72,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{a:{a:3}, b:{{b:1}}}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":40,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":47,"query_location_length":13,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":56,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":64,"query_location_length":13,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"b","query_location":73,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select $$[{'a': test}, {'a': NULL}, {'a': 'null'}, {'a': 'nUlL'}, {'a': NULL}, {'a': NULLz}, {'a': 'NULL'}]$$::STRUCT(a VARCHAR)[] a, a::VARCHAR::STRUCT(a VARCHAR)[] b, a IS NOT DISTINCT FROM b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":109,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":120,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[{'a': test}, {'a': NULL}, {'a': 'null'}, {'a': 'nUlL'}, {'a': NULL}, {'a': NULLz}, {'a': 'NULL'}]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":111,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":120,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":144,"query_location_length":21,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":135,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":137,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":146,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":155,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":169,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":192,"query_location_length":1,"column_names":["b"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select [\n\trow('test'),\n\t$$(NULL)$$,\n\t$$('null')$$,\n\t$$('nUlL')$$,\n\t$$(NuLl)$$,\n\t$$(\"NULLz\")$$,\n\t$$(\"NULL\")$$\n] a, a::VARCHAR::STRUCT(a VARCHAR)[] b, a IS NOT DISTINCT FROM b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":7,"query_location_length":103,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(NULL)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"('null')"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"('nUlL')"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(NuLl)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(\"NULLz\")"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(\"NULL\")"}}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":124,"query_location_length":21,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":115,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":117,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":135,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":149,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":1,"column_names":["b"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (NULL::STRUCT(name VARCHAR, age INT))::MAP(VARCHAR, VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":23,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":29,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"name","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]},{"class":"TYPE","type":"TYPE","alias":"age","query_location":39,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (1, 2, 3)::MAP(INT, INT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":15,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":13,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {\"true_val\": true, \"false_val\": false}::MAP(VARCHAR, VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":23,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"true_val","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"true_val","query_location":20,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"name":"false_val","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"false_val","query_location":39,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT b::UTINYINT FROM bits;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":4,"schema_name":"","table_name":"bits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bits"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 15::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":15}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT bitstring('1', 65)::BIGINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"bitstring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":65}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (-15)::HUGEINT::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":5,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-15}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '10000000'::BIT::TINYINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10000000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (18446744073709551615)::UBIGINT::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":5,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":20,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":0,"lower":18446744073709551615}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(1=0 AS VARCHAR)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":20,"child":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":12,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('nO' AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nO"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(CAST('0' AS integer) AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(CAST('0' AS float) AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(' E1' AS DOUBLE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" E1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{prefix}11'::INT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{prefix}11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{prefix}00000000000000000000000000000000111111111'::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":51,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{prefix}00000000000000000000000000000000111111111"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::INTEGER::VARCHAR, 12442952::INTEGER::VARCHAR, (-2000000111)::INTEGER::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":8,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12442952}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2000000111}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '0x80'::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0x80"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST('0x100' AS UINT8)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0x100"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":5,"catalog":"","schema":"","type_name":"UINT8","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select t::TIMESTAMP from tss;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":3,"schema_name":"","table_name":"tss","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tss"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(TIMESTAMP 'infinity' AS TIME);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":34,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select *\nfrom test\nwhere (t::date) = '2021-02-04';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":24,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["t"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-02-04"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with \"CTE\" AS (SELECT 42)\nselect * from cte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"CTE","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":33,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from A join B using(X);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"A","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["A"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"B","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["B"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["X"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM a FULL OUTER JOIN b USING (hello) FULL OUTER JOIN c USING (hello) FULL OUTER JOIN d USING (hello) FULL OUTER JOIN e USING (hello)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":112,"query_location_length":31,"left":{"type":"JOIN","alias":"","sample":null,"query_location":80,"query_location_length":31,"left":{"type":"JOIN","alias":"","sample":null,"query_location":48,"query_location_length":31,"left":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":31,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["hello"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["hello"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":96,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["hello"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":128,"query_location_length":1,"schema_name":"","table_name":"e","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["e"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["hello"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT 1 \"hello\", 2 \"HeLlO\") NATURAL JOIN (SELECT 1 \"hello\", 2 \"HeLlO\")","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":44,"query_location_length":42,"left":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"hello","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"HeLlO","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":57,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"hello","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"HeLlO","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select comment from duckdb_sequences() where sequence_name='test_sequence';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["comment"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_sequences","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":13,"column_names":["sequence_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test_sequence"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT table_name, database_name, temporary FROM duckdb_tables() WHERE table_name='temp_comment_test'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["table_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":9,"column_names":["temporary"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":49,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"temp_comment_test"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select database_name, schema_name, comment from duckdb_indexes() where index_name='test_index' order by comment;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":7,"column_names":["comment"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":11,"column_names":["schema_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":7,"column_names":["comment"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":48,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_indexes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":10,"column_names":["index_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test_index"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT colname, colname2, colname3, colname4, colname5 FROM tablename;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["colname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":8,"column_names":["colname2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":8,"column_names":["colname3"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":8,"column_names":["colname4"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":8,"column_names":["colname5"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":9,"schema_name":"","table_name":"tablename","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tablename"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT min_from_tbl(integers, k)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"min_from_tbl","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":8,"column_names":["integers"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["k"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from m(b := 'a', a := 'b')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":21,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":31,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM query('SELECT 1, 2, 3');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":23,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT 1, 2, 3"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM query_table([tbl, tbl2]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query_table","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["tbl"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":4,"column_names":["tbl2"]}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM query_table('SELECT 4 + 2');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query_table","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT 4 + 2"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT IFELSE(1, IFELSE(1,'a','b'), 'c')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"ifelse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":17,"function_name":"ifelse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH ppterms AS (\n SELECT unnest(string_split_regex(regexp_replace(lower(strip_accents('QUÁCK BÁRK')), '[^a-z]', ' ', 'g'), '\\s+')) AS term\n), qtermids AS (\n SELECT termid\n FROM fts_main_documents.dict AS dict\n JOIN ppterms\n USING (term)\n), qterms AS (\n SELECT termid,\n docid\n FROM fts_main_documents.terms AS terms\n WHERE termid IN (\n SELECT qtermids.termid FROM qtermids\n )\n), subscores AS (\n SELECT docs.docid,\n len,\n term_tf.termid,\n tf,\n df,\n (log((3 - df + 0.5) / (df + 0.5))* ((tf * (1.2 + 1)/(tf + 1.2 * (1 - 0.75 + 0.75 * (len / 4)))))) AS subscore\n FROM (\n SELECT termid,\n docid,\n COUNT(*) AS tf\n FROM qterms\n GROUP BY docid,\n termid\n ) AS term_tf\n JOIN (\n SELECT DISTINCT docid\n FROM qterms\n ) AS cdocs\n ON term_tf.docid = cdocs.docid\n JOIN fts_main_documents.docs AS docs\n ON term_tf.docid = docs.docid\n JOIN fts_main_documents.dict AS dict\n ON term_tf.termid = dict.termid\n)\nSELECT name,\n score\nFROM (\n SELECT docid,\n sum(subscore) AS score\n FROM subscores\n GROUP BY docid\n) AS scores\nJOIN fts_main_documents.docs AS docs\nON scores.docid = docs.docid\nORDER BY score DESC\nLIMIT 1000","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1303,"query_location_length":5,"column_names":["score"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1320,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[{"key":"ppterms","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"term","query_location":29,"query_location_length":107,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":99,"function_name":"string_split_regex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":72,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":36,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":29,"function_name":"strip_accents","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"QUÁCK BÁRK"}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[^a-z]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\s+"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"qtermids","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":6,"column_names":["termid"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":225,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"dict","sample":null,"query_location":189,"query_location_length":31,"schema_name":"fts_main_documents","table_name":"dict","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fts_main_documents","dict"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":230,"query_location_length":7,"schema_name":"","table_name":"ppterms","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ppterms"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["term"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"qterms","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":281,"query_location_length":6,"column_names":["termid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":300,"query_location_length":5,"column_names":["docid"]}],"from_table":{"type":"BASE_TABLE","alias":"terms","sample":null,"query_location":315,"query_location_length":33,"schema_name":"fts_main_documents","table_name":"terms","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fts_main_documents","terms"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":369,"query_location_length":52,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":386,"query_location_length":15,"column_names":["qtermids","termid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":407,"query_location_length":8,"schema_name":"","table_name":"qtermids","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["qtermids"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":359,"query_location_length":6,"column_names":["termid"]},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"subscores","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":451,"query_location_length":10,"column_names":["docs","docid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":474,"query_location_length":3,"column_names":["len"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":490,"query_location_length":14,"column_names":["term_tf","termid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":517,"query_location_length":2,"column_names":["tf"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":532,"query_location_length":2,"column_names":["df"]},{"class":"FUNCTION","type":"FUNCTION","alias":"subscore","query_location":548,"query_location_length":95,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":548,"query_location_length":32,"function_name":"log","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":552,"query_location_length":27,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":560,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":555,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":553,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":557,"query_location_length":2,"column_names":["df"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":562,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":573,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":570,"query_location_length":2,"column_names":["df"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":575,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":584,"query_location_length":57,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":584,"query_location_length":2,"column_names":["tf"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":594,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":590,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":12}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":596,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":603,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":600,"query_location_length":2,"column_names":["tf"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":605,"query_location_length":35,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":605,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":12}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":621,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":614,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":612,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":616,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":75}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":623,"query_location_length":16,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":623,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":75}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":631,"query_location_length":7,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":631,"query_location_length":3,"column_names":["len"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":637,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}}]}}]}}]}}]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":1018,"query_location_length":72,"left":{"type":"JOIN","alias":"","sample":null,"query_location":943,"query_location_length":70,"left":{"type":"JOIN","alias":"","sample":null,"query_location":832,"query_location_length":106,"left":{"type":"SUBQUERY","alias":"term_tf","sample":null,"query_location":666,"query_location_length":150,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":683,"query_location_length":6,"column_names":["termid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":706,"query_location_length":5,"column_names":["docid"]},{"class":"FUNCTION","type":"FUNCTION","alias":"tf","query_location":728,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":756,"query_location_length":6,"schema_name":"","table_name":"qterms","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["qterms"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":780,"query_location_length":5,"column_names":["docid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":804,"query_location_length":6,"column_names":["termid"]}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"cdocs","sample":null,"query_location":837,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":863,"query_location_length":5,"column_names":["docid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":882,"query_location_length":6,"schema_name":"","table_name":"qterms","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["qterms"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":911,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":911,"query_location_length":13,"column_names":["term_tf","docid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":927,"query_location_length":11,"column_names":["cdocs","docid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"docs","sample":null,"query_location":948,"query_location_length":31,"schema_name":"fts_main_documents","table_name":"docs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fts_main_documents","docs"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":987,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":987,"query_location_length":13,"column_names":["term_tf","docid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1003,"query_location_length":10,"column_names":["docs","docid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"dict","sample":null,"query_location":1023,"query_location_length":31,"schema_name":"fts_main_documents","table_name":"dict","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fts_main_documents","dict"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":1062,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1062,"query_location_length":14,"column_names":["term_tf","termid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1079,"query_location_length":11,"column_names":["dict","termid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1100,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1113,"query_location_length":5,"column_names":["score"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":1228,"query_location_length":65,"left":{"type":"SUBQUERY","alias":"scores","sample":null,"query_location":1124,"query_location_length":93,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1137,"query_location_length":5,"column_names":["docid"]},{"class":"FUNCTION","type":"FUNCTION","alias":"score","query_location":1155,"query_location_length":13,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1159,"query_location_length":8,"column_names":["subscore"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":1187,"query_location_length":9,"schema_name":"","table_name":"subscores","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["subscores"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1210,"query_location_length":5,"column_names":["docid"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"docs","sample":null,"query_location":1233,"query_location_length":31,"schema_name":"fts_main_documents","table_name":"docs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fts_main_documents","docs"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":1268,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1268,"query_location_length":12,"column_names":["scores","docid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1283,"query_location_length":10,"column_names":["docs","docid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT deep_cte(42)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"deep_cte","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select my_macro2(84)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"my_macro2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":84}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT function_name, parameters FROM duckdb_functions() WHERE function_name IN ('arithmetic', 'multi_add', 'generate_numbers') ORDER BY function_name, len(parameters)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":13,"column_names":["function_name"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":152,"query_location_length":15,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":10,"column_names":["parameters"]}}]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["function_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":10,"column_names":["parameters"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":38,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_functions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":80,"query_location_length":47,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":13,"column_names":["function_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"arithmetic"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"multi_add"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"generate_numbers"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select m('duck')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select parameter_types[1]\nfrom duckdb_functions()\nwhere function_name = 'm'\nand function_type = 'table_macro'\norder by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":22,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":15,"column_names":["parameter_types"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":31,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_functions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":56,"query_location_length":53,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":13,"column_names":["function_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"m"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":13,"column_names":["function_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"table_macro"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT in_next_n(12, 'seq', 5);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"in_next_n","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT in_expression_list(1, 1, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"in_expression_list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT IFELSE(1, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"ifelse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT two_default_params()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"two_default_params","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT subquery(a) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"subquery","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test_tbl where id\u003e=(SELECT max(id) FROM xt(id,30));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"test_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":29,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":2,"column_names":["id"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":33,"query_location_length":31,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":2,"column_names":["id"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":54,"query_location_length":9,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"xt","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":30}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM sc2(50.0, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sc2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":1}},"is_null":false,"value":500}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select my_agg(range) OVER () \nfrom range(2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":21,"function_name":"my_agg","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["range"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT schema_name, parent_schema FROM duckdb_schemas()\nWHERE database_name = 'memory' AND schema_name IN ('s1','child','grandchild','sibling')\nORDER BY schema_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":11,"column_names":["schema_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["schema_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":13,"column_names":["parent_schema"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":62,"query_location_length":81,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"memory"}}},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":106,"query_location_length":37,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":11,"column_names":["schema_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"child"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"grandchild"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"sibling"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM duckdb_schemas()\nWHERE schema_name IN ('parent','child','grandchild','gc1','gc2','sibling','leaf');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":59,"query_location_length":60,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":11,"column_names":["schema_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"parent"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"child"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"grandchild"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"gc1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"gc2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"sibling"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"leaf"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM duckdb_tables() WHERE database_name = 'memory';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"memory"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'angry'::s1.s2.mood;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":12,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"angry"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":10,"catalog":"s1","schema":"s2","type_name":"mood","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM duckdb_functions() WHERE function_name IN ('double', 'tbl_macro');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_functions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":63,"query_location_length":23,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":13,"column_names":["function_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"double"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tbl_macro"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM read_text('{TEST_DIR}/nested_export/schema.sql') WHERE content LIKE '%CREATE SCHEMA s1.s2;%';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/nested_export/schema.sql"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":29,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%CREATE SCHEMA s1.s2;%"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT database_name, schema_name FROM duckdb_types() WHERE type_name = 'ty';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":11,"column_names":["schema_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":9,"column_names":["type_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ty"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM duckdb_tables() t, duckdb_schemas() s\nWHERE t.table_name = 't1' AND t.schema_oid = s.oid AND s.parent_schema = 's1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":42,"left":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":21,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"s","sample":null,"query_location":40,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":65,"query_location_length":71,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":12,"column_names":["t","table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":89,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":12,"column_names":["t","schema_oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":5,"column_names":["s","oid"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":114,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":15,"column_names":["s","parent_schema"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s1"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT tbl.s.b FROM s1.s2.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["tbl","s","b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"s2","table_name":"tbl","column_name_alias":[],"catalog_name":"s1","at_clause":null,"qualified_name":{"path":["s1","s2","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s1.s2.dup.a AS x, s4.s2.dup.a AS y FROM s1.s2.dup, s4.s2.dup;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":7,"query_location_length":11,"column_names":["s1","s2","dup","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"y","query_location":25,"query_location_length":11,"column_names":["s4","s2","dup","a"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":25,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":9,"schema_name":"s2","table_name":"dup","column_name_alias":[],"catalog_name":"s1","at_clause":null,"qualified_name":{"path":["s1","s2","dup"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":9,"schema_name":"s2","table_name":"dup","column_name_alias":[],"catalog_name":"s4","at_clause":null,"qualified_name":{"path":["s4","s2","dup"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM parent.child.t1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":15,"schema_name":"child","table_name":"t1","column_name_alias":[],"catalog_name":"parent","at_clause":null,"qualified_name":{"path":["parent","child","t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM duckdb_schemas() WHERE schema_name IN ('parent', 'child', 'grandchild');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":59,"query_location_length":33,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":11,"column_names":["schema_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"parent"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"child"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"grandchild"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM duckdb_tables();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT nextval('seq6') from generate_series(0,20);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq6"}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT setval('myseq');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"setval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"myseq"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT setval(NULL, NULL, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"setval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT nextval('seq'), nextval('seq');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s, nextval('seq') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(DISTINCT a) FROM test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT j FROM integers2 ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM test_catalog.nonexistent_schema.some_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":42,"schema_name":"nonexistent_schema","table_name":"some_table","column_name_alias":[],"catalog_name":"test_catalog","at_clause":null,"qualified_name":{"path":["test_catalog","nonexistent_schema","some_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT k FROM out_of_path.oop_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":21,"schema_name":"out_of_path","table_name":"oop_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["out_of_path","oop_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM main_view;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"main_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT main.nextval('test_sequence');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"nextval","schema":"main","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test_sequence"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT current_schemas(true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"current_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM s1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"s1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x FROM v1 t1(x) WHERE x \u003e 41","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"v1","column_name_alias":["x"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":41}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 'ABC' in (select s collate nocase) from (values ('aBc')) t(s);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":16,"query_location_length":25,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":24,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["s"]},"collation":"nocase"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ABC"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":47,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aBc"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'a%ö' COLLATE NOACCENT LIKE 'a$%ö' ESCAPE '$'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":23,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a%ö"}},"collation":"NOACCENT"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a$%ö"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select (select c1 from t0) collate nocase;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":34,"child":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":19,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":2,"column_names":["c1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"collation":"nocase"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT icu_sort_key(chr(44032), 'en')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"icu_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":10,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":44032}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"en"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(collate_de('a')), typeof(icu_collate_de('a'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":15,"function_name":"collate_de","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":27,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":19,"function_name":"icu_collate_de","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select right(left(b collate de, 6), 1) from tbl order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"right","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":21,"function_name":"left","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":18,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["b"]},"collation":"de"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select NULL product_id, region, sum(amount_sold) from sales group by region\nUNION ALL\nselect NULL product_id, NULL region, sum(amount_sold) from sales\nUNION ALL\nselect product_id, NULL region, sum(amount_sold) from sales group by product_id order by 1,2;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":250,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":252,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"product_id","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":6,"column_names":["region"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":16,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":11,"column_names":["amount_sold"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":5,"schema_name":"","table_name":"sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sales"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":6,"column_names":["region"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"product_id","query_location":93,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"region","query_location":110,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":123,"query_location_length":16,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":11,"column_names":["amount_sold"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":145,"query_location_length":5,"schema_name":"","table_name":"sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sales"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":10,"column_names":["product_id"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"region","query_location":180,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":193,"query_location_length":16,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":11,"column_names":["amount_sold"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":215,"query_location_length":5,"schema_name":"","table_name":"sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sales"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":10,"column_names":["product_id"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT * FROM collate_test WHERE s='hello'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"collate_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collate_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_contains(['hello', 'world'], 'hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"world"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL::VARCHAR GROUP BY NULL::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL::INTERVAL IN (NULL::INTERVAL, INTERVAL 1 DAY);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":25,"query_location_length":32,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 999::VARCHAR ORDER BY 1 COLLATE NOCASE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":29,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"collation":"NOCASE"}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":999}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select lower(a collate noaccent) from tbl order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":13,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["a"]},"collation":"noaccent"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select a from tbl where starts_with(b collate noaccent, '\u003e\u003e\u003e\u003e\u003eo') order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":41,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":36,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["b"]},"collation":"noaccent"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\u003e\u003e\u003e\u003e\u003eo"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select icu_sort_key('Ş', 'ro');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"icu_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Ş"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ro"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'Á' COLLATE \"NOACCENT.ICU_NOACCENT\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Á"}},"collation":"NOACCENT.ICU_NOACCENT"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strpos('HELLO' COLLATE NOCASE, 'HELLO')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"strpos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":14,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"HELLO"}},"collation":"NOCASE"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"HELLO"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strpos('a' COLLATE NOCASE, '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"strpos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":14,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}},"collation":"NOCASE"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'hello'::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM pkt1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"pkt1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pkt1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM read_parquet('{TEST_DIR}/async_lifecycle_sync.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":55,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/async_lifecycle_sync.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select columns FROM sniff_csv('{DATA_DIR}/csv/14512_og.csv', strict_mode = false, delim = ',', quote = '\"', escape = '\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["columns"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":101,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/14512_og.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":108,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT Delimiter, Quote, Escape FROM sniff_csv(\"data/19578.csv\", strict_mode=false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["Delimiter"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":5,"column_names":["Quote"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":6,"column_names":["Escape"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":37,"query_location_length":47,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":16,"column_names":["data/19578.csv"]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_1.csv', rejects_scan=0, buffer_size=655371, all_varchar=false, rejects_scan=0, buffer_size=42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":133,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_1.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":12,"column_names":["rejects_scan"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":655371}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":11,"column_names":["all_varchar"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":107,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":12,"column_names":["rejects_scan"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":123,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_13.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_13.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_25.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_25.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_37.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_37.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_49.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_49.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_61.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_61.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_73.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_73.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_85.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3977/case_85.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/4496/crashes/case_1.csv', auto_detect=false, buffer_size=42, columns={'json': 'JSON'}, delim=NULL, rejects_limit=658694493994253607, store_rejects=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":181,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/4496/crashes/case_1.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"json","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"json","query_location":112,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"JSON"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":133,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":13,"column_names":["rejects_limit"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":18,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":658694493994253607}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":167,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":167,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * from locations_header_trailing_comma","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":31,"schema_name":"","table_name":"locations_header_trailing_comma","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["locations_header_trailing_comma"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(#1) from read_csv_auto('{DATA_DIR}/csv/test/multi_column_string.csv', COLUMN_TYPES=STRUCT_PACK(column0 := 'DOUBLE')) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":14,"query_location_length":2,"index":1}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":108,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/test/multi_column_string.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":45,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":12,"column_names":["COLUMN_TYPES"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":32,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column0","query_location":121,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOUBLE"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, nfc_normalize(j) j, k FROM '{DATA_DIR}/csv/real/greek_utf8.csv' t(i, j, k)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":10,"query_location_length":16,"function_name":"nfc_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["j"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":37,"query_location_length":47,"schema_name":"","table_name":"{DATA_DIR}/csv/real/greek_utf8.csv","column_name_alias":["i","j","k"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/real/greek_utf8.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/pipe_delim.csv', columns={'a': 'VARCHAR'}, auto_detect=False)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":86,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/pipe_delim.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":61,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"describe v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT column00, column01, column02, column03, column04, column05, column06, column07, column08, column09, column10, column11, column12 FROM test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["column00"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["column01"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":8,"column_names":["column02"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":8,"column_names":["column03"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":8,"column_names":["column04"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":8,"column_names":["column05"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":8,"column_names":["column06"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":8,"column_names":["column07"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":8,"column_names":["column08"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":8,"column_names":["column09"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":8,"column_names":["column10"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":8,"column_names":["column11"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":8,"column_names":["column12"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":141,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT _select, _insert, _join FROM test ORDER BY _select;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":7,"column_names":["_select"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["_select"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["_insert"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":5,"column_names":["_join"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv_auto ('{TEST_DIR}/csv_file.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/csv_file.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(column0), typeof(column1), typeof(column2) FROM read_csv_auto ('{TEST_DIR}/csv_file.csv', auto_type_candidates=['FLOAT','VARCHAR']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":7,"column_names":["column0"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":7,"column_names":["column1"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":7,"column_names":["column2"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":62,"query_location_length":83,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/csv_file.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":104,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":20,"column_names":["auto_type_candidates"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":125,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"FLOAT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, b, t, d, ts FROM test ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["t"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["ts"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/auto/issue_1254_rn.csv', buffer_size=10)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/auto/issue_1254_rn.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from read_csv('{DATA_DIR}/csv/test/invalid_utf_big.csv',columns = {'col1': 'VARCHAR','col2': 'VARCHAR','col3': 'VARCHAR'}, auto_detect=false, header = 0, delim = ',')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":161,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/test/invalid_utf_big.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":65,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":55,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"col1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":75,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"col2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":93,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"col3","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col3","query_location":111,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":123,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":154,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from read_csv_auto('{DATA_DIR}/csv/invalid_utf8.csv', auto_detect = false, columns={'c01': 'VARCHAR'} )","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":98,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/invalid_utf8.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c01","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c01","query_location":91,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT commas, periods FROM decimal_separators;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["commas"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["periods"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":18,"schema_name":"","table_name":"decimal_separators","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["decimal_separators"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select typeof(Year), typeof(Quarter) from read_csv_auto('{DATA_DIR}/csv/real/ontime_sample.csv', dtypes=['INT', 'TINYINT']) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":4,"column_names":["Year"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":7,"column_names":["Quarter"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":42,"query_location_length":81,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/real/ontime_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":6,"column_names":["dtypes"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":104,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"TINYINT"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_csv('{DATA_DIR}/csv/auto/int_bol.csv', columns={'i':'varchar', 'b':'varchar'}, column_types={'x': 'INTEGER', 'y': 'BOOLEAN'})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":130,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/auto/int_bol.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":71,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":86,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":45,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":12,"column_names":["column_types"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":32,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":117,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":133,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"BOOLEAN"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/15473.csv', delim = ',', columns = {'A' : 'VARCHAR','B' : 'VARCHAR','C' : 'VARCHAR','D' : 'VARCHAR'})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":126,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/15473.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":75,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":65,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"A","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"A","query_location":72,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"B","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"B","query_location":88,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"C","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"C","query_location":104,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"D","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"D","query_location":120,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/mismatching_names/*/*/test.csv', HIVE_PARTITIONING=1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":101,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":65,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/hive-partitioning/mismatching_names/*/*/test.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select id, value, CAST(part AS INT) as part_cast, CAST(date AS DATE) as date_cast from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/types/*/*/test.csv', HIVE_PARTITIONING=1) where (date_cast=CAST('2012-01-01' as DATE) AND concat(date_cast::VARCHAR, part_cast::VARCHAR) == 'foobar') OR (part_cast=1337) ORDER BY date_cast;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":314,"query_location_length":9,"column_names":["date_cast"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["value"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"part_cast","query_location":18,"query_location_length":17,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":4,"column_names":["part"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"date_cast","query_location":50,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["date"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":87,"query_location_length":89,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":53,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/hive-partitioning/types/*/*/test.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":156,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":183,"query_location_length":121,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":184,"query_location_length":99,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":184,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":9,"column_names":["date_cast"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":194,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":199,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2012-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":215,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":225,"query_location_length":58,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":225,"query_location_length":46,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":241,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":9,"column_names":["date_cast"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":243,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":261,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":252,"query_location_length":9,"column_names":["part_cast"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":263,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":275,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foobar"}}}]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":289,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":289,"query_location_length":9,"column_names":["part_cast"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":299,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1337}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_csv_auto(['{DATA_DIR}/csv/hive-partitioning/mismatching_contents/part=1/test.csv', '{DATA_DIR}/csv/hive-partitioning/mismatching_contents/part=2/test.csv']) order by 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":186,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":161,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":146,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":71,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/hive-partitioning/mismatching_contents/part=1/test.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":71,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/hive-partitioning/mismatching_contents/part=2/test.csv"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select column00, column01, column02, column03 from read_csv_auto('{DATA_DIR}/csv/real/lineitem_sample.csv', names=[]) LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["column00"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["column01"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":8,"column_names":["column02"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":8,"column_names":["column03"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":51,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/real/lineitem_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":108,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":5,"column_names":["names"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":114,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/header.csv', names = ['a'], header = false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":68,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/header.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":5,"column_names":["names"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv_auto('{DATA_DIR}/csv/nullpadding_header.csv', null_padding=True, comment = '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":87,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/nullpadding_header.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":7,"column_names":["comment"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/null/multiple_quoted_nulls.csv', auto_detect=false, delim=',', quote='\"', escape='\"', skip=0, header=true, columns={'name': 'VARCHAR', 'age': 'VARCHAR', 'height': 'VARCHAR'}, nullstr = ['',',','null'], allow_quoted_nulls = false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":254,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":47,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/null/multiple_quoted_nulls.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":93,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":104,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":124,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":137,"query_location_length":66,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":145,"query_location_length":58,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":154,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":172,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"height","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"height","query_location":193,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":205,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":205,"query_location_length":7,"column_names":["nullstr"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":215,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"null"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":232,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":18,"column_names":["allow_quoted_nulls"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":253,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM v1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv_auto('{DATA_DIR}/csv/empty_first_line.csv', delim='|', auto_detect=false, columns={'column00': 'VARCHAR'}, skip = 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":125,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/empty_first_line.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"|"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column00","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column00","query_location":118,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":130,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv(['{DATA_DIR}/csv/glob/a?/a*.csv', '{DATA_DIR}/csv/glob/a?/a*.csv']) ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":76,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":66,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/glob/a?/a*.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/glob/a?/a*.csv"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv(['{DATA_DIR}/csv/glob/*/a*a.csv']) ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":33,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/glob/*/a*a.csv"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM '{DATA_DIR}/csv/glob_dif_dialect/14166/__200*.csv';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":50,"schema_name":"","table_name":"{DATA_DIR}/csv/glob_dif_dialect/14166/__200*.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/glob_dif_dialect/14166/__200*.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv_auto('{DATA_DIR}/csv/issue6764.csv', all_varchar=true, null_padding=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":82,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/issue6764.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":11,"column_names":["all_varchar"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/multidelimiter/aab_delim.csv', delim = 'AAB')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":70,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/multidelimiter/aab_delim.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"AAB"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM '{DATA_DIR}/csv/null_terminator.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":36,"schema_name":"","table_name":"{DATA_DIR}/csv/null_terminator.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/null_terminator.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(a) FROM read_csv('{DATA_DIR}/csv/test/new_line_string_rn.csv', COLUMNS=STRUCT_PACK(a := 'INTEGER', b := 'INTEGER', c := 'INTEGER', d := 'VARCHAR'), auto_detect='true', delim = '|')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":173,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/test/new_line_string_rn.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":83,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["COLUMNS"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":75,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":100,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":116,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":132,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":148,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":160,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":180,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":180,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"|"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select part, value, date from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/simple/*/*/test.csv', HIVE_PARTITIONING=1) order by 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["part"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["date"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":30,"query_location_length":90,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":54,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/hive-partitioning/simple/*/*/test.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select *\nfrom read_csv('{DATA_DIR}/csv/bug_7578.csv', delim='\\t', quote = '`', columns={\n 'transaction_id': 'VARCHAR',\n 'team_id': 'INT',\n 'direction': 'INT',\n 'amount':'DOUBLE',\n 'account_id':'INT',\n 'transaction_date':'DATE',\n 'recorded_date':'DATE',\n 'tags.transaction_id':'VARCHAR',\n 'tags.team_id':'INT',\n 'tags':'varchar'\n}) order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":15,"query_location_length":326,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/bug_7578.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\t"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"`"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":260,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":252,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"transaction_id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"transaction_id","query_location":110,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"team_id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"team_id","query_location":134,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INT"}}},{"name":"direction","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"direction","query_location":156,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INT"}}},{"name":"amount","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"amount","query_location":174,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOUBLE"}}},{"name":"account_id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"account_id","query_location":199,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INT"}}},{"name":"transaction_date","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"transaction_date","query_location":227,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"recorded_date","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recorded_date","query_location":253,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"tags.transaction_id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"tags.transaction_id","query_location":285,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"tags.team_id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"tags.team_id","query_location":313,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INT"}}},{"name":"tags","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"tags","query_location":329,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/wrongtype.csv', sep=',', buffer_size=100, columns={'h1': int, 'h2': varchar}, header=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":115,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/wrongtype.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":3,"column_names":["sep"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":26,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"h1","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"h1","query_location":96,"query_location_length":3,"column_names":["int"]}},{"name":"h2","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"h2","query_location":107,"query_location_length":7,"column_names":["varchar"]}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":117,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/error/date.csv', parallel=false, sep=',', buffer_size=100, columns={'h1': date, 'h2': varchar}, header=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":133,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/date.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":8,"column_names":["parallel"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":3,"column_names":["sep"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":106,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"h1","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"h1","query_location":113,"query_location_length":4,"column_names":["date"]}},{"name":"h2","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"h2","query_location":125,"query_location_length":7,"column_names":["varchar"]}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":135,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*), sum(j) FROM read_csv(['{TEST_DIR}/csv_ra_0.csv', '{TEST_DIR}/csv_ra_union.csv'], union_by_name=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":88,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":58,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/csv_ra_0.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/csv_ra_union.csv"}}}]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(i, j) AS\n(\n\tSELECT 1, 0\n\tUNION ALL\n\t(\n\t\tSELECT i + 1, j + a\n\t\tFROM t, r\n\t\tWHERE i \u003c= part\n\t)\n)\nSELECT * FROM t ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["i","j"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":79,"query_location_length":9,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":84,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":97,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":4,"column_names":["part"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["i","j"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":119,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":126,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(first(column0)), typeof(first(column1)), COUNT(*), SUM(column0), MAX(len(column1)) FROM read_csv_auto(\n '{DATA_DIR}/csv/error/mismatch/big_bad*.csv',\n sample_size=1,\n store_rejects=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["column0"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":7,"column_names":["column1"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["column0"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":17,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":12,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":7,"column_names":["column1"]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":107,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/mismatch/big_bad*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":190,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":190,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":204,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv(\n '{DATA_DIR}/csv/error/mismatch/bad2.csv',\n columns = {'col0': 'INTEGER', 'col1': 'INTEGER', 'col2': 'INTEGER'},\n store_rejects = true, auto_detect=false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":173,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":40,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/mismatch/bad2.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":67,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"col0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col0","query_location":93,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"col1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":112,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"col2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":131,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":147,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/rejects/dr_who.csv', columns={ 'date': 'DATE', 'datetime': 'TIMESTAMPTZ', 'time': 'TIME', 'timestamp': 'TIMESTAMP', 'time_tz': 'TIMETZ' }, store_rejects=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":183,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/rejects/dr_who.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":116,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":108,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"date","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"date","query_location":69,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"datetime","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"datetime","query_location":89,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"TIMESTAMPTZ"}}},{"name":"time","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"time","query_location":112,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"TIME"}}},{"name":"timestamp","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"timestamp","query_location":133,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"TIMESTAMP"}}},{"name":"time_tz","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"time_tz","query_location":157,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"TIMETZ"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(first(column0)), typeof(first(column1)), COUNT(*), SUM(column0), MAX(len(column1)) FROM read_csv_auto(\n '{DATA_DIR}/csv/error/mismatch/big_bad*.csv',\n sample_size=1,\n rejects_scan = 'rejects_scan_3',\n rejects_table = 'rejects_errors_3'\n );","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["column0"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":7,"column_names":["column1"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["column0"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":17,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":12,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":7,"column_names":["column1"]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":166,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/mismatch/big_bad*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":190,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":190,"query_location_length":12,"column_names":["rejects_scan"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"rejects_scan_3"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":228,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":228,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"rejects_errors_3"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(first(column0)), typeof(first(column1)), COUNT(*), SUM(column0), MAX(len(column1)) FROM read_csv_auto(\n '{DATA_DIR}/csv/error/mismatch/big_bad*.csv',\n sample_size=1,\n rejects_scan = 'rejects_scan_3',\n store_rejects = false\n );","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["column0"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":7,"column_names":["column1"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["column0"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":17,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":12,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":7,"column_names":["column1"]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":153,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/mismatch/big_bad*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":190,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":190,"query_location_length":12,"column_names":["rejects_scan"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"rejects_scan_3"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":228,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":228,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv(\n '{DATA_DIR}/csv/error/mismatch/bad.csv',\n columns = {'col0': 'INTEGER', 'col1': 'INTEGER', 'col2': 'VARCHAR'},\n ignore_errors=true,\n rejects_table='csv_rejects_table',\n rejects_limit=-1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":212,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/mismatch/bad.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":67,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"col0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col0","query_location":92,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"col1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":111,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"col2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":146,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":170,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"csv_rejects_table"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":209,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":209,"query_location_length":13,"column_names":["rejects_limit"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/rejects/multiple_errors/multiple_casts_flush.csv',\n columns = {'name': 'VARCHAR', 'age': 'INTEGER', 'current_day': 'DATE', 'tomorrow': 'DATE'},\n store_rejects = true, auto_detect=false, header = 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":228,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":65,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/rejects/multiple_errors/multiple_casts_flush.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":90,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":80,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":104,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":122,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"current_day","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"current_day","query_location":148,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"tomorrow","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"tomorrow","query_location":168,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":181,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":197,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":203,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":222,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":222,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/rejects/multiple_errors/invalid_utf_cast.csv',\n columns = {'name': 'VARCHAR', 'age': 'INTEGER', 'current_day': 'DATE', 'barks': 'INTEGER'},\n store_rejects = true, auto_detect=false, header = 1, max_line_size=40);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":242,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":61,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/rejects/multiple_errors/invalid_utf_cast.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":90,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":80,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":100,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":118,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"current_day","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"current_day","query_location":144,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"barks","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"barks","query_location":161,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":177,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":177,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":193,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":199,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":211,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":218,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":227,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":230,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":13,"column_names":["max_line_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":40}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/unescaped_quotes/end_quote.csv', columns = {'a':'varchar'}, header = false, quote = '\"', strict_mode = false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":134,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":47,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/unescaped_quotes/end_quote.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":78,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":119,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from read_csv('{DATA_DIR}/csv/bug_12596.csv', skip=1, delim=',', header=false, columns={'c1': 'INTEGER', 'c2': 'INTEGER', 'column2': 'VARCHAR'}, null_padding = true, parallel = false, auto_detect = false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":199,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/bug_12596.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":64,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":56,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c1","query_location":94,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c2","query_location":111,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"column2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column2","query_location":133,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":145,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":166,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":8,"column_names":["parallel"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":184,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3.csv', max_line_size=-1003718790012071149, ignore_errors=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":92,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/3.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":13,"column_names":["max_line_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-1003718790012071149}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/15.csv', rejects_table='d');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/afl/15.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"d"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv_auto('{DATA_DIR}/csv/null_comparison.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":51,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/null_comparison.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(bam) FROM test WHERE bam = '!';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["bam"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["bam"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"!"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/inconsistencies/line_with_spaces.csv', null_padding = true, ignore_errors = true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":106,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":53,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/inconsistencies/line_with_spaces.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM tbl1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s FROM test_default_parent","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":19,"schema_name":"","table_name":"test_default_parent","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_default_parent"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM glob('{TEST_DIR}/test4.db.wal')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/test4.db.wal"}}}],"qualified_name":{"path":["glob"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"from ddb.my_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":12,"schema_name":"ddb","table_name":"my_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ddb","my_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM db1.main.test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"main","table_name":"test","column_name_alias":[],"catalog_name":"db1","at_clause":null,"qualified_name":{"path":["db1","main","test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT enum_range(NULL::xx.db1.main.mood) AS my_enum_range;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"my_enum_range","query_location":7,"query_location_length":34,"function_name":"enum_range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":16,"catalog":"xx","schema":"main","type_name":"mood","children":[],"qualified_name":{"path":["xx","db1","main","mood"]}}}}],"qualified_name":{"path":["enum_range"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM hidden_db.main.tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":18,"schema_name":"main","table_name":"tbl","column_name_alias":[],"catalog_name":"hidden_db","at_clause":null,"qualified_name":{"path":["hidden_db","main","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT db1.main.two_x_plus_y(x, y) FROM db1.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"two_x_plus_y","schema":"main","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"db1","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["db1","main","two_x_plus_y"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":7,"schema_name":"db1","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db1","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT db1.t, db2.t FROM db1.s1.t, db2.s1.t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["db1","t"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["db2","t"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":20,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"s1","table_name":"t","column_name_alias":[],"catalog_name":"db1","at_clause":null,"qualified_name":{"path":["db1","s1","t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"s1","table_name":"t","column_name_alias":[],"catalog_name":"db2","at_clause":null,"qualified_name":{"path":["db2","s1","t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT database.table FROM \"table\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":14,"column_names":["database","table"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":7,"schema_name":"","table_name":"table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_databases() WHERE database_name = 'db3';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":5,"literal":{"kind":"STRING","text":"db3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(DISTINCT row_group_id) FROM pragma_storage_info('test.data');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":12,"column_names":["row_group_id"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":11,"literal":{"kind":"STRING","text":"test.data"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tags['storage_version'] FROM duckdb_databases() WHERE database_name='version_1_2_0'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":11,"query_location_length":19,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["tags"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":17,"literal":{"kind":"STRING","text":"storage_version"}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":15,"literal":{"kind":"STRING","text":"version_1_2_0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_databases() WHERE database_name = 'qtx2';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":6,"literal":{"kind":"STRING","text":"qtx2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_databases() WHERE database_name = 'blocked';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":9,"literal":{"kind":"STRING","text":"blocked"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT reference, state FROM duckdb_external_resources(discover := true) WHERE managed = false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["reference"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":5,"column_names":["state"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_external_resources","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"discover","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"discover","query_location":67,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["duckdb_external_resources"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":7,"column_names":["managed"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT operation, resource_name FROM duckdb_logs_parsed('ExternalResource') ORDER BY timestamp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":9,"column_names":["timestamp"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["operation"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":13,"column_names":["resource_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":37,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":18,"literal":{"kind":"STRING","text":"ExternalResource"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM new_database.integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":21,"schema_name":"new_database","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["new_database","integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM my_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"my_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["my_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name FROM pragma_database_list ORDER BY name","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":4,"column_names":["name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":20,"schema_name":"","table_name":"pragma_database_list","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pragma_database_list"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a as x FROM (VALUES (1),(2),(3)) t(a)\nGROUP BY alias.x + 1\nORDER BY alias.x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["alias","x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":19,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":7,"column_names":["alias","x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, row_number() OVER (ORDER BY a) AS rn\nFROM (VALUES (3),(1),(2)) t(a)\nQUALIFY alias.rn \u003c= 2\nORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"rn","query_location":10,"query_location_length":30,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":52,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":86,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":8,"column_names":["alias","rn"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}},"named_param_map":[]}]}} +{"sql":"SELECT\n a AS x,\n CASE WHEN alias.x % 2 = 0 THEN 'even' ELSE 'odd' END AS parity\nFROM (VALUES (1),(2),(3)) t(a)\nORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":9,"query_location_length":1,"column_names":["a"]},{"class":"CASE","type":"CASE_EXPR","alias":"parity","query_location":19,"query_location_length":52,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":15,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":11,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":7,"column_names":["alias","x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":6,"literal":{"kind":"STRING","text":"even"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":5,"literal":{"kind":"STRING","text":"odd"}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":87,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select ss_items.item_id\nfrom ss_items,cs_items\nwhere ss_items.item_id = cs_items.item_id\ngroup by item_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":16,"column_names":["ss_items","item_id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":22,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"ss_items","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ss_items"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"cs_items","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cs_items"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":16,"column_names":["ss_items","item_id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":16,"column_names":["cs_items","item_id"]}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":7,"column_names":["item_id"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.i FROM t, t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["t","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":11,"query_location_length":9,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with stage as (\n select\n [1,2,3] as c1,\n [4,5,6] as c2\n)\nselect\n list_transform(\n c1,\n lambda x: list_bool_or(\n list_transform(\n c2,\n lambda y: y == x\n )\n )\n ) as c3\nfrom stage;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"stage","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"c1","query_location":39,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"c2","query_location":64,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"c3","query_location":92,"query_location_length":156,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":2,"column_names":["c1"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":126,"query_location_length":115,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":136,"query_location_length":105,"function_name":"list_bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":160,"query_location_length":72,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":2,"column_names":["c2"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":204,"query_location_length":16,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":214,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":214,"query_location_length":1,"column_names":["y"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":219,"query_location_length":1,"column_names":["x"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}}],"qualified_name":{"path":["list_bool_or"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":260,"query_location_length":5,"schema_name":"","table_name":"stage","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stage"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(1::TINYINT + 10000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t0 WHERE NOT REGEXP_MATCHES(t0.c0, '1');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":23,"query_location_length":30,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":26,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":5,"column_names":["t0","c0"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}}],"qualified_name":{"path":["regexp_matches"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, (a*10)::VARCHAR AS big FROM test_alias WHERE alias.big.length() \u003e 1 ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"big","query_location":16,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":4,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":10,"schema_name":"","table_name":"test_alias","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_alias"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":55,"query_location_length":22,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":18,"function_name":"length","schema":"big","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"alias","arguments":[],"qualified_name":{"path":["alias","big","length"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM s1.t NATURAL JOIN s2.t NATURAL JOIN s3.t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":17,"left":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"s1","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s1","t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":4,"schema_name":"s2","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s2","t"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":4,"schema_name":"s3","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s3","t"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from m_lineitem;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"m_lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["m_lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select i IN (1) from (values ('01')) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":12,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":21,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"STRING","text":"01"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s1.v.c FROM s1.v AS x","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["s1","v","c"]}],"from_table":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":19,"query_location_length":9,"schema_name":"s1","table_name":"v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s1","v"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (WITH keys AS (SELECT unnest(json_keys(example)) AS k), nonNull AS (\n \t\tSELECT keys.k, example-\u003ekeys.k AS v\n \t\tFROM keys WHERE nullif(v, 'null') IS NOT NULL\n \t)\n \tSELECT json_group_object(nonNull.k, nonNull.v)\n \tFROM nonNull\n)\nFROM testjson;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":241,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"keys","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":29,"query_location_length":26,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":18,"function_name":"json_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":7,"column_names":["example"]}}],"qualified_name":{"path":["json_keys"]}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"nonNull","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":6,"column_names":["keys","k"]},{"class":"LAMBDA","type":"LAMBDA","alias":"v","query_location":97,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":7,"column_names":["example"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":6,"column_names":["keys","k"]},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":129,"query_location_length":4,"schema_name":"","table_name":"keys","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["keys"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":158,"query_location_length":11,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":140,"query_location_length":17,"function_name":"nullif","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}}],"qualified_name":{"path":["nullif"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":189,"query_location_length":39,"function_name":"json_group_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":207,"query_location_length":9,"column_names":["nonNull","k"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":9,"column_names":["nonNull","v"]}}],"qualified_name":{"path":["json_group_object"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":239,"query_location_length":7,"schema_name":"","table_name":"nonNull","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nonNull"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":254,"query_location_length":8,"schema_name":"","table_name":"testjson","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["testjson"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT test.HeLlO FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["test","HeLlO"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT test1.\"HeLlO\" FROM test1, test2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["test1","HeLlO"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":21,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":5,"schema_name":"","table_name":"test1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select upper(col1)\nfrom (\n\tselect *\n\tfrom t1\n\tunion\n\tselect *\n\tfrom t2\n) d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["col1"]}}],"qualified_name":{"path":["upper"]}}],"from_table":{"type":"SUBQUERY","alias":"d","sample":null,"query_location":24,"query_location_length":48,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":34,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":60,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, COUNT(*) AS k FROM integers GROUP BY i HAVING integers.k=1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":10,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":10,"column_names":["integers","k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select test from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["test"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from tbl where str collate nocase in ('abcde');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":46,"query_location_length":9,"children":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":24,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":3,"column_names":["str"]},"collation":"nocase"},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":7,"literal":{"kind":"STRING","text":"abcde"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT NULL) tbl(i) UNION ALL SELECT CAST(1 AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":13,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":62,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT * FROM v1 UNION ALL SELECT CAST(1 AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT i + 1 AS i, i + 1 AS b FROM integers ORDER BY b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":21,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ['a,b', 'x\"y']::VARCHAR[2]::VARCHAR v, v::VARCHAR[2] = ['a,b', 'x\"y'];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":33,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":5,"literal":{"kind":"STRING","text":"a,b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"literal":{"kind":"STRING","text":"x\"y"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":30,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":5,"literal":{"kind":"STRING","text":"a,b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":5,"literal":{"kind":"STRING","text":"x\"y"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1=true;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":6,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT false='true';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":12,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":6,"literal":{"kind":"STRING","text":"true"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1000]::utinyint[]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":8,"catalog":"","schema":"","type_name":"utinyint","children":[],"qualified_name":{"path":["utinyint"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s::int FROM cast_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":10,"schema_name":"","table_name":"cast_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cast_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'nope'::mood;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"nope"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":4,"catalog":"","schema":"","type_name":"mood","children":[],"qualified_name":{"path":["mood"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tTRY_CAST(value AS TIMESTAMP_S) IS NULL,\n\tTRY_CAST(value AS TIMESTAMP_MS) IS NULL,\n\tTRY_CAST(value AS TIMESTAMPTZ_NS) IS NULL\nFROM temporal_cast_input\nWHERE id = 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":39,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":30,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":5,"column_names":["value"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMP_S","children":[],"qualified_name":{"path":["TIMESTAMP_S"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":81,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":31,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":5,"column_names":["value"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[],"qualified_name":{"path":["TIMESTAMP_MS"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":125,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":91,"query_location_length":33,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":5,"column_names":["value"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":109,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":138,"query_location_length":19,"schema_name":"","table_name":"temporal_cast_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["temporal_cast_input"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":164,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 100000000000000000000 \u003e 99999999999999999999.99999;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":50,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":21,"literal":{"kind":"INTEGER","text":"100000000000000000000"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":26,"literal":{"kind":"NUMERIC","text":"99999999999999999999.99999"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 1e308::float;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1e308"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2147483647.1'::INTEGER, '-2147483648.1'::INTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"literal":{"kind":"STRING","text":"2147483647.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":15,"literal":{"kind":"STRING","text":"-2147483648.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '170141183460469231731687303715884105727.5'::HUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":43,"literal":{"kind":"STRING","text":"170141183460469231731687303715884105727.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '3276.7e1'::SMALLINT, '-3276.8e1'::SMALLINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"STRING","text":"3276.7e1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":11,"literal":{"kind":"STRING","text":"-3276.8e1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '922337203685477580.8e1'::BIGINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"922337203685477580.8e1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '1e-100000'::int;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":11,"literal":{"kind":"STRING","text":"1e-100000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select ('0.' || repeat('0', 65536) || '5')::BIGNUM;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":33,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"literal":{"kind":"STRING","text":"0."}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":18,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"literal":{"kind":"INTEGER","text":"65536"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"STRING","text":"5"}}}],"qualified_name":{"path":["||"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('[Hello World!]' AS VARCHAR[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":16,"literal":{"kind":"STRING","text":"[Hello World!]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('[[ [🦆, 🦆, 🦆]], [[duck, db, 🦆], [🦆]], [[🦆, duck, db]]]' AS VARCHAR[][][]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":96,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":73,"literal":{"kind":"STRING","text":"[[ [🦆, 🦆, 🦆]], [[duck, db, 🦆], [🦆]], [[🦆, duck, db]]]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST($$[\"]\", \"hello\", \"world\"]$$ AS VARCHAR[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":46,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":27,"literal":{"kind":"STRING","text":"[\"]\", \"hello\", \"world\"]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT col1::INT[] FROM null_tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["col1"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"null_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('[3],[[]' AS INT[][]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":9,"literal":{"kind":"STRING","text":"[3],[[]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('[{a:[12,13,14], b:\"🦆\", c:{a:[[a], [b, c]], b:[123]}}]' AS STRUCT(a INT[], b VARCHAR, c STRUCT(a VARCHAR[][], b INT[]))[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":130,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":58,"literal":{"kind":"STRING","text":"[{a:[12,13,14], b:\"🦆\", c:{a:[[a], [b, c]], b:[123]}}]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":60,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":83,"query_location_length":5,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":92,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":103,"query_location_length":30,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":112,"query_location_length":11,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":127,"query_location_length":5,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":127,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '[{\"bar\":\"\\\\\\\"\"}]'::STRUCT(bar VARCHAR)[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":18,"literal":{"kind":"STRING","text":"[{\"bar\":\"\\\\\\\"\"}]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":19,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"bar","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT $$[hello\\\"quoted\\\"text, more]$$::VARCHAR[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":31,"literal":{"kind":"STRING","text":"[hello\\\"quoted\\\"text, more]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT $$[\"quote at end\\\"\", \"\\\"\"]$$::VARCHAR[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"literal":{"kind":"STRING","text":"[\"quote at end\\\"\", \"\\\"\"]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT $$[\"\\\\backslash at start and end\\\\\", \"\\\\leading and trailing backslash\\\\\"]$$::VARCHAR[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":83,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":76,"literal":{"kind":"STRING","text":"[\"\\\\backslash at start and end\\\\\", \"\\\\leading and trailing backslash\\\\\"]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":85,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT $$[\" \"]$$::VARCHAR[]; -- List with whitespace string","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"STRING","text":"[\" \"]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select $$[{}]$$::VARCHAR[] a, a::VARCHAR::VARCHAR[] b, a == b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":15,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"literal":{"kind":"STRING","text":"[{}]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":40,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["b"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM '__TEST_DIR__/string_to_map_null_keys.csv' EXCEPT SELECT 'bla' AS a, MAP {} AS b;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":42,"schema_name":"","table_name":"__TEST_DIR__/string_to_map_null_keys.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["__TEST_DIR__/string_to_map_null_keys.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":62,"query_location_length":5,"literal":{"kind":"STRING","text":"bla"}},{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":74,"query_location_length":6,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT '{a:{b:DuckDB, c:12}, b:900, c:{a:\"DuckParty\"}}'::STRUCT(a STRUCT(b VARCHAR, c INT), b INT, c STRUCT(a VARCHAR));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":64,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":48,"literal":{"kind":"STRING","text":"{a:{b:DuckDB, c:12}, b:900, c:{a:\"DuckParty\"}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":62,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":66,"query_location_length":24,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"b","query_location":75,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":86,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":94,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":101,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":110,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '{key_D: \"World Hello\", key_B: [Hello, World], key_C : 5000, key_A: [[{a: 5, b: 900}, {a:3, b:34}], [{a:2, b: 0}]]}'::STRUCT(key_A STRUCT(a INT, b INT)[][], key_B VARCHAR[], key_C INT, key_D VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":123,"query_location_length":83,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":116,"literal":{"kind":"STRING","text":"{key_D: \"World Hello\", key_B: [Hello, World], key_C : 5000, key_A: [[{a: 5, b: 900}, {a:3, b:34}], [{a:2, b: 0}]]}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":125,"query_location_length":81,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"key_A","query_location":138,"query_location_length":24,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":138,"query_location_length":20,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":147,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":154,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}},{"class":"TYPE","type":"TYPE","alias":"key_B","query_location":170,"query_location_length":9,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":170,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}},{"class":"TYPE","type":"TYPE","alias":"key_C","query_location":187,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"key_D","query_location":198,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '{key_A: 2, key_C: 8}'::STRUCT(key_A INT, key_B INT, key_C FLOAT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":43,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":22,"literal":{"kind":"STRING","text":"{key_A: 2, key_C: 8}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":41,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"key_A","query_location":44,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"key_B","query_location":55,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"key_C","query_location":66,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(col AS STRUCT(a STRUCT(d INT), b DOUBLE, c VARCHAR)) FROM try_cast_tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":61,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["col"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":44,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":32,"query_location_length":13,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"d","query_location":41,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":49,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":74,"query_location_length":12,"schema_name":"","table_name":"try_cast_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["try_cast_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('{[{]}}' AS STRUCT(a VARCHAR[]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":8,"literal":{"kind":"STRING","text":"{[{]}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":19,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":33,"query_location_length":9,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::VARCHAR::STRUCT(v VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":19,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"v","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [row([4,5,6]), $$([1,2,3],)$$]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":14,"literal":{"kind":"STRING","text":"([1,2,3],)"}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {\"small\": 1, \"big\": 999999999}::MAP(VARCHAR, BIGINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":22,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"small","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"small","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"big","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"big","query_location":27,"query_location_length":9,"literal":{"kind":"INTEGER","text":"999999999"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":20,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(col AS MAP(VARCHAR, integer))\nFROM (\n SELECT CASE WHEN (i % 5 == 0) THEN NULL else {'a': i::varchar} END as col\n FROM range(1, 1001) t(i)\n)\nLIMIT 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":38,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["col"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":51,"query_location_length":110,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"col","query_location":64,"query_location_length":59,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":109,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":111,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":140,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1001"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {\n \"tinyint\": 1::TINYINT,\n \"smallint\": 2::SMALLINT, \n \"int\": 3::INT,\n \"bigint\": 4::BIGINT\n}::MAP(VARCHAR, BIGINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":110,"query_location_length":22,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":103,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"tinyint","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"tinyint","query_location":25,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}},{"name":"smallint","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"smallint","query_location":53,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}},{"name":"int","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"int","query_location":78,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"bigint","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"bigint","query_location":100,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":102,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":20,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":116,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":125,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT b::SMALLINT FROM bits;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":4,"schema_name":"","table_name":"bits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bits"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 15::BOOLEAN::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":5,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bitstring('1', 9)::TINYINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"bitstring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["bitstring"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'AAAA'::BLOB::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":5,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"AAAA"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (170141183460469231731687303715884105727)::HUGEINT::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":5,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":39,"literal":{"kind":"INTEGER","text":"170141183460469231731687303715884105727"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (255)::UTINYINT::BIT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":5,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"literal":{"kind":"INTEGER","text":"255"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0111111111101111111111111111111111111111111111111111111111111111'::BIT::DOUBLE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":66,"literal":{"kind":"STRING","text":"0111111111101111111111111111111111111111111111111111111111111111"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('false' AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":7,"literal":{"kind":"STRING","text":"false"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(CAST('0' AS tinyint) AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"tinyint","children":[],"qualified_name":{"path":["tinyint"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(CAST('0' AS decimal(9,0)) AS BOOLEAN)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":42,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":25,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bool_and(x[1]['a'] IS NULL) FROM (SELECT TRY_CAST(l AS MAP(VARCHAR, INTEGER)[]) x FROM (SELECT list({'a': [i::INT]}) l FROM range(2049) t(i)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":26,"query_location_length":7,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":20,"query_location_length":5,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":17,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["x"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}]}]}}],"qualified_name":{"path":["bool_and"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":40,"query_location_length":109,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"x","query_location":48,"query_location_length":38,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["l"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":62,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":94,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":102,"query_location_length":21,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":107,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":113,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":115,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":117,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":131,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2049"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('e1' AS DOUBLE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"literal":{"kind":"STRING","text":"e1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '{prefix}1'::INT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":11,"literal":{"kind":"STRING","text":"{prefix}1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '{prefix}0000000000000000000000000000000001111111'::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":50,"literal":{"kind":"STRING","text":"{prefix}0000000000000000000000000000000001111111"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::TINYINT::VARCHAR, 12::TINYINT::VARCHAR, (-125)::TINYINT::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-125"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0xFF'::UINT8, '0xFFFF'::UINT16, '0xFFFFFFFF'::UINT32, '0xFFFFFFFFFFFFFFFF'::UINT64","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"0xFF"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":5,"catalog":"","schema":"","type_name":"UINT8","children":[],"qualified_name":{"path":["UINT8"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":8,"literal":{"kind":"STRING","text":"0xFFFF"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":6,"catalog":"","schema":"","type_name":"UINT16","children":[],"qualified_name":{"path":["UINT16"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":12,"literal":{"kind":"STRING","text":"0xFFFFFFFF"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":6,"catalog":"","schema":"","type_name":"UINT32","children":[],"qualified_name":{"path":["UINT32"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":20,"literal":{"kind":"STRING","text":"0xFFFFFFFFFFFFFFFF"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":6,"catalog":"","schema":"","type_name":"UINT64","children":[],"qualified_name":{"path":["UINT64"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST('0x80000000' AS INT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":29,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":12,"literal":{"kind":"STRING","text":"0x80000000"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_cast(try_cast(try_cast as integer) as integer) FROM try_cast;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":50,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":29,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":8,"column_names":["try_cast"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":8,"schema_name":"","table_name":"try_cast","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["try_cast"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(TIMESTAMP_MS '2262-04-11 23:47:16.855' AS TIMESTAMPTZ_NS);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":62,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":38,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2262-04-11 23:47:16.855"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[],"qualified_name":{"path":["TIMESTAMP_MS"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tTRY_CAST(TIMESTAMP 'infinity' AS TIME) IS NULL,\n\tTRY_CAST(TIMESTAMP 'infinity' AS TIMETZ) IS NULL,\n\tTRY_CAST(TIMESTAMPTZ 'infinity' AS TIMETZ) IS NULL,\n\tTRY_CAST('infinity'::TIMESTAMP_NS AS TIME) IS NULL,\n\tTRY_CAST('infinity'::TIMESTAMP_NS AS TIME_NS) IS NULL,\n\tTRY_CAST('infinity'::TIMESTAMPTZ_NS AS TIMETZ) IS NULL,\n\tTRY_CAST(TIMESTAMPTZ '2262-04-11 23:47:16.854776+00' AS TIMESTAMP_NS) IS NULL,\n\tTRY_CAST(TIMESTAMP_MS '2262-04-11 23:47:16.855' AS TIMESTAMP_NS) IS NULL,\n\tTRY_CAST(TIMESTAMP_S '2262-04-12 00:00:00' AS TIMESTAMP_NS) IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":47,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":38,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":98,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":40,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":66,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":151,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":42,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":117,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":117,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":143,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":204,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":161,"query_location_length":42,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":180,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":170,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":182,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":198,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":260,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":214,"query_location_length":45,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":233,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":235,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":251,"query_location_length":7,"catalog":"","schema":"","type_name":"TIME_NS","children":[],"qualified_name":{"path":["TIME_NS"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":317,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":270,"query_location_length":46,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":289,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":279,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":291,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":309,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":397,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":327,"query_location_length":69,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":336,"query_location_length":43,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2262-04-11 23:47:16.854776+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":336,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":383,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":472,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":407,"query_location_length":64,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":416,"query_location_length":38,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2262-04-11 23:47:16.855"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":416,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[],"qualified_name":{"path":["TIMESTAMP_MS"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":458,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":542,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":482,"query_location_length":59,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":491,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2262-04-12 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":491,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMP_S","children":[],"qualified_name":{"path":["TIMESTAMP_S"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":528,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tCAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS),\n\tCAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS),\n\tTRY_CAST(TIMESTAMPTZ 'infinity' AS TIMESTAMPTZ_NS),\n\tTRY_CAST(TIMESTAMPTZ '-infinity' AS TIMESTAMPTZ_NS);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":46,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":47,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"-infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":62,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":107,"query_location_length":50,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":116,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":116,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":142,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":160,"query_location_length":51,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":169,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"-infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":169,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":196,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT union_tag(union_value(a := 42)::UNION(a VARIANT, b INTEGER));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":60,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":20,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["union_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":58,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["UNION"]}}}}],"qualified_name":{"path":["union_tag"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM abc; -- error: which table did I mean?","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"abc","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["abc"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT structs.S.i.K, \"STRUCTS\".\"S\".\"I\".\"K\", \"structs\".\"s\".\"i\".\"k\" FROM structs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["structs","S","i","K"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":21,"column_names":["STRUCTS","S","I","K"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":21,"column_names":["structs","s","i","k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":7,"schema_name":"","table_name":"structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM a FULL OUTER JOIN b USING (hello)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":31,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["hello"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM a NATURAL FULL OUTER JOIN b NATURAL FULL OUTER JOIN c NATURAL FULL OUTER JOIN d NATURAL FULL OUTER JOIN e","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":94,"query_location_length":25,"left":{"type":"JOIN","alias":"","sample":null,"query_location":68,"query_location_length":25,"left":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":25,"left":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":25,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":null,"join_type":"FULL","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":66,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":null,"join_type":"FULL","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"condition":null,"join_type":"FULL","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":118,"query_location_length":1,"schema_name":"","table_name":"e","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["e"]}},"condition":null,"join_type":"FULL","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select comment from duckdb_columns() where column_name='test_view_column';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["comment"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_columns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_columns"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":18,"literal":{"kind":"STRING","text":"test_view_column"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select comment from duckdb_functions() where function_name='test_table_macro';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["comment"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_functions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_functions"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":13,"column_names":["function_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":18,"literal":{"kind":"STRING","text":"test_table_macro"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select comment from duckdb_views() where view_name='b';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["comment"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_views","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_views"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":41,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":9,"column_names":["view_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ddb.comment, pg.description\nFROM duckdb_columns AS ddb\nLEFT JOIN pg_description AS pg\n ON pg.classoid=ddb.database_oid AND pg.objoid=ddb.table_oid\nWHERE pg.objsubid=1 AND ddb.table_name='test_view'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["ddb","comment"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":14,"column_names":["pg","description"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":62,"query_location_length":94,"left":{"type":"BASE_TABLE","alias":"ddb","sample":null,"query_location":40,"query_location_length":21,"schema_name":"","table_name":"duckdb_columns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_columns"]}},"right":{"type":"BASE_TABLE","alias":"pg","sample":null,"query_location":72,"query_location_length":20,"schema_name":"","table_name":"pg_description","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_description"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":100,"query_location_length":56,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":11,"column_names":["pg","classoid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":16,"column_names":["ddb","database_oid"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":133,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":9,"column_names":["pg","objoid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":13,"column_names":["ddb","table_oid"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":163,"query_location_length":44,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":163,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":11,"column_names":["pg","objsubid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":181,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":14,"column_names":["ddb","table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":196,"query_location_length":11,"literal":{"kind":"STRING","text":"test_view"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM idx.terms","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"idx","table_name":"terms","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["idx","terms"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM helloo;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"helloo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["helloo"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT min_from_tbl(integers2, i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"min_from_tbl","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":9,"column_names":["integers2"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min_from_tbl"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from m(a := 'b', b := 'a')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":31,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["m"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM query('SELECT 42;;;--- hello;');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":24,"literal":{"kind":"STRING","text":"SELECT 42;;;--- hello;"}}}],"qualified_name":{"path":["query"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM query_table(NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query_table","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["query_table"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT f.x FROM query_table('tbl_int') as f(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["f","x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"f","sample":null,"query_location":16,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query_table","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":9,"literal":{"kind":"STRING","text":"tbl_int"}}}],"qualified_name":{"path":["query_table"]}},"column_name_alias":["x"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT my_extract({'a': {'b': 42}})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"my_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":24,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["my_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT triple_add1(1, 2, 3, 4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"triple_add1","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["triple_add1"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT plus42(a) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"plus42","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["plus42"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select f(x:=a) from (select 41) t(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"f","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":12,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["f"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":20,"query_location_length":11,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"41"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select arithmetic(100, 200, 300)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"arithmetic","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"INTEGER","text":"300"}}}],"qualified_name":{"path":["arithmetic"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT pg_typeof(#1) FROM (SELECT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"pg_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":17,"query_location_length":2,"index":1}}],"qualified_name":{"path":["pg_typeof"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":26,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select m(0, 42)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["m"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"from m(s := 'ab')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"s","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"s","query_location":12,"query_location_length":4,"literal":{"kind":"STRING","text":"ab"}}}],"qualified_name":{"path":["m"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT having_macro(1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"having_macro","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["having_macro"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT IFELSE(1,'true','false')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"ifelse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":6,"literal":{"kind":"STRING","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":7,"literal":{"kind":"STRING","text":"false"}}}],"qualified_name":{"path":["ifelse"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT weird_avg(a) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"weird_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["weird_avg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT my_macro(x := 42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"my_macro","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["my_macro"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"(SELECT* FROM xt(1, 'tom') EXCEPT SELECT* FROM xt(20,'tom' )) INTERSECT SELECT* FROM xt(100,'harry');","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":false,"children":[{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"xt","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"literal":{"kind":"STRING","text":"tom"}}}],"qualified_name":{"path":["xt"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":40,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":47,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"xt","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":5,"literal":{"kind":"STRING","text":"tom"}}}],"qualified_name":{"path":["xt"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":78,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":85,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"xt","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":7,"literal":{"kind":"STRING","text":"harry"}}}],"qualified_name":{"path":["xt"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT * FROM card_select(_name:='king', _val_max:=13) ORDER BY suit;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":4,"column_names":["suit"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":15,"query_location_length":40,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"card_select","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"_name","query_location":34,"query_location_length":6,"literal":{"kind":"STRING","text":"king"}}},{"name":"_val_max","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"_val_max","query_location":52,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}}],"qualified_name":{"path":["card_select"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from dates_between('2021-01-01', '2021-02-04');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"dates_between","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":12,"literal":{"kind":"STRING","text":"2021-01-01"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":12,"literal":{"kind":"STRING","text":"2021-02-04"}}}],"qualified_name":{"path":["dates_between"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT my_sum(i) FILTER (WHERE i \u003e 3) OVER () FROM range(10) t(i) LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":38,"function_name":"my_sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":31,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["my_sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":51,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT p.oid = c.parent_schema_oid\nFROM duckdb_schemas() c, duckdb_schemas() p\nWHERE c.schema_name = 'child' AND p.schema_name = 's1' AND p.database_name = 'memory';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["p","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":19,"column_names":["c","parent_schema_oid"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":43,"left":{"type":"TABLE_FUNCTION","alias":"c","sample":null,"query_location":40,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_schemas"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"p","sample":null,"query_location":60,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_schemas"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":85,"query_location_length":79,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":13,"column_names":["c","schema_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":7,"literal":{"kind":"STRING","text":"child"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":113,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":13,"column_names":["p","schema_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":4,"literal":{"kind":"STRING","text":"s1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":138,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":15,"column_names":["p","database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":8,"literal":{"kind":"STRING","text":"memory"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM memory.s1.s2.s3.s4.v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":20,"schema_name":"s4","table_name":"v","column_name_alias":[],"catalog_name":"memory","at_clause":null,"qualified_name":{"path":["memory","s1","s2","s3","s4","v"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_schemas() WHERE database_name = 'memory' AND schema_name = 'child' AND parent_schema = 's2';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_schemas"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":44,"query_location_length":75,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":44,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":8,"literal":{"kind":"STRING","text":"memory"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":11,"column_names":["schema_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":7,"literal":{"kind":"STRING","text":"child"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":99,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":13,"column_names":["parent_schema"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":4,"literal":{"kind":"STRING","text":"s2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM s1.s2.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"s2","table_name":"t","column_name_alias":[],"catalog_name":"s1","at_clause":null,"qualified_name":{"path":["s1","s2","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT schema_name, view_name FROM duckdb_views() WHERE view_name = 'v';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["schema_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":9,"column_names":["view_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_views","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_views"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":9,"column_names":["view_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":3,"literal":{"kind":"STRING","text":"v"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT schema_name, type_name FROM duckdb_types() WHERE type_name = 'mood';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["schema_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":9,"column_names":["type_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":9,"column_names":["type_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":6,"literal":{"kind":"STRING","text":"mood"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_types() WHERE type_name = 'mood';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":9,"column_names":["type_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":6,"literal":{"kind":"STRING","text":"mood"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_text('{TEST_DIR}/nested_export/schema.sql') WHERE content LIKE '%CREATE SCHEMA s1.s2.s3;%';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":37,"literal":{"kind":"STRING","text":"{TEST_DIR}/nested_export/schema.sql"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":32,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":27,"literal":{"kind":"STRING","text":"%CREATE SCHEMA s1.s2.s3;%"}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT database_name, schema_name FROM duckdb_views() WHERE view_name = 'v';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":11,"column_names":["schema_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_views","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_views"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":9,"column_names":["view_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"v"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT database_name, schema_name, table_name FROM duckdb_tables() WHERE table_name = 'tt';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":11,"column_names":["schema_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":10,"column_names":["table_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":51,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_tables","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_tables"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"literal":{"kind":"STRING","text":"tt"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT memory.s1.s2.tbl.s.a FROM s1.s2.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":20,"column_names":["memory","s1","s2","tbl","s","a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":9,"schema_name":"s2","table_name":"tbl","column_name_alias":[],"catalog_name":"s1","at_clause":null,"qualified_name":{"path":["s1","s2","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.i FROM s1.s2.tbl AS t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["t","i"]}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":16,"query_location_length":14,"schema_name":"s2","table_name":"tbl","column_name_alias":[],"catalog_name":"s1","at_clause":null,"qualified_name":{"path":["s1","s2","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(i) FROM parent.child.big;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":16,"schema_name":"child","table_name":"big","column_name_alias":[],"catalog_name":"parent","at_clause":null,"qualified_name":{"path":["parent","child","big"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(i) FROM parent.child.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":14,"schema_name":"child","table_name":"t","column_name_alias":[],"catalog_name":"parent","at_clause":null,"qualified_name":{"path":["parent","child","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_functions() WHERE function_name IN ('double', 'tm');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_functions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_functions"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":63,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":13,"column_names":["function_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":8,"literal":{"kind":"STRING","text":"double"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"literal":{"kind":"STRING","text":"tm"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT max(nextval('{db}.seq_incr')), min(nextval('{db}.seq_desc')), max(nextval('{db}.seq_cycle')) FROM range(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":24,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":15,"literal":{"kind":"STRING","text":"{db}.seq_incr"}}}],"qualified_name":{"path":["nextval"]}}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":29,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":24,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":15,"literal":{"kind":"STRING","text":"{db}.seq_desc"}}}],"qualified_name":{"path":["nextval"]}}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":30,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":25,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":16,"literal":{"kind":"STRING","text":"{db}.seq_cycle"}}}],"qualified_name":{"path":["nextval"]}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":105,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT nextval('seq3') from generate_series(0,20);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"literal":{"kind":"STRING","text":"seq3"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT setval('myseq', 42, false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"setval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"literal":{"kind":"STRING","text":"myseq"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"qualified_name":{"path":["setval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT setval(NULL, 42, true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"setval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["setval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('persisted_seq');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":15,"literal":{"kind":"STRING","text":"persisted_seq"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT nextval('\"seq\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"literal":{"kind":"STRING","text":"\"seq\""}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select currval('fresh');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"literal":{"kind":"STRING","text":"fresh"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v, a FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM db2.main.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":12,"schema_name":"main","table_name":"tbl","column_name_alias":[],"catalog_name":"db2","at_clause":null,"qualified_name":{"path":["db2","main","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test_catalog.missing_schema.missing_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":41,"schema_name":"missing_schema","table_name":"missing_table","column_name_alias":[],"catalog_name":"test_catalog","at_clause":null,"qualified_name":{"path":["test_catalog","missing_schema","missing_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM memory.main.test_temp_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":27,"schema_name":"main","table_name":"test_temp_table","column_name_alias":[],"catalog_name":"memory","at_clause":null,"qualified_name":{"path":["memory","main","test_temp_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM out_of_path.oop_view;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":20,"schema_name":"out_of_path","table_name":"oop_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["out_of_path","oop_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT main.nextval('main_sequence');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"nextval","schema":"main","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":15,"literal":{"kind":"STRING","text":"main_sequence"}}}],"qualified_name":{"path":["main","nextval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT in_main FROM table_with_same_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["in_main"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":20,"schema_name":"","table_name":"table_with_same_name","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table_with_same_name"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * from v1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM v1 ORDER BY i DESC LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sql FROM duckdb_views() WHERE view_name = 'rv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["sql"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":16,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_views","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_views"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":37,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":9,"column_names":["view_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":4,"literal":{"kind":"STRING","text":"rv"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from v1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(DISTINCT s COLLATE NOCASE) FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":22,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]},"collation":"NOCASE"}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('collation_sequence');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":20,"literal":{"kind":"STRING","text":"collation_sequence"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list(DISTINCT s COLLATE de ORDER BY s COLLATE de),\n string_agg(DISTINCT s COLLATE de, ',' ORDER BY s COLLATE de)\nFROM (VALUES ('GÖTHE'), ('Z'), ('GÖTHE')) t(s);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":43,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["s"]},"collation":"de"}}]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":21,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]},"collation":"de"}}],"qualified_name":{"path":["list"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":60,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":112,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["s"]},"collation":"de"}}]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":85,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["s"]},"collation":"de"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":131,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":8,"literal":{"kind":"STRING","text":"GÖTHE"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":3,"literal":{"kind":"STRING","text":"Z"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":8,"literal":{"kind":"STRING","text":"GÖTHE"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'a' NOT LIKE 'A' COLLATE NOCASE","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":23,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":20,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}},"collation":"NOCASE"}}],"qualified_name":{"path":["!~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'öX' COLLATE NOACCENT NOT ILIKE 'Ö%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":11,"function_name":"!~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"öX"}},"collation":"NOACCENT"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":5,"literal":{"kind":"STRING","text":"Ö%"}}}],"qualified_name":{"path":["!~~*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 'b' COLLATE NOCASE} != {'x': 'B'}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":39,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"COLLATE","type":"COLLATE","alias":"x","query_location":13,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}},"collation":"NOCASE"}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":10,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":42,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': {'y': {'z': 'HELLO' COLLATE NOCASE}}} = {'x': {'y': {'z': 'hello'}}}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":74,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":13,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":19,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"z","expression":{"class":"COLLATE","type":"COLLATE","alias":"z","query_location":25,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":7,"literal":{"kind":"STRING","text":"HELLO"}},"collation":"NOCASE"}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":28,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":59,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":65,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"z","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"z","query_location":71,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n creditCard_number as \"pk\", CustomerTable.pk AS inner_pk\nfrom\n CreditCardTable JOIN CustomerTable USING (id)\norder by\n \"pk\" COLLATE NOCASE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":129,"query_location_length":19,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":4,"column_names":["pk"]},"collation":"NOCASE"}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"pk","query_location":9,"query_location_length":17,"column_names":["creditCard_number"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"inner_pk","query_location":36,"query_location_length":16,"column_names":["CustomerTable","pk"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":88,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":15,"schema_name":"","table_name":"CreditCardTable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["CreditCardTable"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":93,"query_location_length":13,"schema_name":"","table_name":"CustomerTable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["CustomerTable"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["id"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s1 COLLATE de = 'x' COLLATE de FROM t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":30,"left":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":13,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["s1"]},"collation":"de"},"right":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":23,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}},"collation":"de"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT icu_sort_key(chr(19969), 'en')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"icu_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":10,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":5,"literal":{"kind":"INTEGER","text":"19969"}}}],"qualified_name":{"path":["chr"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"STRING","text":"en"}}}],"qualified_name":{"path":["icu_sort_key"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT icu_sort_key('-', 'th')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"icu_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"STRING","text":"th"}}}],"qualified_name":{"path":["icu_sort_key"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(DISTINCT s COLLATE NOCASE), count(DISTINCT s)\nFROM strings WHERE false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":22,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]},"collation":"NOCASE"}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select reverse(a collate de) from tbl order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":15,"query_location_length":12,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["a"]},"collation":"de"}}],"qualified_name":{"path":["reverse"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM collate_test WHERE 'mórritz' BETWEEN s AND t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"collate_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collate_test"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":51,"query_location_length":15,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":10,"literal":{"kind":"STRING","text":"mórritz"}},"lower":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["s"]},"upper":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["t"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM collate_test WHERE s='hello' COLLATE NOCASE","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"collate_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collate_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["s"]},"right":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":35,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}},"collation":"NOCASE"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains(['héllo', 'world'], 'HELLO' COLLATE NOACCENT.NOCASE)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":8,"literal":{"kind":"STRING","text":"héllo"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":7,"literal":{"kind":"STRING","text":"world"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":42,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":7,"literal":{"kind":"STRING","text":"HELLO"}},"collation":"NOACCENT.NOCASE"}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains([{'x': 'héllo'}], {'x': 'HELLO' COLLATE NOACCENT.NOCASE})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":72,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":28,"query_location_length":8,"literal":{"kind":"STRING","text":"héllo"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"COLLATE","type":"COLLATE","alias":"x","query_location":46,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":7,"literal":{"kind":"STRING","text":"HELLO"}},"collation":"NOACCENT.NOCASE"}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains([('HELLO', 'é')], ('hello' COLLATE NOCASE, 'e' COLLATE NOACCENT))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":80,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":15,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":7,"literal":{"kind":"STRING","text":"HELLO"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"STRING","text":"é"}}}],"qualified_name":{"path":["row"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":46,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":41,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}},"collation":"NOCASE"}},{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":65,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}},"collation":"NOACCENT"}}],"qualified_name":{"path":["row"]}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::VARCHAR[2] GROUP BY NULL::VARCHAR[2];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":12,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":12,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::INTERVAL = ANY (SELECT INTERVAL 1 DAY);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":44,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s FROM collate_test ORDER BY s COLLATE NOCASE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":36,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["s"]},"collation":"NOCASE"}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"collate_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collate_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select trim(b collate noaccent, '\u003c\u003e') from tbl order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":12,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["b"]},"collation":"noaccent"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"STRING","text":"\u003c\u003e"}}}],"qualified_name":{"path":["trim"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM collate_test WHERE s='hEllô'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"collate_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collate_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":8,"literal":{"kind":"STRING","text":"hEllô"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select icu_sort_key('æ', 'icu_noaccent');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"icu_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"literal":{"kind":"STRING","text":"æ"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":14,"literal":{"kind":"STRING","text":"icu_noaccent"}}}],"qualified_name":{"path":["icu_sort_key"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strpos('HELLO' COLLATE NOCASE, 'el')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"strpos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":14,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"literal":{"kind":"STRING","text":"HELLO"}},"collation":"NOCASE"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"STRING","text":"el"}}}],"qualified_name":{"path":["strpos"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strpos('HELLO WORLD' COLLATE NOCASE, 'o w')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"strpos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":14,"query_location_length":28,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":13,"literal":{"kind":"STRING","text":"HELLO WORLD"}},"collation":"NOCASE"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"literal":{"kind":"STRING","text":"o w"}}}],"qualified_name":{"path":["strpos"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strpos('HÉLLO' COLLATE NOCASE, 'éll')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"strpos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":14,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":8,"literal":{"kind":"STRING","text":"HÉLLO"}},"collation":"NOCASE"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":6,"literal":{"kind":"STRING","text":"éll"}}}],"qualified_name":{"path":["strpos"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 7;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT constraint_text\nFROM duckdb_constraints()\nWHERE table_name = 'george'\n AND constraint_type = 'FOREIGN KEY';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":15,"column_names":["constraint_text"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_constraints","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_constraints"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":59,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":8,"literal":{"kind":"STRING","text":"george"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":15,"column_names":["constraint_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":13,"literal":{"kind":"STRING","text":"FOREIGN KEY"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM album ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"album","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["album"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_name, column_default, is_nullable FROM duckdb_columns() WHERE table_name = 't' ORDER BY column_index;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":12,"column_names":["column_index"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":14,"column_names":["column_default"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":11,"column_names":["is_nullable"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":53,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_columns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_columns"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":76,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"STRING","text":"t"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_parquet('{TEST_DIR}/async_lifecycle_per_thread/*.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":49,"literal":{"kind":"STRING","text":"{TEST_DIR}/async_lifecycle_per_thread/*.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT replace(content, chr(10), '|') FROM read_text('{TEST_DIR}/copy_csv_user_column_{conversion}.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}],"qualified_name":{"path":["replace"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":43,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":50,"literal":{"kind":"STRING","text":"{TEST_DIR}/copy_csv_user_column_{conversion}.csv"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT p FROM read_parquet('{TEST_DIR}/copy_order_by_subquery.parquet', file_row_number = true) ORDER BY file_row_number","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":15,"column_names":["file_row_number"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["p"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":81,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":43,"literal":{"kind":"STRING","text":"{TEST_DIR}/copy_order_by_subquery.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":15,"column_names":["file_row_number"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT columns, comment FROM sniff_csv('{TEST_DIR}/test.csv', null_padding = true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["columns"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["comment"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":53,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":21,"literal":{"kind":"STRING","text":"{TEST_DIR}/test.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_csv_auto( ['{DATA_DIR}/csv/error/mismatch/half1.csv', '{DATA_DIR}/csv/error/mismatch/half2.csv'], ignore_errors=true, sample_size=1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":137,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":86,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/mismatch/half1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/mismatch/half2.csv"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":124,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":144,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_3.csv', names=['a','b','c','d'], store_rejects=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":91,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":36,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_3.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":5,"column_names":["names"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":3,"literal":{"kind":"STRING","text":"d"}}}],"qualified_name":{"path":["list_value"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_15.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_15.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_27.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_27.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_39.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_39.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_51.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', '|':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_51.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"|","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"|","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_63.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_63.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_75.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_75.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":115,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3977/case_87.csv', auto_detect=false, buffer_size=42, columns={'a2.0-22222222222222222.0222-\u003e\u003e':'VARCHAR'}, delim=';', rejects_table='\"', strict_mode=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":184,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3977/case_87.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a2.0-22222222222222222.0222-\u003e\u003e","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a2.0-22222222222222222.0222-\u003e\u003e","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/4793/crashes/case_1.csv', auto_detect=false, buffer_size=42, columns={'a':'INTEGER','b':'INTEGER', 'c':'VARCHAR'}, delim=';', escape='\"', quote='\"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":177,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/4793/crashes/case_1.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":108,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":122,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":137,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":149,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":160,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(bignumber), typeof(bignumber::DECIMAL(25,3)) FROM read_csv('{DATA_DIR}/csv/big_number.csv', COLUMNS={'bignumber': 'DECIMAL(25,3)'}, QUOTE='\"', DELIM=',');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":9,"column_names":["bignumber"]}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":32,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":9,"column_names":["bignumber"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":2,"literal":{"kind":"INTEGER","text":"25"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":64,"query_location_length":103,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":31,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/big_number.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":7,"column_names":["COLUMNS"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":114,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"bignumber","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"bignumber","query_location":128,"query_location_length":15,"literal":{"kind":"STRING","text":"DECIMAL(25,3)"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":146,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":5,"column_names":["QUOTE"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":157,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":5,"column_names":["DELIM"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(#3) from read_csv_auto('{DATA_DIR}/csv/test/multi_column_string.csv', COLUMN_TYPES=STRUCT_PACK( column2 := 'HUGEINT')) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":14,"query_location_length":2,"index":3}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":110,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":45,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/test/multi_column_string.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":47,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":12,"column_names":["COLUMN_TYPES"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":34,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column2","query_location":122,"query_location_length":9,"literal":{"kind":"STRING","text":"HUGEINT"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"(FROM movie_info EXCEPT FROM movie_info2)\nUNION ALL\n(FROM movie_info2 EXCEPT FROM movie_info)","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":6,"query_location_length":10,"schema_name":"","table_name":"movie_info","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["movie_info"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":11,"schema_name":"","table_name":"movie_info2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["movie_info2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":11,"schema_name":"","table_name":"movie_info2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["movie_info2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":10,"schema_name":"","table_name":"movie_info","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["movie_info"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}]},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/nullterm.csv', quote = '\"', escape = '\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":29,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/nullterm.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"describe from '{DATA_DIR}/csv/double_quoted_header.csv';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":41,"schema_name":"","table_name":"{DATA_DIR}/csv/double_quoted_header.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/double_quoted_header.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column0, column1 FROM test ORDER BY column0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":7,"column_names":["column0"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["column0"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["column1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT allo, teost, _ FROM test ORDER BY allo;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":4,"column_names":["allo"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["allo"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["teost"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["_"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv_auto ('{TEST_DIR}/csv_file.csv', auto_type_candidates=['BIGINT', 'DOUBLE', 'VARCHAR']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":95,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/csv_file.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":20,"column_names":["auto_type_candidates"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":31,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["list_value"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(column0), typeof(column1), typeof(column2) FROM read_csv_auto ('{TEST_DIR}/csv_file.csv', auto_type_candidates=['SMALLINT','BIGINT', 'DOUBLE', 'FLOAT','VARCHAR']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":7,"column_names":["column0"]}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":7,"column_names":["column1"]}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":7,"column_names":["column2"]}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":62,"query_location_length":114,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/csv_file.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":104,"query_location_length":71,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":20,"column_names":["auto_type_candidates"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":125,"query_location_length":50,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":10,"literal":{"kind":"STRING","text":"SMALLINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":7,"literal":{"kind":"STRING","text":"FLOAT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["list_value"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, b, t, tf, d, df FROM test ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["t"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["tf"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["d"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":2,"column_names":["df"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * from read_csv_auto('{DATA_DIR}/csv/escape.csv', escape=']', header = 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":27,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/escape.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":3,"literal":{"kind":"STRING","text":"]"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_name, column_type\nFROM (\n\tDESCRIBE SELECT *\n\tFROM read_csv(\n\t\t['{TEST_DIR}/scanner_schema_1.csv', '{TEST_DIR}/scanner_schema_2.csv'],\n\t\tnull_padding = true,\n\t\tfiles_to_sniff = -1\n\t)\n)\nORDER BY column_name","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":207,"query_location_length":11,"column_names":["column_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":37,"query_location_length":160,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":56,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":64,"query_location_length":131,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":70,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":33,"literal":{"kind":"STRING","text":"{TEST_DIR}/scanner_schema_1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":33,"literal":{"kind":"STRING","text":"{TEST_DIR}/scanner_schema_2.csv"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":150,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":173,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":14,"column_names":["files_to_sniff"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"from read_csv('{DATA_DIR}/csv/test/invalid_utf_quoted.csv',columns = {'col1': 'VARCHAR','col2': 'VARCHAR','col3': 'VARCHAR'}, auto_detect=false, header = 0, delim = ',', quote = '\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":177,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/test/invalid_utf_quoted.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":59,"query_location_length":65,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":55,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"col1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":78,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"col2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":96,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"col3","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col3","query_location":114,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":126,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":145,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":157,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":170,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_csv_auto('{DATA_DIR}/csv/empty.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":26,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/empty.csv"}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_csv('{TEST_DIR}/comment_roundtrip.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":44,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":34,"literal":{"kind":"STRING","text":"{TEST_DIR}/comment_roundtrip.csv"}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT commas, periods FROM decimal_separators3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["commas"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["periods"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":19,"schema_name":"","table_name":"decimal_separators3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["decimal_separators3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_csv_auto('{DATA_DIR}/csv/real/ontime_sample.csv', dtypes={'Quarter': 42}) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":78,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":39,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/real/ontime_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":6,"column_names":["dtypes"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"Quarter","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"Quarter","query_location":88,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(a), typeof(b), typeof(c)\nFROM read_csv_auto('{TEST_DIR}/ubn*.csv', UNION_BY_NAME=TRUE, dtypes={'xxx': TINYINT})\nLIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":45,"query_location_length":81,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":21,"literal":{"kind":"STRING","text":"{TEST_DIR}/ubn*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":13,"column_names":["UNION_BY_NAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":6,"column_names":["dtypes"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"xxx","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"xxx","query_location":117,"query_location_length":7,"column_names":["TINYINT"]}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/test/date.csv', columns = {'d': 'DATE'});","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":30,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/test/date.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":71,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select id, value, CAST(part AS INT) as part_cast, CAST(date AS DATE) as date_cast from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/types/*/*/test.csv', HIVE_PARTITIONING=1) where part_cast \u003e 0 and part_cast \u003c 5000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["value"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"part_cast","query_location":18,"query_location_length":17,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":4,"column_names":["part"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"date_cast","query_location":50,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["date"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":87,"query_location_length":89,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":53,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/hive-partitioning/types/*/*/test.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":156,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":183,"query_location_length":34,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":183,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":183,"query_location_length":9,"column_names":["part_cast"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":201,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":201,"query_location_length":9,"column_names":["part_cast"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5000"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select filename.replace('\\', '/').split('/')[-2] from read_csv_auto('{DATA_DIR}/csv/hive-partitioning/simple/*/*/test.csv', HIVE_PARTITIONING=1, FILENAME=1) order by 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":44,"query_location_length":4,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":10,"function_name":"split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"replace","schema":"filename","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["filename","replace"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["split"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":54,"query_location_length":103,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":54,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/hive-partitioning/simple/*/*/test.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":124,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":146,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers_load","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"","table_name":"integers_load","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers_load"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select column00, column01, column02, column03 from read_csv_auto('{DATA_DIR}/csv/real/lineitem_sample.csv', names=[]) LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["column00"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["column01"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":8,"column_names":["column02"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":8,"column_names":["column03"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":51,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/real/lineitem_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":108,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":5,"column_names":["names"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":114,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/header.csv', names = ['a'], header = false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":68,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":27,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/header.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":5,"column_names":["names"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_value"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_csv('{DATA_DIR}/csv/nul_field_start.csv', columns={'a': 'VARCHAR', 'b': 'VARCHAR', 'c': 'VARCHAR'}, quote='', escape='', header=false) where a \u003c\u003e 'aaaa'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":139,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":36,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/nul_field_start.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":56,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":48,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":75,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":91,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":107,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":119,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":129,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":140,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":160,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":6,"literal":{"kind":"STRING","text":"aaaa"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/null/multiple_nulls.csv', auto_detect=false, delim=',', quote='\"', escape='\"', skip=0, header=true, columns={'name': 'VARCHAR', 'age': 'VARCHAR', 'height': 'VARCHAR'}, nullstr = NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":209,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":40,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/null/multiple_nulls.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":86,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":118,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":131,"query_location_length":66,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":139,"query_location_length":58,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":148,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":166,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"height","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"height","query_location":187,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":199,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":7,"column_names":["nullstr"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":209,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/null/multiple_nulls.csv', auto_detect=false, delim=',', quote='\"', escape='\"', skip=0, header=true, columns={'name': 'VARCHAR', 'age': 'VARCHAR', 'height': 'VARCHAR'}, nullstr = ['','none','null'], force_not_null = ['dont_exist']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":256,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":40,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/null/multiple_nulls.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":86,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":118,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":131,"query_location_length":66,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":139,"query_location_length":58,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":148,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":166,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"height","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"height","query_location":187,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":199,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":7,"column_names":["nullstr"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":209,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":210,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":6,"literal":{"kind":"STRING","text":"none"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":220,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}}],"qualified_name":{"path":["list_value"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":229,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":229,"query_location_length":14,"column_names":["force_not_null"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":246,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":247,"query_location_length":12,"literal":{"kind":"STRING","text":"dont_exist"}}}],"qualified_name":{"path":["list_value"]}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM sniff_csv('{DATA_DIR}/csv/14512.csv', names := [NULL]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":26,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/14512.csv"}}},{"name":"names","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"names","query_location":52,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/glob/a?/a*.csv') ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":31,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/glob/a?/a*.csv"}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM glob('{DATA_DIR}\\csv\\glob\\*\\*.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":35,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":29,"literal":{"kind":"STRING","text":"{DATA_DIR}\\csv\\glob\\*\\*.csv"}}}],"qualified_name":{"path":["glob"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv_auto([]::INT[]) ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":7,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv_auto('{DATA_DIR}/csv/issue6764.csv', all_varchar=true, skip=1, null_padding=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":90,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":30,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/issue6764.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":11,"column_names":["all_varchar"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/multidelimiter/aa_delim_small.csv', delim = 'aa', header = False, buffer_size = 8)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":108,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":50,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/multidelimiter/aa_delim_small.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"literal":{"kind":"STRING","text":"aa"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM read_csv('{DATA_DIR}/csv/nullpadding_commas.csv', sep=',', columns={'a': INT, 'b': INT, 'c': INT, 'd': INT}, ignore_errors=True, null_padding=False)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":149,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":39,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/nullpadding_commas.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":3,"column_names":["sep"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":48,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":40,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":95,"query_location_length":3,"column_names":["INT"]}},{"name":"b","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":105,"query_location_length":3,"column_names":["INT"]}},{"name":"c","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c","query_location":115,"query_location_length":3,"column_names":["INT"]}},{"name":"d","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"d","query_location":125,"query_location_length":3,"column_names":["INT"]}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":131,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":151,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(a) FROM read_csv('{DATA_DIR}/csv/test/multi_column_integer_rn.csv', COLUMNS=STRUCT_PACK(a := 'INTEGER', b := 'INTEGER', c := 'INTEGER'), auto_detect='true', delim = '|', buffer_size=30)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":178,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":49,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/test/multi_column_integer_rn.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":67,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":7,"column_names":["COLUMNS"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":59,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":105,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":121,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":137,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":149,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":6,"literal":{"kind":"STRING","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":182,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":194,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE a WHEN 42 THEN 100 WHEN 43 THEN 200 ELSE 300 END FROM exprtest","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":53,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":3,"literal":{"kind":"INTEGER","text":"300"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":66,"query_location_length":8,"schema_name":"","table_name":"exprtest","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["exprtest"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_csv_auto('{DATA_DIR}/csv/auto/test_single_column_rn.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":47,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/auto/test_single_column_rn.csv"}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_csv_auto('{DATA_DIR}/csv/null_string.csv', header = false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":32,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/null_string.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/error/quotednewlines.csv', parallel=true, sep=',', quote='\"', buffer_size=100, columns={'h1': varchar, 'h2': varchar}, header=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":156,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/quotednewlines.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":8,"column_names":["parallel"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":3,"column_names":["sep"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":101,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":118,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":126,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"h1","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"h1","query_location":133,"query_location_length":7,"column_names":["varchar"]}},{"name":"h2","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"h2","query_location":148,"query_location_length":7,"column_names":["varchar"]}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":158,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":158,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), count(DISTINCT id) FROM read_csv('{TEST_DIR}/rrrn_mid.csv',\n auto_detect=false, header=true, delim=',', columns={'id':'BIGINT','val':'VARCHAR'},\n strict_mode=false, ignore_errors=true, buffer_size=4096, max_line_size=2048, parallel=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":18,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":2,"column_names":["id"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":219,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/rrrn_mid.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":113,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":124,"query_location_length":39,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":132,"query_location_length":31,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"id","query_location":138,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"val","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"val","query_location":153,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":188,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":202,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":208,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":208,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":220,"query_location_length":4,"literal":{"kind":"INTEGER","text":"4096"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":226,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":226,"query_location_length":13,"column_names":["max_line_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":240,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":246,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":246,"query_location_length":8,"column_names":["parallel"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":255,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(i) FROM read_csv('{TEST_DIR}/csv_ra_single.csv', buffer_size=65536)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":59,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":30,"literal":{"kind":"STRING","text":"{TEST_DIR}/csv_ra_single.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":5,"literal":{"kind":"INTEGER","text":"65536"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_single_csv_file('data/csv/tpcds_14.csv', skip=2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":53,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_single_csv_file","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":23,"literal":{"kind":"STRING","text":"data/csv/tpcds_14.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}}],"qualified_name":{"path":["read_single_csv_file"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(filename) FROM read_csv('data/csv/error/mismatch/*.csv', ignore_errors=true, filename=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":76,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":31,"literal":{"kind":"STRING","text":"data/csv/error/mismatch/*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_type FROM (DESCRIBE SELECT * FROM read_csv('{TEST_DIR}/sniff_*.csv', files_to_sniff=-1)) WHERE column_name='a'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":24,"query_location_length":78,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":41,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":48,"query_location_length":53,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":24,"literal":{"kind":"STRING","text":"{TEST_DIR}/sniff_*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":14,"column_names":["files_to_sniff"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":109,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv(\n '{DATA_DIR}/csv/rejects/incorrect_columns/many_columns.csv',\n columns = {'a': 'INTEGER', 'b': 'INTEGER', 'c': 'INTEGER', 'd': 'INTEGER'},\n store_rejects=true, auto_detect=false, header = 1, strict_mode=True);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":227,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":59,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/rejects/incorrect_columns/many_columns.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":93,"query_location_length":74,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":64,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":109,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":125,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":141,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":157,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":173,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":193,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":193,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":212,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":212,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":224,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":236,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT table_name FROM information_schema.tables\nWHERE table_name IN ('foo_bar', 'baz', 'foo', 'bar_baz') ORDER BY table_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":10,"column_names":["table_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["table_name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":25,"schema_name":"information_schema","table_name":"tables","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["information_schema","tables"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":69,"query_location_length":36,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":10,"column_names":["table_name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":9,"literal":{"kind":"STRING","text":"foo_bar"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":5,"literal":{"kind":"STRING","text":"baz"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":5,"literal":{"kind":"STRING","text":"foo"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":9,"literal":{"kind":"STRING","text":"bar_baz"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv(\n '{DATA_DIR}/csv/error/mismatch/bad*.csv',\n columns = {'col0': 'INTEGER', 'col1': 'INTEGER', 'col2': 'VARCHAR'},\n store_rejects = true, auto_detect=false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":173,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":40,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/mismatch/bad*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":67,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"col0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col0","query_location":93,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"col1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":112,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"col2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":131,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":147,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/rejects/dr_who.csv', columns={ 'date': 'DATE', 'datetime': 'TIMESTAMPTZ', 'time': 'TIME', 'timestamp': 'TIMESTAMP', 'time_tz': 'TIMETZ' }, store_rejects=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":183,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":35,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/rejects/dr_who.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":116,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":108,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"date","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"date","query_location":69,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"datetime","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"datetime","query_location":89,"query_location_length":13,"literal":{"kind":"STRING","text":"TIMESTAMPTZ"}}},{"name":"time","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"time","query_location":112,"query_location_length":6,"literal":{"kind":"STRING","text":"TIME"}}},{"name":"timestamp","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"timestamp","query_location":133,"query_location_length":11,"literal":{"kind":"STRING","text":"TIMESTAMP"}}},{"name":"time_tz","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"time_tz","query_location":157,"query_location_length":8,"literal":{"kind":"STRING","text":"TIMETZ"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(first(column0)), typeof(first(column1)), COUNT(*), SUM(column0), MAX(len(column1)) FROM read_csv_auto(\n '{DATA_DIR}/csv/error/mismatch/big_bad*.csv',\n sample_size=1,\n rejects_scan = 'rejects_scan_3',\n rejects_table = 'rejects_errors_3'\n );","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["column0"]}}],"qualified_name":{"path":["first"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":7,"column_names":["column1"]}}],"qualified_name":{"path":["first"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["column0"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":17,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":12,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":7,"column_names":["column1"]}}],"qualified_name":{"path":["len"]}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":166,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/mismatch/big_bad*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":190,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":190,"query_location_length":12,"column_names":["rejects_scan"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":16,"literal":{"kind":"STRING","text":"rejects_scan_3"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":228,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":228,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":18,"literal":{"kind":"STRING","text":"rejects_errors_3"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(first(column0)), typeof(first(column1)), COUNT(*), SUM(column0), MAX(len(column1)) FROM read_csv_auto(\n '{DATA_DIR}/csv/error/mismatch/big_bad*.csv',\n sample_size=1,\n rejects_scan = 'rejects_scan_3',\n store_rejects = false\n );","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["column0"]}}],"qualified_name":{"path":["first"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":22,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":14,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":7,"column_names":["column1"]}}],"qualified_name":{"path":["first"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["column0"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":17,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":12,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":7,"column_names":["column1"]}}],"qualified_name":{"path":["len"]}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":153,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/mismatch/big_bad*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":190,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":190,"query_location_length":12,"column_names":["rejects_scan"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":16,"literal":{"kind":"STRING","text":"rejects_scan_3"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":228,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":228,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv(\n '{DATA_DIR}/csv/error/mismatch/bad.csv',\n columns = {'col0': 'INTEGER', 'col1': 'INTEGER', 'col2': 'VARCHAR'},\n ignore_errors=true,\n rejects_table='csv_rejects_table',\n rejects_limit=-1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":212,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":39,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/error/mismatch/bad.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":67,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"col0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col0","query_location":92,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"col1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":111,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"col2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":130,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":146,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":170,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":19,"literal":{"kind":"STRING","text":"csv_rejects_table"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":209,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":209,"query_location_length":13,"column_names":["rejects_limit"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/rejects/multiple_errors/multiple_casts_flush.csv',\n columns = {'name': 'VARCHAR', 'age': 'INTEGER', 'current_day': 'DATE', 'tomorrow': 'DATE'},\n store_rejects = true, auto_detect=false, header = 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":228,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":65,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/rejects/multiple_errors/multiple_casts_flush.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":90,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":80,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":104,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":122,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"current_day","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"current_day","query_location":148,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"tomorrow","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"tomorrow","query_location":168,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":181,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":197,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":203,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":222,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":222,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/rejects/multiple_errors/invalid_utf_cast.csv',\n columns = {'name': 'VARCHAR', 'age': 'INTEGER', 'current_day': 'DATE', 'barks': 'INTEGER'},\n store_rejects = true, auto_detect=false, header = 1, max_line_size=40);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":242,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":61,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/rejects/multiple_errors/invalid_utf_cast.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":90,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":80,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":100,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":118,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"current_day","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"current_day","query_location":144,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"barks","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"barks","query_location":161,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":177,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":177,"query_location_length":13,"column_names":["store_rejects"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":193,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":199,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":211,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":218,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":227,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":230,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":13,"column_names":["max_line_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/unescaped_quotes/end_quote.csv', columns = {'a':'varchar'}, header = false, quote = '\"', strict_mode = false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":134,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":47,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/unescaped_quotes/end_quote.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":78,"query_location_length":9,"literal":{"kind":"STRING","text":"varchar"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":119,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"from read_csv('{DATA_DIR}/csv/bug_12596.csv', skip=1, delim=',', header=false, columns={'c1': 'INTEGER', 'c2': 'INTEGER', 'column2': 'VARCHAR'}, null_padding = true, parallel = false, auto_detect = false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":199,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":30,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/bug_12596.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":64,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":56,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c1","query_location":94,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c2","query_location":111,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"column2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column2","query_location":133,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":145,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":166,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":8,"column_names":["parallel"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":184,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/3.csv', max_line_size=-1003718790012071149, ignore_errors=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":92,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":26,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/3.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":13,"column_names":["max_line_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":20,"literal":{"kind":"INTEGER","text":"-1003718790012071149"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/afl/15.csv', rejects_table='d');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":27,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/afl/15.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":13,"column_names":["rejects_table"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"literal":{"kind":"STRING","text":"d"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv_auto('{DATA_DIR}/csv/null_comparison.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":51,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":36,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/null_comparison.csv"}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(bam) FROM test WHERE bam = '!';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["bam"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["bam"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"literal":{"kind":"STRING","text":"!"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/inconsistencies/line_with_spaces.csv', null_padding = true, ignore_errors = true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":106,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":53,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/inconsistencies/line_with_spaces.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"FROM '{DATA_DIR}/csv/comments/simple_mid_line.csv';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":45,"schema_name":"","table_name":"{DATA_DIR}/csv/comments/simple_mid_line.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/comments/simple_mid_line.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM '{DATA_DIR}/csv/comments/big.csv' limit 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":33,"schema_name":"","table_name":"{DATA_DIR}/csv/comments/big.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/comments/big.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM '{DATA_DIR}/csv/comments/big.csv' limit 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":33,"schema_name":"","table_name":"{DATA_DIR}/csv/comments/big.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/comments/big.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"SELECT a, b, c FROM lineitem ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(a), COUNT(b), COUNT(c), MIN(LENGTH(b)), MAX(LENGTH(b)), SUM(a), SUM(c) FROM test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["c"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":14,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["b"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":14,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["b"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["c"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/error/json.csv', columns={'a':'JSON'}, ignore_errors = true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":85,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/json.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":12,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":60,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"JSON"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM '{DATA_DIR}/csv/real/lineitem_sample.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":41,"schema_name":"","table_name":"{DATA_DIR}/csv/real/lineitem_sample.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/real/lineitem_sample.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_csv('{TEST_DIR}/timestamp-format.csv', all_varchar=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/timestamp-format.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":11,"column_names":["all_varchar"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT columns[1].type FROM sniff_csv('{DATA_DIR}/csv/bad_date_2.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":15,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":14,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["columns"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"type"}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/bad_date_2.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select columns FROM sniff_csv('{DATA_DIR}/csv/dateformat/not_working.csv', header=true,dateformat='%d-%b-%Y');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["columns"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":90,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":43,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/dateformat/not_working.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":76,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":10,"column_names":["dateformat"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%d-%b-%Y"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(number) FROM read_csv('{DATA_DIR}/csv/double_trouble.csv', decimal_separator=',', auto_type_candidates = ['FLOAT']) limit 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["number"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":27,"query_location_length":102,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/double_trouble.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":17,"column_names":["decimal_separator"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":96,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":20,"column_names":["auto_type_candidates"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":119,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"FLOAT"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from tbl_2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"tbl_2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(bar) FROM read_csv(['{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/1.csv','{DATA_DIR}/csv/17451/2.csv','{DATA_DIR}/csv/17451/extra/3.csv'], files_to_sniff = -1) limit 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":446,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["bar"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":415,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":384,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":208,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":237,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":266,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":295,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":324,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":353,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":382,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/17451/extra/3.csv"}}}]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":419,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":419,"query_location_length":14,"column_names":["files_to_sniff"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":436,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT columns from sniff_csv('{DATA_DIR}/csv/header_only_2.csv', types = {'foo':'INTEGER'})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["columns"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":72,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/header_only_2.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":5,"column_names":["types"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"foo","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"foo","query_location":81,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/test_ignore_errors.csv', columns = {'Order ref ID': 'VARCHAR'}, delim = ',', ignore_errors=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":122,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/test_ignore_errors.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":37,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"Order ref ID","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"Order ref ID","query_location":91,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":103,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":117,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv(['{DATA_DIR}/csv/multiple_files/more_columns/file_1.csv','{DATA_DIR}/csv/multiple_files/more_columns/file_2.csv',\n'{DATA_DIR}/csv/multiple_files/more_columns/file_3.csv','{DATA_DIR}/csv/multiple_files/more_columns/file_no_header.csv'])\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":244,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":234,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":55,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/multiple_files/more_columns/file_1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":55,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/multiple_files/more_columns/file_2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":55,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/multiple_files/more_columns/file_3.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":193,"query_location_length":63,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/multiple_files/more_columns/file_no_header.csv"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from read_csv('{DATA_DIR}/csv/mixed_new_line_2.csv', new_line ='\\r\\n', strict_mode = False, columns = {'a':'varchar', 'b':'varchar'}, auto_detect = false, delim = ',')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":162,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/mixed_new_line_2.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":8,"column_names":["new_line"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\r\\n"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":87,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":108,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":118,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":123,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":138,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":150,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM nfcstrings WHERE source COLLATE NFC=nfc","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":10,"schema_name":"","table_name":"nfcstrings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nfcstrings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":22,"left":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":38,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":6,"column_names":["source"]},"collation":"NFC"},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":3,"column_names":["nfc"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_csv('{DATA_DIR}/csv/nullpadding.csv',null_padding=true, columns={\n'a': 'INTEGER','b': 'INTEGER','c': 'INTEGER','d': 'INTEGER'}, auto_detect := false, ignore_errors := true, strict_mode=True)\nwhere b = 100;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":195,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/nullpadding.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":70,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":62,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":90,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":105,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":120,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":135,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}}]}}},{"name":"auto_detect","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"auto_detect","query_location":162,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}},{"name":"ignore_errors","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"ignore_errors","query_location":186,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":192,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":192,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":204,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":217,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":217,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from read_csv('{DATA_DIR}/csv/evil_nullpadding.csv', delim = ';', quote = '\"', null_padding = True, header = 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":106,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/evil_nullpadding.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from read_csv('{DATA_DIR}/csv/test_default_option.csv', columns = {'a':'varchar', 'b':'integer'}, auto_detect = false, header = true) where b = 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":128,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":40,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/test_default_option.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":71,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":86,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"integer"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":119,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":140,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/quoted_values_delimited.csv', quote = '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/quoted_values_delimited.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM people2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"people2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["people2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM sniff_csv('{DATA_DIR}/csv/error/mismatch/big_bad.csv', sample_size=10000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":73,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":43,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/error/mismatch/big_bad.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM sniff_csv('{DATA_DIR}/csv/comments/simple.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":47,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/comments/simple.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM sniff_csv('{DATA_DIR}/csv/auto/time_date_timestamp_yyyy.mm.dd.csv', timestampformat='%Y.%m.%d %H:%M:%S')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":104,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":56,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/auto/time_date_timestamp_yyyy.mm.dd.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":15,"column_names":["timestampformat"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y.%m.%d %H:%M:%S"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM sniff_csv('{DATA_DIR}/csv/real/lineitem_sample.csv', column_types=['INTEGER','BIGINT','BIGINT','BIGINT','BIGINT', 'DOUBLE','DOUBLE','DOUBLE','VARCHAR', 'VARCHAR','DATE', 'DATE', 'DATE', 'VARCHAR', 'VARCHAR', 'VARCHAR']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":221,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/real/lineitem_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":167,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":12,"column_names":["column_types"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":154,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOUBLE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOUBLE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOUBLE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DATE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":192,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":204,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/test_apple_financial.csv.gz', header = 1, skip=3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":74,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/test_apple_financial.csv.gz"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/thousands_separator/simple.csv', thousands = ',', decimal_separator = ',')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":99,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":47,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/thousands_separator/simple.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":9,"column_names":["thousands"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":17,"column_names":["decimal_separator"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM T;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":1,"schema_name":"","table_name":"T","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["T"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_csv_auto(['{TEMP_DIR}/ubn1.csv', '{TEMP_DIR}/ubn2.csv', '{TEMP_DIR}/ubn3.csv']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":84,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":69,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/ubn1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/ubn2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/ubn3.csv"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from read_csv('{DATA_DIR}/csv/union_by_name_2/*.csv', union_by_name=True, parallel = false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":86,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/union_by_name_2/*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":8,"column_names":["parallel"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM read_csv('{DATA_DIR}/csv/validator/single_column_quoted_newline.csv', columns = {'Raffaella Carrà': 'varchar'}, quote = '\"', buffer_size = 24)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":144,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":59,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/validator/single_column_quoted_newline.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":41,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":31,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"Raffaella Carrà","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"Raffaella Carrà","query_location":106,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"varchar"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":118,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":132,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":24}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{TEST_DIR}/test.tsv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":21,"schema_name":"","table_name":"{TEST_DIR}/test.tsv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/test.tsv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM ncvoters","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"ncvoters","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ncvoters"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l_suppkey FROM encrypted_v0.lineitem limit 10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["l_suppkey"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":21,"schema_name":"encrypted_v0","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["encrypted_v0","lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM read_csv_auto('{TEST_DIR}/file_size_bytes_csv3/*.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/file_size_bytes_csv3/*.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{TEST_DIR}/trailing/a=9/????????-????-4???-????-????????????_trailing.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":79,"schema_name":"","table_name":"{TEST_DIR}/trailing/a=9/????????-????-4???-????-????????????_trailing.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/trailing/a=9/????????-????-4???-????-????????????_trailing.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM '{TEST_DIR}/pto/basename_????????-????-4???-????-????????????.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":70,"schema_name":"","table_name":"{TEST_DIR}/pto/basename_????????-????-4???-????-????????????.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/pto/basename_????????-????-4???-????-????????????.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, payload, partition_key\nFROM read_parquet(['{TEST_DIR}/allow_empty_hive/**/*.parquet'], hive_partitioning = true, allow_empty = true)\nORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":13,"column_names":["partition_key"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":104,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":44,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/allow_empty_hive/**/*.parquet"}}}]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":124,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":11,"column_names":["allow_empty"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) from '{TEST_DIR}/dict-{type}-v2.parquet' WHERE r='20'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":35,"schema_name":"","table_name":"{TEST_DIR}/dict-{type}-v2.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/dict-{type}-v2.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["r"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"20"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT BOOL_AND(NOT bloom_filter_excludes)\nFROM parquet_bloom_probe('{TEST_DIR}/bloom_decimal.parquet', 'dec_int32', 0.00::DECIMAL(4,2));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":16,"query_location_length":25,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":21,"column_names":["bloom_filter_excludes"]}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":48,"query_location_length":88,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_bloom_probe","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/bloom_decimal.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"dec_int32"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":121,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":123,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/bloom_interval_equivalent.parquet')\nWHERE iv_list[1] = INTERVAL '1 day';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":46,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/bloom_interval_equivalent.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":29,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":95,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["iv_list"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 day"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/bloom_list.parquet')\nWHERE struct_value.level_1.level_2.value = 101;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/bloom_list.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":34,"column_names":["struct_value","level_1","level_2","value"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":101}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM assert_bloom_filter_hit('{TEST_DIR}/bloom1.parquet', 'r', NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"assert_bloom_filter_hit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/bloom1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"r"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT column_id, bool_and(bloom_filter_offset IS NOT NULL), bool_and(bloom_filter_length IS NOT NULL)\nFROM parquet_metadata('{TEST_DIR}/bloom_temporal.parquet')\nGROUP BY column_id\nORDER BY column_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":190,"query_location_length":9,"column_names":["column_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["column_id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":41,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":47,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":19,"column_names":["bloom_filter_offset"]}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":41,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":90,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":19,"column_names":["bloom_filter_length"]}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":108,"query_location_length":53,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/bloom_temporal.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":9,"column_names":["column_id"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/timestamp_ms_infinity_bloom.parquet')\nWHERE ts = 'infinity'::TIMESTAMP","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":48,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/timestamp_ms_infinity_bloom.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":2,"column_names":["ts"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":105,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":107,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select row_group_id, bloom_filter_offset IS NOT NULL, bloom_filter_length IS NOT NULL from parquet_metadata('{TEST_DIR}/bloom9.parquet') order by row_group_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":12,"column_names":["row_group_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["row_group_id"]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":41,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":19,"column_names":["bloom_filter_offset"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":74,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":19,"column_names":["bloom_filter_length"]}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":91,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/bloom9.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from parquet_scan('test/sql/copy/parquet/broken/hugefooter.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":49,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test/sql/copy/parquet/broken/hugefooter.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM (\n\tSELECT i, row_number() OVER () - 1 AS expected\n\tFROM read_parquet('{TEST_DIR}/cte_nested_batch_exchange.parquet')\n)\nWHERE i != expected;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":118,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"expected","query_location":55,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":34,"query_location_length":20,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":77,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":46,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/cte_nested_batch_exchange.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":146,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":8,"column_names":["expected"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM parquet_file_metadata('{DATA_DIR}/parquet-testing/arrow/alltypes_dictionary.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":85,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_file_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":62,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/arrow/alltypes_dictionary.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{DATA_DIR}/parquet-testing/broken/broken_bigint.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":57,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/broken/broken_bigint.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/broken/broken_bigint.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(i) FROM '{TEST_DIR}/integers.csv' tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"tbl","sample":null,"query_location":19,"query_location_length":32,"schema_name":"","table_name":"{TEST_DIR}/integers.csv","column_name_alias":["i"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/integers.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT key::VARCHAR, value::VARCHAR FROM (SELECT unnest(parquet_kv_metadata, recursive:=True) FROM parquet_full_metadata('{TEST_DIR}/kv_metadata_test3.parquet'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["key"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":5,"column_names":["value"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":41,"query_location_length":120,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":44,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":19,"column_names":["parquet_kv_metadata"]}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":88,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":99,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_full_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/kv_metadata_test3.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM read_parquet(['{TEST_DIR}/af_cross_1.parquet', '{TEST_DIR}/af_cross_2.parquet', '{TEST_DIR}/af_cross_3.parquet']) WHERE a \u003e 100 AND b \u003e 3 AND c \u003c 50","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":113,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":99,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/af_cross_1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/af_cross_2.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/af_cross_3.parquet"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":141,"query_location_length":28,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":141,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":141,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":153,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":163,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM read_parquet(['{TEST_DIR}/ord_abc.parquet', '{TEST_DIR}/ord_cab.parquet']) WHERE a \u003e 100 AND b \u003e 3 AND c \u003c 50","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":74,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":60,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ord_abc.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ord_cab.parquet"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":102,"query_location_length":28,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":102,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":114,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":124,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT f, i\nFROM string_file_first\nWHERE i\u003e'10'\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["f"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":17,"schema_name":"","table_name":"string_file_first","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["string_file_first"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":41,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from parquet_scan('{DATA_DIR}/parquet-testing/g*/t1.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/g*/t1.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select name from parquet_schema( '{DATA_DIR}/parquet-testing/bug13053.parquet') offset 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":null,"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/bug13053.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT backlink_count FROM parquet_scan('{DATA_DIR}/parquet-testing/bug1589.parquet') LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":14,"column_names":["backlink_count"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":27,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/bug1589.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x FROM read_parquet(['{TEST_DIR}/ubn22147_struct.parquet', '{TEST_DIR}/ubn22147_int_val.parquet'], union_by_name=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":111,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":77,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ubn22147_struct.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ubn22147_int_val.parquet"}}}]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(total_compressed_size) \u003e 10000,\n SUM(total_uncompressed_size) \u003e 10000,\n SUM(total_uncompressed_size) \u003e SUM(total_compressed_size)\nFROM parquet_metadata('{TEST_DIR}/test_5209.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":34,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":21,"column_names":["total_compressed_size"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":50,"query_location_length":36,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":28,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":23,"column_names":["total_uncompressed_size"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":95,"query_location_length":57,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":28,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":23,"column_names":["total_uncompressed_size"]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":126,"query_location_length":26,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":21,"column_names":["total_compressed_size"]}}]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":158,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/test_5209.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM '{TEST_DIR}/all_null.parquet' WHERE coalesce(n, i) = i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":29,"schema_name":"","table_name":"{TEST_DIR}/all_null.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/all_null.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":18,"left":{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":57,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["n"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(#1) FROM parquet_scan('{DATA_DIR}/parquet-testing/binary_string.parquet',binary_as_string=True) limit 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":14,"query_location_length":2,"index":1}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":86,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":50,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/binary_string.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":87,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":16,"column_names":["binary_as_string"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x FROM read_parquet('{DATA_DIR}/parquet-testing/parquet_column_num_values_mismatch.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":85,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":71,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/parquet_column_num_values_mismatch.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_parquet('{TEST_DIR}/encrypted128.parquet', encryption_config={footer_key: 'key192'})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":89,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/encrypted128.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":17,"column_names":["encryption_config"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"footer_key","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"footer_key","query_location":93,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"key192"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM '{TEST_DIR}/expr_prune_double.parquet' WHERE d + d \u003c 20479.5e0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":38,"schema_name":"","table_name":"{TEST_DIR}/expr_prune_double.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/expr_prune_double.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":66,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["d"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":9,"value":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":20479.5}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM '{TEST_DIR}/expr_prune_prefix_or.parquet'\nWHERE s ILIKE 'P000000'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":41,"schema_name":"","table_name":"{TEST_DIR}/expr_prune_prefix_or.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/expr_prune_prefix_or.parquet"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":15,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"P000000"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i, j, parse_path(filename)[-2:] from parquet_scan('{DATA_DIR}/parquet-testing/glob*/t?.parquet', FILENAME=1) order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":33,"query_location_length":5,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":20,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":8,"column_names":["filename"]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":44,"query_location_length":71,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/glob*/t?.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":104,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i, j, filename as file from parquet_scan('{DATA_DIR}/parquet-testing/glob*/t?.parquet', FILENAME=1) where file='{DATA_DIR}/parquet-testing/glob2/t1.parquet' or file='{DATA_DIR}/parquet-testing/glob/t2.parquet' order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":226,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"file","query_location":13,"query_location_length":8,"column_names":["filename"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":71,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/glob*/t?.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":113,"query_location_length":103,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":113,"query_location_length":50,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":4,"column_names":["file"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/glob2/t1.parquet"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":167,"query_location_length":49,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":167,"query_location_length":4,"column_names":["file"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/glob/t2.parquet"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select id, value from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/*/*/*/test.parquet', FILENAME=1) where filename like '%simple%' and value = 'value2';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["value"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":22,"query_location_length":91,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":65,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/hive-partitioning/*/*/*/test.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":120,"query_location_length":45,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":15,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%simple%"}}}]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":149,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":5,"column_names":["value"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"value2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select id, date from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/different_order/*/*/test.parquet', HIVE_PARTITIONING=1) where date = '2018-01-01';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":4,"column_names":["date"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":114,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":79,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/hive-partitioning/different_order/*/*/test.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":115,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":4,"column_names":["date"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2018-01-01"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, b, parse_path(filename)[-3:] filename FROM parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/hive_col_also_in_file/*/test.parquet', HIVE_PARTITIONING=1, FILENAME=1) order by filename;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":193,"query_location_length":8,"column_names":["filename"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"filename","query_location":33,"query_location_length":5,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":20,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":8,"column_names":["filename"]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":53,"query_location_length":130,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":83,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/hive-partitioning/hive_col_also_in_file/*/test.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":151,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (p IS NULL)::INTEGER AS is_null, COALESCE((p='NULL')::INTEGER, -1) AS equals_literal, id\nFROM parquet_scan('{TEST_DIR}/hive-literal-null-partition/**/*.parquet', hive_partitioning=1)\nORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"is_null","query_location":18,"query_location_length":9,"child":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":10,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["p"]}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"equals_literal","query_location":40,"query_location_length":33,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["p"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NULL"}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":101,"query_location_length":88,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":53,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/hive-literal-null-partition/**/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/hive_override_u/part=42/*.parquet') u\nJOIN read_parquet('{TEST_DIR}/hive_override_s/part=42/*.parquet') s ON u.part = s.part","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":84,"query_location_length":86,"left":{"type":"TABLE_FUNCTION","alias":"u","sample":null,"query_location":21,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":46,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/hive_override_u/part=42/*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"s","sample":null,"query_location":89,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":46,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/hive_override_s/part=42/*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":155,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":6,"column_names":["u","part"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":6,"column_names":["s","part"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT 100 + i i, 1000 + j j, 10000 + k k, 100000 + l l FROM (SELECT -i i, -j j, -k k, -l l FROM test)) ORDER BY j DESC LIMIT 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":1,"column_names":["j"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":104,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":26,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":38,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["j"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":51,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["k"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":65,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100000}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["l"]}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":76,"query_location_length":41,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":84,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":90,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["j"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":96,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["k"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":102,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["l"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":112,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM parquet_schema('{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":75,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":59,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select min(b) from '{TEST_DIR}/blobs.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":26,"schema_name":"","table_name":"{TEST_DIR}/blobs.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/blobs.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from parquet_scan('{DATA_DIR}/parquet-testing/arrow_nan.parquet', can_have_nan := true) where f='nan';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":82,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":46,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/arrow_nan.parquet"}}},{"name":"can_have_nan","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"can_have_nan","query_location":91,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":103,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["f"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nan"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT accepted_column_gap\nFROM duckdb_logs_parsed('ParquetPrefetch')\nWHERE file_path LIKE '%cost_model_gap.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":19,"column_names":["accepted_column_gap"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":37,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ParquetPrefetch"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":30,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":9,"column_names":["file_path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%cost_model_gap.parquet"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT row_group_id, fully_filtered, strategy, prefetch_groups\nFROM duckdb_logs_parsed('ParquetPrefetch')\nWHERE file_path LIKE '%rgo_proj_gap.parquet'\nORDER BY row_group_id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":12,"column_names":["row_group_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["row_group_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":14,"column_names":["fully_filtered"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":8,"column_names":["strategy"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":15,"column_names":["prefetch_groups"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":68,"query_location_length":37,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ParquetPrefetch"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":28,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":9,"column_names":["file_path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%rgo_proj_gap.parquet"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(a + b + c + d)\nFROM read_parquet('{TEST_DIR}/rgo_ab.parquet')\nWHERE a \u003e 50 AND b \u003e 50 AND c = 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["b"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["c"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["d"]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":31,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/rgo_ab.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":79,"query_location_length":27,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":79,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":90,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":101,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select min(file_row_number), max(file_row_number), avg(file_row_number), count(*) from parquet_scan('{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet', file_row_number=1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":15,"column_names":["file_row_number"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":20,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":15,"column_names":["file_row_number"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":20,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":15,"column_names":["file_row_number"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":88,"query_location_length":92,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":59,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/lineitem-top10000.gzip.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":162,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":15,"column_names":["file_row_number"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT c FROM '{TEST_DIR}/evolution_*.parquet' ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":32,"schema_name":"","table_name":"{TEST_DIR}/evolution_*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/evolution_*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{TEMP_DIR}/test_nested.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":32,"schema_name":"","table_name":"{TEMP_DIR}/test_nested.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/test_nested.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select stats_min, stats_max, stats_min_value, stats_max_value from parquet_metadata('{DATA_DIR}/parquet-testing/unsigned_stats.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["stats_min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":9,"column_names":["stats_max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":15,"column_names":["stats_min_value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":15,"column_names":["stats_max_value"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":67,"query_location_length":69,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":51,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/unsigned_stats.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{DATA_DIR}/parquet-testing/arrow/int64_decimal.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":56,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/arrow/int64_decimal.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/arrow/int64_decimal.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a,b,c \nFROM parquet_scan('{TEST_DIR}/ubn*.parquet', UNION_BY_NAME=TRUE)\nORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":59,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ubn*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":59,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":13,"column_names":["UNION_BY_NAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i, j, parse_path(filename)[-2:] from '{DATA_DIR}/parquet-testing/glob*/t?.parquet' order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":33,"query_location_length":5,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":20,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":8,"column_names":["filename"]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":45,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/glob*/t?.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/glob*/t?.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i, j, file_row_group_number from '{TEST_DIR}/rg.parquet' where i in (0, 2048, 9999) order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":21,"column_names":["file_row_group_number"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":23,"schema_name":"","table_name":"{TEST_DIR}/rg.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/rg.parquet"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":75,"query_location_length":15,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2048}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9999}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_parquet('{TEST_DIR}/lists.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":40,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/lists.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(it, accum) AS\n(\n\tSELECT 1, 0\n\tUNION ALL\n\t(\n\t\tSELECT it + 1, accum + j\n\t\tFROM t, r\n\t\tWHERE it \u003c= x\n\t)\n)\nSELECT * FROM t ORDER BY it, accum;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":2,"column_names":["it"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":5,"column_names":["accum"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["it","accum"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":2,"column_names":["it"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":5,"column_names":["accum"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":89,"query_location_length":9,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":97,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":107,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":2,"column_names":["it"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["x"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["it","accum"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":127,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":134,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select s.min, s.max, s.has_null, s.has_no_null from (select stats(col).fully_shredded.child_stats.stats s from '{TEST_DIR}/fully_shredded_list_element_with_nulls.parquet' limit 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["s","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["s","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":13,"column_names":["s","has_no_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":127,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"s","query_location":60,"query_location_length":43,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":10,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":3,"column_names":["col"]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"fully_shredded"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"child_stats"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"stats"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":111,"query_location_length":59,"schema_name":"","table_name":"{TEST_DIR}/fully_shredded_list_element_with_nulls.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/fully_shredded_list_element_with_nulls.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/aws1.snappy.parquet') limit 100","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":48,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/aws1.snappy.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/userdata1.parquet') where id \u003e 100 and id \u003c 900","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":46,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/userdata1.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":88,"query_location_length":21,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":88,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":101,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":900}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/date.parquet') where d \u003e= cast('1990-01-01' as date)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":55,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/date.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":76,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["d"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":81,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1990-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":102,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * FROM parquet_scan('{DATA_DIR}/parquet-testing/map.parquet') sq limit 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"sq","sample":null,"query_location":14,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":40,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/map.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM \"{DATA_DIR}/parquet-testing/arrow/alltypes_plain.parquet\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":57,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/arrow/alltypes_plain.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/arrow/alltypes_plain.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FIRST(id) OVER w, LAST(id) OVER w FROM userdata1 WINDOW w AS (ORDER BY id RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":7,"query_location_length":16,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":2,"column_names":["id"]}}]},{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"","query_location":25,"query_location_length":15,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":2,"column_names":["id"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":9,"schema_name":"","table_name":"userdata1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["userdata1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FIRST(cc) OVER w, LAST(cc) OVER w FROM userdata1 WINDOW w AS (ORDER BY id RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":7,"query_location_length":16,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":2,"column_names":["cc"]}}]},{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"","query_location":25,"query_location_length":15,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":2,"column_names":["cc"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":9,"schema_name":"","table_name":"userdata1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["userdata1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time from parquet_scan('{DATA_DIR}/parquet-testing/timestamp*.parquet') where time \u003e '2020-10-06'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["time"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":47,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/timestamp*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":85,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":4,"column_names":["time"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-10-06"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, j, k, x\nFROM read_parquet('{DATA_DIR}/parquet-testing/hive-partitioning/union_by_name/*/*.parquet', hive_partitioning=1, union_by_name=1)\nORDER BY j","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":1,"column_names":["j"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":124,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":72,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/parquet-testing/hive-partitioning/union_by_name/*/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":131,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT k FROM read_parquet(['{TEST_DIR}/union_by_name_pushdown1.parquet', '{TEST_DIR}/union_by_name_pushdown2.parquet'], union_by_name=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":126,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":92,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/union_by_name_pushdown1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/union_by_name_pushdown2.parquet"}}}]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH two AS (\n\tSELECT total_uncompressed_size AS sz\n\tFROM parquet_metadata('{TEST_DIR}/dict-two-values.parquet')\n), three AS (\n\tSELECT total_uncompressed_size AS sz\n\tFROM parquet_metadata('{TEST_DIR}/dict-three-values.parquet')\n)\nSELECT CASE WHEN two.sz * 3 \u003c three.sz * 2 THEN 1 ELSE 0 END\nFROM two, three;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"two","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"sz","query_location":22,"query_location_length":23,"column_names":["total_uncompressed_size"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":58,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/dict-two-values.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"three","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"sz","query_location":135,"query_location_length":23,"column_names":["total_uncompressed_size"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":171,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/dict-three-values.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":237,"query_location_length":53,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":247,"query_location_length":25,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":247,"query_location_length":10,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":247,"query_location_length":6,"column_names":["two","sz"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":256,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":260,"query_location_length":12,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":260,"query_location_length":8,"column_names":["three","sz"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":271,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":285,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":291,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":296,"query_location_length":3,"schema_name":"","table_name":"two","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["two"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":301,"query_location_length":5,"schema_name":"","table_name":"three","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["three"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT items FROM read_parquet('{TEMP_DIR}/list_union.parquet')\nORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["items"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":18,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/list_union.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{TEST_DIR}/compress_level2.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":36,"schema_name":"","table_name":"{TEST_DIR}/compress_level2.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/compress_level2.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT stats_min, stats_max FROM parquet_metadata('{TEST_DIR}/enum_stats_single_1.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["stats_min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":9,"column_names":["stats_max"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":33,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":40,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/enum_stats_single_1.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select field_id from parquet_schema('{TEST_DIR}/my.parquet') where name = 'F'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["field_id"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/my.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"F"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{TEST_DIR}/signed.parquet' WHERE d=42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":27,"schema_name":"","table_name":"{TEST_DIR}/signed.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/signed.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":48,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["d"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(d) FROM '{TEST_DIR}/timestamps.parquet' LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":31,"schema_name":"","table_name":"{TEST_DIR}/timestamps.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/timestamps.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM '{TEST_DIR}/unsigned.parquet' WHERE d\u003c42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":29,"schema_name":"","table_name":"{TEST_DIR}/unsigned.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/unsigned.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":57,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["d"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{TEST_DIR}/overwrite.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":30,"schema_name":"","table_name":"{TEST_DIR}/overwrite.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/overwrite.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM parquet_scan('{TEMP_DIR}/userdata1-uncompressed.parquet') ORDER BY 1 LIMIT 10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":43,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/userdata1-uncompressed.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM '{TEST_DIR}/stats.parquet' WHERE i IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":26,"schema_name":"","table_name":"{TEST_DIR}/stats.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/stats.parquet"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":56,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select key, COUNT(*)\nfrom parquet_scan('{TEST_DIR}/escaped_partitions/**/*.parquet')\nGROUP BY ALL\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/escaped_partitions/**/*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH per_file AS (\n\tSELECT\n\t\tfilename,\n\t\tv,\n\t\tlag(v) OVER (PARTITION BY filename ORDER BY file_row_number) AS prev_v\n\tFROM read_parquet(\n\t\t'{TEST_DIR}/delayed_ordered/**/*.parquet',\n\t\tfilename = true,\n\t\tfile_row_number = true,\n\t\thive_partitioning = true\n\t)\n)\nSELECT count(*)\nFROM per_file\nWHERE prev_v IS NOT NULL AND prev_v \u003e v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"per_file","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":8,"column_names":["filename"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"prev_v","query_location":46,"query_location_length":60,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":8,"column_names":["filename"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":15,"column_names":["file_row_number"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":123,"query_location_length":133,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/delayed_ordered/**/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":184,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":203,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":15,"column_names":["file_row_number"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":229,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":229,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":249,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":266,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":280,"query_location_length":8,"schema_name":"","table_name":"per_file","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["per_file"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":295,"query_location_length":33,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":302,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":295,"query_location_length":6,"column_names":["prev_v"]}]},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":318,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":318,"query_location_length":6,"column_names":["prev_v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":327,"query_location_length":1,"column_names":["v"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT part_col, value_col, value2_col FROM '{TEST_DIR}/partitioned8/part_col=0/*.parquet' ORDER BY value2_cOl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":10,"column_names":["value2_cOl"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["part_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":9,"column_names":["value_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":10,"column_names":["value2_col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":46,"schema_name":"","table_name":"{TEST_DIR}/partitioned8/part_col=0/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/partitioned8/part_col=0/*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM glob('{TEST_DIR}/ordered_only_empty/*.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":47,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ordered_only_empty/*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH per_file AS (\n\tSELECT\n\t\tfilename,\n\t\tv,\n\t\tlag(v) OVER (PARTITION BY filename ORDER BY file_row_number) AS prev_v\n\tFROM read_parquet(\n\t\t'{TEST_DIR}/partitioned_early_finalize_ordered/**/*.parquet',\n\t\tfilename = true,\n\t\tfile_row_number = true,\n\t\thive_partitioning = true\n\t)\n)\nSELECT count(*)\nFROM per_file\nWHERE prev_v IS NOT NULL AND prev_v \u003e v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"per_file","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":8,"column_names":["filename"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"prev_v","query_location":46,"query_location_length":60,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":8,"column_names":["filename"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":15,"column_names":["file_row_number"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":123,"query_location_length":152,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":60,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/partitioned_early_finalize_ordered/**/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":203,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":214,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":222,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":222,"query_location_length":15,"column_names":["file_row_number"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":240,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":248,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":248,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":268,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":285,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":299,"query_location_length":8,"schema_name":"","table_name":"per_file","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["per_file"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":314,"query_location_length":33,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":321,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":314,"query_location_length":6,"column_names":["prev_v"]}]},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":337,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":337,"query_location_length":6,"column_names":["prev_v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":346,"query_location_length":1,"column_names":["v"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT partition, COUNT(DISTINCT col2)\nFROM partitioned_tbl\nGROUP BY partition\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["partition"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":20,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":4,"column_names":["col2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":15,"schema_name":"","table_name":"partitioned_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["partitioned_tbl"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":9,"column_names":["partition"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM glob('{TEST_DIR}/ordered_partitioned/p=0/data_1.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":51,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ordered_partitioned/p=0/data_1.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM (\n\tSELECT partition1, partition2, lag(col1) OVER w AS prev\n\tFROM partitioned_tbl2\n\tWINDOW w AS (PARTITION BY partition1 ORDER BY col1)\n\tQUALIFY col1 - prev \u003c\u003e 2\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":162,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":10,"column_names":["partition1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":10,"column_names":["partition2"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"prev","query_location":55,"query_location_length":16,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":10,"column_names":["partition1"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":4,"column_names":["col1"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":4,"column_names":["col1"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":16,"schema_name":"","table_name":"partitioned_tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["partitioned_tbl2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":165,"query_location_length":16,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":4,"column_names":["col1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":4,"column_names":["prev"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT part_col, value_col, value2_col FROM '{TEST_DIR}/no-part-cols9/part_col=0/value_col=*/value2_col=*/*.parquet' ORDER BY value2_col;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":10,"column_names":["value2_col"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["part_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":9,"column_names":["value_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":10,"column_names":["value2_col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":72,"schema_name":"","table_name":"{TEST_DIR}/no-part-cols9/part_col=0/value_col=*/value2_col=*/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/no-part-cols9/part_col=0/value_col=*/value2_col=*/*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) \u003e 1 f FROM GLOB('{TEST_DIR}/per_thread_output/data_*.parquet') ORDER BY f","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":1,"column_names":["f"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"f","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":27,"query_location_length":51,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/per_thread_output/data_*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM glob('{TEST_DIR}/row_groups_per_file3/*.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":43,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/row_groups_per_file3/*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) BETWEEN 1 AND 10 FROM glob('{TEST_DIR}/row_groups_per_file9/*.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":16,"query_location_length":16,"input":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":38,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"glob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":43,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/row_groups_per_file9/*.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM db2.test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"db2","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db2","test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl6;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl6","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl6"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT compression FROM pragma_storage_info('T') WHERE segment_type ILIKE 'INTEGER' LIMIT 3","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"T"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":15,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":12,"column_names":["segment_type"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('{TEST_DIR}/multibyte_delimiter.csv', delim='é')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":36,"literal":{"kind":"STRING","text":"{TEST_DIR}/multibyte_delimiter.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":4,"literal":{"kind":"STRING","text":"é"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) from venue_2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":7,"schema_name":"","table_name":"venue_2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["venue_2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv(\n '{DATA_DIR}/csv/mixed_double.csv',\n auto_detect = false,\n header = true,\n columns = {\n 'A': 'INTEGER',\n 'B': 'DOUBLE',\n },\n ignore_errors = true\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":186,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":33,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/mixed_double.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":103,"query_location_length":60,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":113,"query_location_length":50,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"A","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"A","query_location":126,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"B","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"B","query_location":148,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_csv('{TEMP_DIR}/typed_null_options.csv', auto_type_candidates := ['BIGINT', NULL]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":87,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEMP_DIR}/typed_null_options.csv"}}},{"name":"auto_type_candidates","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"auto_type_candidates","query_location":91,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM '{DATA_DIR}/csv/timestamp_timezone.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":39,"schema_name":"","table_name":"{DATA_DIR}/csv/timestamp_timezone.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/timestamp_timezone.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select typeof(#1) FROM read_csv('{DATA_DIR}/csv/dates_special_format.csv', dateformat = '%b %-d, %Y', columns = {'Date': 'DATE'}) limit 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":14,"query_location_length":2,"index":1}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":106,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/dates_special_format.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":10,"column_names":["dateformat"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":12,"literal":{"kind":"STRING","text":"%b %-d, %Y"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"Date","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"Date","query_location":121,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM dates ORDER BY d","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(col_a) FROM read_csv(\n '{DATA_DIR}/csv/decimal.csv',\n auto_type_candidates=['NULL', 'DECIMAL', 'VARCHAR']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["col_a"]}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":101,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":28,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/decimal.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":51,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":20,"column_names":["auto_type_candidates"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":30,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":6,"literal":{"kind":"STRING","text":"NULL"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":9,"literal":{"kind":"STRING","text":"DECIMAL"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["list_value"]}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT right(value, 8) FROM read_csv('{DATA_DIR}/csv/encodings/straddle_cp932_1k.csv.gz', header=true, all_varchar=true, encoding='ibm-943_P15A-2003', buffer_size=1024) WHERE key='z'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"right","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["value"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["right"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":140,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":51,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/encodings/straddle_cp932_1k.csv.gz"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":103,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":11,"column_names":["all_varchar"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":8,"column_names":["encoding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":19,"literal":{"kind":"STRING","text":"ibm-943_P15A-2003"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":151,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1024"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":175,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":3,"column_names":["key"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column1, column2, column3, parse_filename(filename) FROM read_csv('{DATA_DIR}/csv/filename_filter/*.csv', filename=true, union_by_name=true) WHERE filename like '%d.csv';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["column1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["column2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":7,"column_names":["column3"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":24,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["parse_filename"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":64,"query_location_length":83,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":38,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/filename_filter/*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":113,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":128,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":163,"query_location_length":13,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":8,"literal":{"kind":"STRING","text":"%d.csv"}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT abs_file_name FROM read_csv('{DATA_DIR}/csv/header_only.csv', header=True, ignore_errors=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["abs_file_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":75,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":32,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/header_only.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/hits_problematic.csv', auto_detect=false, delim=',', quote='\"', escape='\\', new_line='\\n', skip=0, comment='', header=false, columns={'column000': 'BIGINT', 'column001': 'BIGINT', 'column002': 'VARCHAR', 'column003': 'BIGINT', 'column004': 'TIMESTAMP', 'column005': 'DATE', 'column006': 'BIGINT', 'column007': 'BIGINT', 'column008': 'BIGINT', 'column009': 'BIGINT', 'column010': 'BIGINT', 'column011': 'BIGINT', 'column012': 'BIGINT', 'column013': 'VARCHAR', 'column014': 'VARCHAR', 'column015': 'BIGINT', 'column016': 'BIGINT', 'column017': 'BIGINT', 'column018': 'BIGINT', 'column019': 'BIGINT', 'column020': 'BIGINT', 'column021': 'BIGINT', 'column022': 'BIGINT', 'column023': 'BIGINT', 'column024': 'BIGINT', 'column025': 'DOUBLE', 'column026': 'BIGINT', 'column027': 'BIGINT', 'column028': 'BIGINT', 'column029': 'VARCHAR', 'column030': 'BIGINT', 'column031': 'BIGINT', 'column032': 'BIGINT', 'column033': 'BIGINT', 'column034': 'VARCHAR', 'column035': 'VARCHAR', 'column036': 'BIGINT', 'column037': 'BIGINT', 'column038': 'BIGINT', 'column039': 'VARCHAR', 'column040': 'BIGINT', 'column041': 'BIGINT', 'column042': 'BIGINT', 'column043': 'BIGINT', 'column044': 'BIGINT', 'column045': 'TIMESTAMP', 'column046': 'BIGINT', 'column047': 'BIGINT', 'column048': 'BIGINT', 'column049': 'BIGINT', 'column050': 'VARCHAR', 'column051': 'BIGINT', 'column052': 'BIGINT', 'column053': 'BIGINT', 'column054': 'BIGINT', 'column055': 'BIGINT', 'column056': 'VARCHAR', 'column057': 'BIGINT', 'column058': 'BIGINT', 'column059': 'BIGINT', 'column060': 'BIGINT', 'column061': 'BIGINT', 'column062': 'BIGINT', 'column063': 'VARCHAR', 'column064': 'TIMESTAMP', 'column065': 'BIGINT', 'column066': 'BIGINT', 'column067': 'BIGINT', 'column068': 'BIGINT', 'column069': 'BIGINT', 'column070': 'BIGINT', 'column071': 'BIGINT', 'column072': 'BIGINT', 'column073': 'BIGINT', 'column074': 'VARCHAR', 'column075': 'VARCHAR', 'column076': 'VARCHAR', 'column077': 'VARCHAR', 'column078': 'BIGINT', 'column079': 'BIGINT', 'column080': 'BIGINT', 'column081': 'BIGINT', 'column082': 'BIGINT', 'column083': 'BIGINT', 'column084': 'BIGINT', 'column085': 'BIGINT', 'column086': 'VARCHAR', 'column087': 'BIGINT', 'column088': 'VARCHAR', 'column089': 'VARCHAR', 'column090': 'BIGINT', 'column091': 'VARCHAR', 'column092': 'VARCHAR', 'column093': 'VARCHAR', 'column094': 'VARCHAR', 'column095': 'VARCHAR', 'column096': 'VARCHAR', 'column097': 'VARCHAR', 'column098': 'VARCHAR', 'column099': 'VARCHAR', 'column100': 'VARCHAR', 'column101': 'BIGINT', 'column102': 'BIGINT', 'column103': 'BIGINT', 'column104': 'BIGINT'}, dateformat='%Y-%m-%d');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":2631,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/hits_problematic.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":94,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":8,"column_names":["new_line"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":4,"literal":{"kind":"STRING","text":"\\n"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":129,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":7,"column_names":["comment"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":141,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":141,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":155,"query_location_length":2457,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":163,"query_location_length":2449,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column000","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column000","query_location":177,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column001","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column001","query_location":200,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column002","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column002","query_location":223,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column003","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column003","query_location":247,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column004","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column004","query_location":270,"query_location_length":11,"literal":{"kind":"STRING","text":"TIMESTAMP"}}},{"name":"column005","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column005","query_location":296,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"column006","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column006","query_location":317,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column007","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column007","query_location":340,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column008","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column008","query_location":363,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column009","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column009","query_location":386,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column010","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column010","query_location":409,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column011","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column011","query_location":432,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column012","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column012","query_location":455,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column013","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column013","query_location":478,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column014","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column014","query_location":502,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column015","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column015","query_location":526,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column016","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column016","query_location":549,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column017","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column017","query_location":572,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column018","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column018","query_location":595,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column019","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column019","query_location":618,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column020","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column020","query_location":641,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column021","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column021","query_location":664,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column022","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column022","query_location":687,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column023","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column023","query_location":710,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column024","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column024","query_location":733,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column025","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column025","query_location":756,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"column026","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column026","query_location":779,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column027","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column027","query_location":802,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column028","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column028","query_location":825,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column029","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column029","query_location":848,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column030","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column030","query_location":872,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column031","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column031","query_location":895,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column032","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column032","query_location":918,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column033","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column033","query_location":941,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column034","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column034","query_location":964,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column035","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column035","query_location":988,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column036","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column036","query_location":1012,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column037","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column037","query_location":1035,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column038","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column038","query_location":1058,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column039","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column039","query_location":1081,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column040","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column040","query_location":1105,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column041","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column041","query_location":1128,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column042","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column042","query_location":1151,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column043","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column043","query_location":1174,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column044","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column044","query_location":1197,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column045","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column045","query_location":1220,"query_location_length":11,"literal":{"kind":"STRING","text":"TIMESTAMP"}}},{"name":"column046","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column046","query_location":1246,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column047","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column047","query_location":1269,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column048","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column048","query_location":1292,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column049","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column049","query_location":1315,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column050","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column050","query_location":1338,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column051","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column051","query_location":1362,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column052","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column052","query_location":1385,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column053","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column053","query_location":1408,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column054","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column054","query_location":1431,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column055","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column055","query_location":1454,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column056","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column056","query_location":1477,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column057","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column057","query_location":1501,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column058","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column058","query_location":1524,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column059","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column059","query_location":1547,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column060","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column060","query_location":1570,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column061","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column061","query_location":1593,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column062","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column062","query_location":1616,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column063","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column063","query_location":1639,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column064","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column064","query_location":1663,"query_location_length":11,"literal":{"kind":"STRING","text":"TIMESTAMP"}}},{"name":"column065","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column065","query_location":1689,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column066","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column066","query_location":1712,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column067","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column067","query_location":1735,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column068","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column068","query_location":1758,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column069","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column069","query_location":1781,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column070","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column070","query_location":1804,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column071","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column071","query_location":1827,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column072","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column072","query_location":1850,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column073","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column073","query_location":1873,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column074","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column074","query_location":1896,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column075","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column075","query_location":1920,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column076","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column076","query_location":1944,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column077","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column077","query_location":1968,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column078","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column078","query_location":1992,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column079","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column079","query_location":2015,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column080","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column080","query_location":2038,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column081","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column081","query_location":2061,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column082","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column082","query_location":2084,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column083","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column083","query_location":2107,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column084","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column084","query_location":2130,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column085","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column085","query_location":2153,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column086","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column086","query_location":2176,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column087","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column087","query_location":2200,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column088","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column088","query_location":2223,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column089","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column089","query_location":2247,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column090","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column090","query_location":2271,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column091","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column091","query_location":2294,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column092","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column092","query_location":2318,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column093","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column093","query_location":2342,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column094","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column094","query_location":2366,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column095","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column095","query_location":2390,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column096","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column096","query_location":2414,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column097","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column097","query_location":2438,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column098","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column098","query_location":2462,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column099","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column099","query_location":2486,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column100","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column100","query_location":2510,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"column101","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column101","query_location":2534,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column102","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column102","query_location":2557,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column103","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column103","query_location":2580,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"column104","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column104","query_location":2603,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":2614,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2614,"query_location_length":10,"column_names":["dateformat"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2625,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%m-%d"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from '{DATA_DIR}/csv/lineitem-carriage.csv';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":38,"schema_name":"","table_name":"{DATA_DIR}/csv/lineitem-carriage.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/lineitem-carriage.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv(['{DATA_DIR}/csv/multiple_files/different_order/file_1.csv','{DATA_DIR}/csv/multiple_files/different_order/file_2.csv'])\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":129,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":119,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":58,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/multiple_files/different_order/file_1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":58,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/multiple_files/different_order/file_2.csv"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column0 FROM read_csv('{DATA_DIR}/csv/one_r_two.csv',new_line ='\\r', strict_mode = TRUE, HEADER = FALSE)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["column0"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":91,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":30,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/one_r_two.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":8,"column_names":["new_line"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"literal":{"kind":"STRING","text":"\\r"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":76,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":11,"column_names":["strict_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":96,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":6,"column_names":["HEADER"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * exclude(scan_id ) from reject_errors order by all limit 5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":19,"relation_name":"","exclude_list":["scan_id"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":13,"schema_name":"","table_name":"reject_errors","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["reject_errors"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_csv('{DATA_DIR}/csv/nullpadding.csv',null_padding=true, columns={\n'a': 'INTEGER','b': 'INTEGER','c': 'INTEGER','d': 'INTEGER', 'e': 'INTEGER'}, auto_detect := false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":170,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":32,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/nullpadding.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":86,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":78,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":90,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":105,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":120,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":135,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}},{"name":"e","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"e","query_location":151,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"auto_detect","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"auto_detect","query_location":178,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from read_csv('{DATA_DIR}/csv/evil_nullpadding.csv', delim = ';', quote = '\"', null_padding = True, header = 0, buffer_size = 27)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":124,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":37,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/evil_nullpadding.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":12,"column_names":["null_padding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":128,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":11,"column_names":["buffer_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":2,"literal":{"kind":"INTEGER","text":"27"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quote, escape FROM sniff_csv('{TEST_DIR}/out_2.csv');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["quote"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["escape"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":33,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":22,"literal":{"kind":"STRING","text":"{TEST_DIR}/out_2.csv"}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('{DATA_DIR}/csv/real/lineitem_sample.csv', sep='|', columns=STRUCT_PACK(l_orderkey := 5))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":98,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/real/lineitem_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":3,"column_names":["sep"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":28,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"l_orderkey","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"l_orderkey","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quote, escape from sniff_csv('{DATA_DIR}/csv/16857.csv', ignore_errors = true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["quote"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["escape"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":59,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":26,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/16857.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/test/dateformat.csv', auto_detect=false, delim=',', quote='\"', escape='\"', new_line='\\n', skip=0, header=false, columns={'column0': 'DATE'}, dateformat='%d/%m/%Y');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":188,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":36,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/test/dateformat.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":5,"column_names":["quote"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":93,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":6,"column_names":["escape"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":3,"literal":{"kind":"STRING","text":"\""}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":8,"column_names":["new_line"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":4,"literal":{"kind":"STRING","text":"\\n"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":120,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":4,"column_names":["skip"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":128,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":142,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":150,"query_location_length":19,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"column0","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"column0","query_location":162,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":10,"column_names":["dateformat"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":182,"query_location_length":10,"literal":{"kind":"STRING","text":"%d/%m/%Y"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM sniff_csv('{DATA_DIR}/csv/real/lineitem_sample.csv', delim='|');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/real/lineitem_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM sniff_csv('{DATA_DIR}/csv/real/lineitem_sample.csv', columns={'c1': 'BIGINT', 'c2': 'BIGINT', 'c3': 'BIGINT', 'c4': 'BIGINT', 'c5': 'BIGINT', 'c6': 'DOUBLE', 'c7': 'DOUBLE', 'c8': 'DOUBLE', 'c9': 'VARCHAR', 'c10': 'VARCHAR', 'c11': 'DATE', 'c12': 'DATE', 'c13': 'DATE', 'c14': 'VARCHAR', 'c15': 'VARCHAR', 'c16': 'VARCHAR'}, auto_detect = false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":345,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/real/lineitem_sample.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":270,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":262,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c1","query_location":73,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"c2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c2","query_location":89,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"c3","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c3","query_location":105,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"c4","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c4","query_location":121,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"c5","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c5","query_location":137,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"c6","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c6","query_location":153,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"c7","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c7","query_location":169,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"c8","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c8","query_location":185,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},{"name":"c9","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c9","query_location":201,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"c10","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c10","query_location":219,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"c11","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c11","query_location":237,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"c12","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c12","query_location":252,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"c13","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c13","query_location":267,"query_location_length":6,"literal":{"kind":"STRING","text":"DATE"}}},{"name":"c14","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c14","query_location":282,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"c15","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c15","query_location":300,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"c16","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c16","query_location":318,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":330,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":330,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":344,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT delimiter FROM sniff_csv('{DATA_DIR}/csv/ignore_errors.csv', ignore_errors=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["delimiter"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":22,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":34,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/ignore_errors.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from '{DATA_DIR}/csv/soccer_kaggle.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":34,"schema_name":"","table_name":"{DATA_DIR}/csv/soccer_kaggle.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/soccer_kaggle.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('{DATA_DIR}/csv/thousands_separator/simple.csv', thousands = ',', delim = ';', columns = {'a':'double'}, header = False, auto_detect = false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":150,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":47,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/thousands_separator/simple.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":9,"column_names":["thousands"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":3,"literal":{"kind":"STRING","text":";"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":93,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":108,"query_location_length":8,"literal":{"kind":"STRING","text":"double"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":119,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":135,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select columns from sniff_csv('{DATA_DIR}/csv/thousands_separator/integers.csv', thousands = ',')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["columns"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":77,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sniff_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":49,"literal":{"kind":"STRING","text":"{DATA_DIR}/csv/thousands_separator/integers.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":9,"column_names":["thousands"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}}],"qualified_name":{"path":["sniff_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(a), COUNT(b), COUNT(c), COUNT(filename)\nFROM read_csv_auto(['{TEMP_DIR}/ubn1.csv', '{TEMP_DIR}/ubn2.csv', '{TEMP_DIR}/ubn3.csv'], UNION_BY_NAME=TRUE)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":15,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":59,"query_location_length":104,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":69,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":21,"literal":{"kind":"STRING","text":"{TEMP_DIR}/ubn1.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":21,"literal":{"kind":"STRING","text":"{TEMP_DIR}/ubn2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":21,"literal":{"kind":"STRING","text":"{TEMP_DIR}/ubn3.csv"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":144,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":13,"column_names":["UNION_BY_NAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM read_csv('data/csv/encodings/utf16_odd_length.csv', encoding = 'utf-16', header = false);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":88,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":41,"literal":{"kind":"STRING","text":"data/csv/encodings/utf16_odd_length.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":8,"column_names":["encoding"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":8,"literal":{"kind":"STRING","text":"utf-16"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM web_page ORDER BY wp_web_page_sk LIMIT 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":14,"column_names":["wp_web_page_sk"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"web_page","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["web_page"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{DATA_DIR}/csv/issue2628_中文.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":37,"schema_name":"","table_name":"{DATA_DIR}/csv/issue2628_中文.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/issue2628_中文.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM encrypted.fuu","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":13,"schema_name":"encrypted","table_name":"fuu","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["encrypted","fuu"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l_suppkey FROM encrypted.lineitem limit 10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["l_suppkey"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":18,"schema_name":"encrypted","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["encrypted","lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM read_csv_auto('{TEST_DIR}/file_size_bytes_csv4/*.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":39,"literal":{"kind":"STRING","text":"{TEST_DIR}/file_size_bytes_csv4/*.csv"}}}],"qualified_name":{"path":["read_csv_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(i) FROM read_csv('__TEST_DIR__/tiny_fsb/*.csv')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":29,"literal":{"kind":"STRING","text":"__TEST_DIR__/tiny_fsb/*.csv"}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{TEST_DIR}/part/a=9/basename[0-9]*.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":44,"schema_name":"","table_name":"{TEST_DIR}/part/a=9/basename[0-9]*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/part/a=9/basename[0-9]*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from parquet_scan('{DATA_DIR}/parquet-testing/afl/{i}.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/afl/{i}.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select column_id, BOOL_AND(bloom_filter_offset \u003e 4), BOOL_AND(bloom_filter_length \u003e 1) from parquet_metadata('{TEST_DIR}/dict-{type}.parquet') group by column_id order by column_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":9,"column_names":["column_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["column_id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":33,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":27,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":19,"column_names":["bloom_filter_offset"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}}],"qualified_name":{"path":["bool_and"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":33,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":62,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":19,"column_names":["bloom_filter_length"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["bool_and"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":93,"query_location_length":50,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":32,"literal":{"kind":"STRING","text":"{TEST_DIR}/dict-{type}.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":9,"column_names":["column_id"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{DATA_DIR}/parquet-testing/aws_kinesis.parquet' WHERE event_timestamp=TIMESTAMP '2022-11-22 00:01:13.175';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":48,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/aws_kinesis.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/aws_kinesis.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":51,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":15,"column_names":["event_timestamp"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":85,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2022-11-22 00:01:13.175"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":85,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM parquet_kv_metadata('{TEST_DIR}/bloom_interval_nested.parquet')\nWHERE key = 'duckdb.interval_bloom_filter'\n\tAND decode(value) = 'normalized-v1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_kv_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":42,"literal":{"kind":"STRING","text":"{TEST_DIR}/bloom_interval_nested.parquet"}}}],"qualified_name":{"path":["parquet_kv_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":91,"query_location_length":73,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":91,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":3,"column_names":["key"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":30,"literal":{"kind":"STRING","text":"duckdb.interval_bloom_filter"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":133,"query_location_length":31,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":13,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["decode"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":15,"literal":{"kind":"STRING","text":"normalized-v1"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/bloom_in.parquet')\nWHERE r IN (NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":29,"literal":{"kind":"STRING","text":"{TEST_DIR}/bloom_in.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":76,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["r"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(list_value)\nFROM read_parquet('{TEST_DIR}/bloom_list.parquet')\nWHERE list_value[2] = 102;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":10,"column_names":["list_value"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":30,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":31,"literal":{"kind":"STRING","text":"{TEST_DIR}/bloom_list.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":19,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":92,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":10,"column_names":["list_value"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":3,"literal":{"kind":"INTEGER","text":"102"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM assert_bloom_filter_hit('{TEST_DIR}/bloom1.parquet', 'r_float', 200);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":68,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"assert_bloom_filter_hit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":27,"literal":{"kind":"STRING","text":"{TEST_DIR}/bloom1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":9,"literal":{"kind":"STRING","text":"r_float"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}}],"qualified_name":{"path":["assert_bloom_filter_hit"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bool_and(bloom_filter_excludes)\nFROM parquet_bloom_probe('{TEST_DIR}/bloom_temporal.parquet', 'ts',\n TIMESTAMP '2000-01-01' + INTERVAL 1001 SECOND);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":21,"column_names":["bloom_filter_excludes"]}}],"qualified_name":{"path":["bool_and"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":44,"query_location_length":134,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_bloom_probe","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/bloom_temporal.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":4,"literal":{"kind":"STRING","text":"ts"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":155,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":132,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2000-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":157,"query_location_length":20,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1001"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["to_seconds"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["parquet_bloom_probe"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM '{TEST_DIR}/bloom_blob.parquet' lhs\nJOIN '{TEST_DIR}/bloom_blob.parquet' rhs ON lhs.b = rhs.b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":57,"query_location_length":57,"left":{"type":"BASE_TABLE","alias":"lhs","sample":null,"query_location":21,"query_location_length":35,"schema_name":"","table_name":"{TEST_DIR}/bloom_blob.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/bloom_blob.parquet"]}},"right":{"type":"BASE_TABLE","alias":"rhs","sample":null,"query_location":62,"query_location_length":35,"schema_name":"","table_name":"{TEST_DIR}/bloom_blob.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/bloom_blob.parquet"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":101,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":5,"column_names":["lhs","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":5,"column_names":["rhs","b"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/bloom_ndf_signed_zero.parquet')\nWHERE x IS NOT DISTINCT FROM 0.0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":42,"literal":{"kind":"STRING","text":"{TEST_DIR}/bloom_ndf_signed_zero.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":84,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from parquet_scan('test/sql/copy/parquet/broken/garbledfooter.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":52,"literal":{"kind":"STRING","text":"test/sql/copy/parquet/broken/garbledfooter.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM (\n\tSELECT i, row_number() OVER () - 1 AS expected\n\tFROM read_parquet('{TEST_DIR}/cte_nested_batch_exchange.parquet')\n)\nWHERE i != expected;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":118,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"expected","query_location":55,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":34,"query_location_length":20,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":77,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":46,"literal":{"kind":"STRING","text":"{TEST_DIR}/cte_nested_batch_exchange.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":146,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":8,"column_names":["expected"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT dictionary_page_offset IS NULL FROM parquet_metadata('{TEST_DIR}/dictionary_compression_ratio_threshold.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":30,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":22,"column_names":["dictionary_page_offset"]}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":43,"query_location_length":77,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":59,"literal":{"kind":"STRING","text":"{TEST_DIR}/dictionary_compression_ratio_threshold.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select x from read_parquet('{DATA_DIR}/parquet-testing/float16.parquet') where x \u003e 1.1 order by x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/float16.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":79,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{DATA_DIR}/parquet-testing/broken/broken_timestamp.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":60,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/broken/broken_timestamp.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/broken/broken_timestamp.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(ts), ts::VARCHAR\nFROM read_parquet('{DATA_DIR}/parquet-testing/int96_nanoseconds_dictionary.parquet', int96_as='timestamp_ns')\nORDER BY ts","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":2,"column_names":["ts"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["typeof"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["ts"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":104,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":65,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/int96_nanoseconds_dictionary.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":8,"column_names":["int96_as"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":14,"literal":{"kind":"STRING","text":"timestamp_ns"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lo::VARCHAR || '|' || hi::VARCHAR FROM read_parquet('{TEST_DIR}/int96_full_range.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["lo"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":2,"column_names":["hi"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":46,"query_location_length":51,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":37,"literal":{"kind":"STRING","text":"{TEST_DIR}/int96_full_range.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT key::VARCHAR, value::VARCHAR FROM parquet_kv_metadata('{TEST_DIR}/kv_metadata_test3.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["key"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":5,"column_names":["value"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":59,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_kv_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":38,"literal":{"kind":"STRING","text":"{TEST_DIR}/kv_metadata_test3.parquet"}}}],"qualified_name":{"path":["parquet_kv_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT unnest(parquet_metadata, recursive:=True) FROM parquet_full_metadata('data/parquet-testing/lineitem-top10000.gzip.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":16,"column_names":["parquet_metadata"]}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":43,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":54,"query_location_length":76,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_full_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":53,"literal":{"kind":"STRING","text":"data/parquet-testing/lineitem-top10000.gzip.parquet"}}}],"qualified_name":{"path":["parquet_full_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT info['source'] FROM duckdb_logs_parsed('AdaptiveFilter')\nWHERE event = 'INIT' AND file_path LIKE '%af_cross_2.parquet' ORDER BY timestamp LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":9,"column_names":["timestamp"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":11,"query_location_length":10,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["info"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":8,"literal":{"kind":"STRING","text":"source"}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":27,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":16,"literal":{"kind":"STRING","text":"AdaptiveFilter"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":70,"query_location_length":55,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":6,"literal":{"kind":"STRING","text":"INIT"}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":26,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":9,"column_names":["file_path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":21,"literal":{"kind":"STRING","text":"%af_cross_2.parquet"}}}],"qualified_name":{"path":["~~"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT info['source'] FROM duckdb_logs_parsed('AdaptiveFilter')\nWHERE event = 'INIT' AND file_path LIKE '%ord_cab.parquet' ORDER BY timestamp LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":9,"column_names":["timestamp"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":11,"query_location_length":10,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["info"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":8,"literal":{"kind":"STRING","text":"source"}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":27,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":16,"literal":{"kind":"STRING","text":"AdaptiveFilter"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":70,"query_location_length":52,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":6,"literal":{"kind":"STRING","text":"INIT"}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":23,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":9,"column_names":["file_path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":18,"literal":{"kind":"STRING","text":"%ord_cab.parquet"}}}],"qualified_name":{"path":["~~"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_val.f, struct_val.i\nFROM integer_file_first\nWHERE struct_val.i='042'::INTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["struct_val","f"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":12,"column_names":["struct_val","i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":18,"schema_name":"","table_name":"integer_file_first","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integer_file_first"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":12,"column_names":["struct_val","i"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":5,"literal":{"kind":"STRING","text":"042"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM '{DATA_DIR}/parquet-testing/p2.parquet' limit 10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":39,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/p2.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/p2.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_name FROM (DESCRIBE FROM '{DATA_DIR}/parquet-testing/bug13053.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":24,"query_location_length":61,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":45,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/bug13053.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/bug13053.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/bug1589.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/bug1589.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/bug2267.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/bug2267.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{TEST_DIR}/tiny_decimal.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":33,"schema_name":"","table_name":"{TEST_DIR}/tiny_decimal.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/tiny_decimal.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(i), count(s), count(d), count(dt) FROM '{TEST_DIR}/all_null_types.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":9,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":35,"schema_name":"","table_name":"{TEST_DIR}/all_null_types.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/all_null_types.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/binary_string.parquet',binary_as_string=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":86,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":50,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/binary_string.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":16,"column_names":["binary_as_string"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), min(id), max(id) FROM read_parquet(['{TEST_DIR}/column_stats_1.parquet', '{TEST_DIR}/column_stats_2.parquet'],\n column_statistics := MAP {'id': MAP {'min': '0', 'max': '199999', 'count': '200000', 'null_count': '0', 'distinct_count': '200000'}})\nWHERE id \u003e= 150000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":2,"column_names":["id"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":2,"column_names":["id"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":226,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":74,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/column_stats_1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/column_stats_2.parquet"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"column_statistics","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"column_statistics","query_location":153,"query_location_length":111,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":4,"literal":{"kind":"STRING","text":"id"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":164,"query_location_length":99,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":5,"literal":{"kind":"STRING","text":"min"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":5,"literal":{"kind":"STRING","text":"max"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":7,"literal":{"kind":"STRING","text":"count"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":217,"query_location_length":12,"literal":{"kind":"STRING","text":"null_count"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":236,"query_location_length":16,"literal":{"kind":"STRING","text":"distinct_count"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":176,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":8,"literal":{"kind":"STRING","text":"199999"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":207,"query_location_length":8,"literal":{"kind":"STRING","text":"200000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":254,"query_location_length":8,"literal":{"kind":"STRING","text":"200000"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":272,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":272,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":6,"literal":{"kind":"INTEGER","text":"150000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM '{DATA_DIR}/parquet-testing/out_of_range_stats.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":55,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/out_of_range_stats.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/out_of_range_stats.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT path_in_schema, encodings\nFROM parquet_metadata('{TEST_DIR}/skip_v2_encodings.parquet')\nWHERE path_in_schema IN ('f', 'd', 's')\nORDER BY path_in_schema","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":14,"column_names":["path_in_schema"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":14,"column_names":["path_in_schema"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":9,"column_names":["encodings"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":38,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":38,"literal":{"kind":"STRING","text":"{TEST_DIR}/skip_v2_encodings.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":119,"query_location_length":15,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":14,"column_names":["path_in_schema"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":3,"literal":{"kind":"STRING","text":"f"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":3,"literal":{"kind":"STRING","text":"d"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":3,"literal":{"kind":"STRING","text":"s"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), min(i), max(i) FROM read_parquet('{TEST_DIR}/encrypted_metadata_cache.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":37,"query_location_length":59,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":45,"literal":{"kind":"STRING","text":"{TEST_DIR}/encrypted_metadata_cache.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT event, count(*) FROM duckdb_logs_parsed('PhysicalOperator') WHERE class='ParquetReader' GROUP BY event ORDER BY event","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":5,"column_names":["event"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["event"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":18,"literal":{"kind":"STRING","text":"PhysicalOperator"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":15,"literal":{"kind":"STRING","text":"ParquetReader"}}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":5,"column_names":["event"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM '{TEST_DIR}/expr_prune_prefix_utf8_boundary.parquet'\nWHERE prefix(s, chr(255)) OR prefix(s, 'zz')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":52,"schema_name":"","table_name":"{TEST_DIR}/expr_prune_prefix_utf8_boundary.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/expr_prune_prefix_utf8_boundary.parquet"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":80,"query_location_length":38,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":19,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":8,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":3,"literal":{"kind":"INTEGER","text":"255"}}}],"qualified_name":{"path":["chr"]}}}],"qualified_name":{"path":["prefix"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":15,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":4,"literal":{"kind":"STRING","text":"zz"}}}],"qualified_name":{"path":["prefix"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_schema('{DATA_DIR}/parquet-testing/arrow/lineitem-arrow.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":73,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":57,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/arrow/lineitem-arrow.parquet"}}}],"qualified_name":{"path":["parquet_schema"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, j, parse_path(filename)[-2:] as file FROM parquet_scan(['{DATA_DIR}/parquet-testing/glob/t1.parquet', '{DATA_DIR}/parquet-testing/glob/t1.parquet', '{DATA_DIR}/parquet-testing/glob/t2.parquet'], FILENAME=1) where filename like '%t1%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"file","query_location":33,"query_location_length":5,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":20,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["parse_path"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":1,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":52,"query_location_length":164,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":138,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/t1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/t1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/t2.parquet"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":205,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":205,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":214,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":232,"query_location_length":11,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":223,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":237,"query_location_length":6,"literal":{"kind":"STRING","text":"%t1%"}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select id, value from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/*/*/*/test.parquet', FILENAME=1) where filename like '%mismatching_count%' and value = 'value1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["value"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":22,"query_location_length":91,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":65,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/hive-partitioning/*/*/*/test.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":8,"column_names":["FILENAME"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":120,"query_location_length":56,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":26,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":21,"literal":{"kind":"STRING","text":"%mismatching_count%"}}}],"qualified_name":{"path":["~~"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":160,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":5,"column_names":["value"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":8,"literal":{"kind":"STRING","text":"value1"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM f WHERE c = 0.1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"f","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["f"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{DATA_DIR}/parquet-testing/parquet_go.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":47,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/parquet_go.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/parquet_go.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from parquet_scan('{DATA_DIR}/parquet-testing/hive-partitioning/mismatching_count/*/*/test.parquet', HIVE_PARTITIONING=1) WHERE part=b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":116,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":81,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/hive-partitioning/mismatching_count/*/*/test.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":17,"column_names":["HIVE_PARTITIONING"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":137,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":4,"column_names":["part"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":1,"column_names":["b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_parquet('{TEST_DIR}/aliased_hive/*/*.parquet') AS t(a,b) WHERE b=999","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":21,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":37,"literal":{"kind":"STRING","text":"{TEST_DIR}/aliased_hive/*/*.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":["a","b"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":89,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":3,"literal":{"kind":"INTEGER","text":"999"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (p IS NULL)::INTEGER AS is_null, COALESCE((p='NULL')::INTEGER, -1) AS equals_literal, id\nFROM parquet_scan('{TEST_DIR}/hive-literal-null-partition/**/*.parquet', hive_partitioning=1)\nORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"is_null","query_location":18,"query_location_length":9,"child":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":10,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["p"]}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"equals_literal","query_location":40,"query_location_length":33,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["p"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":6,"literal":{"kind":"STRING","text":"NULL"}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":101,"query_location_length":88,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":53,"literal":{"kind":"STRING","text":"{TEST_DIR}/hive-literal-null-partition/**/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/hive_override_u/part=42/*.parquet') u\nJOIN read_parquet('{TEST_DIR}/hive_override_s/part=42/*.parquet') s ON u.part = s.part","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":84,"query_location_length":86,"left":{"type":"TABLE_FUNCTION","alias":"u","sample":null,"query_location":21,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":46,"literal":{"kind":"STRING","text":"{TEST_DIR}/hive_override_u/part=42/*.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"s","sample":null,"query_location":89,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":46,"literal":{"kind":"STRING","text":"{TEST_DIR}/hive_override_s/part=42/*.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":155,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":6,"column_names":["u","part"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":6,"column_names":["s","part"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT logical_type FROM parquet_schema('{TEST_DIR}/json_varchar_mismatch1.parquet') WHERE name='memberDn';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["logical_type"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":59,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":43,"literal":{"kind":"STRING","text":"{TEST_DIR}/json_varchar_mismatch1.parquet"}}}],"qualified_name":{"path":["parquet_schema"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":91,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":10,"literal":{"kind":"STRING","text":"memberDn"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from parquet_scan(['{DATA_DIR}/parquet-testing/glob/*.parquet', '{DATA_DIR}/parquet-testing/glob/t2.parquet']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":105,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":91,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":43,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/*.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/t2.parquet"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from parquet_schema(['{DATA_DIR}/parquet-testing/decimal/int64_decimal.parquet', '{DATA_DIR}/parquet-testing/decimal/int64_decimal.parquet']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":136,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":120,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":58,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/decimal/int64_decimal.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":58,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/decimal/int64_decimal.parquet"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["parquet_schema"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from parquet_scan('{DATA_DIR}/parquet-testing/cache/cache1.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":49,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/cache/cache1.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT row_group_id, path_in_schema, encodings, stats_nan_count, stats_null_count, stats_min_value, stats_max_value\nFROM parquet_metadata('{TEST_DIR}/nan_count_bss.parquet')\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["row_group_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":14,"column_names":["path_in_schema"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":9,"column_names":["encodings"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":15,"column_names":["stats_nan_count"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":16,"column_names":["stats_null_count"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":15,"column_names":["stats_min_value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":15,"column_names":["stats_max_value"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":121,"query_location_length":52,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":34,"literal":{"kind":"STRING","text":"{TEST_DIR}/nan_count_bss.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(b + j) FROM read_parquet('{TEST_DIR}/cost_model_gap.parquet') WHERE a \u003e= 0 AND c \u003e= 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/cost_model_gap.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":79,"query_location_length":17,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":79,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":90,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bit_xor(hash(flag,payload,file_row_number))\nFROM read_parquet('{TEST_DIR}/cheap_first_filter.parquet',file_row_number=true)\nWHERE file_row_number%2=0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"bit_xor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":34,"function_name":"hash","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["flag"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":7,"column_names":["payload"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":15,"column_names":["file_row_number"]}}],"qualified_name":{"path":["hash"]}}}],"qualified_name":{"path":["bit_xor"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":56,"query_location_length":74,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":39,"literal":{"kind":"STRING","text":"{TEST_DIR}/cheap_first_filter.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":109,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":15,"column_names":["file_row_number"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":137,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":17,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":15,"column_names":["file_row_number"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":153,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(g + d)\nFROM read_parquet('{TEST_DIR}/rgo_proj.parquet')\nWHERE a \u003e= 0 AND b \u003e= 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["g"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":29,"literal":{"kind":"STRING","text":"{TEST_DIR}/rgo_proj.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":73,"query_location_length":17,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":73,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":84,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT row_group_id, fully_filtered, strategy, prefetch_groups\nFROM duckdb_logs_parsed('ParquetPrefetch')\nWHERE file_path LIKE '%rgo2.parquet'\nORDER BY row_group_id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":12,"column_names":["row_group_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["row_group_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":14,"column_names":["fully_filtered"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":8,"column_names":["strategy"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":15,"column_names":["prefetch_groups"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":68,"query_location_length":37,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":17,"literal":{"kind":"STRING","text":"ParquetPrefetch"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":20,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":9,"column_names":["file_path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":15,"literal":{"kind":"STRING","text":"%rgo2.parquet"}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(a) FROM read_parquet('{TEST_DIR}/force.parquet', prefetch_strategy='auto')\nWHERE b \u003e= 0 AND b \u003c 10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":26,"literal":{"kind":"STRING","text":"{TEST_DIR}/force.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":17,"column_names":["prefetch_strategy"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":6,"literal":{"kind":"STRING","text":"auto"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":92,"query_location_length":17,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":92,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":103,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(len(l)), sum(s.a), count(n) FROM read_parquet('{TEMP_DIR}/row_group_row_count.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":6,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["len"]}}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["s","a"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":54,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":40,"literal":{"kind":"STRING","text":"{TEMP_DIR}/row_group_row_count.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (\n\tSELECT name, duckdb_type FROM parquet_schema('{TEMP_DIR}/parquet_schema_duckdb_type.parquet')\n\tWHERE name IN ('l', 's', 'm', 'v', 'g')\n\tEXCEPT\n\tSELECT column_name, column_type FROM (DESCRIBE FROM '{TEMP_DIR}/parquet_schema_duckdb_type.parquet')\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":249,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":11,"column_names":["duckdb_type"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":54,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":47,"literal":{"kind":"STRING","text":"{TEMP_DIR}/parquet_schema_duckdb_type.parquet"}}}],"qualified_name":{"path":["parquet_schema"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":133,"query_location_length":25,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":4,"column_names":["name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":3,"literal":{"kind":"STRING","text":"l"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":3,"literal":{"kind":"STRING","text":"s"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":3,"literal":{"kind":"STRING","text":"m"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":3,"literal":{"kind":"STRING","text":"v"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":3,"literal":{"kind":"STRING","text":"g"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":205,"query_location_length":63,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":220,"query_location_length":47,"schema_name":"","table_name":"{TEMP_DIR}/parquet_schema_duckdb_type.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/parquet_schema_duckdb_type.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, a FROM '{TEST_DIR}/evolution_*.parquet' WHERE id=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":32,"schema_name":"","table_name":"{TEST_DIR}/evolution_*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/evolution_*.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM '{DATA_DIR}/parquet-testing/issue6990.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":46,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/issue6990.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/issue6990.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v::VARCHAR FROM '__TEST_DIR__/shred_varchar.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":36,"schema_name":"","table_name":"__TEST_DIR__/shred_varchar.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["__TEST_DIR__/shred_varchar.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from '{DATA_DIR}/parquet-testing/unsigned_stats.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":51,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/unsigned_stats.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/unsigned_stats.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT stats_min, stats_max, stats_min_value, stats_max_value FROM parquet_metadata('{DATA_DIR}/parquet-testing/data-types.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["stats_min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":9,"column_names":["stats_max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":15,"column_names":["stats_min_value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":15,"column_names":["stats_max_value"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":67,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":47,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/data-types.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a \nFROM parquet_scan(['{TEST_DIR}/ubn2.parquet', '{TEST_DIR}/ubn1.parquet', '{TEST_DIR}/ubn3.parquet'])\nORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":15,"query_location_length":95,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":81,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/ubn2.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/ubn1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEST_DIR}/ubn3.parquet"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT file_index, i, j\nFROM read_parquet(['{DATA_DIR}/parquet-testing/glob/t1.parquet', '{DATA_DIR}/parquet-testing/glob/t2.parquet', '{DATA_DIR}/parquet-testing/glob2/t1.parquet'])\nWHERE file_index=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["file_index"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":153,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":139,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/t1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":44,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob/t2.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":45,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/glob2/t1.parquet"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":189,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":10,"column_names":["file_index"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":200,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from '{TEST_DIR}/rg.parquet' where file_row_group_number in (1, 3) and i between 4096 and 6143;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":23,"schema_name":"","table_name":"{TEST_DIR}/rg.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/rg.parquet"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":51,"query_location_length":59,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":76,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":21,"column_names":["file_row_group_number"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]},{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":89,"query_location_length":21,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["i"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"literal":{"kind":"INTEGER","text":"4096"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":4,"literal":{"kind":"INTEGER","text":"6143"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{TEMP_DIR}/{codec}.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":28,"literal":{"kind":"STRING","text":"{TEMP_DIR}/{codec}.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class='ParquetReader' AND event='ReadRowGroup'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":18,"literal":{"kind":"STRING","text":"PhysicalOperator"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":66,"query_location_length":46,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":15,"literal":{"kind":"STRING","text":"ParquetReader"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":92,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":14,"literal":{"kind":"STRING","text":"ReadRowGroup"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(i) FROM read_parquet('{TEST_DIR}/waiting_consumers/**/*.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":43,"literal":{"kind":"STRING","text":"{TEST_DIR}/waiting_consumers/**/*.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), min(id), max(id) FROM read_single_parquet_file('{TEST_DIR}/single_rg.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":2,"column_names":["id"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":2,"column_names":["id"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_single_parquet_file","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":30,"literal":{"kind":"STRING","text":"{TEST_DIR}/single_rg.parquet"}}}],"qualified_name":{"path":["read_single_parquet_file"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, b, c FROM read_parquet('{TEST_DIR}/multi_*.parquet', union_by_name=true) ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":28,"literal":{"kind":"STRING","text":"{TEST_DIR}/multi_*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select s.shredding_state, s.fully_shredded.stats.min, s.fully_shredded.stats.max, s.fully_shredded.stats.has_null, s.fully_shredded.stats.has_no_null FROM (select stats(col) s from '{TEST_DIR}/fully_shredded_primitive.parquet' limit 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":17,"column_names":["s","shredding_state"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":26,"column_names":["s","fully_shredded","stats","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":26,"column_names":["s","fully_shredded","stats","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":31,"column_names":["s","fully_shredded","stats","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":34,"column_names":["s","fully_shredded","stats","has_no_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":155,"query_location_length":80,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":163,"query_location_length":10,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":3,"column_names":["col"]}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":181,"query_location_length":45,"schema_name":"","table_name":"{TEST_DIR}/fully_shredded_primitive.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/fully_shredded_primitive.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select s.fully_shredded.a, s.fully_shredded.c.stats.min from (select stats(col) s from '{TEST_DIR}/not_fully_shredded_object_field.parquet' limit 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["s","fully_shredded","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":28,"column_names":["s","fully_shredded","c","stats","min"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":61,"query_location_length":87,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":69,"query_location_length":10,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["col"]}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":52,"schema_name":"","table_name":"{TEST_DIR}/not_fully_shredded_object_field.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/not_fully_shredded_object_field.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/decimal_dc.parquet') limit 10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":69,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":55,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/decimal/decimal_dc.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/decimal/byte_array_decimal_gt38.parquet') WHERE x \u003e 100","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":82,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":68,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/decimal/byte_array_decimal_gt38.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":110,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT gender, first_name FROM parquet_scan('{DATA_DIR}/parquet-testing/userdata1.parquet') where first_name = 'Mark' and gender \u003c\u003e ''","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["gender"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":10,"column_names":["first_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":31,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":46,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/userdata1.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":98,"query_location_length":36,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":10,"column_names":["first_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":6,"literal":{"kind":"STRING","text":"Mark"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":122,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":6,"column_names":["gender"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM parquet_scan('{DATA_DIR}/parquet-testing/date.parquet') where d \u003e= cast('1975-01-01' as date) and d \u003c cast('1976-01-01' as date)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":55,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":41,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/date.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":83,"query_location_length":66,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":83,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["d"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":12,"literal":{"kind":"STRING","text":"1975-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":109,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":119,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["d"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":123,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":12,"literal":{"kind":"STRING","text":"1976-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":144,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, authors FROM parquet_scan('{DATA_DIR}/parquet-testing/apkwan.parquet') limit 10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["authors"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":43,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/apkwan.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{DATA_DIR}/parquet-testing/data-types.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":47,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/data-types.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT FIRST(email) OVER w, LAST(email) OVER w FROM userdata1 WINDOW w AS (ORDER BY id RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":7,"query_location_length":19,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["email"]}}],"qualified_name":{"path":["first_value"]}},{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"","query_location":28,"query_location_length":18,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["email"]}}],"qualified_name":{"path":["last_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":9,"schema_name":"","table_name":"userdata1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["userdata1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT FIRST(salary) OVER w, LAST(salary) OVER w FROM userdata1 WINDOW w AS (ORDER BY id RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":7,"query_location_length":20,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":6,"column_names":["salary"]}}],"qualified_name":{"path":["first_value"]}},{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"","query_location":29,"query_location_length":19,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":6,"column_names":["salary"]}}],"qualified_name":{"path":["last_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":9,"schema_name":"","table_name":"userdata1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["userdata1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select timestamp from '{DATA_DIR}/parquet-testing/issue_5533_timestamp_ms_stats.parquet' order by 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["timestamp"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":66,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/issue_5533_timestamp_ms_stats.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/issue_5533_timestamp_ms_stats.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, j, k, x\nFROM read_parquet('{DATA_DIR}/parquet-testing/hive-partitioning/union_by_name/*/*.parquet', hive_partitioning=1, union_by_name=1)\nWHERE x=2\nORDER BY j","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":167,"query_location_length":1,"column_names":["j"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":124,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":72,"literal":{"kind":"STRING","text":"{DATA_DIR}/parquet-testing/hive-partitioning/union_by_name/*/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":131,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":154,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_parquet(['{TEST_DIR}/union_by_name_pushdown1.parquet', '{TEST_DIR}/union_by_name_pushdown2.parquet'], union_by_name=True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":126,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":92,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":44,"literal":{"kind":"STRING","text":"{TEST_DIR}/union_by_name_pushdown1.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":44,"literal":{"kind":"STRING","text":"{TEST_DIR}/union_by_name_pushdown2.parquet"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id\nFROM read_parquet(['{TEST_DIR}/struct.parquet', '{TEST_DIR}/no_struct.parquet'], union_by_name = true)\nWHERE s.a IS NULL\nORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":15,"query_location_length":97,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":61,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":27,"literal":{"kind":"STRING","text":"{TEST_DIR}/struct.parquet"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":30,"literal":{"kind":"STRING","text":"{TEST_DIR}/no_struct.parquet"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":91,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":123,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":3,"column_names":["s","a"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.page_type, s.encoding, s.\"count\"\nFROM (SELECT unnest(encoding_stats) AS s FROM parquet_metadata('{TEST_DIR}/encoding_stats_v1.parquet'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["s","page_type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":10,"column_names":["s","encoding"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":9,"column_names":["s","count"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":47,"query_location_length":98,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":55,"query_location_length":22,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":14,"column_names":["encoding_stats"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":88,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":38,"literal":{"kind":"STRING","text":"{TEST_DIR}/encoding_stats_v1.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ufield\nFROM read_parquet('{TEMP_DIR}/u.parquet')\nORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["ufield"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":22,"literal":{"kind":"STRING","text":"{TEMP_DIR}/u.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), COUNT(b), BOOL_AND(b), BOOL_OR(b), SUM(CASE WHEN b THEN 1 ELSE 0 END) true_count, SUM(CASE WHEN b THEN 0 ELSE 1 END) false_count\nFROM '{TEST_DIR}/bools.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":11,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["bool_and"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":10,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["bool_or"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"true_count","query_location":52,"query_location_length":34,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":56,"query_location_length":29,"case_checks":[{"when_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["b"]},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"false_count","query_location":99,"query_location_length":34,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":103,"query_location_length":29,"case_checks":[{"when_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["b"]},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":151,"query_location_length":26,"schema_name":"","table_name":"{TEST_DIR}/bools.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/bools.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{TEST_DIR}/decimals.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":29,"schema_name":"","table_name":"{TEST_DIR}/decimals.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/decimals.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select field_id from parquet_schema('{TEST_DIR}/my.parquet') where name = 'value'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["field_id"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_schema","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":23,"literal":{"kind":"STRING","text":"{TEST_DIR}/my.parquet"}}}],"qualified_name":{"path":["parquet_schema"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":7,"literal":{"kind":"STRING","text":"value"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i = INTERVAL '580063 hours 44 minutes 54 seconds',\n datepart('month', i),\n datepart('day', i),\n datepart('hour', i),\n datepart('minute', i),\n datepart('second', i)\nFROM '{TEST_DIR}/large_interval.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":49,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":45,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":36,"literal":{"kind":"STRING","text":"580063 hours 44 minutes 54 seconds"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":20,"function_name":"datepart","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":7,"literal":{"kind":"STRING","text":"month"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["datepart"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":18,"function_name":"datepart","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":5,"literal":{"kind":"STRING","text":"day"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["datepart"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":121,"query_location_length":19,"function_name":"datepart","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":6,"literal":{"kind":"STRING","text":"hour"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["datepart"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":149,"query_location_length":21,"function_name":"datepart","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":8,"literal":{"kind":"STRING","text":"minute"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["datepart"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":179,"query_location_length":21,"function_name":"datepart","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":8,"literal":{"kind":"STRING","text":"second"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":198,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["datepart"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":206,"query_location_length":35,"schema_name":"","table_name":"{TEST_DIR}/large_interval.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/large_interval.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM '{TEST_DIR}/signed.parquet' WHERE d\u003c42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":27,"schema_name":"","table_name":"{TEST_DIR}/signed.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/signed.parquet"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":55,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["d"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts::VARCHAR, ts_s::VARCHAR, ts_ms::VARCHAR, ts_ns::VARCHAR, ts_tz::VARCHAR\nFROM '{TEST_DIR}/timestamp_int96.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["ts_s"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":5,"column_names":["ts_ms"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":5,"column_names":["ts_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":5,"column_names":["ts_tz"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":36,"schema_name":"","table_name":"{TEST_DIR}/timestamp_int96.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/timestamp_int96.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{TEST_DIR}/uuid.parquet' ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":25,"schema_name":"","table_name":"{TEST_DIR}/uuid.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/uuid.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT max(row_group_bytes) \u003c 1300000 FROM parquet_metadata('{TEST_DIR}/mixed/**/*.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":30,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":15,"column_names":["row_group_bytes"]}}],"qualified_name":{"path":["max"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"literal":{"kind":"INTEGER","text":"1300000"}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":43,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":31,"literal":{"kind":"STRING","text":"{TEST_DIR}/mixed/**/*.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{TEST_DIR}/scalar.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":27,"literal":{"kind":"STRING","text":"{TEST_DIR}/scalar.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM parquet_scan('{TEMP_DIR}/userdata1-zstd.parquet') ORDER BY 1 LIMIT 10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEMP_DIR}/userdata1-zstd.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT path_in_schema, stats_null_count, num_values FROM parquet_metadata('{TEST_DIR}/stats.parquet')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":14,"column_names":["path_in_schema"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":16,"column_names":["stats_null_count"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":10,"column_names":["num_values"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":44,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_metadata","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":26,"literal":{"kind":"STRING","text":"{TEST_DIR}/stats.parquet"}}}],"qualified_name":{"path":["parquet_metadata"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select key, COUNT(*)\nfrom parquet_scan('{TEST_DIR}/escaped_partitions/**/*.parquet')\nGROUP BY ALL\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"parquet_scan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":44,"literal":{"kind":"STRING","text":"{TEST_DIR}/escaped_partitions/**/*.parquet"}}}],"qualified_name":{"path":["parquet_scan"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), MIN(part2), MAX(part2), MIN(part1), MAX(part1), SUM(i)\nFROM '{TEST_DIR}/partition_join_pushdown_multi/**/*.parquet'\nWHERE part2=(SELECT MAX(part2) FROM tbl2) AND part1=date '2004-01-01'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":5,"column_names":["part2"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["part2"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":5,"column_names":["part1"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":5,"column_names":["part1"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":55,"schema_name":"","table_name":"{TEST_DIR}/partition_join_pushdown_multi/**/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/partition_join_pushdown_multi/**/*.parquet"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":139,"query_location_length":63,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":139,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":5,"column_names":["part2"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":145,"query_location_length":29,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":153,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":5,"column_names":["part2"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":169,"query_location_length":4,"schema_name":"","table_name":"tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":179,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":5,"column_names":["part1"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":185,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2004-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":185,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT part_col, value_col, value2_col FROM '{TEST_DIR}/partitioned2/part_col=prefix-1/*.parquet' ORDER BY value2_col;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":10,"column_names":["value2_col"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["part_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":9,"column_names":["value_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":10,"column_names":["value2_col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":53,"schema_name":"","table_name":"{TEST_DIR}/partitioned2/part_col=prefix-1/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/partitioned2/part_col=prefix-1/*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/ordered_only_asc/*.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":53,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":39,"literal":{"kind":"STRING","text":"{TEST_DIR}/ordered_only_asc/*.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT payload FROM read_csv('{TEST_DIR}/partitioned_by_compatibility/a=1/*.csv', HEADER = true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["payload"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":76,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":51,"literal":{"kind":"STRING","text":"{TEST_DIR}/partitioned_by_compatibility/a=1/*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":6,"column_names":["HEADER"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract(replace(filename, '\\', '/'), 'partition_path_csv/(.*)/[^/]*$', 1) AS dir, count(*)\nFROM read_csv('{TEST_DIR}/partition_path_csv/*/*.csv', hive_partitioning = false, filename = true)\nGROUP BY dir ORDER BY dir;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":226,"query_location_length":3,"column_names":["dir"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"dir","query_location":7,"query_location_length":80,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":27,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["replace"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":32,"literal":{"kind":"STRING","text":"partition_path_csv/(.*)/[^/]*$"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["regexp_extract"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":110,"query_location_length":93,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":39,"literal":{"kind":"STRING","text":"{TEST_DIR}/partition_path_csv/*/*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":160,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":187,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":187,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":213,"query_location_length":3,"column_names":["dir"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract(replace(filename, '\\', '/'), 'partition_path_json_columns/(.*)/[^/]*$', 1) AS dir, count(*), count(region)\nFROM read_json('{TEST_DIR}/partition_path_json_columns/*/*.json', hive_partitioning = false, filename = true)\nGROUP BY dir ORDER BY dir;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":261,"query_location_length":3,"column_names":["dir"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"dir","query_location":7,"query_location_length":89,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":27,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["replace"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":41,"literal":{"kind":"STRING","text":"partition_path_json_columns/(.*)/[^/]*$"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["regexp_extract"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":115,"query_location_length":13,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":6,"column_names":["region"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":134,"query_location_length":104,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":49,"literal":{"kind":"STRING","text":"{TEST_DIR}/partition_path_json_columns/*/*.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":195,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":195,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":222,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":222,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":248,"query_location_length":3,"column_names":["dir"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH files AS (\n\tSELECT p, count(DISTINCT filename) file_count\n\tFROM read_parquet(\n\t\t'{TEST_DIR}/partitioned_rotation_size/**/*.parquet',\n\t\tfilename = true,\n\t\thive_partitioning = true\n\t)\n\tGROUP BY p\n)\nSELECT min(file_count) \u003e 1\nFROM files;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"files","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["p"]},{"class":"FUNCTION","type":"FUNCTION","alias":"file_count","query_location":27,"query_location_length":24,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":69,"query_location_length":117,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":51,"literal":{"kind":"STRING","text":"{TEST_DIR}/partitioned_rotation_size/**/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":140,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":159,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":159,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":1,"column_names":["p"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":208,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":208,"query_location_length":15,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":212,"query_location_length":10,"column_names":["file_count"]}}],"qualified_name":{"path":["min"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":233,"query_location_length":5,"schema_name":"","table_name":"files","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["files"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT partition, SUM(col1) FILTER (col2%7\u003e2)\nFROM partitioned_tbl\nGROUP BY partition\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["partition"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":27,"function_name":"sum","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":36,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":6,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["col2"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":4,"column_names":["col1"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":15,"schema_name":"","table_name":"partitioned_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["partitioned_tbl"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":9,"column_names":["partition"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM read_parquet('{TEST_DIR}/ordered_partitioned/**/*.parquet', hive_partitioning = true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":85,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":45,"literal":{"kind":"STRING","text":"{TEST_DIR}/ordered_partitioned/**/*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":17,"column_names":["hive_partitioning"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM (\n\tSELECT partition1, partition2, lag(col1) OVER w AS prev\n\tFROM partitioned_tbl2\n\tWINDOW w AS (PARTITION BY partition1 ORDER BY col1)\n\tQUALIFY col1 - prev \u003c\u003e 2\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":162,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":10,"column_names":["partition1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":10,"column_names":["partition2"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"prev","query_location":55,"query_location_length":16,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":10,"column_names":["partition1"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":4,"column_names":["col1"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":4,"column_names":["col1"]}}],"qualified_name":{"path":["lag"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":16,"schema_name":"","table_name":"partitioned_tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["partitioned_tbl2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":165,"query_location_length":16,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":4,"column_names":["col1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":4,"column_names":["prev"]}}],"qualified_name":{"path":["-"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT part_col, value_col, value2_col, value3_col, value4_col, value5_col, value6_col, value7_col, value8_col, value9_col FROM '{TEST_DIR}/no-part-cols7/value9_col=*/value8_col=*/value7_col=*/*.parquet' ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["part_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":9,"column_names":["value_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":10,"column_names":["value2_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":10,"column_names":["value3_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":10,"column_names":["value4_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":10,"column_names":["value5_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":10,"column_names":["value6_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":10,"column_names":["value7_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":10,"column_names":["value8_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":10,"column_names":["value9_col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":128,"query_location_length":75,"schema_name":"","table_name":"{TEST_DIR}/no-part-cols7/value9_col=*/value8_col=*/value7_col=*/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/no-part-cols7/value9_col=*/value8_col=*/value7_col=*/*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT part_col, value_col, value2_col FROM '{TEST_DIR}/csv-no-part-cols9/part_col=0/value_col=*/value2_col=*/*.csv' ORDER BY value2_col;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":10,"column_names":["value2_col"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["part_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":9,"column_names":["value_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":10,"column_names":["value2_col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":72,"schema_name":"","table_name":"{TEST_DIR}/csv-no-part-cols9/part_col=0/value_col=*/value2_col=*/*.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/csv-no-part-cols9/part_col=0/value_col=*/value2_col=*/*.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM '{TEST_DIR}/row_groups_per_file1/*.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":43,"schema_name":"","table_name":"{TEST_DIR}/row_groups_per_file1/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/row_groups_per_file1/*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM '{TEST_DIR}/row_groups_per_file7/*.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":43,"schema_name":"","table_name":"{TEST_DIR}/row_groups_per_file7/*.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/row_groups_per_file7/*.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM db1.pk_integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":15,"schema_name":"db1","table_name":"pk_integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db1","pk_integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT database_name, table_name, index_name FROM duckdb_indexes ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":10,"column_names":["table_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":10,"column_names":["index_name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":14,"schema_name":"","table_name":"duckdb_indexes","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_indexes"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM tbl8;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"tbl8","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl8"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM T_1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"T_1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["T_1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c AS MATERIALIZED (SELECT * FROM strings) SELECT count(*) FROM c WHERE id=1 AND random()\u003c2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":76,"query_location_length":19,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":76,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":85,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["random"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"FROM nums","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":4,"schema_name":"","table_name":"nums","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nums"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH\n del AS (DELETE FROM t WHERE i = 1 RETURNING i),\n remaining AS (SELECT i FROM t)\nSELECT * FROM remaining;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"del","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":37,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"using_clauses":[],"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}]}}},{"key":"remaining","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":99,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":106,"query_location_length":9,"schema_name":"","table_name":"remaining","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["remaining"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t_aux;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"t_aux","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_aux"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH ins AS (INSERT INTO t1 VALUES (1, 10), (2, 20)),\n upd AS (UPDATE t1 SET j = j + 1)\nSELECT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ins","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"INSERT_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"select_statement":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"columns":[],"table":"t1","schema":"","catalog":"","returning_list":[],"on_conflict_info":null,"table_ref":null,"default_values":false,"column_order":"INSERT_BY_POSITION"}}},{"key":"upd","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"UPDATE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":74,"query_location_length":6,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"from_table":null,"returning_list":[],"set_info":{"condition":null,"columns":["j"],"expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}]},"prioritize_table_when_binding":false}}}]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH ins AS (INSERT INTO t1 VALUES (1, 10), (2, 20) RETURNING i, j),\n upd AS (UPDATE t1 SET j = j + 1 RETURNING i, j)\nSELECT * FROM ins;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ins","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"INSERT_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"select_statement":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"columns":[],"table":"t1","schema":"","catalog":"","returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["j"]}],"on_conflict_info":null,"table_ref":null,"default_values":false,"column_order":"INSERT_BY_POSITION"}}},{"key":"upd","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"UPDATE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":6,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"from_table":null,"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["j"]}],"set_info":{"condition":null,"columns":["j"],"expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}]},"prioritize_table_when_binding":false}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":129,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":136,"query_location_length":3,"schema_name":"","table_name":"ins","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ins"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH ins AS (\n INSERT INTO base SELECT i + 1 FROM base_view RETURNING i\n)\nSELECT * FROM ins;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ins","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"INSERT_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"select_statement":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":9,"schema_name":"","table_name":"base_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["base_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"columns":[],"table":"base","schema":"","catalog":"","returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["i"]}],"on_conflict_info":null,"table_ref":null,"default_values":false,"column_order":"INSERT_BY_POSITION"}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":84,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":91,"query_location_length":3,"schema_name":"","table_name":"ins","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ins"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE cte AS (SELECT 42) SELECT * FROM cte;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":41,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH ins AS (\n INSERT INTO t VALUES (42, 42) RETURNING i\n)\nSELECT * FROM ins;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ins","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"INSERT_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"select_statement":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"columns":[],"table":"t","schema":"","catalog":"","returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["i"]}],"on_conflict_info":null,"table_ref":null,"default_values":false,"column_order":"INSERT_BY_POSITION","qualified_name":{"path":["t"]}}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":69,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":3,"schema_name":"","table_name":"ins","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ins"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH ins AS (INSERT INTO t_aux VALUES (99, 99) RETURNING i),\n del AS (DELETE FROM t1 WHERE i \u003c= 2 RETURNING i)\nSELECT * FROM del;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ins","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"INSERT_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"select_statement":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"99"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"literal":{"kind":"INTEGER","text":"99"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"columns":[],"table":"t_aux","schema":"","catalog":"","returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["i"]}],"on_conflict_info":null,"table_ref":null,"default_values":false,"column_order":"INSERT_BY_POSITION","qualified_name":{"path":["t_aux"]}}}},{"key":"del","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":95,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"using_clauses":[],"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["i"]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":122,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":129,"query_location_length":3,"schema_name":"","table_name":"del","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["del"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, j FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH ins AS (INSERT INTO t1 VALUES (1, 10), (2, 20) RETURNING i, j),\n upd AS (UPDATE t1 SET j = j + 1 RETURNING i, j),\n del AS (DELETE FROM t1 WHERE i = 1 RETURNING i, j)\nSELECT * FROM ins;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ins","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"INSERT_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"select_statement":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"columns":[],"table":"t1","schema":"","catalog":"","returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["j"]}],"on_conflict_info":null,"table_ref":null,"default_values":false,"column_order":"INSERT_BY_POSITION","qualified_name":{"path":["t1"]}}}},{"key":"upd","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"UPDATE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":6,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"from_table":null,"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["j"]}],"set_info":{"condition":null,"columns":["j"],"expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}]},"prioritize_table_when_binding":false}}},{"key":"del","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":157,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"using_clauses":[],"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":176,"query_location_length":1,"column_names":["j"]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":186,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":193,"query_location_length":3,"schema_name":"","table_name":"ins","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ins"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM base;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"base","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["base"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with recursive t as (select 1 as x intersect select x+1 from t where x \u003c 3) select * from t order by x","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":69,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":83,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":90,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"FROM a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH t(i) AS MATERIALIZED (\n\tSELECT i FROM range(1000000) tbl(i)\n)\nSELECT (SELECT i FROM t LIMIT 1 OFFSET 100000), (SELECT i FROM t LIMIT 1 OFFSET 900000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":43,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":74,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100000}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":115,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":900000}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":130,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*), min(i), max(i) FROM cte_parallel_limit;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":18,"schema_name":"","table_name":"cte_parallel_limit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte_parallel_limit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(y, arr) AS MATERIALIZED\n(\n SELECT 1, array[1,2,3,4,5,6]\n UNION ALL\n SELECT y+1, arr[:loc]\n FROM t, p\n WHERE y \u003c 10\n AND y = loc\n) SELECT * FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["y","arr"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":55,"query_location_length":18,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":105,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":3,"column_names":["arr"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":3,"column_names":["loc"]}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":114,"query_location_length":11,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":121,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":124,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":134,"query_location_length":22,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":134,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":149,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":1,"column_names":["y"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":3,"column_names":["loc"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["y","arr"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":166,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":173,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with parents_tab (id , value , parent )\nas MATERIALIZED (values (1, 1, 2), (2, 2, 4), (3, 1, 4), (4, 2, -1), (5, 1, 2), (6, 2, 7), (7, 1, -1)\n),\nparents_tab2(id , value , parent )\nas MATERIALIZED (values (1, 1, 2), (2, 2, 4), (3, 1, 4), (4, 2, -1), (5, 1, 2), (6, 2, 7), (7, 1, -1)\n),\nparents as MATERIALIZED (\n select * from parents_tab\n union all\n select id, value+2, parent from parents_tab2\n)\nselect * from parents ORDER BY id, value, parent;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":437,"query_location_length":2,"column_names":["id"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":441,"query_location_length":5,"column_names":["value"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":448,"query_location_length":6,"column_names":["parent"]}}]}],"cte_map":{"map":[{"key":"parents_tab","value":{"aliases":["id","value","parent"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"parents_tab2","value":{"aliases":["id","value","parent"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":208,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":211,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":222,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":227,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":230,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":238,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":241,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":250,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":253,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":256,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":261,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":264,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":267,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":272,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":275,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"parents","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":322,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":329,"query_location_length":11,"schema_name":"","table_name":"parents_tab","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parents_tab"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":366,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":375,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":370,"query_location_length":5,"column_names":["value"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":376,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":379,"query_location_length":6,"column_names":["parent"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":391,"query_location_length":12,"schema_name":"","table_name":"parents_tab2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parents_tab2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":413,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":420,"query_location_length":7,"schema_name":"","table_name":"parents","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parents"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x, y\nFROM generate_series(1,4) AS _(x), LATERAL\n(WITH RECURSIVE t(y) AS MATERIALIZED (\n SELECT _.x\n UNION\n SELECT t1.y + t2.y + _.x\n FROM t AS t1, t AS t2\n WHERE t1.y \u003c 3\n)\nSELECT * FROM t) AS t\nORDER BY x, y;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":222,"query_location_length":1,"column_names":["x"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":1,"column_names":["y"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":12,"query_location_length":200,"left":{"type":"TABLE_FUNCTION","alias":"_","sample":null,"query_location":19,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]},"column_name_alias":["x"],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":57,"query_location_length":150,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["y"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":3,"column_names":["_","x"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":140,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":4,"column_names":["t1","y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":4,"column_names":["t2","y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":3,"column_names":["_","x"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":148,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":155,"query_location_length":7,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":164,"query_location_length":7,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":180,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":180,"query_location_length":4,"column_names":["t1","y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["y"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":198,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":205,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH c(i) AS MATERIALIZED (VALUES (1), (2), (2), (NULL)), b(i) AS (VALUES (2), (3), (NULL))\nSELECT count(*) FROM c SEMI JOIN b ON c.i=b.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"b","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":115,"query_location_length":22,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":113,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":125,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":130,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":3,"column_names":["c","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["b","i"]}},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH c AS MATERIALIZED (SELECT i FROM range(1000) t(i))\nSELECT count(*) FROM c l JOIN c r USING (i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":38,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":81,"query_location_length":18,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":77,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":86,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte1(xxx) as MATERIALIZED (Select i as j from a) select x from cte1 t1(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte1","value":{"aliases":["xxx"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"j","query_location":39,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":68,"query_location_length":10,"schema_name":"","table_name":"cte1","column_name_alias":["x"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte (a) as MATERIALIZED (\n select 1\n)\nselect\n a as alias1,\n alias1 as alias2\nfrom cte\nwhere alias2 \u003e 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":["a"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"alias1","query_location":57,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"alias2","query_location":74,"query_location_length":6,"column_names":["alias1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":96,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":106,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":6,"column_names":["alias2"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH d AS MATERIALIZED (\n SELECT\n i AS c00,\n i AS c01, i AS c02, i AS c03, i AS c04, i AS c05, i AS c06, i AS c07,\n i AS c08, i AS c09, i AS c10, i AS c11, i AS c12, i AS c13, i AS c14, i AS c15\n FROM range(300000) tbl(i)\n)\nSELECT (SELECT sum(c00 + c01 + c02 + c03 + c04 + c05 + c06 + c07 +\n c08 + c09 + c10 + c11 + c12 + c13 + c14 + c15)\n FROM (SELECT * FROM d LIMIT 10)),\n (SELECT sum(c00 + c01 + c02 + c03 + c04 + c05 + c06 + c07 +\n c08 + c09 + c10 + c11 + c12 + c13 + c14 + c15)\n FROM (SELECT * FROM d LIMIT 10));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"d","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c00","query_location":38,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c01","query_location":52,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c02","query_location":62,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c03","query_location":72,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c04","query_location":82,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c05","query_location":92,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c06","query_location":102,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c07","query_location":112,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c08","query_location":126,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c09","query_location":136,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c10","query_location":146,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c11","query_location":156,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c12","query_location":166,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c13","query_location":176,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c14","query_location":186,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c15","query_location":196,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":212,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":218,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":300000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":242,"query_location_length":166,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":250,"query_location_length":117,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":361,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":355,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":349,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":343,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":337,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":331,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":325,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":300,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":294,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":288,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":282,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":276,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":270,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":264,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":258,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":254,"query_location_length":3,"column_names":["c00"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":260,"query_location_length":3,"column_names":["c01"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":266,"query_location_length":3,"column_names":["c02"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":272,"query_location_length":3,"column_names":["c03"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":278,"query_location_length":3,"column_names":["c04"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":284,"query_location_length":3,"column_names":["c05"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":290,"query_location_length":3,"column_names":["c06"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":296,"query_location_length":3,"column_names":["c07"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":321,"query_location_length":3,"column_names":["c08"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":327,"query_location_length":3,"column_names":["c09"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":333,"query_location_length":3,"column_names":["c10"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":339,"query_location_length":3,"column_names":["c11"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":345,"query_location_length":3,"column_names":["c12"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":351,"query_location_length":3,"column_names":["c13"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":357,"query_location_length":3,"column_names":["c14"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":363,"query_location_length":3,"column_names":["c15"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":381,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":404,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":389,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":396,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":417,"query_location_length":166,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":425,"query_location_length":117,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":536,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":530,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":524,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":518,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":512,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":506,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":500,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":475,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":469,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":463,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":457,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":451,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":445,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":439,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":433,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":429,"query_location_length":3,"column_names":["c00"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":435,"query_location_length":3,"column_names":["c01"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":441,"query_location_length":3,"column_names":["c02"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":447,"query_location_length":3,"column_names":["c03"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":453,"query_location_length":3,"column_names":["c04"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":459,"query_location_length":3,"column_names":["c05"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":465,"query_location_length":3,"column_names":["c06"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":471,"query_location_length":3,"column_names":["c07"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":496,"query_location_length":3,"column_names":["c08"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":502,"query_location_length":3,"column_names":["c09"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":508,"query_location_length":3,"column_names":["c10"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":514,"query_location_length":3,"column_names":["c11"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":520,"query_location_length":3,"column_names":["c12"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":526,"query_location_length":3,"column_names":["c13"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":532,"query_location_length":3,"column_names":["c14"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":538,"query_location_length":3,"column_names":["c15"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":556,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":579,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":564,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":571,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE collatz(x, t, steps) AS MATERIALIZED\n(\n SELECT x, x, 0\n FROM (WITH RECURSIVE n(t) AS (SELECT 1 UNION ALL SELECT t+1 FROM n WHERE t \u003c 10) SELECT * FROM n) AS _(x)\n UNION ALL\n (SELECT x, CASE WHEN t%2 = 1 THEN t * 3 + p ELSE t / 2 END, steps + p\n FROM collatz, (WITH RECURSIVE n(t) AS (SELECT 1 UNION ALL SELECT t+1 FROM n WHERE t \u003c 1) SELECT * FROM n) AS _(p)\n WHERE t \u003c\u003e 1)\n)\nSELECT * FROM collatz WHERE t = 1\nORDER BY x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":449,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"collatz","value":{"aliases":["x","t","steps"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"collatz","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["x"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"SUBQUERY","alias":"_","sample":null,"query_location":80,"query_location_length":92,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"n","value":{"aliases":["t"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"n","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":132,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":140,"query_location_length":1,"schema_name":"","table_name":"n","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["n"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":148,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":1,"column_names":["t"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["t"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":163,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":170,"query_location_length":1,"schema_name":"","table_name":"n","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["n"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":205,"query_location_length":1,"column_names":["x"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":208,"query_location_length":47,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":218,"query_location_length":7,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":218,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":220,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":224,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":237,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":231,"query_location_length":5,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":231,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":235,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":239,"query_location_length":1,"column_names":["p"]}}]}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":246,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":246,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":250,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":263,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":257,"query_location_length":5,"column_names":["steps"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":265,"query_location_length":1,"column_names":["p"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":270,"query_location_length":115,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":277,"query_location_length":7,"schema_name":"","table_name":"collatz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collatz"]}},"right":{"type":"SUBQUERY","alias":"_","sample":null,"query_location":286,"query_location_length":91,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"n","value":{"aliases":["t"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"n","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":318,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":338,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":337,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":339,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":346,"query_location_length":1,"schema_name":"","table_name":"n","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["n"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":354,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":354,"query_location_length":1,"column_names":["t"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":358,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["t"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":368,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":375,"query_location_length":1,"schema_name":"","table_name":"n","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["n"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["p"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":396,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":396,"query_location_length":1,"column_names":["t"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":401,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["x","t","steps"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":413,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":420,"query_location_length":7,"schema_name":"","table_name":"collatz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collatz"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":434,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":434,"query_location_length":1,"column_names":["t"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":438,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with recursive t as MATERIALIZED (select 1 as x union all select x+1 from t where x \u003c 3) select min(a1.x) from t a1, t a2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":74,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":82,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":4,"column_names":["a1","x"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":106,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"a1","sample":null,"query_location":111,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"a2","sample":null,"query_location":117,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with recursive t as MATERIALIZED (select 1 as x, 'hello' as y union select x+1, y || '-' || 'hello' from t where x \u003c 3) select * from t order by x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":49,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":19,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":105,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":113,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":127,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":134,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE r(x) AS (\n\tVALUES (1), (2), (3)\n\tUNION ALL\n\tSELECT x + (SELECT a FROM (VALUES (1), (2), (3)) df(a) LIMIT 1)\n\tFROM r\n\tWHERE x \u003c 4\n)\nSELECT * FROM r;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"r","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"r","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":70,"query_location_length":52,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"df","sample":null,"query_location":85,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":129,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":138,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["x"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":153,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":160,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(i, payload, unused) AS (\n\tSELECT 1, 10, repeat('x', 1000)\n\tUNION ALL\n\t(\n\t\tWITH materialized_state AS MATERIALIZED (\n\t\t\tSELECT i, payload, unused FROM t\n\t\t),\n\t\tunion_state AS (\n\t\t\tSELECT * FROM materialized_state\n\t\t\tUNION ALL\n\t\t\tSELECT * FROM materialized_state WHERE false\n\t\t)\n\t\tSELECT max(i) + 1, max(payload) + 10, max(unused) || 'y'\n\t\tFROM union_state\n\t\tHAVING max(i) \u003c 3\n\t)\n)\nSELECT i, payload FROM t ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":431,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["i","payload","unused"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":17,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"materialized_state","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":7,"column_names":["payload"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":6,"column_names":["unused"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":167,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"union_state","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":203,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":210,"query_location_length":18,"schema_name":"","table_name":"materialized_state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["materialized_state"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":252,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":259,"query_location_length":18,"schema_name":"","table_name":"materialized_state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["materialized_state"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":284,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":310,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":303,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":307,"query_location_length":1,"column_names":["i"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":312,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":328,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":315,"query_location_length":12,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":319,"query_location_length":7,"column_names":["payload"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":330,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":334,"query_location_length":18,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":334,"query_location_length":11,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":338,"query_location_length":6,"column_names":["unused"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":349,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"y"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":360,"query_location_length":11,"schema_name":"","table_name":"union_state","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["union_state"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":381,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":381,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":385,"query_location_length":1,"column_names":["i"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":390,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"sample":null,"qualify":null},"aliases":["i","payload","unused"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":404,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":407,"query_location_length":7,"column_names":["payload"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":420,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s.s_name, COUNT(*) AS numwait\nFROM supplier AS s, nation AS n, (SELECT *\n FROM orders\n WHERE o_orderstatus = 'F'\n ORDER BY o_orderkey) AS o\nWHERE o.o_orderstatus = 'F'\nAND s.s_nationkey = n.n_nationkey\nAND\n(WITH RECURSIVE \"@loop\" (\"$label\", \"$output\", \"0\", \"1\") AS (\n (SELECT CAST('$' AS VARCHAR) AS \"$label\", CAST(NULL AS BOOLEAN) AS \"$output\", CAST(o.o_orderkey AS BIGINT) AS \"0\", CAST(s.s_suppkey AS BIGINT) AS \"1\")\n UNION ALL\n (WITH \"0\" (suppkey, orderkey) AS (SELECT \"@loop\".\"1\" AS suppkey, \"@loop\".\"0\" AS orderkey FROM \"@loop\" WHERE (\"@loop\".\"$label\" IS NOT DISTINCT FROM '$')),\n \"1\" (orderkey, suppkey, found) AS (SELECT \"0\".orderkey AS orderkey, \"0\".suppkey AS suppkey, CAST(NULL AS BOOLEAN) AS found FROM \"0\" AS \"0\"(suppkey, orderkey)),\n \"2\" (suppkey, orderkey, lis) AS (SELECT \"1\".suppkey AS suppkey, \"1\".orderkey AS orderkey, CAST(NULL AS BIGINT[]) AS lis FROM \"1\" AS \"1\"(orderkey, suppkey, found)),\n \"3\" (orderkey, suppkey, li) AS (SELECT \"2\".orderkey AS orderkey, \"2\".suppkey AS suppkey, CAST(NULL AS BIGINT) AS li FROM \"2\" AS \"2\"(suppkey, orderkey, lis)),\n \"4\" (suppkey, orderkey, blame) AS (SELECT \"3\".suppkey AS suppkey, \"3\".orderkey AS orderkey, CAST('f' AS BOOLEAN) AS blame FROM \"3\" AS \"3\"(orderkey, suppkey, li)),\n \"5\" (orderkey, blame, suppkey, multi) AS (SELECT \"4\".orderkey AS orderkey, \"4\".blame AS blame, \"4\".suppkey AS suppkey, CAST('f' AS BOOLEAN) AS multi FROM \"4\" AS \"4\"(suppkey, orderkey, blame)),\n \"6\" (suppkey, multi, blame, lis) AS (SELECT \"5\".suppkey AS suppkey, \"5\".multi AS multi, \"5\".blame AS blame, (SELECT CAST((SELECT * FROM (SELECT array_agg(l.l_suppkey) FROM lineitem AS l WHERE (l.l_orderkey = \"5\".orderkey)) AS subquery LIMIT 1) AS BIGINT[])) AS lis FROM \"5\" AS \"5\"(orderkey, blame, suppkey, multi)),\n \"7\" (blame, multi) AS (SELECT \"6\".blame AS blame, (SELECT CAST((SELECT (\"6\".multi OR ((\"6\".lis[1]) != \"6\".suppkey))) AS BOOLEAN)) AS multi FROM \"6\" AS \"6\"(suppkey, multi, blame, lis)),\n \"8\" (return_value) AS (SELECT (\"7\".multi AND \"7\".blame) AS return_value FROM \"7\" AS \"7\"(blame, multi)),\n \"9\" (\"$output\") AS (SELECT \"8\".return_value AS \"$output\" FROM \"8\" AS \"8\"(return_value))\n SELECT CAST(NULL AS VARCHAR) AS \"$label\", CAST(\"9\".\"$output\" AS BOOLEAN) AS \"$output\", CAST(NULL AS BIGINT) AS \"0\", CAST(NULL AS BIGINT) AS \"1\" FROM \"9\" AS \"9\"(\"$output\")))\n SELECT \"@loop\".\"$output\" FROM \"@loop\" AS \"@loop\"(\"$label\", \"$output\", \"0\", \"1\") WHERE (\"@loop\".\"$label\" IS NULL)\n)\nGROUP BY s.s_name\nORDER BY numwait DESC, s_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2643,"query_location_length":7,"column_names":["numwait"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2657,"query_location_length":6,"column_names":["s_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["s","s_name"]},{"class":"FUNCTION","type":"FUNCTION","alias":"numwait","query_location":17,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":216,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":44,"query_location_length":13,"schema_name":"","table_name":"supplier","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["supplier"]}},"right":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":59,"query_location_length":11,"schema_name":"","table_name":"nation","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nation"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"o","sample":null,"query_location":72,"query_location_length":176,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":237,"query_location_length":10,"column_names":["o_orderkey"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":80,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":123,"query_location_length":6,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":13,"column_names":["o_orderstatus"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"F"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":261,"query_location_length":2354,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":261,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":261,"query_location_length":15,"column_names":["o","o_orderstatus"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":279,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"F"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":290,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":290,"query_location_length":13,"column_names":["s","s_nationkey"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":306,"query_location_length":13,"column_names":["n","n_nationkey"]}},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":324,"query_location_length":2291,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"@loop","value":{"aliases":["$label","$output","0","1"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"@loop","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"$label","query_location":395,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":400,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":407,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"$output","query_location":429,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":434,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":442,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"0","query_location":465,"query_location_length":28,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":470,"query_location_length":12,"column_names":["o","o_orderkey"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":486,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"1","query_location":502,"query_location_length":27,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":507,"query_location_length":11,"column_names":["s","s_suppkey"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":522,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"0","value":{"aliases":["suppkey","orderkey"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":596,"query_location_length":11,"column_names":["@loop","1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"orderkey","query_location":620,"query_location_length":11,"column_names":["@loop","0"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":649,"query_location_length":7,"schema_name":"","table_name":"@loop","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["@loop"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":664,"query_location_length":41,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":664,"query_location_length":16,"column_names":["@loop","$label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":702,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"1","value":{"aliases":["orderkey","suppkey","found"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"orderkey","query_location":759,"query_location_length":12,"column_names":["0","orderkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":785,"query_location_length":11,"column_names":["0","suppkey"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"found","query_location":809,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":814,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":822,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"0","sample":null,"query_location":845,"query_location_length":29,"schema_name":"","table_name":"0","column_name_alias":["suppkey","orderkey"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"2","value":{"aliases":["suppkey","orderkey","lis"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":925,"query_location_length":11,"column_names":["1","suppkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"orderkey","query_location":949,"query_location_length":12,"column_names":["1","orderkey"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"lis","query_location":975,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":980,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":988,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"1","sample":null,"query_location":1010,"query_location_length":36,"schema_name":"","table_name":"1","column_name_alias":["orderkey","suppkey","found"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"3","value":{"aliases":["orderkey","suppkey","li"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"orderkey","query_location":1096,"query_location_length":12,"column_names":["2","orderkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":1122,"query_location_length":11,"column_names":["2","suppkey"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"li","query_location":1146,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1151,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":1159,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"2","sample":null,"query_location":1178,"query_location_length":34,"schema_name":"","table_name":"2","column_name_alias":["suppkey","orderkey","lis"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"4","value":{"aliases":["suppkey","orderkey","blame"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":1265,"query_location_length":11,"column_names":["3","suppkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"orderkey","query_location":1289,"query_location_length":12,"column_names":["3","orderkey"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"blame","query_location":1315,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1320,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"f"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":1327,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"3","sample":null,"query_location":1350,"query_location_length":33,"schema_name":"","table_name":"3","column_name_alias":["orderkey","suppkey","li"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"5","value":{"aliases":["orderkey","blame","suppkey","multi"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"orderkey","query_location":1443,"query_location_length":12,"column_names":["4","orderkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"blame","query_location":1469,"query_location_length":9,"column_names":["4","blame"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":1489,"query_location_length":11,"column_names":["4","suppkey"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"multi","query_location":1513,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1518,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"f"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":1525,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"4","sample":null,"query_location":1548,"query_location_length":36,"schema_name":"","table_name":"4","column_name_alias":["suppkey","orderkey","blame"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["4"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"6","value":{"aliases":["suppkey","multi","blame","lis"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"suppkey","query_location":1639,"query_location_length":11,"column_names":["5","suppkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"multi","query_location":1663,"query_location_length":9,"column_names":["5","multi"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"blame","query_location":1683,"query_location_length":9,"column_names":["5","blame"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"lis","query_location":1703,"query_location_length":149,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":1711,"query_location_length":140,"child":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1716,"query_location_length":122,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1836,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":1724,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"subquery","sample":null,"query_location":1731,"query_location_length":86,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":1739,"query_location_length":22,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1749,"query_location_length":11,"column_names":["l","l_suppkey"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":1767,"query_location_length":13,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":1788,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1788,"query_location_length":12,"column_names":["l","l_orderkey"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1803,"query_location_length":12,"column_names":["5","orderkey"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":1842,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"5","sample":null,"query_location":1865,"query_location_length":43,"schema_name":"","table_name":"5","column_name_alias":["orderkey","blame","suppkey","multi"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["5"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"7","value":{"aliases":["blame","multi"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"blame","query_location":1949,"query_location_length":9,"column_names":["6","blame"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"multi","query_location":1969,"query_location_length":79,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":1977,"query_location_length":70,"child":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1982,"query_location_length":53,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":1991,"query_location_length":42,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1991,"query_location_length":9,"column_names":["6","multi"]},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":2005,"query_location_length":27,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":2013,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2006,"query_location_length":7,"column_names":["6","lis"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2014,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2021,"query_location_length":11,"column_names":["6","suppkey"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":2039,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"6","sample":null,"query_location":2063,"query_location_length":38,"schema_name":"","table_name":"6","column_name_alias":["suppkey","multi","blame","lis"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["6"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"8","value":{"aliases":["return_value"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"return_value","query_location":2143,"query_location_length":23,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2143,"query_location_length":9,"column_names":["7","multi"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2157,"query_location_length":9,"column_names":["7","blame"]}]}],"from_table":{"type":"BASE_TABLE","alias":"7","sample":null,"query_location":2189,"query_location_length":24,"schema_name":"","table_name":"7","column_name_alias":["blame","multi"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["7"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"9","value":{"aliases":["$output"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"$output","query_location":2251,"query_location_length":16,"column_names":["8","return_value"]}],"from_table":{"type":"BASE_TABLE","alias":"8","sample":null,"query_location":2286,"query_location_length":24,"schema_name":"","table_name":"8","column_name_alias":["return_value"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["8"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"$label","query_location":2327,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2332,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":2340,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"$output","query_location":2362,"query_location_length":30,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2367,"query_location_length":13,"column_names":["9","$output"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":2384,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"0","query_location":2407,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2412,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":2420,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"1","query_location":2436,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2441,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":2449,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"9","sample":null,"query_location":2469,"query_location_length":21,"schema_name":"","table_name":"9","column_name_alias":["$output"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["9"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["$label","$output","0","1"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2508,"query_location_length":17,"column_names":["@loop","$output"]}],"from_table":{"type":"BASE_TABLE","alias":"@loop","sample":null,"query_location":2531,"query_location_length":49,"schema_name":"","table_name":"@loop","column_name_alias":["$label","$output","0","1"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["@loop"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":2605,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2588,"query_location_length":16,"column_names":["@loop","$label"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":2625,"query_location_length":8,"column_names":["s","s_name"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT info.retained_build_executions::UBIGINT \u003e= 1\nFROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class = 'PhysicalRecursiveCTE' AND event = 'RuntimeMetrics';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":44,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":30,"column_names":["info","retained_build_executions"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalOperator"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":102,"query_location_length":59,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalRecursiveCTE"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":137,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"RuntimeMetrics"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE tbl(a,b,c) USING KEY (a, c , list(b), max(c)) AS (\n\tSELECT 1, 1, NULL\n \tUNION\n SELECT tbl.a, tbl.b - 1, a.b\n\tFROM tbl, recurring.tbl AS a\n\tWHERE tbl.b \u003e 0)\nSELECT * FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":["a","b","c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["c"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["c"]}}]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tbl","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":5,"column_names":["tbl","a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":120,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":5,"column_names":["tbl","b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":3,"column_names":["a","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":130,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":135,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"right":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":140,"query_location_length":18,"schema_name":"recurring","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","tbl"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":166,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":5,"column_names":["tbl","b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["a","b","c"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["c"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["c"]}}]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":184,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":191,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE tbl(key, iter, b, c) USING KEY (key, bool_and(b), bool_or(c)) AS (\n\tSELECT 1, 1, TRUE, TRUE\n\t\tUNION\n\tSELECT key, iter + 1, NOT b, NOT c\n\tFROM tbl\n\tWHERE iter \u003c 8\n) TABLE tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":["key","iter","b","c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":11,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":10,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["c"]}}]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tbl","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":4,"column_names":["iter"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":138,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":1,"column_names":["b"]}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":145,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":1,"column_names":["c"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":157,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":168,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":4,"column_names":["iter"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["key","iter","b","c"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":11,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":10,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["c"]}}]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE tbl (a,b) USING KEY (a, b+1) AS (\n\tSELECT 1, 1\n \t\tUNION\n \tSELECT a, b + 1\n \tFROM tbl\n \tWHERE b \u003c 5)\nTABLE tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":["a","b"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tbl","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":100,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":113,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["a","b"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(k, v) USING KEY (k) AS (\n\tSELECT i, 0 FROM range(0) r(i)\n\tUNION ALL\n\tSELECT k, v + 1 FROM t WHERE v \u003c 0\n)\nSELECT count(*) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":60,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":107,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":115,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":130,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":144,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(k, v) USING KEY (k, max(v) AS v) AS (\n\tVALUES (1, 0)\n\tUNION ALL\n\tSELECT n.k, r.v + 1\n\tFROM t n JOIN recurring.t r USING (k)\n\tWHERE n.v \u003c 3\n)\nSELECT k, v FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":37,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":3,"column_names":["n","k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":3,"column_names":["r","v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":112,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":108,"query_location_length":3,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":117,"query_location_length":13,"schema_name":"recurring","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","t"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["k"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":148,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":3,"column_names":["n","v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":37,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}]}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":175,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2) AS (\n\tVALUES (1, 1, 0), (1, 2, 0), (2, 1, 0)\n\tUNION ALL\n\tSELECT n.k1, n.k2, r.v + 1\n\tFROM recurring.t r JOIN t n ON r.k1 = n.k1\n\tWHERE n.v \u003c 1\n)\nSELECT * FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k1","k2","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":2,"column_names":["k1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["k2"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":4,"column_names":["n","k1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":4,"column_names":["n","k2"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":127,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":3,"column_names":["r","v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":151,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":137,"query_location_length":13,"schema_name":"recurring","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","t"]}},"right":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":156,"query_location_length":3,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":163,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":4,"column_names":["r","k1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":4,"column_names":["n","k1"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":182,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":3,"column_names":["n","v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k1","k2","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":2,"column_names":["k1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["k2"]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":199,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":206,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE\n\t\"@loop\" (\"$label\", \"$output\", \"0\") AS (\n\t\t(SELECT '$'::VARCHAR AS \"$label\", NULL::BIGINT AS \"$output\", NULL::BIGINT AS \"0\")\n\t\tUNION ALL\n\t\t(WITH\n\t\t\t\"0\" AS (SELECT NULL FROM \"@loop\" WHERE \"$label\" IS NOT DISTINCT FROM '$'),\n\t\t\t\"1\" (i) AS (SELECT 0 AS i FROM \"0\"),\n\t\t\t\"2\" (i) AS (SELECT \"0\" AS i FROM \"@loop\" WHERE \"$label\" IS NOT DISTINCT FROM '$loop0'),\n\t\t\t\"3\" (i) AS (\n\t\t\t\tSELECT i FROM \"1\"\n\t\t\t\tUNION ALL\n\t\t\t\tSELECT i FROM \"2\"\n\t\t\t),\n\t\t\t\"4\" (i) AS (SELECT (i + 1) % 1000 AS i FROM \"3\"),\n\t\t\t\"5\" (\"$output\") AS (SELECT i FROM \"4\"),\n\t\t\t\"6\" (\"$label\", i) AS (SELECT '$loop0', i FROM \"4\")\n\t\t\tSELECT NULL::VARCHAR, \"$output\"::BIGINT, NULL::BIGINT FROM \"5\"\n\t\t\tUNION ALL\n\t\t\tSELECT \"$label\"::VARCHAR, NULL::BIGINT, i::BIGINT FROM \"6\"\n\t\t)\n\t)\nSELECT \"$output\" FROM \"@loop\" WHERE \"$label\" IS NULL LIMIT 10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":806,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[{"key":"@loop","value":{"aliases":["$label","$output","0"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"@loop","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"$label","query_location":69,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"$output","query_location":96,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":98,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"0","query_location":123,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":125,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[{"key":"0","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":188,"query_location_length":7,"schema_name":"","table_name":"@loop","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["@loop"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":202,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":202,"query_location_length":8,"column_names":["$label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":232,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"1","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":260,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":272,"query_location_length":3,"schema_name":"","table_name":"0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"2","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"i","query_location":300,"query_location_length":3,"column_names":["0"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":314,"query_location_length":7,"schema_name":"","table_name":"@loop","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["@loop"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":328,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":328,"query_location_length":8,"column_names":["$label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":358,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$loop0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"3","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":396,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":403,"query_location_length":3,"schema_name":"","table_name":"1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":432,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":439,"query_location_length":3,"schema_name":"","table_name":"2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}},{"key":"4","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":471,"query_location_length":14,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":474,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":472,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":476,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":481,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":496,"query_location_length":3,"schema_name":"","table_name":"3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"5","value":{"aliases":["$output"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":532,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":539,"query_location_length":3,"schema_name":"","table_name":"4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["4"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"6","value":{"aliases":["$label","i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":577,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$loop0"}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":587,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":594,"query_location_length":3,"schema_name":"","table_name":"4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["4"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":613,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":609,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":615,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":633,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":624,"query_location_length":9,"column_names":["$output"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":635,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":647,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":643,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":649,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":661,"query_location_length":3,"schema_name":"","table_name":"5","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["5"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":696,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":688,"query_location_length":8,"column_names":["$label"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":698,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":711,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":707,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":713,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":722,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":721,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":724,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":736,"query_location_length":3,"schema_name":"","table_name":"6","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["6"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"aliases":["$label","$output","0"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":754,"query_location_length":9,"column_names":["$output"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":769,"query_location_length":7,"schema_name":"","table_name":"@loop","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["@loop"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":792,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":783,"query_location_length":8,"column_names":["$label"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) = 1 FROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class = 'PhysicalRecursiveCTE' AND event = 'DistinctPromoted'\n AND info.partitions::UBIGINT BETWEEN 2 AND 4\n AND info.migrated_rows::UBIGINT \u003e 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalOperator"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":70,"query_location_length":146,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalRecursiveCTE"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DistinctPromoted"}}},{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":163,"query_location_length":15,"input":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":153,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":15,"column_names":["info","partitions"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":155,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":171,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":185,"query_location_length":31,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":203,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":185,"query_location_length":18,"column_names":["info","migrated_rows"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":205,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT info.direct_probe_rows::UBIGINT \u003e 0,\n info.recurring_scan_rows::UBIGINT = 0\nFROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class = 'PhysicalRecursiveCTE' AND event = 'RuntimeMetrics';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":35,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":22,"column_names":["info","direct_probe_rows"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":37,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":24,"column_names":["info","recurring_scan_rows"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":94,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalOperator"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":139,"query_location_length":59,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":139,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalRecursiveCTE"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":174,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":174,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":182,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"RuntimeMetrics"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT info.recurring_scan_work_ns::UBIGINT \u003e 0,\n info.final_state_drain_work_ns::UBIGINT \u003e 0\nFROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":40,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":27,"column_names":["info","recurring_scan_work_ns"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":56,"query_location_length":43,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":30,"column_names":["info","final_state_drain_work_ns"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":88,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":105,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalOperator"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":150,"query_location_length":57,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":150,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PhysicalRecursiveCTE"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":185,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":185,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":193,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"EpochSummary"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE t(i, level) AS (\n\tSELECT i, 0 FROM range(4096) r(i)\n\tUNION\n\tSELECT i, level + 1 FROM t WHERE level \u003c 4\n)\nSELECT count(*), max(level) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["i","level"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":50,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4096}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":5,"column_names":["level"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":100,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":108,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":5,"column_names":["level"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["i","level"],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":127,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":141,"query_location_length":5,"column_names":["level"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":153,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte1 as (Select i as j from a) select * from cte1 cte11, cte1 cte12;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"j","query_location":21,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":43,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":45,"query_location_length":27,"left":{"type":"BASE_TABLE","alias":"cte11","sample":null,"query_location":50,"query_location_length":10,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"right":{"type":"BASE_TABLE","alias":"cte12","sample":null,"query_location":62,"query_location_length":10,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte3 as (select ref2.j as i from cte1 as ref2), cte1 as (Select i as j from a), cte2 as (select ref.j+1 as k from cte1 as ref) select * from cte2 union all select * FROM cte3;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte3","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"i","query_location":21,"query_location_length":6,"column_names":["ref2","j"]}],"from_table":{"type":"BASE_TABLE","alias":"ref2","sample":null,"query_location":38,"query_location_length":12,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"j","query_location":69,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":106,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":5,"column_names":["ref","j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"ref","sample":null,"query_location":119,"query_location_length":11,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":139,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":146,"query_location_length":4,"schema_name":"","table_name":"cte2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":168,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":175,"query_location_length":4,"schema_name":"","table_name":"cte3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"with\norders as (\n select * from main.stg_orders\n where ordered_at \u003e= (select max(ordered_at) from main.orders)\n),\nsome_more_logic as (\n select *\n from orders\n)\nselect * from some_more_logic;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"orders","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":28,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":15,"schema_name":"main","table_name":"stg_orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","stg_orders"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":61,"query_location_length":55,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":10,"column_names":["ordered_at"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":75,"query_location_length":41,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":15,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":10,"column_names":["ordered_at"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":104,"query_location_length":11,"schema_name":"main","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["main","orders"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"some_more_logic","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":152,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":163,"query_location_length":6,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":179,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":186,"query_location_length":15,"schema_name":"","table_name":"some_more_logic","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["some_more_logic"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH RECURSIVE ctename AS (\n SELECT empno, ename\n FROM emp\n WHERE empno = 7566\n UNION ALL\n SELECT emp.empno, emp.ename\n FROM emp\n JOIN ctename ON emp.mgr = ctename.empno\n)\nSELECT * FROM ctename;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"ctename","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"ctename","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":5,"column_names":["empno"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":5,"column_names":["ename"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":65,"query_location_length":3,"schema_name":"","table_name":"emp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["emp"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":5,"column_names":["empno"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7566}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":9,"column_names":["emp","empno"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":9,"column_names":["emp","ename"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":165,"query_location_length":39,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":152,"query_location_length":3,"schema_name":"","table_name":"emp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["emp"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":170,"query_location_length":7,"schema_name":"","table_name":"ctename","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ctename"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":181,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":7,"column_names":["emp","mgr"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":191,"query_location_length":13,"column_names":["ctename","empno"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":214,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":221,"query_location_length":7,"schema_name":"","table_name":"ctename","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ctename"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with recursive t as (select 1 as x union select x+1 from t where x \u003c 3) select min(a1.x) from t a1, t a2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":65,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":4,"column_names":["a1","x"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":89,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"a1","sample":null,"query_location":94,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"a2","sample":null,"query_location":100,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with recursive t as (select 1 as x, 'hello' as y union all select x+1, y || '-' || 'hello' from t where x \u003c 3) select * from t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":36,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":19,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":96,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":104,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":118,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":125,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FILTER (WHERE i % 2 = 0) FROM r","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM a WHERE i \u003e= 2000 AND i \u003c 5000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":22,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":29,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2000}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":43,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5000}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 12345::utinyint","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12345}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":8,"catalog":"","schema":"","type_name":"utinyint","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FUNFUNFUN();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"funfunfun","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with 🍞🍞 as (select 'bread' as 🍞), 🦆🦆 as (select ref.🍞 as \"🍞\" from 🍞🍞 as ref) SELECT * FROM integers9 where x LIKE '🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆' order by x+1+1+1+1+1+1+1+1+1+1+1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":238,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":236,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":234,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":232,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":230,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":228,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":226,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":224,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":222,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":220,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":218,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":217,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":225,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":227,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":229,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":235,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":237,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":239,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"cte_map":{"map":[{"key":"🍞🍞","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"🍞","query_location":25,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bread"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"🦆🦆","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"🍞","query_location":63,"query_location_length":8,"column_names":["ref","🍞"]}],"from_table":{"type":"BASE_TABLE","alias":"ref","sample":null,"query_location":87,"query_location_length":15,"schema_name":"","table_name":"🍞🍞","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["🍞🍞"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":111,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":118,"query_location_length":9,"schema_name":"","table_name":"integers9","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers9"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":136,"query_location_length":71,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":66,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆🦆"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n l_returnflag,\n l_linestatus,\n sum(l_quantity) AS sum_qty,\n sum(l_extendedprice) AS sum_base_price,\n sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price,\n sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge,\n avg(l_quantity) AS avg_qty,\n avg(l_extendedprice) AS avg_price,\n avg(l_discount) AS avg_disc,\n count(*) AS count_order\n FROM\n lineitem\n WHERE\n l_shipdate \u003c= CAST('1998-09-02' AS date) + timestamp '2020-01-01'\n GROUP BY\n l_returnflag,\n l_linestatus\n ORDER BY\n l_returnflag,\n l_linestatus;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":576,"query_location_length":12,"column_names":["l_returnflag"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":596,"query_location_length":12,"column_names":["l_linestatus"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":12,"column_names":["l_returnflag"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":12,"column_names":["l_linestatus"]},{"class":"FUNCTION","type":"FUNCTION","alias":"sum_qty","query_location":53,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":10,"column_names":["l_quantity"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"sum_base_price","query_location":87,"query_location_length":20,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":15,"column_names":["l_extendedprice"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"sum_disc_price","query_location":133,"query_location_length":39,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":34,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":15,"column_names":["l_extendedprice"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":158,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":10,"column_names":["l_discount"]}}]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"sum_charge","query_location":198,"query_location_length":53,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":202,"query_location_length":48,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":202,"query_location_length":15,"column_names":["l_extendedprice"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":223,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":10,"column_names":["l_discount"]}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":242,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":240,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":244,"query_location_length":5,"column_names":["l_tax"]}}]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"avg_qty","query_location":273,"query_location_length":15,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":277,"query_location_length":10,"column_names":["l_quantity"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"avg_price","query_location":307,"query_location_length":20,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":311,"query_location_length":15,"column_names":["l_extendedprice"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"avg_disc","query_location":348,"query_location_length":15,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":352,"query_location_length":10,"column_names":["l_discount"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"count_order","query_location":383,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":420,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":443,"query_location_length":65,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":443,"query_location_length":10,"column_names":["l_shipdate"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":484,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":457,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":462,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1998-09-02"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":478,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":486,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":486,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":526,"query_location_length":12,"column_names":["l_returnflag"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":546,"query_location_length":12,"column_names":["l_linestatus"]}],"group_sets":[[0,1]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT 42, 84)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":15,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":84}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM \"table.with-symbols\" ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":20,"schema_name":"","table_name":"table.with-symbols","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table.with-symbols"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT col1::VARCHAR FROM table2 ORDER BY col1::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":4,"column_names":["col1"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["col1"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":6,"schema_name":"","table_name":"table2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM d.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"d","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM (\n SELECT id, s FROM t WHERE id % 100 = 7\n EXCEPT\n SELECT id, s FROM t WHERE id % 100 = 7\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":100,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":8,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":107,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":107,"query_location_length":8,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE 2\u003e1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE 2 IN (((1*2)+(1*0))*1, 3, 4, 5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":34,"query_location_length":26,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":15,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":3,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":3,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE a\u003e0 AND a=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":37,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE a\u003c=2 AND a\u003c2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":12,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":29,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":38,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE a=4 AND a\u003c2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":37,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM strings WHERE s='hello' AND s\u003c\u003e'world'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":28,"query_location_length":24,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":28,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":42,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"world"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM strings WHERE s\u003c\u003e'world' AND s\u003e='hello'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":28,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":28,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"world"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":43,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM nested_structs WHERE s.a.c = true AND s.d.e = 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":14,"schema_name":"","table_name":"nested_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_structs"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":35,"query_location_length":26,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":35,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":5,"column_names":["s","a","c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":5,"column_names":["s","d","e"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM vals1 WHERE i\u003c=0 AND j\u003e=i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":13,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":26,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":35,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM vals1 WHERE i\u003e9 AND j\u003ci","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":26,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":34,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM vals1 WHERE j\u003c=i AND i\u003c1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":12,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":26,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":35,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM vals1, vals2 WHERE i\u003e9 AND j\u003c=l AND k\u003e=i AND l\u003c11\nORDER BY 2 DESC, 4 DESC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":33,"query_location_length":30,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":33,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":41,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["l"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":50,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":59,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH cte as (\n\tselect '12'::VARIANT a\n)\nselect IF(a == [1,2,3], 1, 0) from cte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":26,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":47,"query_location_length":22,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["a"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":75,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(i) FROM integers WHERE i=4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select length(a) from arrays;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":6,"schema_name":"","table_name":"arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arrays"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_concat(array_value(1,2,3), NULL), list_concat(NULL, array_value(4,5,6));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":18,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":37,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":18,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('ALTER TABLE my_table RENAME COLUMN fi') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ALTER TABLE my_table RENAME COLUMN fi"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE SCHEMA I') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE SCHEMA I"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('create ta') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"create ta"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE TABLE SC') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE TABLE SC"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('DROP TABLE tbl CAS') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DROP TABLE tbl CAS"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT sum(42) IS NOT NUL') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":46,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT sum(42) IS NOT NUL"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('INSERT INTO tbl VAL') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":40,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INSERT INTO tbl VAL"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SEL') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SEL"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM tbl LIM') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT * FROM tbl LIM"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM tbl NATURAL JOIN tbl2 NAT') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT * FROM tbl NATURAL JOIN tbl2 NAT"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM tbl QUAL') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT * FROM tbl QUAL"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SET e_directory') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SET e_directory"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('select a from t1 inner join t2 on t1.id = t2.id where t1.active = true') = $$SELECT a\nFROM t1\nINNER JOIN t2 ON t1.id = t2.id\nWHERE t1.active = TRUE$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":166,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":91,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":72,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"select a from t1 inner join t2 on t1.id = t2.id where t1.active = true"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":72,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT a\nFROM t1\nINNER JOIN t2 ON t1.id = t2.id\nWHERE t1.active = TRUE"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('select a from t where x = 1', MAP {'inline_threshold': '0', 'indent_size': '2'}) = $$SELECT\n a\nFROM\n t\nWHERE\n x = 1$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":137,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":99,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"select a from t where x = 1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":49,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"inline_threshold"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"indent_size"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2"}}}]}}]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT\n a\nFROM\n t\nWHERE\n x = 1"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('CREATE TEMP TABLE t (id INTEGER, name VARCHAR)') = $$CREATE TEMP TABLE t(\n id INTEGER,\n name VARCHAR\n)$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":127,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":48,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE TEMP TABLE t (id INTEGER, name VARCHAR)"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":57,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE TEMP TABLE t(\n id INTEGER,\n name VARCHAR\n)"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END') = $$CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":224,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":120,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":101,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":101,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('WITH RECURSIVE tree AS (SELECT id, parent_id, name, 0 as depth FROM nodes WHERE parent_id IS NULL UNION ALL SELECT n.id, n.parent_id, n.name, t.depth + 1 FROM nodes n INNER JOIN tree t ON n.parent_id = t.id) SELECT * FROM tree ORDER BY depth, name') = $$WITH RECURSIVE tree AS (\n SELECT id, parent_id, name, 0 AS depth\n FROM nodes\n WHERE parent_id IS NULL\n UNION ALL\n SELECT n.id, n.parent_id, n.name, t.depth + 1\n FROM nodes n\n INNER JOIN tree t ON n.parent_id = t.id\n )\nSELECT *\nFROM tree\nORDER BY depth, name$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":582,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":268,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":249,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WITH RECURSIVE tree AS (SELECT id, parent_id, name, 0 as depth FROM nodes WHERE parent_id IS NULL UNION ALL SELECT n.id, n.parent_id, n.name, t.depth + 1 FROM nodes n INNER JOIN tree t ON n.parent_id = t.id) SELECT * FROM tree ORDER BY depth, name"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":311,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WITH RECURSIVE tree AS (\n SELECT id, parent_id, name, 0 AS depth\n FROM nodes\n WHERE parent_id IS NULL\n UNION ALL\n SELECT n.id, n.parent_id, n.name, t.depth + 1\n FROM nodes n\n INNER JOIN tree t ON n.parent_id = t.id\n )\nSELECT *\nFROM tree\nORDER BY depth, name"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('SELECT name, count(*) FROM users GROUP BY ALL ORDER BY ALL') = $$SELECT name, count(*)\nFROM users\nGROUP BY ALL\nORDER BY ALL$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":142,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":79,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":60,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT name, count(*) FROM users GROUP BY ALL ORDER BY ALL"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":60,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT name, count(*)\nFROM users\nGROUP BY ALL\nORDER BY ALL"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('CREATE OR REPLACE TABLE t AS SELECT a, b FROM s') = $$CREATE OR REPLACE TABLE t AS\nSELECT a, b\nFROM s$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":120,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":49,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE OR REPLACE TABLE t AS SELECT a, b FROM s"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":49,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CREATE OR REPLACE TABLE t AS\nSELECT a, b\nFROM s"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duckdb_format_sql('SELECT 100.00 * sum(CASE WHEN p_type LIKE ''PROMO%'' THEN l_extendedprice * (1 - l_discount) ELSE 0 END) / sum(l_extendedprice * (1 - l_discount)) AS promo_revenue FROM t') = $$SELECT 100.00 * sum(\n CASE\n WHEN p_type LIKE 'PROMO%' THEN l_extendedprice *(1 - l_discount)\n ELSE 0\n END) / sum(l_extendedprice *(1 - l_discount)) AS promo_revenue\nFROM t$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":389,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":191,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":172,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT 100.00 * sum(CASE WHEN p_type LIKE 'PROMO%' THEN l_extendedprice * (1 - l_discount) ELSE 0 END) / sum(l_extendedprice * (1 - l_discount)) AS promo_revenue FROM t"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":201,"query_location_length":195,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT 100.00 * sum(\n CASE\n WHEN p_type LIKE 'PROMO%' THEN l_extendedprice *(1 - l_discount)\n ELSE 0\n END) / sum(l_extendedprice *(1 - l_discount)) AS promo_revenue\nFROM t"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('call histo') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"call histo"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT min(42, l_ord') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT min(42, l_ord"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete($$\nSELECT\n nation,\n o_year,\n sum(amount) AS sum_profit\nFROM (\n SELECT\n n_name AS nation,\n extract(year FROM o_orderdate) AS o_year,\n l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity AS amount\n FROM\n part,\n supplier,\n lineitem,\n partsupp,\n orders,\n nation\n WHERE\n s_suppkey = l_suppkey\n AND ps_suppkey = l_suppkey\n AND ps_partkey = l_partkey\n AND p_partkey = l_partkey\n AND o_orderkey = l_orderkey\n AND s_nationkey = n_nat$$) LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":628,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":580,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":559,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\nSELECT\n nation,\n o_year,\n sum(amount) AS sum_profit\nFROM (\n SELECT\n n_name AS nation,\n extract(year FROM o_orderdate) AS o_year,\n l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity AS amount\n FROM\n part,\n supplier,\n lineitem,\n partsupp,\n orders,\n nation\n WHERE\n s_suppkey = l_suppkey\n AND ps_suppkey = l_suppkey\n AND ps_partkey = l_partkey\n AND p_partkey = l_partkey\n AND o_orderkey = l_orderkey\n AND s_nationkey = n_nat"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT sum(42) OVER (PARTITION BY col1, col2 ORDER BY col3 ROW') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":83,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":64,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT sum(42) OVER (PARTITION BY col1, col2 ORDER BY col3 ROW"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT from_base64(base64(encode('a')))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"from_base64","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":19,"function_name":"base64","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":11,"function_name":"encode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM varchars ORDER BY create_sort_key(v, 'ASC NULLS LAST')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":36,"function_name":"create_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ASC NULLS LAST"}}}]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"varchars","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["varchars"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM list_of_structs ORDER BY create_sort_key(s, 'ASC NULLS LAST')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":36,"function_name":"create_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ASC NULLS LAST"}}}]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":15,"schema_name":"","table_name":"list_of_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_of_structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM sweep\nWHERE octet_length(create_sort_key(b, 'ASC NULLS LAST')) \u003c\u003e\n octet_length(b) + CASE WHEN pos \u003c len AND esc \u003c= '\\x01'::BLOB THEN 1 ELSE 0 END + 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"sweep","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sweep"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":33,"query_location_length":143,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":50,"function_name":"octet_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":36,"function_name":"create_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ASC NULLS LAST"}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":173,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":15,"function_name":"octet_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["b"]}}]}},{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":111,"query_location_length":61,"case_checks":[{"when_expr":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":121,"query_location_length":33,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":121,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":3,"column_names":["pos"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":3,"column_names":["len"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":135,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":3,"column_names":["esc"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":148,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\x01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":150,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT decode('\\xFF'::BLOB)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\xFF"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select array_slice(blob '\\x00\\xF0\\x9F\\xA6\\x86\\x00', 4, 6)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"array_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\x00\\xF0\\x9F\\xA6\\x86\\x00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"blob","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT datediff('week', DATE '5881580-07-10', DATE '-5877641-06-25');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":61,"function_name":"datediff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"week"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5881580-07-10"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-5877641-06-25"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(second FROM d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SECOND"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT WEEKOFYEAR(d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"weekofyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_part(s, DATE '1992-01-01') FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_part('isoyear', d::TIMESTAMP) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"isoyear"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["d"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DAYNAME(d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"dayname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT d, DATE_PART(['isoyear', 'week', 'yearweek'], d) AS parts\nFROM dates\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":10,"query_location_length":45,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":31,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"isoyear"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"week"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"yearweek"}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":70,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_trunc(s, d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_trunc('century', TIMESTAMP '2019-01-06 04:03:02') FROM timestamps LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"century"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019-01-06 04:03:02"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s.min, s.max, s.has_null, s.has_no_null FROM (SELECT stats(date_trunc('month', d)) s FROM dates LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["s","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["s","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":13,"column_names":["s","has_no_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":59,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":60,"query_location_length":29,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":22,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"month"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["d"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":97,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(DOY FROM i) FROM dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(century FROM cast('2001-10-10' AS DATE));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CENTURY"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2001-10-10"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(dow FROM cast('1970-01-01' AS DATE) - 4);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"dow"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1970-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(week FROM cast('2010-01-01' AS DATE));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WEEK"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2010-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(week FROM cast('2007-01-01' AS DATE) + 77);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WEEK"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2007-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":77}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(week FROM cast('2007-01-01' AS DATE) + 161);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WEEK"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2007-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":161}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(week FROM cast('2007-01-01' AS DATE) + 245);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WEEK"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2007-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":245}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(DATE '1992-01-01', '(%Y)');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(%Y)"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, d::VARCHAR) FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["d"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, '%-d') FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%-d"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, '%-H') FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%-H"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, '%-j') FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%-j"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(date '-99999-01-01', '%y')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-99999-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%y"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select d, time_bucket('3 months'::interval, d, null::interval) from dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":52,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('-1 month'::interval, '2019-04-05'::date);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":53,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1 month"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019-04-05"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('3 months'::interval, '2019-05-05'::date, '-2000000000 months'::interval);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":85,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019-05-05"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":81,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-2000000000 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('1 day'::interval, '294247-01-11'::date);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 day"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH cte AS (\n SELECT NULL::INTERVAL i,\n NULL::DATE d,\n NULL::TIMESTAMP t\n FROM range(1)\n)\nSELECT time_bucket(i, d, i)\nFROM cte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"i","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"d","query_location":58,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"t","query_location":83,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":85,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":106,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":124,"query_location_length":20,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":150,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT enum_range_boundary('orange'::rainbow, 'green'::rainbow)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"enum_range_boundary","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"orange"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"rainbow","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"green"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":7,"catalog":"","schema":"","type_name":"rainbow","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT assert_true(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"assert_true","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, s, CASE WHEN i%2=0 THEN s ELSE s END FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["s"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":13,"query_location_length":33,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":23,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["s"]}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["s"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT error('test')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"error","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT r, HASH(r) FROM enums;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":7,"function_name":"hash","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["r"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":5,"schema_name":"","table_name":"enums","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["enums"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select invoke(lambda x, y, z: x * 100 + y * 10 + z, 1, 2, 3) as result","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"result","query_location":7,"query_location_length":53,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":14,"query_location_length":36,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["z"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":7,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["z"]}}]},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select invoke(lambda x: alias(x), 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":14,"query_location_length":18,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":8,"function_name":"alias","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select replace_type({duck: 3.141592653589793::DOUBLE, goose: 2.718281828459045::DOUBLE}, NULL::DOUBLE, NULL::DECIMAL(15,2))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":116,"function_name":"replace_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":67,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"duck","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"duck","query_location":44,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":17,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":16,"scale":15}},"is_null":false,"value":3141592653589793}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"goose","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"goose","query_location":78,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":17,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":16,"scale":15}},"is_null":false,"value":2718281828459045}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":93,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":107,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":109,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":15}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL BETWEEN 10 AND 20","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":12,"query_location_length":17,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM integers WHERE 9 BETWEEN 10 AND NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":38,"query_location_length":19,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM integers WHERE i BETWEEN NULL AND NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":38,"query_location_length":21,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM range(4) tbl(i) WHERE i \u003e 1 AND i \u003c= 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":14,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":36,"query_location_length":16,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":36,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":46,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select false is not true","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":13,"query_location_length":11,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"cast_type":{"id":"BOOLEAN","type_info":null},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count FROM duckdb_connection_count();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["count"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":18,"query_location_length":25,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_connection_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, i IN (1, 2, 3, 4, 5, 6, 7, 8) FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":15,"query_location_length":24,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT MAX(i) FROM integers WHERE i \u003c\u003e i1.i), (SELECT MIN(i) FROM integers WHERE i \u003c= i1.i) FROM integers i1 ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":45,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":45,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":57,"query_location_length":45,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":92,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":108,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LEAST(1, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"least","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT GREATEST(DATE '1992-01-01', DATE '1994-02-02', DATE '1991-01-01', DATE 'infinity', DATE '-infinity')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":100,"function_name":"greatest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1994-02-02"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1991-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":73,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":90,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LEAST(REPEAT(i::VARCHAR, 20), j::VARCHAR) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"least","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":22,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["j"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM range(3) UNION ALL SELECT NULL ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT id, sleep_ms(1) FROM test_sleep_table ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":11,"function_name":"sleep_ms","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":16,"schema_name":"","table_name":"test_sleep_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_sleep_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT pg_sleep(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"pg_sleep","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s.min, s.max, s.has_null, s.has_no_null FROM (SELECT STATS(i + 2) s FROM integers LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["s","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["s","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":13,"column_names":["s","has_no_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":60,"query_location_length":12,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":80,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT index_key({'schema': NULL::VARCHAR, 'table': 'tbl1'}, 'PRIMARY_tbl1_0', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":74,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":42,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"schema","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"schema","query_location":32,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":52,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tbl1"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PRIMARY_tbl1_0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT index_key({'catalog': current_catalog(), 'schema': 'main', 'table': 'tbl3'}, 'tbl3_idx', key1, key2, key3)\nFROM tbl3\nWHERE key1 BETWEEN 1 AND 3\nORDER BY key1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":4,"column_names":["key1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":106,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":65,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"catalog","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"catalog","query_location":29,"query_location_length":17,"function_name":"current_catalog","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"name":"schema","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"schema","query_location":58,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"main"}}},{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":75,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tbl3"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tbl3_idx"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":4,"column_names":["key1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":4,"column_names":["key2"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":4,"column_names":["key3"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":119,"query_location_length":4,"schema_name":"","table_name":"tbl3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl3"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":135,"query_location_length":15,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":4,"column_names":["key1"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT index_key({'foo': 'bar', 'table': 'tbl1'}, 'PRIMARY_tbl1_0', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":31,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"foo","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"foo","query_location":25,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bar"}}},{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":41,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tbl1"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"PRIMARY_tbl1_0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT index_key({'table': 'tbl2'}, 'FOREIGN_tbl2_2', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":27,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tbl2"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"FOREIGN_tbl2_2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT dayofweek(i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"dayofweek","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, DATE_PART(['year', 'month', 'day'], i) AS parts\nFROM intervals\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":10,"query_location_length":38,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"year"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"month"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"day"}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(century FROM i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CENTURY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(minute FROM i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MINUTE"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(dow FROM interval '6 months ago')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"dow"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"6 months ago"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DATE_TRUNC('decade', i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"decade"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_any_value(dt), list_any_value(t) FROM five_dates_tz","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list_any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["dt"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":17,"function_name":"list_any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["t"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":13,"schema_name":"","table_name":"five_dates_tz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_dates_tz"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_avg(i) FROM integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"list_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_bit_and()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"list_bit_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_bool_and(l) FROM bools;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"list_bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["l"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"bools","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bools"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_first()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"list_first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_histogram(['2021-08-20'::TIMESTAMP_S])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"list_histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":27,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-08-20"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMP_S","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_aggr([1], True)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_aggr([1, 2, NULL], 'regr_sxx');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"regr_sxx"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_aggr([1, 2, NULL], 'arg_max');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"arg_max"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_last(i) FROM five","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"list_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":4,"schema_name":"","table_name":"five","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_mad(x) from (values\t(['294247-01-10 04:00:54.775806'::timestamp,\n\t'290309-12-22 (BC) 00:00:00'::timestamp])) tbl(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"list_mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":24,"query_location_length":96,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":85,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-10 04:00:54.775806"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":106,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"290309-12-22 (BC) 00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":108,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_median(r) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"list_median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["r"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MIN(l), MAX(l) FROM list_with_structs;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["l"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":17,"schema_name":"","table_name":"list_with_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_with_structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_mode(v) from timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"list_mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_aggr([NULL], '{func_name}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{func_name}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_skewness([1])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list_skewness","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_string_agg(x) FROM strings WHERE g \u003e [100]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list_string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":45,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["g"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(i \u003e 500), SUM(i=1), SUM(i IS NULL) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":11,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":500}}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":14,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":37,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select round(list_var_samp(val), 1) from stddev_test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":18,"function_name":"list_var_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":3,"column_names":["val"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":11,"schema_name":"","table_name":"stddev_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stddev_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT len(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT array_to_string([1, 2, 3], k) FROM repeat(',', 5) t(k)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"array_to_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":42,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"column_name_alias":["k"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT flatten(1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"flatten","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT flatten([[[1, 2], [3, 4]], [[]], [[5, 6], [7, 8]]]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"flatten","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":42,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}}]}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT generate_series(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT generate_series(1, 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT range(3, 1, -1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT 1 UNION ALL SELECT 0 UNION ALL SELECT 2) AS _(x), generate_series(1, x) AS __(y) ORDER BY x, y","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["x"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["y"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":93,"left":{"type":"SUBQUERY","alias":"_","sample":null,"query_location":14,"query_location_length":48,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":["x"]},"right":{"type":"TABLE_FUNCTION","alias":"__","sample":null,"query_location":72,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["x"]}}]},"column_name_alias":["y"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT generate_series('294247-01-10'::TIMESTAMP, 'infinity'::TIMESTAMP, INTERVAL '1 DAY');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":83,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-10"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":60,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":62,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 DAY"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT generate_series(timestamptz '2020-01-01', timestamptz '2020-01-01', interval '1' day);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":85,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT quantile(NULL, filter(NULL, (lambda c103: 'babea54a-2261-4b0c-b14b-1d0e9b794e1a')));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":83,"function_name":"quantile","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":67,"function_name":"filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":36,"query_location_length":51,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["c103"]},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"babea54a-2261-4b0c-b14b-1d0e9b794e1a"}},"syntax_type":"LAMBDA_KEYWORD"}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_filter([True, False, NULL], x -\u003e x AND true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":40,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["x"]},"expr":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":45,"query_location_length":10,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["x"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_filter(NULL, x -\u003e x \u003e 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":25,"query_location_length":10,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["x"]},"expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":30,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([[1, 3], [2, 3, 1], [2, 4, 2]], x -\u003e list_filter(x, y -\u003e y \u003c= 2))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":80,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":30,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":54,"query_location_length":32,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":27,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":74,"query_location_length":11,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["y"]},"expr":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":79,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"syntax_type":"SINGLE_ARROW"}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_apply([5,6], x -\u003e list_filter([4,8], y -\u003e y));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":25,"query_location_length":31,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":26,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":49,"query_location_length":6,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["y"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["y"]},"syntax_type":"SINGLE_ARROW"}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_has_all([variable_has_all FOR variable_has_all IN ['a']], ['b']) AS list_comp_result;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"list_comp_result","query_location":7,"query_location_length":69,"function_name":"list_has_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":48,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["variable_has_all"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":16,"column_names":["variable_has_all"]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_intersect(list_intersect([1, 2, 3, 4], [4, 5, 6, 7]), list_intersect([4, 5, 6, 7], [1, 2, 3, 4]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":102,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":42,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":42,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x FROM (VALUES (42)) t(x) GROUP BY x HAVING list_filter(NULL, lambda_param -\u003e lambda_param = 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":13,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["x"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":51,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":69,"query_location_length":32,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":12,"column_names":["lambda_param"]},"expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":12,"column_names":["lambda_param"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"syntax_type":"SINGLE_ARROW"}}]},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [fruit for fruit in ['apple', 'banana', 'cherry', 'kiwi', 'mango'] if contains(fruit, 'a')]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":91,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":46,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"apple"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"banana"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"cherry"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"kiwi"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"mango"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["fruit"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filter","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":20,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["fruit"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"result","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":5,"column_names":["fruit"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"filter"}}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"result"}}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce([1, 2, 3], (x, y) -\u003e y - x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":15,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(a, (x, y, i) -\u003e x + y + i) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":22,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(n, (x, y) -\u003e list_reduce(l, (a, b) -\u003e x + y + a + b)) FROM nested;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":49,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":39,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":47,"query_location_length":23,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["b"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["a"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["b"]}}]},"syntax_type":"SINGLE_ARROW"}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":6,"schema_name":"","table_name":"nested","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \nlist_reduce(\n s, (curr, next) -\u003e struct_pack(a:=curr.a + (next.b - curr.b), b:=next.b)\n)\nFROM df","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":91,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":28,"query_location_length":69,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":4,"column_names":["curr"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":4,"column_names":["next"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":53,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":66,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":6,"column_names":["curr","a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":6,"column_names":["next","b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":6,"column_names":["curr","b"]}}]}}]}},{"name":"b","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":90,"query_location_length":6,"column_names":["next","b"]}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":105,"query_location_length":2,"schema_name":"","table_name":"df","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["df"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce([], (x, y) -\u003e x + y, 100);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":23,"query_location_length":15,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["y"]}}]},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce([1, 2, 3], (x, y, x_i) -\u003e list_reduce([4, 5, 6], (a, b, a_i) -\u003e x + y + a + b + x_i + a_i, 100), 1000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":114,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":84,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":3,"column_names":["x_i"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":69,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":68,"query_location_length":40,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["a_i"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["a"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["b"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":3,"column_names":["x_i"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":3,"column_names":["a_i"]}}]},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce([1, 2, 3], (x, y) -\u003e list_reduce([4, 5, 6], (a, b) -\u003e list_reduce([7, 8, 9], (c, d) -\u003e x + y + a + b + c + d, 1000), 100), 10);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":138,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":110,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":100,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":63,"query_location_length":71,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["b"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":61,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":96,"query_location_length":31,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["d"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":124,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":120,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":116,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["a"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["b"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["c"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":1,"column_names":["d"]}}]},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_apply(range(5), x -\u003e {x:x, w:list_filter(range(5), y -\u003e abs(y-x) \u003c 2)});","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":76,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":8,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":28,"query_location_length":54,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":49,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":36,"query_location_length":1,"column_names":["x"]}},{"name":"w","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"w","query_location":41,"query_location_length":40,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":8,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":63,"query_location_length":17,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["y"]},"expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":68,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":8,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["x"]}}]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"syntax_type":"SINGLE_ARROW"}}]}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM read_parquet('{TEST_DIR}/my_file_' ||\nlist_aggr(list_transform(list_filter(['s', 'c', 'b', NULL, 'a'], x -\u003e x IS NOT NULL AND x != 's'),\ns -\u003e lower(s)), 'string_agg', '') || '.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":185,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":171,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/my_file_"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":132,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":103,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":72,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":124,"query_location_length":31,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["x"]},"expr":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":129,"query_location_length":26,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":131,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":1,"column_names":["x"]}]},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":147,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s"}}}]},"syntax_type":"SINGLE_ARROW"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":158,"query_location_length":13,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":158,"query_location_length":1,"column_names":["s"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":163,"query_location_length":8,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":1,"column_names":["s"]}}]},"syntax_type":"SINGLE_ARROW"}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"string_agg"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":".parquet"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([], x -\u003e x + 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":26,"query_location_length":10,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_sort(list_transform(list_distinct(list_concat([1,2],[2,2])), x -\u003e x + 1));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":78,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":67,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":39,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":24,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":73,"query_location_length":10,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"syntax_type":"SINGLE_ARROW"}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([{'b' : {'a': 1}}], x -\u003e x.b.a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":30,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":42,"query_location_length":10,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["x"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":5,"column_names":["x","b","a"]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([[2, 3], [4]], x -\u003e list_transform([1], y -\u003e x || [y]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":70,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":37,"query_location_length":39,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":34,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":62,"query_location_length":13,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":8,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["y"]}}]}}]},"syntax_type":"SINGLE_ARROW"}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([1,2,3,4,5], (x, i) -\u003e (x * 10 / i));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":35,"query_location_length":22,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":10,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([10], lambda x: sum(1) + x)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":28,"query_location_length":20,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([TIMESTAMP '1992-03-22', TIMESTAMP '209-03-22', TIMESTAMP '1700-03-22'], lambda x: century(x))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":109,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":71,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-03-22"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"209-03-22"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1700-03-22"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":95,"query_location_length":20,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":10,"function_name":"century","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_filter(['duck', 'a', 'ö'], lambda duck: contains(concat(duck, 'DB'), 'duck'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":83,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ö"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":40,"query_location_length":49,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["duck"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":36,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":18,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["duck"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DB"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT array_filter([1, NULL], lambda arr_elem: arr_elem \u003c 4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"array_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":31,"query_location_length":29,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["arr_elem"]},"expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":48,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":8,"column_names":["arr_elem"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([['abc']], lambda x: list_filter(x, lambda y: y));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":64,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":37,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":27,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":58,"query_location_length":11,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["y"]},"syntax_type":"LAMBDA_KEYWORD"}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform(UNNEST(s), x -\u003e UNNEST(x)) FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":14,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"SINGLE_ARROW"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_has_all(list_transform(['a'], lambda variable_has_all: variable_has_all), ['b']) AS list_transform_result;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"list_transform_result","query_location":7,"query_location_length":85,"function_name":"list_has_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":64,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":42,"query_location_length":41,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["variable_has_all"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":16,"column_names":["variable_has_all"]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_filter(['apple', 'banana', 'cherry', 'kiwi', 'mango'], lambda fruit: contains(fruit, 'a'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":95,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":46,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"apple"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"banana"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"cherry"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"kiwi"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"mango"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":67,"query_location_length":34,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["fruit"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":20,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":5,"column_names":["fruit"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce([1, 2, 3], lambda x, y: y - x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(a, lambda x, y: x || ' ' || y) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":26,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":13,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["y"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(n, lambda x, y, x_i: list_reduce(l, lambda a, b, a_i: x + y + a + b + x_i + a_i)) FROM nested;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":93,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":77,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x_i"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":59,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":55,"query_location_length":43,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a_i"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["a"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["b"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":3,"column_names":["x_i"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":3,"column_names":["a_i"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":106,"query_location_length":6,"schema_name":"","table_name":"nested","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \nlist_reduce(\n [struct_pack(a := 0, b := 0), struct_pack(a := 0, b := 1), struct_pack(a := 0, b := 2)],\n lambda curr, next: struct_pack(a := curr.a + (next.b - curr.b), b := next.b)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":188,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":87,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":118,"query_location_length":76,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["curr"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["next"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":161,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":6,"column_names":["curr","a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":171,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":6,"column_names":["next","b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":6,"column_names":["curr","b"]}}]}}]}},{"name":"b","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":187,"query_location_length":6,"column_names":["next","b"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(['1', '2', '3'], lambda acc, x: acc + x::INTEGER, 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":64,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":36,"query_location_length":31,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":3,"column_names":["acc"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["x"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(l, lambda x, y: x + y) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["y"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(n, lambda x, y: list_reduce(l, lambda a, b: x + y + a + b), initial) FROM nested;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":80,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":55,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":42,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":50,"query_location_length":26,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["a"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["b"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":7,"column_names":["initial"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":93,"query_location_length":6,"schema_name":"","table_name":"nested","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a FROM where_clause WHERE list_reduce(a, lambda x, y: x - y, initial) \u003e 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"where_clause","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["where_clause"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":33,"query_location_length":47,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":43,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":48,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["y"]}}]},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":7,"column_names":["initial"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(l, lambda x, y: x \u003e 3, initial) FROM cast_test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}]},"expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":35,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":7,"column_names":["initial"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":9,"schema_name":"","table_name":"cast_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cast_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([1,2], lambda x:\n\tlist_transform([3,4], lambda y:\n\t\tlist_transform([5,6], lambda z: z + y + x)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":111,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":29,"query_location_length":88,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":77,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":62,"query_location_length":54,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":42,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":96,"query_location_length":19,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["z"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["z"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["y"]}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]},"syntax_type":"LAMBDA_KEYWORD"}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM read_parquet('{TEST_DIR}/my_file_' ||\nlist_aggr(list_transform(list_filter(\nlist_filter(['s', 'c', 'b', NULL, 'a'], lambda y: y != 's'), lambda x: x IS NOT NULL),\nlambda s: lower(s)), 'string_agg', '') || '.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":216,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":202,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/my_file_"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":163,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":134,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":98,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":59,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":137,"query_location_length":18,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":147,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s"}}},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":158,"query_location_length":23,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":170,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":1,"column_names":["x"]}]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":184,"query_location_length":18,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["s"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":194,"query_location_length":8,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":1,"column_names":["s"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"string_agg"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":".parquet"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([1, NULL, -2, NULL], lambda x: x + 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":43,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform([[1], [4], NULL, [1], [8]], lambda x: list_concat(\n\tlist_transform(x, lambda y: CASE WHEN y \u003e 1 THEN 'yay' ELSE 'nay' END), x))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":142,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":50,"query_location_length":98,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":88,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":70,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":92,"query_location_length":51,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":102,"query_location_length":41,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":112,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"yay"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nay"}}},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":1,"column_names":["x"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT n FROM corr_test WHERE list_sum(list_transform(l, lambda elem: elem - n)) \u003e= n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"corr_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["corr_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":30,"query_location_length":55,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":50,"function_name":"list_sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":40,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":57,"query_location_length":21,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":4,"column_names":["elem"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["n"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["n"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform(['abc'], lambda x, i: x[i + 1]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":31,"query_location_length":21,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["i"]}}]},"expr":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":45,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["x"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT range(1, 20000, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20000}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_concat([1, 2], NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [1, 2] + [3, 4]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_concat([{a: 1}, {a: 2}], [{a: 3}, {a: 4}], [{a: 5}, {a: 6}])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT array_push_back([1, 2], 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"array_push_back","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, list_contains(i,'aaaaaaaaaaaaaaaaaaaaaaaa') from STR_TEST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":43,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaaaaaaaaaaaaaaaaaaaaaaa"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":8,"schema_name":"","table_name":"STR_TEST","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["STR_TEST"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_contains([7], 5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_contains([NULL, 1],NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_contains([[1,3],[1]],[1,2,3])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_contains([MAP([1], [2]), NULL], NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_distance(l, [1, 2, 3]) FROM lists;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"list_distance","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(list_distinct(list_distinct([1, 1, -5, 10, 10, 2]))) AS l ORDER BY l","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["l"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":7,"query_location_length":59,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":51,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":36,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_distinct(['2021-08-20 00:00:00.123'::TIMESTAMP_MS])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":41,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-08-20 00:00:00.123"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_has_any(l1, l2) from list_data;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"list_has_any","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["l1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":2,"column_names":["l2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":9,"schema_name":"","table_name":"list_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_has_any(l1, l2) from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"list_has_any","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["l1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":2,"column_names":["l2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select l1 \u003c@ NULL from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"\u003c@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["l1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_sort(list_intersect([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [3, 6, 9, 12]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":70,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":39,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(list_intersect([1::INT, 2::INT], [2.0::DOUBLE, 3.0::DOUBLE]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":60,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":20}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":30}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_position([], 7)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_position([1.0,2.0,3.0,4.0],5.0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":20}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":30}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":40}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":50}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_position([],NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_position([[1,NULL],[1], [1,2,3]],[1,NULL])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, j, list_position(i,j) from test0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":18,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":5,"schema_name":"","table_name":"test0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_resize(NULL, NULL, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_resize([1, 2, 3], len(list_resize([1, 2, 3], 2)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":30,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":25,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_resize([NULL], 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_sort((list), 'desc') == list_reverse(list) from tbl_big;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":47,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":4,"column_names":["list"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"desc"}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":18,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":4,"column_names":["list"]}}]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":7,"schema_name":"","table_name":"tbl_big","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_big"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH example AS (\n SELECT [1, 2, 3] AS arr UNION ALL\n SELECT [4, 5] AS arr UNION ALL\n SELECT [] AS arr\n)\nSELECT\n list_reverse(arr) AS reverse_arr\nFROM example ORDER BY length(reverse_arr) DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":172,"query_location_length":19,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":11,"column_names":["reverse_arr"]}}]}}]}],"cte_map":{"map":[{"key":"example","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"arr","query_location":27,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"arr","query_location":63,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"arr","query_location":96,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"reverse_arr","query_location":117,"query_location_length":17,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":3,"column_names":["arr"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":155,"query_location_length":7,"schema_name":"","table_name":"example","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["example"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select\n child,\n count(*) as cnt,\n list_sort(\n list(\n parent\n )\n )\n as source_parents\nfrom test1\ngroup by 1\nhaving cnt \u003e 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["child"]},{"class":"FUNCTION","type":"FUNCTION","alias":"cnt","query_location":22,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"source_parents","query_location":43,"query_location_length":59,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":34,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":6,"column_names":["parent"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":130,"query_location_length":5,"schema_name":"","table_name":"test1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test1"]}},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":154,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":3,"column_names":["cnt"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_unique(l) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"list_unique","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_unique(['14:59:37'::TIMETZ])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"list_unique","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"14:59:37"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_value([1, 2]::INTEGER[2], [3, 4]::INTEGER[2], [5.6, 7.8]::DOUBLE[2]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":73,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":56}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":78}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_value(a, b, c) FROM mixed_array_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["c"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":17,"schema_name":"","table_name":"mixed_array_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mixed_array_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LIST_VALUE(['a', 'a'], ['b', 'b', NULL], NULL, ['c']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":53,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_value(s, s, s) AS res FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_where([NULL::BOOLEAN], [true])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"list_where","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_where(['{a: 1}'::BLOB, '{a: 3}'::BLOB], [true, false])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":59,"function_name":"list_where","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":32,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{a: 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{a: 3}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_zip([1,2,3], [1,2])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_zip([1,2,3], true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_zip(['14:59:37'::TIME]) a, a::VARCHAR::STRUCT(\"time\" TIME)[] b, a == b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":7,"query_location_length":28,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"14:59:37"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}}]}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":49,"query_location_length":23,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":19,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"time","query_location":65,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}]}]}}},"try_cast":false},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":76,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["b"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_zip([[1], [1, 2], NULL])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT repeat([{'x': 1}], 5);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COALESCE(*COLUMNS(lambda c: {'title': c}.title IN ('a', 'c')))\nFROM (SELECT NULL, 2, 3) t(a, b, c);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":7,"query_location_length":62,"children":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":16,"query_location_length":52,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":25,"query_location_length":42,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["c"]},"expr":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":57,"query_location_length":10,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":35,"query_location_length":18,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":12,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"title","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"title","query_location":45,"query_location_length":1,"column_names":["c"]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"title"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}]},"syntax_type":"LAMBDA_KEYWORD"}}]},"qualified_exclude_list":[],"rename_list":[]}]}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":75,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b","c"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (ROW(42, 84))[(-9223372036854775808)::BIGINT]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":20,"query_location_length":32,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":84}}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775808}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH data AS (SELECT 1 AS a, 2 AS b, 3 AS c)\nSELECT struct_update (data, d := 4) FROM data;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"data","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":28,"function_name":"struct_update","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["data"]}},{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":4,"schema_name":"","table_name":"data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_update(col, i:='i='||col.i) FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"struct_update","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":3,"column_names":["col"]}},{"name":"i","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":29,"query_location_length":11,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i="}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":5,"column_names":["col","i"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 10.0 % 0.0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":1}},"is_null":false,"value":100}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT binom(120, 60);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"binom","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":120}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":60}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT even(8.9), even(-8.9)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"even","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":89}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":10,"function_name":"even","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":-89}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT factorial(40);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"factorial","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":40}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(CEIL(n::tinyint) as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":32,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":16,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"tinyint","children":[]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(FLOOR(n::double) as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":32,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":16,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT lgamma(0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"lgamma","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT gcd(42, NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"gcd","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ln(0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"ln","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select nextafter()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"nextafter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select nextafter(a, 0::FLOAT) from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"nextafter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select pi()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":4,"function_name":"pi","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select log(2, -1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"log","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select pow(a, b) from powerme","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"pow","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"powerme","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["powerme"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select setseed(-1.1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"setseed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":-11}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select round(a, 1) from roundme","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":7,"schema_name":"","table_name":"roundme","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["roundme"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT roundBankers(-45, -1), roundBankers(-35, -1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"roundbankers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-45}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":21,"function_name":"roundbankers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-35}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT signbit(abs(x)) FROM negative_zero;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"signbit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["x"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":13,"schema_name":"","table_name":"negative_zero","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["negative_zero"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(COS(n::float)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":34,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":18,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":13,"function_name":"cos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(ATAN(n::float)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":19,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":14,"function_name":"atan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(ACOS(n::float)*1000 as bigint) FROM numbers WHERE n between -1 and 1 ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":19,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":14,"function_name":"acos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":65,"query_location_length":16,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["n"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(ATAN2(n::bigint, 42)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":41,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":25,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":20,"function_name":"atan2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select asinh(-1), asinh(0), asinh(2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"asinh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":8,"function_name":"asinh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":8,"function_name":"asinh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::SMALLINT + 1::SMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::INTEGER + 1::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::REAL + 1::REAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":4,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -i FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 2+i=5, 5=2+i FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["i"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":14,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}}]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT - col2 AS col2 FROM tab1 WHERE NOT 18 BETWEEN NULL AND ( + col0 * + CAST ( NULL AS INTEGER ) + - 3 / col2 ) OR NOT col0 BETWEEN col2 + + col1 AND NULL ORDER BY 1 DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":176,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"col2","query_location":16,"query_location_length":6,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":4,"column_names":["col2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":4,"schema_name":"","table_name":"tab1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tab1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":47,"query_location_length":119,"children":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":47,"query_location_length":76,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":54,"query_location_length":69,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"upper":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":35,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":4,"column_names":["col0"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":26,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":84,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":10,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-3}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":4,"column_names":["col2"]}}]}}]}}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":127,"query_location_length":39,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":136,"query_location_length":30,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":4,"column_names":["col0"]},"lower":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":149,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":4,"column_names":["col2"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":151,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":4,"column_names":["col1"]}}]}}]},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 3 \u003c\u003c 'hello'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '1000' \u003e 20","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":11,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1000"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT true OR true","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":7,"query_location_length":12,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i\u003e3 AND false FROM a ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":7,"query_location_length":13,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT d, ttz, ttz + d\nFROM dates, timetzs\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":3,"column_names":["ttz"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["ttz"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT format_bytes(1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"format_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT format_bytes(1e15::BIGINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"format_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":1000000000000000.0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT hex(unhex('abcd'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"hex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":13,"function_name":"unhex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcd"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM t0 WHERE t0.c0 LIKE '_';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":8,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["t0","c0"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"_"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select md5_number_lower('hello'), md5_number_lower(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"md5_number_lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":22,"function_name":"md5_number_lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'a': v} FROM null_byte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":13,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"null_byte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_byte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT OVERLAY('abcdef', 'XX', 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"overlay","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcdef"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"XX"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT overlay('33333rce' placing 'resou' from 1 FOR -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"overlay","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"33333rce"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"resou"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT overlay('abc' placing 'XY' from 5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"overlay","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"XY"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT parse_formatted_bytes('2 MB');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2 MB"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT parse_formatted_bytes('null');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"null"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try(parse_formatted_bytes('-5 MB'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":7,"query_location_length":35,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":30,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-5 MB"}}}]}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select parse_path('\\path\\to\\file', 'forward_slash');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\path\\to\\file"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"forward_slash"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT parse_path();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT parse_dirname('path/to/file.csv', NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"parse_dirname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT parse_dirpath('/path/to/file.csv', 'forward_slash');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"parse_dirpath","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"forward_slash"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (VALUES (parse_filename('path/to/file.csv', 'system')), (parse_filename('path/to/file.csv\\file2.csv', 'both_slash')), (parse_filename('path/to/file.csv', 'forward_slash')), (parse_filename('path\\to\\file.csv/file2.csv', 'backslash'))) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":233,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":44,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"system"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":58,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path/to/file.csv\\file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"both_slash"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":51,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"forward_slash"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":188,"query_location_length":57,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":203,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path\\to\\file.csv/file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"backslash"}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select parse_filename('/', 'backslash');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"backslash"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT parse_filename(NULL, '');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (VALUES (parse_dirpath('path\\to\\file.csv/file2.csv', 'system')), (parse_dirpath('path/to/file.csv\\file2.csv', 'both_slash')), (parse_dirpath('path/to/file.csv', 'forward_slash')), (parse_dirpath('path\\to\\file.csv/file2.csv', 'backslash'))) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":239,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":53,"function_name":"parse_dirpath","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path\\to\\file.csv/file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"system"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":57,"function_name":"parse_dirpath","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path/to/file.csv\\file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"both_slash"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":141,"query_location_length":50,"function_name":"parse_dirpath","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"forward_slash"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":195,"query_location_length":56,"function_name":"parse_dirpath","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":209,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"path\\to\\file.csv/file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":239,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"backslash"}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT path_join('/usr/local', '../..');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"path_join","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/usr/local"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"../.."}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT path_join(NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"path_join","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH patterns AS (\n\tSELECT 'rundate_(\\d+-\\d+-\\d+)_pass_(\\d+)' AS pattern FROM range(3)\n)\nSELECT regexp_extract(filename, pattern, ['rundate', 'pass']) AS groups\nFROM filenames, patterns","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"patterns","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"pattern","query_location":27,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"rundate_(\\d+-\\d+-\\d+)_pass_(\\d+)"}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":78,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"groups","query_location":96,"query_location_length":54,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":7,"column_names":["pattern"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":130,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"rundate"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"pass"}}}]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":161,"query_location_length":24,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":166,"query_location_length":9,"schema_name":"","table_name":"filenames","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["filenames"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":177,"query_location_length":8,"schema_name":"","table_name":"patterns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["patterns"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_escape('@');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"regexp_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"@"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract('foobarbaz', '(b..)(b..)', 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foobarbaz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(b..)(b..)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract('foobarbaz', '(b..)', 1, 'k')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foobarbaz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(b..)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"k"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract_all('1a 2b 14m', '\\\\d+', -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1a 2b 14m"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\\\d+"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regexp_extract_all('abc=111, def=222, ghi=333', '(\"[^\"]+\"|\\w+)=(\"[^\"]+\"|\\w+)', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc=111, def=222, ghi=333"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(\"[^\"]+\"|\\w+)=(\"[^\"]+\"|\\w+)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regexp_extract_all('aaba', 'a?')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaba"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a?"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regexp_extract_all('abbb', '^a*(b)')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abbb"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"^a*(b)"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regexp_extract_all('\\001\\002\\003', '\\002?')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\001\\002\\003"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\002?"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT str, \n REGEXP_EXTRACT_ALL(str,'(ab)+cd') AS matched\nFROM (\n VALUES ('bcd'), ('abcd'), ('abbcd'), ('ababcd'), ('ababxcd')\n) AS t(str)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["str"]},{"class":"FUNCTION","type":"FUNCTION","alias":"matched","query_location":15,"query_location_length":33,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(ab)+cd"}}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":65,"query_location_length":66,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abbcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ababcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ababxcd"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["str"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select regexp_extract_all('si1si2', '^(si\\d)(?:.*)$', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"si1si2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"^(si\\d)(?:.*)$"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract_all(NULL, '(a)', ['g']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(a)"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract_all('', '(a)?', ['a']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":37,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(a)?"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract_all('a 2b 14m', '(\\d+)?([a-z]+)', ['g1','g2']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":61,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a 2b 14m"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(\\d+)?([a-z]+)"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g2"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract_all('ad', 'a(bc)?d', ['g1']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":43,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ad"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a(bc)?d"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g1"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_extract_all('aaaaaaaa', '(a)(a)(a)', ['g1','g2','g3']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":61,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaaaaaaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(a)(a)(a)"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g3"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s FROM regex WHERE REGEXP_MATCHES(s, 'as(c|d|e)f')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"regex","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["regex"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":31,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"as(c|d|e)f"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * ~ 'b' FROM regex_columns_partial","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":5,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":21,"schema_name":"","table_name":"regex_columns_partial","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["regex_columns_partial"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * ~* 'b.*' FROM regex_columns_full","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":8,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b.*"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":18,"schema_name":"","table_name":"regex_columns_full","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["regex_columns_full"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_replace('as^/$df', '^/$', '', 'l')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"as^/$df"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"^/$"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"l"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_replace(s, '^/([^/]+)/.*$', '\\1') FROM (VALUES\n ('/usr/local/bin/duckdb'),\n ('/etc/hosts'),\n ('/var/'),\n ('relative/path/no/leading/slash')) t(s);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"^/([^/]+)/.*$"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\1"}}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":53,"query_location_length":113,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/usr/local/bin/duckdb"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/etc/hosts"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/var/"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"relative/path/no/leading/slash"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_replace('abc', '(b)', '\\3Y');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(b)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\3Y"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_matches(c0, CAST(NULL AS STRING)) from t0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["c0"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":6,"catalog":"","schema":"","type_name":"STRING","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_full_match('hello\nworld', '.*', 'n')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello\nworld"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":".*"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"n"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_split_to_table('axbyc', '[x|y]'), 42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"regexp_split_to_table","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"axbyc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[x|y]"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sha1(s), sha1('1') FROM strings WHERE s::INTEGER BETWEEN 1 AND 3 ORDER BY s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"sha1","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["s"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":9,"function_name":"sha1","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":56,"query_location_length":15,"input":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["s"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strip_accents(s)=strip_accents(str) FROM collate_test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":35,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"strip_accents","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":18,"function_name":"strip_accents","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":3,"column_names":["str"]}}]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":12,"schema_name":"","table_name":"collate_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collate_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT array_extract(s, 2147483646) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"array_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":10,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2147483646}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ASCII(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"ascii","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select bar(40, 20, 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"bar","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":40}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select bar(1, 0, '-infinity'::double)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"bar","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select bar(1, 0, 1, 1.375)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"bar","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":3}},"is_null":false,"value":1375}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select BIT_LENGTH(1, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"bit_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT length_grapheme('🤦🏼‍♂️')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"length_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🤦🏼‍♂️"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT substring_grapheme('🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️', 1, 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":79,"function_name":"substring_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":53,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CONCAT('hello', ' ', s) FROM strings ORDER BY s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select list_concat([1], [2], [3]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select CONCAT_WS('$',a, b) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"concat_ws","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select CONCAT_WS(',', NULL, 'SUFFIX') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"concat_ws","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SUFFIX"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT contains(s,'h') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"h"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT contains(s,'á') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"á"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT damerau_levenshtein('to', 'out')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"to"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"out"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT damerau_levenshtein('amanaplanacanalpanama', 'm23aanaplancaanaalnama')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":70,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"amanaplanacanalpanama"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"m23aanaplancaanaalnama"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT damerau_levenshtein(s, 'theres') FROM strings ORDER BY s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"theres"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT damerau_levenshtein(NULL, s) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT format('{}', BLOB '\\x00hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{}"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\x00hello"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT format('{}', 'hello', 'world')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"world"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select format('{:_}', 123456789)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{:_}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":123456789}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select printf('%+,.0f / %,.0f / %,.0f', -5::BIGINT, 9007199254740993::BIGINT, 5::UBIGINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%+,.0f / %,.0f / %,.0f"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":10,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":16,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":9007199254740993}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":79,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":81,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'aaa' GLOB '*b'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":9,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"*b"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '012a' GLOB '[0-9][0-9][0-9]'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":22,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"012a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[0-9][0-9][0-9]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '3' GLOB '\\\\'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":9,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\\\"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'abac' GLOB '*a[bc]'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":13,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abac"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"*a[bc]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'aaa' ILIKE '%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":9,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'ababac' ILIKE '%%%a%%%b%%a%b%%%%%a%c%%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":31,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ababac"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%%%a%%%b%%a%b%%%%%a%c%%"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM t WHERE s ILIKE '%WORLD%' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":15,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%WORLD%"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM t WHERE s NOT ILIKE '%a%' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":11,"function_name":"!~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%a%"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a ILIKE ('GOO' || chr(0) || 'SE') FROM unicode_possible ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":31,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":23,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"GOO"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SE"}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":16,"schema_name":"","table_name":"unicode_possible","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unicode_possible"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT str ILIKE NULL ESCAPE '$' FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":21,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM t WHERE s ILIKE '%fast' ESCAPE '\\' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":24,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%fast"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM t WHERE s ILIKE '%c_zzz%' ESCAPE '\\' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":26,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%c_zzz%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT position('h' in s) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"h"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INSTR(s,'á') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"instr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"á"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM t\nWHERE (str LIKE '%o%' AND str LIKE '%rld%')\n OR (str LIKE '%o%')\n OR (str LIKE '%o%');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":29,"query_location_length":83,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":35,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%o%"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":12,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%rld%"}}}]}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%o%"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%o%"}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT round(jaccard('aabbcc', 'ab'), 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":23,"function_name":"jaccard","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aabbcc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ab"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select round(jaccard(NULL, t), 1) from strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":16,"function_name":"jaccard","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["t"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select jaro_winkler_similarity('10000000000000000000000000000000000000000000000000000000000000020', '00000000000000000000000000000000000000000000000000000000000000000')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":161,"function_name":"jaro_winkler_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":67,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10000000000000000000000000000000000000000000000000000000000000020"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":67,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00000000000000000000000000000000000000000000000000000000000000000"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select jaro_winkler_similarity('', 'a')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"jaro_winkler_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select jaro_winkler_similarity('CRATE', 'TRACE', 0.6)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"jaro_winkler_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CRATE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"TRACE"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":6}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT levenshtein('hallo', 'hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hallo"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT levenshtein(NULL, '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT levenshtein(s, 'hi') from strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hi"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'aaa' LIKE 'aaa'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaa"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'ababac' LIKE 'abab%%%%%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":16,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ababac"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abab%%%%%"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'zebra elephant tiger horse' LIKE 'zebra elephant tiger horse blabla%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":41,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"zebra elephant tiger horse"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"zebra elephant tiger horse blabla%"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'zebra elephant tiger horse' NOT LIKE '%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":8,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"zebra elephant tiger horse"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'zebra elephant tiger horse' NOT LIKE 'zebra%tiger%elephant%horse'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":33,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"zebra elephant tiger horse"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"zebra%tiger%elephant%horse"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ' a ' LIKE '*_ ' ESCAPE '*';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":21,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" a "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"*_ "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"*"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT mismatches('hallo', 'hallo')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"mismatches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hallo"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hallo"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT mismatches(s, NULL) FROM strings ORDER BY s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"mismatches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s, t, hamming(s, t) hd FROM strings WHERE length(s) = length(t)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"hd","query_location":13,"query_location_length":13,"function_name":"hamming","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["t"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":49,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["s"]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["t"]}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select LPAD()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"lpad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT prefix('abcd', 'abc')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcd"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT prefix('abcdefghijklmnopqrstuvwxyz', 'abcd')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcdefghijklmnopqrstuvwxyz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcd"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT prefix('ñeft', 'ñ')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ñeft"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ñ"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT printf('hello'), printf(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":12,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT printf('%d', '-170141183460469231731687303715884105728'::HUGEINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%d"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-170141183460469231731687303715884105728"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT printf('%c', 65)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":65}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT printf(fmt, 10, pstring) FROM strings ORDER BY idx","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["idx"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["fmt"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":7,"column_names":["pstring"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT repeat(blob '00', 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":4,"catalog":"","schema":"","type_name":"blob","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select REPLACE(b, 'Ä', '--') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Ä"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"--"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT RIGHT_GRAPHEME('🦆🤦S̈', 0), RIGHT_GRAPHEME('🦆🤦S̈', 1), RIGHT_GRAPHEME('🦆🤦S̈', 2), RIGHT_GRAPHEME('🦆🤦S̈', 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"right_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🦆🤦S̈"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":32,"function_name":"right_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🦆🤦S̈"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":32,"function_name":"right_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🦆🤦S̈"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":32,"function_name":"right_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"🦆🤦S̈"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'aaa' SIMILAR TO 'a[a-z]a'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":20,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a[a-z]a"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'abc' ~ '^(b|c)'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":10,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"^(b|c)"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select split_part('a,b,c',',',5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"split_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a,b,c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT STARTS_WITH('hello world', 'h'),\n STARTS_WITH('hello world', 'he'),\n STARTS_WITH('hello world', 'hel'),\n STARTS_WITH('hello world', 'hell'),\n STARTS_WITH('hello world', 'hello'),\n STARTS_WITH('hello world', 'hello '),\n STARTS_WITH('hello world', 'hello w'),\n STARTS_WITH('hello world', 'hello wo'),\n STARTS_WITH('hello world', 'hello wor'),\n STARTS_WITH('hello world', 'hello worl')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"h"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":32,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"he"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":33,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hel"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":130,"query_location_length":34,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hell"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":173,"query_location_length":35,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":200,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":217,"query_location_length":36,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":229,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello "}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":262,"query_location_length":37,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":274,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":289,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello w"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":308,"query_location_length":38,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":320,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":335,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello wo"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":355,"query_location_length":39,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":367,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":382,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello wor"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":403,"query_location_length":40,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":415,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":430,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello worl"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT starts_with(s,'你好世界') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"你好世界"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL ^@ NULL FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_slice(s, 0, 2) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"list_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT array_slice(NULL::varchar, off, NULL+off) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"array_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["off"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":3,"column_names":["off"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from (SELECT list_slice(NULL, 1, 3, 2));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":34,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":25,"function_name":"list_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT n[off:length+off] FROM strings, nulltable","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":3,"column_names":["off"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":6,"column_names":["length"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":3,"column_names":["off"]}}]}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":9,"schema_name":"","table_name":"nulltable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nulltable"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s[2:] FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":4,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":1,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(string_split_regex('üüüüü', '◌'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":39,"function_name":"string_split_regex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"üüüüü"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"◌"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT string_agg(ss, 'bb') FROM (SELECT rowid AS id, UNNEST(string_split(s, 'bb')) AS ss FROM documents) AS q GROUP BY id ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":2,"column_names":["ss"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bb"}}}]}],"from_table":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":33,"query_location_length":72,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"id","query_location":41,"query_location_length":5,"column_names":["rowid"]},{"class":"FUNCTION","type":"FUNCTION","alias":"ss","query_location":54,"query_location_length":29,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":21,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bb"}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":95,"query_location_length":9,"schema_name":"","table_name":"documents","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["documents"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":2,"column_names":["id"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select UNNEST(string_split('abc', ''))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":23,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select string_split('a')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s[-2147483647] FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":13,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2147483647}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT substring('hello' from NULL for NULL) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"substring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suffix('abcd', 'd')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcd"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"d"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suffix('abcdefghijklmnopqrstuvwxyz', 'z')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcdefghijklmnopqrstuvwxyz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"z"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suffix('omotá', 'á')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"omotá"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"á"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT suffix('two ñ three ₡ four 🦆 end', 'XXXtwo ñ three ₡ four 🦆 end')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":77,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"two ñ three ₡ four 🦆 end"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"XXXtwo ñ three ₡ four 🦆 end"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT to_base(10, 36)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"to_base","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":36}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select TRANSLATE('https://dxyzdb.org', 'zyx.orghttps:/', 'kcu')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"translate","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"https://dxyzdb.org"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"zyx.orghttps:/"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"kcu"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select TRANSLATE(a, 'oel', 'OEL') FROM strings WHERE b IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"translate","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"oel"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"OEL"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":55,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["b"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select RTRIM(a) FROM strings WHERE b IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"rtrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":37,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["b"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select UNICODE(b) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"unicode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT abs(i), upper(s), i + 10 FROM executor_input ORDER BY rowid;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":5,"column_names":["rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":14,"schema_name":"","table_name":"executor_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["executor_input"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_part('hour', d) FROM times;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hour"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT isodow(i) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"isodow","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT d, DATE_PART('{partcode}', d) AS p, DATE_PART(['{partcode}'], d) AS st\nFROM times\nWHERE p \u003c\u003e st['{partcode}'];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":10,"query_location_length":26,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{partcode}"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["d"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"st","query_location":43,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{partcode}"}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":83,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":95,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["p"]},"right":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":102,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":2,"column_names":["st"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{partcode}"}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(microseconds FROM i) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(week FROM i) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"WEEK"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('3 months'::interval, null::time, '2 seconds'::interval) from times;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2 seconds"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('-3 hours'::interval, '00:00:00'::time, '00:00:00'::time);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":69,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-3 hours"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('3 months'::interval, '00:00:00'::time, '2000000000 months'::interval);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2000000000 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('-1 month'::interval, null::time, '10:00:00'::time);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1 month"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t1 - t2 FROM timestamp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["t1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":2,"column_names":["t2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT AGE('{rspecial}'::TIMESTAMP, '{lspecial}'::TIMESTAMP);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":53,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{rspecial}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{lspecial}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \n\tmake_timestamp(0) as epoch1, \n\tmake_timestamp(1574802684123 * 1000) as epoch2, \n\tmake_timestamp(-291044928000 * 1000) as epoch3, \n\tmake_timestamp(-291081600000 * 1000) as epoch4, \n\tmake_timestamp(-291081600001 * 1000) as epoch5, \n\tmake_timestamp(-290995201000 * 1000) as epoch6","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"epoch1","query_location":9,"query_location_length":17,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"epoch2","query_location":40,"query_location_length":36,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":13,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1574802684123}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"epoch3","query_location":90,"query_location_length":36,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":13,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-291044928000}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"epoch4","query_location":140,"query_location_length":36,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":155,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":13,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-291081600000}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":171,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"epoch5","query_location":191,"query_location_length":36,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":206,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":206,"query_location_length":13,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-291081600001}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":222,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"epoch6","query_location":241,"query_location_length":36,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":256,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":256,"query_location_length":13,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-290995201000}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":272,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, mts\nFROM (SELECT ts, make_timestamp(year(ts), month(ts), day(ts), hour(ts), minute(ts), microsecond(ts) / 1000000.0) mts\n\tFROM timestamps) t\nWHERE mts IS DISTINCT FROM ts;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["mts"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":20,"query_location_length":129,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"mts","query_location":32,"query_location_length":95,"function_name":"make_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":2,"column_names":["ts"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":9,"function_name":"month","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":2,"column_names":["ts"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":7,"function_name":"day","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":2,"column_names":["ts"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":8,"function_name":"hour","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":2,"column_names":["ts"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":10,"function_name":"minute","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":2,"column_names":["ts"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":27,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":15,"function_name":"microsecond","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":2,"column_names":["ts"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":9,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":8,"scale":1}},"is_null":false,"value":10000000}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":138,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":158,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":158,"query_location_length":3,"column_names":["mts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":2,"column_names":["ts"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT make_timestamp_ns(9223372036854775807); -- Infinity","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"make_timestamp_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":9223372036854775807}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, DATE_PART('millennium', ts) FROM millennia;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":27,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"millennium"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":9,"schema_name":"","table_name":"millennia","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["millennia"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts::DATE AS d, DATE_PART(['weekday', 'isodow', 'doy', 'julian'], ts) AS parts\nFROM millennia\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"d","query_location":9,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":22,"query_location_length":53,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":38,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"weekday"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"isodow"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"doy"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"julian"}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":90,"query_location_length":9,"schema_name":"","table_name":"millennia","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["millennia"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts::TIMESTAMPTZ, epoch_us(ts::TIMESTAMPTZ) FROM timestamps ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":13,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":25,"function_name":"epoch_us","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":13,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH parts(p) AS (VALUES (['year', 'month', 'day']), (['hour', 'minute', 'microsecond']))\nSELECT DATE_PART(p, ts) FROM parts, timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"parts","value":{"aliases":["p"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"year"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"month"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"day"}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":33,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hour"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"minute"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"microsecond"}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":16,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":1,"column_names":["p"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":114,"query_location_length":22,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":119,"query_location_length":5,"schema_name":"","table_name":"parts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parts"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":126,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(DOY FROM i) FROM timestamps","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DOY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT AGE(TIMESTAMPTZ '1957-06-13') t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"t","query_location":7,"query_location_length":29,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1957-06-13"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT AGE(TIMESTAMPTZ '1957-06-13', NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1957-06-13"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT iv, iv + '2021-12-01 13:54:48.123456Z'::TIMESTAMPTZ FROM intervals;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["iv"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["iv"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-12-01 13:54:48.123456Z"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 'epoch'::timestamptz - '9223372022400001001 microseconds'::interval","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"epoch"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9223372022400001001 microseconds"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts + (INTERVAL (-14) hour) FROM limits WHERE label = 'tsmin';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":19,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-14}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":6,"schema_name":"","table_name":"limits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":5,"column_names":["label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tsmin"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts + (INTERVAL (-485) microsecond) FROM limits WHERE label = 'tsmax';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":27,"function_name":"to_microseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-485}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":6,"schema_name":"","table_name":"limits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":5,"column_names":["label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tsmax"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts + (INTERVAL 1 second) FROM limits WHERE label = 'tsmax';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":17,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":6,"schema_name":"","table_name":"limits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":5,"column_names":["label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"tsmax"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TIMESTAMPTZ 'Infinity' - TIMESTAMPTZ '2020-01-01';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DATEDIFF('{specifier}', '{rspecial}'::TIMESTAMPTZ_NS, '{lspecial}'::TIMESTAMPTZ_NS);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":83,"function_name":"datediff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{specifier}"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{rspecial}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{lspecial}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select date_diff('day', '2022-01-04 19:00:00'::timestamptz, '2024-03-01'::date) as c1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"c1","query_location":7,"query_location_length":72,"function_name":"date_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"day"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2022-01-04 19:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-03-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT minute(ts), minute(ts::TIMESTAMP) FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"minute","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":21,"function_name":"minute","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_part(part, ts), date_part(part, ts::TIMESTAMP), part \nFROM timestamps","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["part"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":30,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":4,"column_names":["part"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["part"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":71,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAX(EXTRACT(YEAR FROM ts))\n\t, MAX(EXTRACT(MONTH FROM ts))\n\t, MAX(EXTRACT(DAY FROM ts))\n\t, MAX(EXTRACT(DECADE FROM ts))\n\t, MAX(EXTRACT(CENTURY FROM ts))\nFROM timestamps","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":21,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"YEAR"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":2,"column_names":["ts"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":27,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":22,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MONTH"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":2,"column_names":["ts"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":25,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DAY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":2,"column_names":["ts"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":28,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":23,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DECADE"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":2,"column_names":["ts"]}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":29,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":24,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"CENTURY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":2,"column_names":["ts"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":164,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, DATE_PART(['year', 'month', 'day'], ts) AS parts\nFROM timestamps\nWHERE part = 'day'\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":11,"query_location_length":39,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"year"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"month"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"day"}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":65,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":4,"column_names":["part"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"day"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select DATESUB('month', '2004-01-31 12:00:00-08'::TIMESTAMPTZ, '2004-02-29 13:00:00-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":94,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"month"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-01-31 12:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-02-29 13:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select DATESUB('month', '2004-01-31 13:00:00-08'::TIMESTAMPTZ, '2004-02-29 12:00:00-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":94,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"month"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-01-31 13:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-02-29 12:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select DATESUB('hour', '2004-01-31 12:00:00-08'::TIMESTAMPTZ, '2004-02-01 13:05:00-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":93,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hour"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-01-31 12:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-02-01 13:05:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":88,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select DATESUB('microsecond', '2004-01-31 12:00:00-08'::TIMESTAMPTZ, '2004-02-01 12:00:00.000050-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":107,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"microsecond"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-01-31 12:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":100,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2004-02-01 12:00:00.000050-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":102,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT datetrunc(s, d), s FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"datetrunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["d"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_trunc('hour', TIMESTAMPTZ '2019-01-06 04:03:02-08') FROM timestamps LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hour"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019-01-06 04:03:02-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT make_timestamptz(2021, 13, 1, 0, 0, 0) mts","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"mts","query_location":7,"query_location_length":38,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2021}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":13}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, make_timestamptz(yyyy, mm, dd, hr, mn, ss, 'America/New_York'), make_timestamptz(yyyy, mm, dd, hr, mn, ss)\nFROM timeparts;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":62,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":4,"column_names":["yyyy"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["mm"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":2,"column_names":["dd"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":2,"column_names":["hr"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":2,"column_names":["mn"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["ss"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"America/New_York"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":42,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":4,"column_names":["yyyy"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":2,"column_names":["mm"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":2,"column_names":["dd"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":2,"column_names":["hr"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":2,"column_names":["mn"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":2,"column_names":["ss"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":123,"query_location_length":9,"schema_name":"","table_name":"timeparts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timeparts"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime('2022-04-07 18:12:15.123456+00'::TIMESTAMPTZ, f)\nFROM formats","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2022-04-07 18:12:15.123456+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["f"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":70,"query_location_length":7,"schema_name":"","table_name":"formats","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["formats"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '0044-03-13 (BC) 10:33:41+01'::timestamptz","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0044-03-13 (BC) 10:33:41+01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 'epoch'::timestamptz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"epoch"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select t, time_bucket(null::interval, t, '2 seconds'::interval) from timestamps_tz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":53,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2 seconds"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":13,"schema_name":"","table_name":"timestamps_tz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps_tz"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select t, time_bucket('5 months'::interval, t, 'Europe/Berlin') from timestamps_tz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":53,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5 months"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Europe/Berlin"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":13,"schema_name":"","table_name":"timestamps_tz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps_tz"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('-1 month'::interval, '2019-04-05 00:00:00-11'::timestamptz, '1 hour 30 minutes'::interval);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":103,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1 month"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019-04-05 00:00:00-11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":99,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 hour 30 minutes"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":101,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('1 microseconds'::interval, '290279-12-24 (BC) 19:59:05.224191+00'::timestamptz);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":92,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 microseconds"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":85,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"290279-12-24 (BC) 19:59:05.224191+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":87,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(DISTINCT t) FROM t1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["t"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, '%m') FROM timestamps ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%m"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, '%-M') FROM timestamps ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%-M"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strftime(d, '%V') FROM timestamps ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%V"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('Mon 30, December 30, 7:3:5 PM', '%a %d, %B %y, %I:%M:%S %p')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":70,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Mon 30, December 30, 7:3:5 PM"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%a %d, %B %y, %I:%M:%S %p"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('6', '%u')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"6"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%u"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('2021-0-5', '%Y-%U-%w'), strftime('2021-01-01'::DATE, '%Y-%U-%w')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-0-5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%U-%w"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":40,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%U-%w"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('Jun 30 2003 2:03:10AM', '%b %d %Y %-I:%M:%S%p');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Jun 30 2003 2:03:10AM"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%b %d %Y %-I:%M:%S%p"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select strptime('2024-11-28 23:59:00.3', '%Y-%m-%d %H:%M:%S.%g');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-11-28 23:59:00.3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%m-%d %H:%M:%S.%g"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select strptime('2020-12-31 21:25:58.745232+0X', '%Y-%m-%d %H:%M:%S.%f%z');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-12-31 21:25:58.745232+0X"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%m-%d %H:%M:%S.%f%z"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('2000-10-01 13:00:00 AM', '%Y-%m-%d %I:%M:%S %p')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2000-10-01 13:00:00 AM"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%m-%d %I:%M:%S %p"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('moaday', '%A')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"moaday"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%A"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('9', '%w')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%w"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('20 19', '%V %j')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"20 19"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%V %j"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('2000/10/10', random()::varchar)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2000/10/10"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select t, time_bucket('4 days'::interval, t, '6 hours'::interval) from timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":55,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4 days"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"6 hours"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":71,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select w, t, origin, time_bucket(w, t, origin) from timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["w"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["t"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":6,"column_names":["origin"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":25,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["w"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":6,"column_names":["origin"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('1 month 1 day'::interval, '2018-05-05 00:00:00'::timestamp, '2018-05-05 00:00:00'::timestamp);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":106,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 month 1 day"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2018-05-05 00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2018-05-05 00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time_bucket('-1 month'::interval, null::timestamp);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1 month"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('Tuesday 30, December 2003, 7:3:5 PM', '%A %d, %B %Y, %I:%M:%S %p')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":80,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Tuesday 30, December 2003, 7:3:5 PM"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%A %d, %B %Y, %I:%M:%S %p"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('6', '%w')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"6"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%w"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('2021-0-5', '%Y-%W-%w'), strftime('2021-01-01'::DATE, '%Y-%W-%w')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-0-5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%W-%w"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":40,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":66,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%W-%w"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_strptime('2020-12-31 21:25:58.745232', '%Y-%m-%d %H:%M:%S.%f');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":66,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-12-31 21:25:58.745232"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%m-%d %H:%M:%S.%f"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('10/28/1910', ['%d-%m-%Y', '%m-%d-%Y', '%d/%m/%Y', '%m/%d/%Y'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":76,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10/28/1910"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":48,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%d-%m-%Y"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%m-%d-%Y"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%d/%m/%Y"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%m/%d/%Y"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('2000-10-hello', '%Y-%m-%d')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2000-10-hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%m-%d"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('pp', '%p')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"pp"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%p"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('60', '%U')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"60"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%U"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('20 19', '%W %j')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"20 19"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%W %j"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_strptime('9999999', '%f')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9999999"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%f"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT year(d) FROM timetzs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT d, DATE_PART('{partcode}', d) AS p, DATE_PART(['{partcode}'], d) AS st\nFROM timetzs\nWHERE p \u003c\u003e st['{partcode}'];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":10,"query_location_length":26,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{partcode}"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["d"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"st","query_location":43,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{partcode}"}}}]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":83,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":97,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["p"]},"right":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":104,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":2,"column_names":["st"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{partcode}"}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(microseconds FROM i) FROM timetzs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select start, token_type, word from sql_tokenize($$SELECT 1 -- /* not a block */ rest$$);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["start"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":10,"column_names":["token_type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":4,"column_names":["word"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":52,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_tokenize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT 1 -- /* not a block */ rest"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM uuids ORDER BY gen_random_uuid();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":17,"function_name":"gen_random_uuid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"uuids","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uuids"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT uuid_extract_timestamp('0196f97a-db14-71c3-9132-9f0b1334466f');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":62,"function_name":"uuid_extract_timestamp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0196f97a-db14-71c3-9132-9f0b1334466f"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_array_length(NULL::VARIANT, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"variant_array_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_array_length('{\"a\"\\: 1}'::VARIANT, 'a');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"variant_array_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\"\\: 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n variant_contains('{\"a\": 1, \"b\": 2}'::JSON::VARIANT, '{\"a\": 1}'::JSON::VARIANT),\n variant_contains('{\"a\": 1, \"b\": 2}'::JSON::VARIANT, '{\"b\": 2, \"a\": 1}'::JSON::VARIANT),\n variant_contains('{\"a\": 1}'::JSON::VARIANT, '{\"a\": 1, \"b\": 2}'::JSON::VARIANT),\n variant_contains('{\"a\": 1}'::JSON::VARIANT, '{\"b\": 1}'::JSON::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":78,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1, \"b\": 2}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":79,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":81,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":86,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":136,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":130,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1, \"b\": 2}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":138,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":171,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":165,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"b\": 2, \"a\": 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":167,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":173,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":187,"query_location_length":78,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":220,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":214,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":204,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":216,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":222,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":255,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":249,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1, \"b\": 2}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":251,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":257,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":271,"query_location_length":70,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":304,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":298,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":288,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":300,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":306,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":331,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":325,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":315,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"b\": 1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":327,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":333,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n variant_contains('2020-01-01 12:34:56'::TIMESTAMP::VARIANT,\n '2020-01-01 12:34:56+00'::TIMESTAMPTZ::VARIANT),\n variant_contains('12:34:56'::TIME::VARIANT, '12:34:56+00'::TIMETZ::VARIANT),\n variant_contains('12:34:56+02'::TIMETZ::VARIANT, '12:34:56+02'::TIMETZ::VARIANT),\n variant_contains('12:34:56+02'::TIMETZ::VARIANT, '12:34:56+03'::TIMETZ::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":128,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":60,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01 12:34:56"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":62,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":129,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":116,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01 12:34:56+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":118,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":131,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":145,"query_location_length":75,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":178,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":172,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":174,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":180,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":210,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":202,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":204,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":212,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":226,"query_location_length":80,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":264,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":256,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":243,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56+02"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":258,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":266,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":296,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":288,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":275,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56+02"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":290,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":298,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":312,"query_location_length":80,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":350,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":342,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":329,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56+02"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":344,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":352,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":382,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":374,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":361,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56+03"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":376,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":384,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_exists(a, ['']) from struct_cast_data();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"variant_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_cast_data","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_exists({'a': 1, 'b': {'c': {'d': 12}}}::VARIANT, '$.b.c');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"variant_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":31,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":36,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"c","query_location":42,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":48,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b.c"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT variant_exists(v, 'b'), variant_exists(v, 'missing')\nFROM fully_shredded_objects\nORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"variant_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":28,"function_name":"variant_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"missing"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":65,"query_location_length":22,"schema_name":"","table_name":"fully_shredded_objects","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fully_shredded_objects"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_extract_string('{\"a\": 1, \"b\": {\"c\": 12, \"d\": 10}}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":59,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1, \"b\": {\"c\": 12, \"d\": 10}}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT variant_extract_string(float::VARIANT, '')::DOUBLE = float::DOUBLE,\n variant_extract_string(double::VARIANT, '')::DOUBLE = double\nFROM test_all_types()\nWHERE bool IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":66,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["float"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":5,"column_names":["float"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":60,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":125,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":43,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":111,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":6,"column_names":["double"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":113,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":127,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":6,"column_names":["double"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":148,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":176,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":4,"column_names":["bool"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_extract_string(j, 'a') from (values ({'a': {'x': 1}}::VARIANT), (NULL::VARIANT)) t(j);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":43,"query_location_length":52,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":58,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":84,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":86,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["j"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_extract_string({'c': 1}::VARIANT, []::VARCHAR[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_group_array(i) from (values (1), (NULL), (2)) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"variant_group_array","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":35,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_keys('{\"a\": 1, \"b\": {\"c\": 12, \"d\": 10}}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1, \"b\": {\"c\": 12, \"d\": 10}}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_keys(''::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_keys({'a': 1, 'b': {'c': {'d': 12}}}::VARIANT, '$.b.c');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":31,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":34,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"c","query_location":40,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"d","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":46,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b.c"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT variant_keys(v) FROM fully_shredded_objects ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":22,"schema_name":"","table_name":"fully_shredded_objects","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fully_shredded_objects"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_type(a, ['c']) from struct_cast_data();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"variant_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_cast_data","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select variant_type('{}'::VARIANT, 'a');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"variant_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT variant_type(v, ['b', 'z', 'missing']) FROM variants ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"variant_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"z"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"missing"}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":8,"schema_name":"","table_name":"variants","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["variants"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte as (\n\tselect * from all_types limit 1 offset 1\n)\nselect variant_typeof(variant_extract(test, 'array_of_structs')[1]), variant_typeof(variant_extract(test, 'array_of_structs')[2]), variant_typeof(variant_extract(test, 'array_of_structs')[3]) from cte;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":22,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":9,"schema_name":"","table_name":"all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":60,"function_name":"variant_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":121,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":41,"function_name":"variant_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":4,"column_names":["test"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"array_of_structs"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":127,"query_location_length":60,"function_name":"variant_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":183,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":142,"query_location_length":41,"function_name":"variant_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":158,"query_location_length":4,"column_names":["test"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"array_of_structs"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":189,"query_location_length":60,"function_name":"variant_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":245,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":204,"query_location_length":41,"function_name":"variant_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":220,"query_location_length":4,"column_names":["test"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"array_of_structs"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":246,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":255,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT also_total_profit FROM unit","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":17,"column_names":["also_total_profit"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":4,"schema_name":"","table_name":"unit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT total_profit, COUNT(total_profit), SUM(amount_sold), SUM(price) FROM unit GROUP BY total_profit ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["total_profit"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":19,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":12,"column_names":["total_profit"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":16,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":11,"column_names":["amount_sold"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":5,"column_names":["price"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":4,"schema_name":"","table_name":"unit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unit"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":12,"column_names":["total_profit"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, b, gen, c, d FROM tbl_comp WHERE c = 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["gen"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["c"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["d"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":8,"schema_name":"","table_name":"tbl_comp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_comp"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, u, rowid FROM t_4807;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["u"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["rowid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":6,"schema_name":"","table_name":"t_4807","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_4807"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl WHERE i=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(i) FROM integers WHERE i \u003e= 1 AND i \u003c 3","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":36,"query_location_length":16,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":36,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":47,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE i \u003c 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE j=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select z, y, x from test_view where upper(x) = '526';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["z"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["y"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"","table_name":"test_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_view"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":36,"query_location_length":16,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":8,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["x"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"526"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(i) FROM integers WHERE i \u003e 15","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":34,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":15}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM integers WHERE i\u003e=0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":36,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM blobs WHERE b = '\\x00'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"blobs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["blobs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":26,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\x00"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT pk FROM tab1 WHERE (col4 \u003e 71.47) OR col0 IN (98,26,25,60)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["pk"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":4,"schema_name":"","table_name":"tab1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tab1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":26,"query_location_length":39,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":27,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":4,"column_names":["col4"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":2}},"is_null":false,"value":7147}}},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":52,"query_location_length":13,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":4,"column_names":["col0"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":98}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":26}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":25}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":60}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i FROM tbl WHERE i IN (2, 42, 100, 42, 101) AND i \u003e 42 AND i \u003e= 42 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":24,"query_location_length":49,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":29,"query_location_length":21,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":101}}]},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":55,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":66,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from t where id = getvariable('u2');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["id"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":17,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"u2"}}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i FROM tbl WHERE i = 13000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":13000}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM pk_tbl WHERE id = 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":6,"schema_name":"","table_name":"pk_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pk_tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":28,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM test_table LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":10,"schema_name":"","table_name":"test_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT j FROM integers WHERE j \u003c 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT u_1.string FROM tbl WHERE u_2 = 'helloo';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["u_1","string"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":3,"column_names":["u_2"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"helloo"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM tbl3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"tbl3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(i), SUM(i), MIN(i), MAX(i), COUNT(*) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT p.ts, e.value\nFROM range(0,10) p(ts) ASOF JOIN events0 e\nON p.ts \u003c\u003e e.begin\nORDER BY p.ts ASC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":4,"column_names":["p","ts"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["p","ts"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":7,"column_names":["e","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":44,"query_location_length":38,"left":{"type":"TABLE_FUNCTION","alias":"p","sample":null,"query_location":26,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":["ts"],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":54,"query_location_length":9,"schema_name":"","table_name":"events0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events0"]}},"condition":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":67,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["p","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["e","begin"]}},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT p.key, p.ts, e.value\nFROM \n\tprobes p\nJOIN (\n\tSELECT key, value, begin, \n\t\tLEAD(begin, 1, 'infinity'::DOUBLE) OVER (PARTITION BY key ORDER BY begin ASC) AS end\n\tFROM events\n) e\nON p.key = e.key AND p.ts \u003e= e.begin AND p.ts \u003c e.end\nORDER BY 1, 2 ASC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":246,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":249,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["p","key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":4,"column_names":["p","ts"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["e","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":44,"query_location_length":192,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"probes","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probes"]}},"right":{"type":"SUBQUERY","alias":"e","sample":null,"query_location":49,"query_location_length":131,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":3,"column_names":["key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":5,"column_names":["value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":5,"column_names":["begin"]},{"class":"WINDOW","type":"WINDOW_LEAD","alias":"end","query_location":81,"query_location_length":77,"function_name":"lead","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":3,"column_names":["key"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":5,"column_names":["begin"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["begin"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":106,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":108,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":172,"query_location_length":6,"schema_name":"","table_name":"events","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":186,"query_location_length":50,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":186,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":186,"query_location_length":5,"column_names":["p","key"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":194,"query_location_length":5,"column_names":["e","key"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":204,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":204,"query_location_length":4,"column_names":["p","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":212,"query_location_length":7,"column_names":["e","begin"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":224,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":4,"column_names":["p","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":231,"query_location_length":5,"column_names":["e","end"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM left_table l\nASOF JOIN right_table r\nON l.symbol = r.symbol AND l.ts \u003e= r.ts AND true;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":72,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":37,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":54,"query_location_length":45,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":8,"column_names":["l","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":8,"column_names":["r","symbol"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":78,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":4,"column_names":["l","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":4,"column_names":["r","ts"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}]},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT p.begin, e.begin, e.value\nFROM probe0 p ASOF JOIN events0 e\nON p.begin \u003c e.begin\nORDER BY ALL ASC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["p","begin"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["e","begin"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":7,"column_names":["e","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":47,"query_location_length":40,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"probe0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe0"]}},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":57,"query_location_length":9,"schema_name":"","table_name":"events0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events0"]}},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":70,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":7,"column_names":["p","begin"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":7,"column_names":["e","begin"]}},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t.id, p.id\nFROM null_trades t ASOF LEFT JOIN null_prices p\n ON t.symbol IS NOT DISTINCT FROM p.symbol\n AND t.venue = p.venue\n AND t.ts \u003e= p.ts\nWHERE t.id = 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["t","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["p","id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":113,"left":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":23,"query_location_length":13,"schema_name":"","table_name":"null_trades","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_trades"]}},"right":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":52,"query_location_length":13,"schema_name":"","table_name":"null_prices","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_prices"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":71,"query_location_length":79,"children":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":71,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":8,"column_names":["t","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":8,"column_names":["p","symbol"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":115,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":7,"column_names":["t","venue"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":7,"column_names":["p","venue"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":138,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":4,"column_names":["t","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":4,"column_names":["p","ts"]}}]},"join_type":"LEFT","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":157,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":4,"column_names":["t","id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \n\td1.time,\n\td2.time,\n\td1.value, \n\td2.value\nFROM right_pushdown d1 \nASOF JOIN (\n\tSELECT * FROM right_pushdown WHERE value is not NULL\n\t) d2\n\tON d1.time \u003e= d2.time\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":7,"column_names":["d1","time"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":7,"column_names":["d2","time"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":8,"column_names":["d1","value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":8,"column_names":["d2","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":74,"query_location_length":94,"left":{"type":"BASE_TABLE","alias":"d1","sample":null,"query_location":55,"query_location_length":17,"schema_name":"","table_name":"right_pushdown","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_pushdown"]}},"right":{"type":"SUBQUERY","alias":"d2","sample":null,"query_location":84,"query_location_length":58,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":94,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":101,"query_location_length":14,"schema_name":"","table_name":"right_pushdown","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_pushdown"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":128,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":5,"column_names":["value"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":150,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":7,"column_names":["d1","time"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":7,"column_names":["d2","time"]}},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM r t1\nASOF LEFT JOIN (SELECT * FROM a INTERSECT ALL SELECT * FROM a) t0 ON t1.d \u003e= t0.d\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":81,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"right":{"type":"SUBQUERY","alias":"t0","sample":null,"query_location":34,"query_location_length":47,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":42,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":72,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":79,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":88,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":4,"column_names":["t1","d"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":4,"column_names":["t0","d"]}},"join_type":"LEFT","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * \nFROM left_table l \nASOF ANTI JOIN right_table r \n\t ON l.symbol = r.symbol \n\tAND l.ts \u003e= r.ts \n\tAND l.price + r.bid \u003e 300;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":29,"query_location_length":101,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":15,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":44,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":64,"query_location_length":66,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":8,"column_names":["l","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":8,"column_names":["r","symbol"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":90,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":4,"column_names":["l","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":4,"column_names":["r","ts"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":109,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":117,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":7,"column_names":["l","price"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":5,"column_names":["r","bid"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":300}}}]},"join_type":"ANTI","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM integers_empty JOIN integers2 ON (integers_empty.i\u003c\u003eintegers2.i OR integers_empty.i+1\u003c\u003eintegers2.i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":36,"query_location_length":84,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"integers_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers_empty"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":55,"query_location_length":64,"children":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":55,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":16,"column_names":["integers_empty","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":11,"column_names":["integers2","i"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":88,"query_location_length":31,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":104,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":16,"column_names":["integers_empty","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":11,"column_names":["integers2","i"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT integers.*, integers2_empty.* FROM integers FULL OUTER JOIN integers2_empty USING (i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":10,"relation_name":"integers","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"STAR","type":"STAR","alias":"","query_location":19,"query_location_length":17,"relation_name":"integers2_empty","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":51,"query_location_length":41,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":15,"schema_name":"","table_name":"integers2_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2_empty"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, j, k, l FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["l"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":51,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":10,"column_names":["integers","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["integers2","k"]}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, j, k, l FROM integers FULL OUTER JOIN integers2 ON integers.i\u003cintegers2.k ORDER BY 1, 2, 3, 4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["l"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":51,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":61,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":10,"column_names":["integers","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["integers2","k"]}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM (SELECT 'USD' AS ccy, id FROM fact) t WHERE ccy IN (SELECT k FROM dim)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":21,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"ccy","query_location":29,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"USD"}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":72,"query_location_length":19,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":3,"schema_name":"","table_name":"dim","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":3,"column_names":["ccy"]},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT n.n_name, COUNT(*) AS cnt\nFROM nation n JOIN customer_tiny c ON n.nk = c.nk JOIN orders_tiny o ON o.ck = c.ck\nGROUP BY n.n_name ORDER BY n.n_name","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":8,"column_names":["n","n_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["n","n_name"]},{"class":"FUNCTION","type":"FUNCTION","alias":"cnt","query_location":17,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":83,"query_location_length":33,"left":{"type":"JOIN","alias":"","sample":null,"query_location":47,"query_location_length":35,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"nation","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nation"]}},"right":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":52,"query_location_length":15,"schema_name":"","table_name":"customer_tiny","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["customer_tiny"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":4,"column_names":["n","nk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":4,"column_names":["c","nk"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":88,"query_location_length":13,"schema_name":"","table_name":"orders_tiny","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders_tiny"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":4,"column_names":["o","ck"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":4,"column_names":["c","ck"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":8,"column_names":["n","n_name"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT n.n_t, COUNT(*) AS cnt\nFROM nation_tiny n JOIN customer c ON n.nk = c.nk JOIN orders o ON o.ck = c.ck\nGROUP BY n.n_t ORDER BY n.n_t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":5,"column_names":["n","n_t"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["n","n_t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"cnt","query_location":14,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":80,"query_location_length":28,"left":{"type":"JOIN","alias":"","sample":null,"query_location":49,"query_location_length":30,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":35,"query_location_length":13,"schema_name":"","table_name":"nation_tiny","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nation_tiny"]}},"right":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":54,"query_location_length":10,"schema_name":"","table_name":"customer","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["customer"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":4,"column_names":["n","nk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":4,"column_names":["c","nk"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":85,"query_location_length":8,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":4,"column_names":["o","ck"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":4,"column_names":["c","ck"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":5,"column_names":["n","n_t"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM fact f JOIN dim_dup d ON f.k = d.k","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":28,"query_location_length":27,"left":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"right":{"type":"BASE_TABLE","alias":"d","sample":null,"query_location":33,"query_location_length":9,"schema_name":"","table_name":"dim_dup","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim_dup"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":3,"column_names":["f","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":3,"column_names":["d","k"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM fact f JOIN dim d ON lower(f.k) = lower(d.k)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":28,"query_location_length":37,"left":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"right":{"type":"BASE_TABLE","alias":"d","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"dim","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":23,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":10,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":3,"column_names":["f","k"]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":10,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":3,"column_names":["d","k"]}}]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT o.o_orderkey, o.o_custkey, o.o_totalprice, o.o_orderstatus\nFROM orders o\nSEMI JOIN lineitem l ON o.o_orderkey = l.l_orderkey\n AND o.o_totalprice + l.l_extendedprice \u003e 250;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["o","o_orderkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":11,"column_names":["o","o_custkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":14,"column_names":["o","o_totalprice"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":15,"column_names":["o","o_orderstatus"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":80,"query_location_length":100,"left":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":71,"query_location_length":8,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"right":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":90,"query_location_length":10,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":104,"query_location_length":76,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":104,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":12,"column_names":["o","o_orderkey"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":12,"column_names":["l","l_orderkey"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":140,"query_location_length":40,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":155,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":14,"column_names":["o","o_totalprice"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":17,"column_names":["l","l_extendedprice"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":250}}}]},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * \nFROM test AS a, test AS b \nWHERE (a.x BETWEEN b.x AND b.x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":10,"query_location_length":25,"left":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":15,"query_location_length":9,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":26,"query_location_length":9,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":48,"query_location_length":19,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":3,"column_names":["a","x"]},"lower":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["b","x"]},"upper":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":3,"column_names":["b","x"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.id, l.start, l.stop\nFROM left_small l\nANTI JOIN right_small r\n ON l.start \u003c r.stop\n AND r.start \u003c l.stop\n AND l.symbol = r.symbol\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["l","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":7,"column_names":["l","start"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":6,"column_names":["l","stop"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":47,"query_location_length":107,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":34,"query_location_length":12,"schema_name":"","table_name":"left_small","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_small"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":57,"query_location_length":13,"schema_name":"","table_name":"right_small","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_small"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":81,"query_location_length":73,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":81,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["l","start"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":6,"column_names":["r","stop"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":108,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":7,"column_names":["r","start"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":6,"column_names":["l","stop"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":135,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":8,"column_names":["l","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":8,"column_names":["r","symbol"]}}]},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s1.rid, s2.rid\nFROM west s1, west s2\nWHERE s1.time \u003e s2.time\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["s1","rid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["s2","rid"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":22,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"s1","sample":null,"query_location":27,"query_location_length":7,"schema_name":"","table_name":"west","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["west"]}},"right":{"type":"BASE_TABLE","alias":"s2","sample":null,"query_location":36,"query_location_length":7,"schema_name":"","table_name":"west","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["west"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":50,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":7,"column_names":["s1","time"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":7,"column_names":["s2","time"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select l.k100 as lid, r.k100 as rid\nfrom tleft l \nfull join tleft r \non l.b100 \u003c r.e100\nand r.b100 \u003c l.e100\nand l.k100 + r.k100 \u003c 10\norder by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"lid","query_location":7,"query_location_length":6,"column_names":["l","k100"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"rid","query_location":22,"query_location_length":6,"column_names":["r","k100"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":50,"query_location_length":82,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":41,"query_location_length":7,"schema_name":"","table_name":"tleft","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tleft"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":60,"query_location_length":7,"schema_name":"","table_name":"tleft","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tleft"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":72,"query_location_length":60,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":72,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":6,"column_names":["l","b100"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":6,"column_names":["r","e100"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":92,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":6,"column_names":["r","b100"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":6,"column_names":["l","e100"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":112,"query_location_length":20,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":119,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":6,"column_names":["l","k100"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":6,"column_names":["r","k100"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM bigtable JOIN smalltable USING (a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":25,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"bigtable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigtable"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":10,"schema_name":"","table_name":"smalltable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smalltable"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM p WHERE p.pb IN (SELECT f FROM v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":37,"query_location_length":17,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["f"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":1,"schema_name":"","table_name":"v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":4,"column_names":["p","pb"]},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test WHERE NOT EXISTS(SELECT * FROM test2 WHERE test.a=test2.a AND test.b\u003ctest2.c AND test2.a=12) AND NOT EXISTS(SELECT * FROM test2 WHERE test.a=test2.a AND test.b\u003etest2.c AND test2.a=12) order by 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":212,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":25,"query_location_length":177,"children":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":25,"query_location_length":86,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":29,"query_location_length":82,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":43,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":62,"query_location_length":48,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":6,"column_names":["test","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["test2","a"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":81,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":7,"column_names":["test2","c"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":7,"column_names":["test2","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":116,"query_location_length":86,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":120,"query_location_length":82,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":134,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":141,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":153,"query_location_length":48,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":6,"column_names":["test","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":7,"column_names":["test2","a"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":172,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":7,"column_names":["test2","c"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":191,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":191,"query_location_length":7,"column_names":["test2","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":199,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, test.b, c FROM test, test2 WHERE test.b=test2.b AND test.a-1=test2.c","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":6,"column_names":["test","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":20,"query_location_length":16,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":43,"query_location_length":35,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":7,"column_names":["test2","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":16,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":6,"column_names":["test","a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":7,"column_names":["test2","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x.col1, y.col1 FROM tbl x JOIN tbl y\nON x.col0 = y.col0 AND (x.col1 IS DISTINCT FROM y.col1)\nORDER BY x.col1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":6,"column_names":["x","col1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["x","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["y","col1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":66,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":27,"query_location_length":5,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":38,"query_location_length":5,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":47,"query_location_length":52,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":6,"column_names":["x","col0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":6,"column_names":["y","col0"]}},{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":68,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":6,"column_names":["x","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":6,"column_names":["y","col1"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x.col1, y.col1 FROM tbl_s_null x JOIN tbl_s_null y\nON x.col0 = y.col0 AND x.col1 != y.col1\nORDER BY x.col1.x, y.col1.x NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":8,"column_names":["x","col1","x"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":8,"column_names":["y","col1","x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["x","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["y","col1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":57,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":27,"query_location_length":12,"schema_name":"","table_name":"tbl_s_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_s_null"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":45,"query_location_length":12,"schema_name":"","table_name":"tbl_s_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_s_null"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":61,"query_location_length":36,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":6,"column_names":["x","col0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":6,"column_names":["y","col0"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":81,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":6,"column_names":["x","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":6,"column_names":["y","col1"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x.col1, y.col1 FROM tbl_s x JOIN tbl_s y\nON x.col0 = y.col0 AND (x.col1 IS NOT DISTINCT FROM y.col1)\nORDER BY x.col1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":6,"column_names":["x","col1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["x","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["y","col1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":72,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":27,"query_location_length":7,"schema_name":"","table_name":"tbl_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_s"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":40,"query_location_length":7,"schema_name":"","table_name":"tbl_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_s"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":51,"query_location_length":56,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":6,"column_names":["x","col0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":6,"column_names":["y","col0"]}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":72,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":6,"column_names":["x","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":6,"column_names":["y","col1"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from a, (SELECT 2000 AS j) b where i \u003c j","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":24,"query_location_length":18,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":32,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2000}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":51,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["j"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT b.k, p.k\nFROM prf_row_group_bug.prf_probe_small p\nRIGHT JOIN prf_build_row_group_bug b USING (k)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["b","k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["p","k"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":57,"query_location_length":46,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":21,"query_location_length":35,"schema_name":"prf_row_group_bug","table_name":"prf_probe_small","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["prf_row_group_bug","prf_probe_small"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":68,"query_location_length":25,"schema_name":"","table_name":"prf_build_row_group_bug","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["prf_build_row_group_bug"]}},"condition":null,"join_type":"RIGHT","ref_type":"REGULAR","using_columns":["k"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t1 JOIN t2 USING (a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":17,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t1 JOIN t2 USING(a) JOIN t2 t2b USING (a) ORDER BY 1, 2, 3, 4, 5, 6, 7","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":34,"query_location_length":21,"left":{"type":"JOIN","alias":"","sample":null,"query_location":17,"query_location_length":16,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"t2b","sample":null,"query_location":39,"query_location_length":6,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT foo.ts foo, bar.ts bar FROM foo LEFT JOIN bar ON foo.ts = bar.ts;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"foo","query_location":7,"query_location_length":6,"column_names":["foo","ts"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"bar","query_location":19,"query_location_length":6,"column_names":["bar","ts"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":39,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":3,"schema_name":"","table_name":"foo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["foo"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":3,"schema_name":"","table_name":"bar","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bar"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":6,"column_names":["foo","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":6,"column_names":["bar","ts"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH t AS (\n SELECT 1 AS r, ARRAY[1, 2, 3] AS a\n UNION SELECT 2 AS r, ARRAY[4] AS a\n UNION SELECT 4 AS r, ARRAY[] AS a\n)\nSELECT r, a.value\nFROM t\nLEFT JOIN UNNEST(a) AS a(value) ON TRUE\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":201,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"a","query_location":29,"query_location_length":14,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"a","query_location":72,"query_location_length":8,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"a","query_location":109,"query_location_length":7,"children":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":7,"column_names":["a","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":149,"query_location_length":39,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":147,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"TABLE_FUNCTION","alias":"a","sample":null,"query_location":159,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":1,"column_names":["a"]}}]},"column_name_alias":["value"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers LEFT OUTER JOIN integers2 ON 1=1 ORDER BY i, k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers LEFT OUTER JOIN (SELECT * FROM integers2 WHERE k=100) integers2 ON integers.i\u003cintegers2.k ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":89,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"SUBQUERY","alias":"integers2","sample":null,"query_location":39,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":47,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":90,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":10,"column_names":["integers","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":11,"column_names":["integers2","k"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT f.fk, f.value, d.label\nFROM fact f LEFT JOIN dim d ON f.fk = d.id\nWHERE f.value = 777","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["f","fk"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":7,"column_names":["f","value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":7,"column_names":["d","label"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":30,"left":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":35,"query_location_length":6,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"right":{"type":"BASE_TABLE","alias":"d","sample":null,"query_location":52,"query_location_length":5,"schema_name":"","table_name":"dim","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":4,"column_names":["f","fk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":4,"column_names":["d","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":7,"column_names":["f","value"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":777}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from (values (1)) tbl(a) natural join (values (1)) tbl2(a) natural join (values (1)) tbl3(a)\n natural join (values (1)) tbl4(a) natural join (values (1)) tbl5(a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":150,"query_location_length":33,"left":{"type":"JOIN","alias":"","sample":null,"query_location":116,"query_location_length":33,"left":{"type":"JOIN","alias":"","sample":null,"query_location":68,"query_location_length":33,"left":{"type":"JOIN","alias":"","sample":null,"query_location":34,"query_location_length":33,"left":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"tbl2","sample":null,"query_location":47,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"tbl3","sample":null,"query_location":81,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"tbl4","sample":null,"query_location":129,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"tbl5","sample":null,"query_location":163,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT q.user_id, q.name, t.product_id, t.name AS product FROM users q\n INNER JOIN products t APPROX NEAREST 2 BY SIMILARITY array_cosine_similarity(q.embedding, t.embedding)\n ORDER BY q.user_id, t.product_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":187,"query_location_length":9,"column_names":["q","user_id"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":198,"query_location_length":12,"column_names":["t","product_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["q","user_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":6,"column_names":["q","name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":12,"column_names":["t","product_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"product","query_location":40,"query_location_length":6,"column_names":["t","name"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":73,"query_location_length":102,"left":{"type":"BASE_TABLE","alias":"q","sample":null,"query_location":63,"query_location_length":7,"schema_name":"","table_name":"users","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["users"]}},"right":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":84,"query_location_length":10,"schema_name":"","table_name":"products","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["products"]}},"condition":null,"join_type":"INNER","ref_type":"NEAREST","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":126,"query_location_length":49,"function_name":"array_cosine_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":11,"column_names":["q","embedding"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":11,"column_names":["t","embedding"]}}]},"nearest_count":2,"nearest_order_type":"DESCENDING","nearest_approx":true},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT q.id, t.y FROM lnums q\n INNER JOIN rnull t NEAREST 2 BY DISTANCE abs(q.x - t.y)\n ORDER BY q.id, t.y;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":4,"column_names":["q","id"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":3,"column_names":["t","y"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["q","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["t","y"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":55,"left":{"type":"BASE_TABLE","alias":"q","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"lnums","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lnums"]}},"right":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":43,"query_location_length":7,"schema_name":"","table_name":"rnull","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rnull"]}},"condition":null,"join_type":"INNER","ref_type":"NEAREST","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":14,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["q","x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":3,"column_names":["t","y"]}}]}}]},"nearest_count":2,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM latest_db.nearest_view;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":22,"schema_name":"latest_db","table_name":"nearest_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["latest_db","nearest_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.a, r.b, s.c, t.d\nFROM ((VALUES (1), (2)) l(a)\nFULL OUTER JOIN (VALUES (10), (20)) r(b)\n\tON EXISTS (SELECT 1 WHERE l.a = 1 AND r.b = 10))\nCROSS JOIN ((VALUES (3), (4)) s(c)\nFULL OUTER JOIN (VALUES (30), (40)) t(d)\n\tON EXISTS (SELECT 1 WHERE s.c = 3 AND t.d = 30))\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["s","c"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":3,"column_names":["t","d"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":146,"query_location_length":125,"left":{"type":"JOIN","alias":"","sample":null,"query_location":55,"query_location_length":89,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":32,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":71,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":100,"query_location_length":44,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":123,"query_location_length":20,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":123,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":135,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":3,"column_names":["r","b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"JOIN","alias":"","sample":null,"query_location":181,"query_location_length":89,"left":{"type":"SUBQUERY","alias":"s","sample":null,"query_location":158,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c"]},"right":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":197,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":206,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":30}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":212,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":40}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["d"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":226,"query_location_length":44,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":241,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":249,"query_location_length":20,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":249,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":249,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":255,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":261,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":261,"query_location_length":3,"column_names":["t","d"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":267,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":30}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT o.b, q.a, q.b\nFROM (VALUES (1), (2)) o(b)\nLEFT JOIN LATERAL (\n\tSELECT l.a, r.b\n\tFROM LATERAL (SELECT b) l(a)\n\tRIGHT JOIN (VALUES (1)) r(b) ON EXISTS (\n\t\tSELECT 1 WHERE l.a = r.b\n\t)\n) q ON true\nORDER BY o.b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":209,"query_location_length":3,"column_names":["o","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["o","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["q","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["q","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":49,"query_location_length":150,"left":{"type":"SUBQUERY","alias":"o","sample":null,"query_location":26,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"right":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":67,"query_location_length":122,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":117,"query_location_length":70,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":100,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":128,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":149,"query_location_length":38,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":175,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":3,"column_names":["r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.i, r.i, r.j, nested.i\nFROM non_inner_l l\nLEFT JOIN non_inner_r r ON EXISTS (\n\tSELECT 1 FROM non_inner_s s WHERE s.i = l.i AND s.j * 10 = r.j\n)\nLEFT JOIN non_inner_s nested ON FALSE\nORDER BY l.i, r.i NULLS LAST, r.j NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":3,"column_names":["l","i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":204,"query_location_length":3,"column_names":["r","i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":220,"query_location_length":3,"column_names":["r","j"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["r","j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":8,"column_names":["nested","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":152,"query_location_length":37,"left":{"type":"JOIN","alias":"","sample":null,"query_location":50,"query_location_length":101,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":36,"query_location_length":13,"schema_name":"","table_name":"non_inner_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":60,"query_location_length":13,"schema_name":"","table_name":"non_inner_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":77,"query_location_length":74,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":101,"query_location_length":13,"schema_name":"","table_name":"non_inner_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":121,"query_location_length":28,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":3,"column_names":["s","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":3,"column_names":["l","i"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":135,"query_location_length":14,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":135,"query_location_length":8,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":3,"column_names":["s","j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":3,"column_names":["r","j"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"nested","sample":null,"query_location":162,"query_location_length":18,"schema_name":"","table_name":"non_inner_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_s"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\nFROM (VALUES (1, 1)) l(x, a)\nLEFT JOIN (VALUES (2, 1)) r(x, b)\nON join_extract({'v': 1}) = 1\nAND EXISTS (\n\tSELECT 1\n\tWHERE l.a = r.b\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":38,"query_location_length":105,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":14,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","a"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":48,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","b"]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":75,"query_location_length":68,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":26,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":22,"function_name":"join_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":106,"query_location_length":37,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":132,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":3,"column_names":["r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.a, r.b\nFROM pair_l l\nFULL OUTER JOIN pair_r r ON EXISTS (\n\tSELECT 1 FROM pair_s s WHERE s.a = l.a AND s.b = r.b\n)\nORDER BY l.a NULLS LAST, r.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":3,"column_names":["l","a"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":3,"column_names":["r","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":92,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":46,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":58,"query_location_length":64,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":82,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":97,"query_location_length":23,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":111,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":3,"column_names":["r","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\nFROM pair_nested_outer_o o\nWHERE EXISTS (\n\tSELECT 1\n\tFROM pair_nested_l l\n\tFULL OUTER JOIN pair_nested_r r ON EXISTS (\n\t\tSELECT 1\n\t\tFROM pair_nested_local_s s\n\t\tWHERE s.a = l.a\n\t\t AND s.b = r.b\n\t\t AND s.c = o.x\n\t)\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":14,"query_location_length":21,"schema_name":"","table_name":"pair_nested_outer_o","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_outer_o"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":42,"query_location_length":184,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":84,"query_location_length":140,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":67,"query_location_length":15,"schema_name":"","table_name":"pair_nested_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":100,"query_location_length":15,"schema_name":"","table_name":"pair_nested_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":119,"query_location_length":105,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":146,"query_location_length":21,"schema_name":"","table_name":"pair_nested_local_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_local_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":176,"query_location_length":45,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":176,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":176,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":194,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":194,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":3,"column_names":["r","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":212,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":212,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":3,"column_names":["o","x"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.a, l.x, r.b, r.y, count(*)::INTEGER\nFROM pair_dup_l l\nFULL OUTER JOIN pair_dup_r r ON r.b NOT IN (\n\tSELECT s.b FROM pair_s_null s WHERE s.a = l.a\n)\nGROUP BY ALL\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["l","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":3,"column_names":["r","y"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":63,"query_location_length":93,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":50,"query_location_length":12,"schema_name":"","table_name":"pair_dup_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_dup_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":79,"query_location_length":12,"schema_name":"","table_name":"pair_dup_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_dup_r"]}},"condition":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":95,"query_location_length":61,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":106,"query_location_length":50,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":3,"column_names":["s","b"]}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":125,"query_location_length":13,"schema_name":"","table_name":"pair_s_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s_null"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":145,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":3,"column_names":["l","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":3,"column_names":["r","b"]},"comparison_type":"COMPARE_EQUAL"}]},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\nFROM pair_multi_l l\nJOIN pair_multi_l2 l2 ON true\nFULL OUTER JOIN pair_multi_r r ON EXISTS (\n\tSELECT 1\n\tFROM pair_multi_s s\n\tWHERE s.a = l.a\n\t AND s.b = r.b\n\t AND s.c = l2.c\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":59,"query_location_length":127,"left":{"type":"JOIN","alias":"","sample":null,"query_location":29,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":14,"schema_name":"","table_name":"pair_multi_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_l"]}},"right":{"type":"BASE_TABLE","alias":"l2","sample":null,"query_location":34,"query_location_length":16,"schema_name":"","table_name":"pair_multi_l2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_l2"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":75,"query_location_length":14,"schema_name":"","table_name":"pair_multi_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":93,"query_location_length":93,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":118,"query_location_length":14,"schema_name":"","table_name":"pair_multi_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":140,"query_location_length":44,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":140,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":157,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":3,"column_names":["r","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":174,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":174,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":180,"query_location_length":4,"column_names":["l2","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.a, r.b\nFROM pair_null_l l\nFULL OUTER JOIN pair_null_r r ON EXISTS (\n\tSELECT 1\n\tFROM pair_null_s s\n\tWHERE s.a IS NOT DISTINCT FROM l.a\n\t AND s.b IS NOT DISTINCT FROM r.b\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":145,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":21,"query_location_length":13,"schema_name":"","table_name":"pair_null_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_null_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":51,"query_location_length":13,"schema_name":"","table_name":"pair_null_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_null_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":68,"query_location_length":112,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":93,"query_location_length":13,"schema_name":"","table_name":"pair_null_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_null_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":114,"query_location_length":64,"children":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":114,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":150,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":3,"column_names":["r","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.a, l.x, r.b, r.y\nFROM pair_l l\nRIGHT JOIN pair_r r ON EXISTS (\n\tSELECT 1 FROM pair_s s WHERE s.a = l.a AND s.b = r.b\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["l","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":3,"column_names":["r","y"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":87,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":31,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":51,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":63,"query_location_length":64,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":87,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":102,"query_location_length":23,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":3,"column_names":["r","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l.a, l2.c, r.b\nFROM (pair_l l JOIN pair_left_multi_l2 l2 ON true)\nLEFT JOIN pair_r r ON EXISTS (\n\tSELECT 1\n\tFROM pair_left_multi_s s\n\tWHERE s.a = l.a\n\t AND s.b = r.b\n\t AND s.c = l2.c\n)\nORDER BY l.a, l2.c, r.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":3,"column_names":["l","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":208,"query_location_length":4,"column_names":["l2","c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":214,"query_location_length":3,"column_names":["r","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":4,"column_names":["l2","c"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":73,"query_location_length":120,"left":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":34,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":28,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"l2","sample":null,"query_location":42,"query_location_length":21,"schema_name":"","table_name":"pair_left_multi_l2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_multi_l2"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":83,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":95,"query_location_length":98,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":120,"query_location_length":19,"schema_name":"","table_name":"pair_left_multi_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_multi_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":147,"query_location_length":44,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":147,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":164,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":3,"column_names":["r","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":181,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":187,"query_location_length":4,"column_names":["l2","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH q AS (\n\tSELECT count(*)::INTEGER AS count_value\n\tFROM (SELECT a, nextval('pair_anti_effect_seq') AS v FROM pair_left_effect_l) l\n\tANTI JOIN pair_left_effect_r r ON EXISTS (\n\t\tSELECT 1 WHERE l.v = r.b\n\t)\n)\nSELECT count_value, currval('pair_anti_effect_seq') FROM q;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"q","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"count_value","query_location":28,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":135,"query_location_length":72,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":59,"query_location_length":72,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":70,"query_location_length":31,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"pair_anti_effect_seq"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":112,"query_location_length":18,"schema_name":"","table_name":"pair_left_effect_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_effect_l"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":145,"query_location_length":20,"schema_name":"","table_name":"pair_left_effect_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_effect_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":169,"query_location_length":38,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":195,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":195,"query_location_length":3,"column_names":["l","v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":201,"query_location_length":3,"column_names":["r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":217,"query_location_length":11,"column_names":["count_value"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":230,"query_location_length":31,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":238,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"pair_anti_effect_seq"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":267,"query_location_length":1,"schema_name":"","table_name":"q","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["q"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*), count(rid), currval('pair_volatile_left_seq')\nFROM pair_volatile_left_result;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":3,"column_names":["rid"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":33,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"pair_volatile_left_seq"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":25,"schema_name":"","table_name":"pair_volatile_left_result","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_volatile_left_result"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT outer_r.b, q.a, q.x, q.b\nFROM pair_r outer_r\nLEFT JOIN LATERAL (\n\tWITH cr AS (SELECT b FROM pair_r WHERE pair_r.b = outer_r.b)\n\tSELECT l.a, l.x, cr.b\n\tFROM pair_l l\n\tLEFT JOIN cr ON EXISTS (\n\t\tSELECT 1\n\t\tFROM pair_s s\n\t\tWHERE s.a = l.a\n\t\t AND s.b = cr.b\n\t)\n) q ON true\nORDER BY outer_r.b, q.a, q.x, q.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":286,"query_location_length":9,"column_names":["outer_r","b"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":297,"query_location_length":3,"column_names":["q","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":302,"query_location_length":3,"column_names":["q","x"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":307,"query_location_length":3,"column_names":["q","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["outer_r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["q","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":3,"column_names":["q","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":3,"column_names":["q","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":52,"query_location_length":224,"left":{"type":"BASE_TABLE","alias":"outer_r","sample":null,"query_location":37,"query_location_length":14,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"right":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":70,"query_location_length":196,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cr","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":6,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":112,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":8,"column_names":["pair_r","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":9,"column_names":["outer_r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":3,"column_names":["l","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":4,"column_names":["cr","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":173,"query_location_length":91,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":163,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":183,"query_location_length":2,"schema_name":"","table_name":"cr","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cr"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":189,"query_location_length":75,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":207,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":216,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":233,"query_location_length":28,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":233,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":233,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":239,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":251,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":251,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":257,"query_location_length":4,"column_names":["cr","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":272,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT outer_l.x, q.a, q.b\nFROM pair_l outer_l\nLEFT JOIN LATERAL (\n\tSELECT l.a, r.b\n\tFROM pair_l l\n\tLEFT JOIN pair_r r ON l.a = outer_l.a AND r.b IN (\n\t\tSELECT s.b\n\t\tFROM pair_s s\n\t\tWHERE s.a = l.a\n\t)\n\tWHERE l.x = outer_l.x\n) q ON true\nORDER BY outer_l.x, q.a, q.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":245,"query_location_length":9,"column_names":["outer_l","x"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":256,"query_location_length":3,"column_names":["q","a"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":261,"query_location_length":3,"column_names":["q","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["outer_l","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["q","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":3,"column_names":["q","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":47,"query_location_length":188,"left":{"type":"BASE_TABLE","alias":"outer_l","sample":null,"query_location":32,"query_location_length":14,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":65,"query_location_length":160,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":100,"query_location_length":100,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":90,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":110,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":122,"query_location_length":78,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":122,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":9,"column_names":["outer_l","a"]}},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":149,"query_location_length":51,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":3,"column_names":["s","b"]}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":171,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":188,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":194,"query_location_length":3,"column_names":["l","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":3,"column_names":["r","b"]},"comparison_type":"COMPARE_EQUAL"}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":208,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":208,"query_location_length":3,"column_names":["l","x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":214,"query_location_length":9,"column_names":["outer_l","x"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\nFROM \n\t(SELECT * FROM three WHERE a % 2 = 1) t1\n\tPOSITIONAL JOIN\n\t(SELECT * FROM two WHERE a % 2 = 0) t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":58,"query_location_length":55,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":16,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"three","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["three"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":75,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":83,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":90,"query_location_length":3,"schema_name":"","table_name":"two","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["two"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"POSITIONAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE i IN (997, 999)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":34,"query_location_length":10,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":997}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":999}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM left_table l\nRIGHT JOIN right_table r ON l.id = r.id AND l.val \u003e 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":53,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":38,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["r","id"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":71,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":5,"column_names":["l","val"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT integers.*, integers2.* FROM integers2 RIGHT OUTER JOIN integers ON l\u003e0 ORDER BY i, k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":10,"relation_name":"integers","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"STAR","type":"STAR","alias":"","query_location":19,"query_location_length":11,"relation_name":"integers2","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":46,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":75,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM left_table ANTI JOIN right_table ON left_table.a = right_table.a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":53,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":12,"column_names":["left_table","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":13,"column_names":["right_table","a"]}},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * from left_table, right_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM input_table\nANTI JOIN flattened\nON input_table.\"timestamp\" \u003e= flattened.start AND input_table.\"timestamp\" \u003c flattened.end;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":26,"query_location_length":110,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"input_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["input_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"flattened","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["flattened"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":49,"query_location_length":87,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":49,"query_location_length":42,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":23,"column_names":["input_table","timestamp"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":15,"column_names":["flattened","start"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":96,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":23,"column_names":["input_table","timestamp"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":13,"column_names":["flattened","end"]}}]},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM left_table SEMI JOIN right_table ON (left_table.a \u003e right_table.a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":55,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":51,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":12,"column_names":["left_table","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":13,"column_names":["right_table","a"]}},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM left_table l\nANTI JOIN empty_table e ON l.id = e.id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":38,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":37,"query_location_length":13,"schema_name":"","table_name":"empty_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empty_table"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":4,"column_names":["e","id"]}},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test FULL OUTER JOIN test2 ON test.a+test2.c=test.b+test2.b ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":54,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":44,"query_location_length":29,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":6,"column_names":["test","a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":7,"column_names":["test2","c"]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":6,"column_names":["test","b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":7,"column_names":["test2","b"]}}]}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, z\nFROM wide_nulls, limits_nulls\nWHERE z NOT BETWEEN c8 AND c9\nORDER BY 1, 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["z"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":12,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":10,"schema_name":"","table_name":"wide_nulls","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["wide_nulls"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":12,"schema_name":"","table_name":"limits_nulls","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits_nulls"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":48,"query_location_length":23,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":54,"query_location_length":17,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["z"]},"lower":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":2,"column_names":["c8"]},"upper":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":2,"column_names":["c9"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM left_table l\nJOIN (SELECT * FROM stats_table WHERE tag % 7 = 3) e ON l.val \u003c= e.category;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":75,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"SUBQUERY","alias":"e","sample":null,"query_location":32,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":40,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":11,"schema_name":"","table_name":"stats_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["stats_table"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":11,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":3,"column_names":["tag"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":83,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":5,"column_names":["l","val"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":10,"column_names":["e","category"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM t1 JOIN BY (TYPE semi) (SELECT b AS a FROM t2) USING (a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":53,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":44,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":52,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"SEMI","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select lhs.*, rhs.*\nfrom list_int lhs, list_int rhs\nwhere lhs.i2 = rhs.i2 and lhs.l3 \u003e rhs.l3\norder by lhs.i, rhs.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":5,"column_names":["lhs","i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":5,"column_names":["rhs","i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":5,"relation_name":"lhs","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"STAR","type":"STAR","alias":"","query_location":14,"query_location_length":5,"relation_name":"rhs","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":20,"query_location_length":31,"left":{"type":"BASE_TABLE","alias":"lhs","sample":null,"query_location":25,"query_location_length":12,"schema_name":"","table_name":"list_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int"]}},"right":{"type":"BASE_TABLE","alias":"rhs","sample":null,"query_location":39,"query_location_length":12,"schema_name":"","table_name":"list_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":58,"query_location_length":35,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":6,"column_names":["lhs","i2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":6,"column_names":["rhs","i2"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":78,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":6,"column_names":["lhs","l3"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":6,"column_names":["rhs","l3"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT content = (SELECT content FROM read_text('{TEST_DIR}/places.geojson')) FROM read_text('{TEST_DIR}/places_l_array.tmp');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":70,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["content"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":17,"query_location_length":60,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":7,"column_names":["content"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":38,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/places.geojson"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":83,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/places_l_array.tmp"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT replace(replace(trim(content, chr(10)), chr(10), ' '), chr(9), '') FROM read_text('{TEST_DIR}/ids_named.geojsonl');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":66,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":45,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":22,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":6,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":79,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/ids_named.geojsonl"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT filename, trim(content, chr(10))\nFROM read_text('{TEST_DIR}/json_partition_dateformat/*/*.json') ORDER BY filename;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":8,"column_names":["filename"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["filename"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":22,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":45,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":47,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/json_partition_dateformat/*/*.json"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from json_test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"json_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["json_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(field1), typeof(field2) FROM '{DATA_DIR}/parquet-testing/parquet_with_json.parquet' LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["field1"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":6,"column_names":["field2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":54,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/parquet_with_json.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/parquet_with_json.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{\"\\\"Status / SubStatus\\\"\": \"test\"}' -\u003e '\"Status / SubStatus\"';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":7,"query_location_length":62,"lhs":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"\\\"Status / SubStatus\\\"\": \"test\"}"}},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"Status / SubStatus\""}},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (1::HUGEINT \u003c\u003c 100)::JSON","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":17,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte as (\n select '{\"a\":1}'::JSON as j\n)\nselect typeof(j[2:3]), typeof(substring(j, 2, 3))\nfrom cte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"j","query_location":34,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":63,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["j"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":26,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":18,"function_name":"substring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":103,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select typeof(id), id from read_json('{TEST_DIR}/mixed.json')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":2,"column_names":["id"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":27,"query_location_length":34,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/mixed.json"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAX(JSON_ARRAY_LENGTH(filter_keystage))::int - 1 FROM read_json_auto('{DATA_DIR}/json/filter_keystage.ndjson');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":5,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":34,"function_name":"json_array_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":15,"column_names":["filter_keystage"]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":61,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":40,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/filter_keystage.ndjson"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'a': 42, 'b': '[1, 2]'}::ROW(a JSON, b JSON)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":21,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":13,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":22,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1, 2]"}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":19,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":39,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{\"duck\":42}'::JSON::STRUCT(duck INTEGER)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":22,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"duck\":42}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":20,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"duck","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM structs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with cte1 as (\n select array_agg({duck:42}::json) json_list_value\n from range(5_000)\n), cte2 as (\n select '[' || string_agg('{\"duck\":42}', ', ') || ']' string_value\n from range(5_000)\n)\nselect json_list_value::varchar = string_value, json_list_value = string_value::json[]\nfrom cte1, cte2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"json_list_value","query_location":26,"query_location_length":26,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"duck","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"duck","query_location":42,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"json","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":78,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5000}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"string_value","query_location":115,"query_location_length":45,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"["}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":31,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"duck\":42}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":", "}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"]"}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":183,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5000}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":205,"query_location_length":39,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":220,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":205,"query_location_length":15,"column_names":["json_list_value"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":222,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":12,"column_names":["string_value"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":246,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":246,"query_location_length":15,"column_names":["json_list_value"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":276,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":264,"query_location_length":12,"column_names":["string_value"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":278,"query_location_length":4,"catalog":"","schema":"","type_name":"json","children":[]}]}}},"try_cast":false}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":285,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":290,"query_location_length":4,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":296,"query_location_length":4,"schema_name":"","table_name":"cte2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '{\"type\":\"Point\",\"coordinates\":[\"a\",\"b\"]}'::JSON::GEOMETRY;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"type\":\"Point\",\"coordinates\":[\"a\",\"b\"]}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT JSON_CONTAINS('{\"a\": 1, \"b\": 2, \"c\": {\"d\": 3}}', '\"c\": {\"d\": 3}') AS Result;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"Result","query_location":7,"query_location_length":65,"function_name":"json_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 1, \"b\": 2, \"c\": {\"d\": 3}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"c\": {\"d\": 3}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_contains(json('{\"key\":\"value\"}'),json('{\"blah\":\"value\"}'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"json_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":23,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"key\":\"value\"}"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":24,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"blah\":\"value\"}"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT to_json(union_value(b := 'abc')::UNION(a INTEGER, b VARCHAR, c FLOAT))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":70,"function_name":"to_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":38,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":23,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":32,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":36,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]},{"class":"TYPE","type":"TYPE","alias":"c","query_location":70,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_object('nested', {nested2: [1, 2, 3]})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nested"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":20,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"nested2","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"nested2","query_location":39,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select row_to_json({a: 42})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"row_to_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":7,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_array(1,2.5,null,'hello');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_array","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":25}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_array(1,null,'3','[4,5]','{\"six\":7.7}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"json_array","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[4,5]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"six\":7.7}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_deep_merge('{\"a\":null}', '{\"a\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":null}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_deep_merge('42', 'null')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"null"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_deep_merge('{\"a\":1}', NULL, '{\"c\":3}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"c\":3}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_deep_merge('{\"a\":{\"b\":2}}', '{\"a\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"b\":2}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json('{\"foo\": null}')['foo']","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":28,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"foo\": null}"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foo"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json('[1, 2, 42]').\"2\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":22,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1, 2, 42]"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json('{\"foo\": \"bar\"}').foo = '\"bar\"';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":36,"left":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":26,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"foo\": \"bar\"}"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foo"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"bar\""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_extract('[null]', '$[0]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[null]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$[0]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_extract_string('[1, 2, 42]', 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"json_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1, 2, 42]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_extract(j, '$.b[#-0]') a, a = json_extract(j, '$.b[-0]') FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":7,"query_location_length":27,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b[#-0]"}}}]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":26,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b[-0]"}}}]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":74,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT j::JSON-\u003e'$.b[#-000001]' a, a = (j::JSON-\u003e'$.b[-000001]') FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"a","query_location":7,"query_location_length":24,"lhs":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b[#-000001]"}},"syntax_type":"SINGLE_ARROW"},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":35,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["a"]},"right":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":40,"query_location_length":23,"lhs":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["j"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b[-000001]"}},"syntax_type":"SINGLE_ARROW"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":70,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '{\"\\\"duck\\\"\": 42}'-\u003e'$.\"\\\"duck\\\"\"';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":7,"query_location_length":34,"lhs":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"\\\"duck\\\"\": 42}"}},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.\"\\\"duck\\\"\""}},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ('[1,2]'::JSON)-\u003e1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":7,"query_location_length":18,"lhs":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1,2]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_insert('[1,2]', '/-', '3')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"json_insert","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1,2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/-"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_insert('{\"a\":1}', 'b', '2')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"json_insert","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_insert('{\"a\":1}', '', '2')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"json_insert","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select sum(list_sum([length(l) for l in json_keys(j, ['duck', 'goose'])])) s\nfrom t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":7,"query_location_length":67,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":62,"function_name":"list_sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":52,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":31,"function_name":"json_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}}]}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["l"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["l"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT JSON_MERGE_PATCH('{\"a\":{\"x\":1}}', '{\"a\":{\"y\":2}}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"json_merge_patch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"x\":1}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"y\":2}}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_merge_patch_diff('{\"a\":1,\"b\":2,\"c\":3}', '{\"a\":1,\"b\":99,\"d\":4}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1,\"b\":2,\"c\":3}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1,\"b\":99,\"d\":4}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_merge_patch_diff('{\"a\":1}', '42')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"42"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_merge_patch_diff('{}', '{\"a\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_merge_patch_diff('{\"a\":{\"x\":1}}', '{\"a\":42}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"x\":1}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":42}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_normalize('{\"b\":[3,1,2],\"a\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"b\":[3,1,2],\"a\":1}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_normalize('{\"t\":20,\"s\":19,\"r\":18,\"q\":17,\"p\":16,\"o\":15,\"n\":14,\"m\":13,\"l\":12,\"k\":11,\"j\":10,\"i\":9,\"h\":8,\"g\":7,\"f\":6,\"e\":5,\"d\":4,\"c\":3,\"b\":2,\"a\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":150,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":134,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"t\":20,\"s\":19,\"r\":18,\"q\":17,\"p\":16,\"o\":15,\"n\":14,\"m\":13,\"l\":12,\"k\":11,\"j\":10,\"i\":9,\"h\":8,\"g\":7,\"f\":6,\"e\":5,\"d\":4,\"c\":3,\"b\":2,\"a\":1}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_normalize('{ \"z\" : 1 , \"a\" : 2 }')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{ \"z\" : 1 , \"a\" : 2 }"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_extract('[0, 1, 2]', '$[1]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[0, 1, 2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$[1]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_extract('{\"my_field\": [{\"my_nested_field\": [\"duck\", \"goose\"]}]}', '$.my_field[0].my_nested_field[0]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":106,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":56,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"my_field\": [{\"my_nested_field\": [\"duck\", \"goose\"]}]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.my_field[0].my_nested_field[0]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_extract('[{\"duck\":42},{\"duck\":43}]', '$[*].duck')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[{\"duck\":42},{\"duck\":43}]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$[*].duck"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select sum((to_json({duck:range})-\u003e'$.*')[1]::int) = sum(range) from range(10000)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":56,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":5,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":41,"query_location_length":3,"children":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":12,"query_location_length":28,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":21,"function_name":"to_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":12,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"duck","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"duck","query_location":26,"query_location_length":5,"column_names":["range"]}}]}}]},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.*"}},"syntax_type":"SINGLE_ARROW"},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":5,"column_names":["range"]}}]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":69,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_pretty(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"json_pretty","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_remove('{\"a\":[1,[2,3],4]}', '/a/1/0')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":[1,[2,3],4]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/a/1/0"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_normalize(json_remove('{\"z\":1,\"a\":2}', '$.z'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":35,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"z\":1,\"a\":2}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.z"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_remove('{\"a\":1}', '$not_a_path')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$not_a_path"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_replace('{\"a\":1}', '/a', '99')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"json_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"/a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"99"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_replace('{\"a\":1,\"b\":2,\"c\":3}', '$.b', '99')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"json_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":1,\"b\":2,\"c\":3}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"99"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_replace('[1,2]', '$[#-1]', '9')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"json_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1,2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$[#-1]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_set('{\"a\":{\"x\":1}}', '$.a.x', '99')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"x\":1}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.a.x"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"99"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_set('{\"a\":{\"b\":{\"c\":1}}}', '$.a.b.c', '99')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"b\":{\"c\":1}}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.a.b.c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"99"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_normalize(json_set('{\"z\":1}', '$.a', '2'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":31,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"z\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_set('[1,2]', '$[2]', '9')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[1,2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$[2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY(json_set('{}', '$not_a_path', '1'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":7,"query_location_length":39,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":34,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$not_a_path"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}}]}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_set('{\"a\":[[1]]}', '$.a[0][0]', '9')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":[[1]]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.a[0][0]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_strip_nulls('{\"a\":{\"x\":1,\"y\":null},\"b\":2}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"json_strip_nulls","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":{\"x\":1,\"y\":null},\"b\":2}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_strip_nulls('[]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"json_strip_nulls","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_structure('{\"a\": 42}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"json_structure","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 42}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_structure('[true,null,false,1,-1]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"json_structure","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[true,null,false,1,-1]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_structure(j) from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"json_structure","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('{\"a\": 42}', '{\"a\":\"UBIGINT\"}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\": 42}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":\"UBIGINT\"}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('[{\"a\": 42}, {\"a\": null}, {\"a\": 7}]', '[{\"a\": \"UBIGINT\"}]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":74,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":36,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[{\"a\": 42}, {\"a\": null}, {\"a\": 7}]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[{\"a\": \"UBIGINT\"}]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform_strict('[]', '\"{type}\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"json_transform_strict","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"{type}\""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('[]', '\"VARCHAR\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"VARCHAR\""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('42.42', '\"DECIMAL(38,17)\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"42.42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"DECIMAL(38,17)\""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('42', '\"UUID\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"UUID\""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('\"42\"', '\"DATE\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"42\""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"DATE\""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_transform('42', '\"TIMESTAMP\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"TIMESTAMP\""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_type('null')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"null"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_type(json, 'int') from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["json"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"int"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_type('{\"a\":[2,3.5,true,false,null,\"x\"]}','$.a[1]');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":35,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":[2,3.5,true,false,null,\"x\"]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.a[1]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('{\"a\":55,\"b\":72,}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"a\":55,\"b\":72,}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\( \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\( \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\4 \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\4 \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\@ \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\@ \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\L \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\L \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\X \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\X \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\d \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\d \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\p \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\p \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('\" \\v \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\" \\v \""}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_valid('{\"x\":-0}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"x\":-0}"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_value('[null]', '$[0]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"json_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[null]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$[0]"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_value(NULL, ['$.x', '$.a']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"json_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.x"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.a"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT json_value(x, '$.settings.layer2.\"tris.legomenon\".\"summary.report\"') FROM t12;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"json_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":53,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"$.settings.layer2.\"tris.legomenon\".\"summary.report\""}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":3,"schema_name":"","table_name":"t12","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t12"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ST_AsGeoJSON(NULL::GEOMETRY);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"st_asgeojson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ST_AsText(ST_GeomFromGeoJSON('{\"type\":\"Point\",\"coordinates\":[1,2],\"crs\":{\"type\":\"name\"},\"bbox\":[0,0,1,1]}'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":108,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":97,"function_name":"st_geomfromgeojson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":77,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"type\":\"Point\",\"coordinates\":[1,2],\"crs\":{\"type\":\"name\"},\"bbox\":[0,0,1,1]}"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ST_GeomFromGeoJSON('{\"type\":\"Point\",\"coordinates\":' || repeat('[', 100000) || repeat(']', 100000) || '}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":105,"function_name":"st_geomfromgeojson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":85,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"type\":\"Point\",\"coordinates\":"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":19,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"["}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100000}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":19,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100000}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"}"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * exclude (filename), parse_filename(filename) as filename from read_json_auto('{DATA_DIR}/json/example_*.ndjson', filename=true) order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":20,"relation_name":"","exclude_list":["filename"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"filename","query_location":29,"query_location_length":24,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":8,"column_names":["filename"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":71,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/example_*.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":122,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_json_auto(['{DATA_DIR}/json/with_uuid.json', '{DATA_DIR}/json/example_n.ndjson'], sample_size=1, maximum_sample_files=99)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":126,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":70,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/with_uuid.json"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/example_n.ndjson"}}}]}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":101,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":20,"column_names":["maximum_sample_files"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":99}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT key, fullkey FROM json_each('{\"\": 1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":7,"column_names":["fullkey"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_each","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"\": 1}"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g FROM read_json('{TEST_DIR}/badwkt.ndjson', columns={g: 'GEOMETRY'});","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/badwkt.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"g","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"g","query_location":64,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"GEOMETRY"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT column_name, column_type\nFROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/not_fc.geojson'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":37,"query_location_length":63,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":54,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":61,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/not_fc.geojson"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ST_AsText(geometry) FROM read_ndjson('data/json/geojson/geometries.geojsonl', geojson=true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["geometry"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":32,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"data/json/geojson/geometries.geojsonl"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["geojson"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT column_name, column_type\nFROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/inconsistent.geojsonl'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":37,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":54,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":61,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/inconsistent.geojsonl"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ST_AsText(geometry), id, name FROM property_ids ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["geometry"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":12,"schema_name":"","table_name":"property_ids","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["property_ids"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT name FROM read_ndjson('{DATA_DIR}/json/example_n.ndjson', columns={id: 'INTEGER', name: 'VARCHAR'}, format='nd')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":102,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/example_n.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":32,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"id","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"id","query_location":78,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":95,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":107,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":6,"column_names":["format"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nd"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_json('{DATA_DIR}/json/top_level_array.json', auto_detect=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":67,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/top_level_array.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_json('{TEMP_DIR}/my_file.json', format='unstructured', records='false', auto_detect=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":94,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/my_file.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":6,"column_names":["format"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"unstructured"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":7,"column_names":["records"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":91,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select typeof(d), d from date_copy_test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["d"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["d"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":14,"schema_name":"","table_name":"date_copy_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["date_copy_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT strptime('2026-04-01T06:03:00+00:01', '%Y-%m-%dT%H:%M:%S');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2026-04-01T06:03:00+00:01"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%Y-%m-%dT%H:%M:%S"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT filename, trim(content, chr(10))\nFROM read_text('{TEMP_DIR}/nested_dateformat_partition/*/*.json') ORDER BY filename;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":8,"column_names":["filename"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["filename"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":22,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":45,"query_location_length":60,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":49,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEMP_DIR}/nested_dateformat_partition/*/*.json"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_ndjson_objects('{DATA_DIR}/json/example_r.ndjson')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":55,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson_objects","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":34,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/example_r.ndjson"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from read_json_objects('{DATA_DIR}/json/unterminated_quotes.ndjson', format='auto', ignore_errors=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":98,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_objects","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/unterminated_quotes.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":6,"column_names":["format"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"auto"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":93,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT data FROM read_ndjson('{DATA_DIR}/json/union.ndjson', columns={data: 'UNION(name VARCHAR, age INT, veteran BOOL)'})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["data"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":105,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/json/union.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":60,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":52,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"data","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"data","query_location":76,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"UNION(name VARCHAR, age INT, veteran BOOL)"}}}]}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT duck.goose FROM '{TEST_DIR}/nested.json'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["duck","goose"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":24,"schema_name":"","table_name":"{TEST_DIR}/nested.json","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/nested.json"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT true::BOOLEAN::JSON::BOOLEAN","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::FLOAT::JSON::FLOAT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":7,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '00:00:00'::TIME_NS::JSON::TIME_NS","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"TIME_NS","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"TIME_NS","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'foo'::VARIANT::JSON::VARIANT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foo"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT current_setting('json_geometry_format');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"json_geometry_format"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json(' { \"this\" : \"is\", \"a\": [ \"test\" ] }')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" { \"this\" : \"is\", \"a\": [ \"test\" ] }"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select json_serialize_plan('select blob ''\\\\x00''');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"json_serialize_plan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"select blob '\\\\x00'"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM json_execute_serialized_sql(json_serialize_sql('SELECT * FROM tbl2'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":69,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":40,"function_name":"json_serialize_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT * FROM tbl2"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM j2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"j2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["j2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \"SCHEMA\".\"TABLE\".\"COLUMN\" FROM \"SCHEMA\".\"TABLE\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":25,"column_names":["SCHEMA","TABLE","COLUMN"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":16,"schema_name":"SCHEMA","table_name":"TABLE","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["SCHEMA","TABLE"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MIN(i), MAX(i), COUNT(*) FROM integers2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * EXCLUDE (context_id, timestamp, connection_id, transaction_id, query_id) FROM duckdb_logs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":74,"relation_name":"","exclude_list":["context_id","query_id","timestamp","connection_id","transaction_id"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":11,"schema_name":"","table_name":"duckdb_logs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_logs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT write_log('hello from the connection log scope', level := 'error', scope := 'connection') from range(0, 2048);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":89,"function_name":"write_log","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello from the connection log scope"}}},{"name":"level","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"level","query_location":65,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"error"}}},{"name":"scope","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"scope","query_location":83,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"connection"}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2048}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) FROM \"{TEMP_DIR}/logging_csv_log.csv\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":32,"schema_name":"","table_name":"{TEMP_DIR}/logging_csv_log.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/logging_csv_log.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT message FROM duckdb_logs_parsed('querylog') WHERE starts_with(message, 'SELECT 1');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["message"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":20,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"querylog"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":32,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["message"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"SELECT 1"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT type, log_level, scope, message FROM duckdb_logs WHERE type='QueryLog';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":9,"column_names":["log_level"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":5,"column_names":["scope"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":7,"column_names":["message"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":11,"schema_name":"","table_name":"duckdb_logs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_logs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"QueryLog"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM Stock order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":5,"schema_name":"","table_name":"Stock","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["Stock"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT k, v FROM target;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":6,"schema_name":"","table_name":"target","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["target"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x \u003e ANY(SELECT y FROM t2 WHERE 1=0) FROM t1 ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":35,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},"comparison_type":"COMPARE_GREATERTHAN"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'b' COLLATE NOCASE \u003e ANY(SELECT x FROM (VALUES ('Z'), ('a')) t(x));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":66,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":46,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Z"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}},"collation":"NOCASE"},"comparison_type":"COMPARE_GREATERTHAN"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT currval('s');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_transform(\n\tlist_filter(\n\t\tlist_transform(l, lambda x: struct_pack(filter := x \u003e 8, result := x + 5)),\n\t\tlambda s: NOT s.filter\n\t),\n\tlambda s: s.result\n) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":158,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":118,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":74,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":57,"query_location_length":55,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":45,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filter","expression":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"filter","query_location":89,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}}},{"name":"result","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"result","query_location":108,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}}]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":117,"query_location_length":22,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["s"]},"expr":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":127,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":8,"column_names":["s","filter"]}]},"syntax_type":"LAMBDA_KEYWORD"}}]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":145,"query_location_length":18,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["s"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":8,"column_names":["s","result"]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":171,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i FROM integers WHERE (i=1 AND i\u003e0) OR (i=1 AND i\u003c3) ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":29,"query_location_length":30,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":38,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":47,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":55,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (i IS NULL AND i=1) OR (i IS NULL AND i\u003c10) FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":7,"query_location_length":43,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":8,"query_location_length":17,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":10,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["i"]}]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":31,"query_location_length":18,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":33,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":45,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('2020-02-20' AS date) - CAST(min(\"ta_1\".\"lo_commitdate\") AS date) AS \"ca_1\"\nFROM dates AS \"ta_1\"\nHAVING CAST('2020-02-20' AS date) - CAST(min(\"ta_1\".\"lo_commitdate\") AS date) \u003e 4\nORDER BY \"ca_1\" ASC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":6,"column_names":["ca_1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"ca_1","query_location":34,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-02-20"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":41,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":27,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":22,"column_names":["ta_1","lo_commitdate"]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"ta_1","sample":null,"query_location":93,"query_location_length":15,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":116,"query_location_length":74,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":143,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":116,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-02-20"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":137,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":145,"query_location_length":41,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":150,"query_location_length":27,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":22,"column_names":["ta_1","lo_commitdate"]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":181,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT test1.i FROM test AS test1, test AS test2 WHERE (test1.i=test2.j) OR (test2.i IS NULL AND test1.j IS NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["test1","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":15,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"test1","sample":null,"query_location":20,"query_location_length":13,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"test2","sample":null,"query_location":35,"query_location_length":13,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":55,"query_location_length":58,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":7,"column_names":["test1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":7,"column_names":["test2","j"]}},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":77,"query_location_length":35,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":85,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":7,"column_names":["test2","i"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":105,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":7,"column_names":["test1","j"]}]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -(CAST(-2147483648 AS INTEGER)), typeof(-(CAST(-2147483648 AS INTEGER)))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":28,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2147483648}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":39,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":31,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":28,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2147483648}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a * 0 FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select timestamp_str, cast(timestamp_str as timestamp)\nfrom table1\nwhere cast(timestamp_str as timestamp) \u003e cast('2024-05-03 01:00:00' as timestamp);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["timestamp_str"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":32,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":13,"column_names":["timestamp_str"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":6,"schema_name":"","table_name":"table1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":73,"query_location_length":75,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":32,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":13,"column_names":["timestamp_str"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-05-03 01:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":138,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x FROM pushdown_extract_multi WHERE s.a + s.b = 12 AND s.a = 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":22,"schema_name":"","table_name":"pushdown_extract_multi","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pushdown_extract_multi"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":43,"query_location_length":26,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":14,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["s","a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":3,"column_names":["s","b"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM t WHERE floor(x::DOUBLE) \u003c 5000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":23,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":16,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5000}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM e WHERE (year(dt) = 2020) IS FALSE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"e","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["e"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":47,"query_location_length":8,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":15,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":2,"column_names":["dt"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2020}}},"cast_type":{"id":"BOOLEAN","type_info":null},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NOT (a AND b), (NOT a) OR (NOT b)\nFROM (VALUES (1, NULL::BOOLEAN, TRUE),\n (2, NULL::BOOLEAN, FALSE),\n (3, TRUE, NULL::BOOLEAN),\n (4, FALSE, NULL::BOOLEAN)) v(id, a, b)\nORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":220,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":13,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":12,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["b"]}]}]},{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":22,"query_location_length":18,"children":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":23,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":34,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["b"]}]}]}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":46,"query_location_length":152,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":147,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":149,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":176,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":187,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":189,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT lhs.id FROM (SELECT 1 id) lhs ANTI JOIN (SELECT 1 id WHERE FALSE) rhs ON lhs.id = rhs.id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["lhs","id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":58,"left":{"type":"SUBQUERY","alias":"lhs","sample":null,"query_location":19,"query_location_length":13,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"id","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":47,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"id","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":5,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":6,"column_names":["lhs","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":6,"column_names":["rhs","id"]}},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers i1 LEFT OUTER JOIN integers i2 ON 1=1 WHERE i1.i=i2.i ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":26,"query_location_length":34,"left":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":42,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":4,"column_names":["i2","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT i1.i AS a, i2.i AS b, row_number() OVER (ORDER BY i1.i, i2.i) FROM integers i1, integers i2 WHERE i1.i IS NOT NULL AND i2.i IS NOT NULL) a1 WHERE a=b ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"a1","sample":null,"query_location":14,"query_location_length":144,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":22,"query_location_length":4,"column_names":["i1","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":33,"query_location_length":4,"column_names":["i2","i"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":44,"query_location_length":39,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":4,"column_names":["i1","i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":4,"column_names":["i2","i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":84,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":89,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":102,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":120,"query_location_length":37,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":125,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":4,"column_names":["i1","i"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":146,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":141,"query_location_length":4,"column_names":["i2","i"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":168,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":1,"column_names":["b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT * FROM vals1, vals2 WHERE j=5 AND l=5) tbl1 LEFT OUTER JOIN (SELECT * FROM vals1, vals2) tbl2 ON tbl1.i=tbl2.i AND tbl1.k=tbl2.k WHERE tbl2.j=5 AND tbl2.l=5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":66,"query_location_length":84,"left":{"type":"SUBQUERY","alias":"tbl1","sample":null,"query_location":14,"query_location_length":46,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":22,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":48,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":48,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"tbl2","sample":null,"query_location":82,"query_location_length":28,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":90,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":92,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":97,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":104,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":119,"query_location_length":31,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":119,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":6,"column_names":["tbl1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":6,"column_names":["tbl2","i"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":137,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":6,"column_names":["tbl1","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":6,"column_names":["tbl2","k"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":157,"query_location_length":21,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":157,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":6,"column_names":["tbl2","j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":170,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":6,"column_names":["tbl2","l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT 0=1 AS cond FROM vals1, vals2 GROUP BY 1) a1 WHERE cond ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"a1","sample":null,"query_location":14,"query_location_length":49,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"cond","query_location":22,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":34,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":4,"column_names":["cond"]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(i) FROM integers where j \u003e 90 and j \u003c 95","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":36,"query_location_length":17,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":36,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":90}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":47,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":95}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s.min, s.max FROM (SELECT stats(power(x, 2)) s FROM negative_power_stats LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["s","max"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":25,"query_location_length":63,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":33,"query_location_length":18,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":11,"function_name":"power","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":20,"schema_name":"","table_name":"negative_power_stats","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["negative_power_stats"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id,\n coalesce(((-x) \u003e 0)::VARCHAR, 'NIL'),\n coalesce(((-x) \u003e= 0)::VARCHAR, 'NIL'),\n coalesce(((-x) \u003c 0)::VARCHAR, 'NIL'),\n coalesce(((-x) \u003c= 0)::VARCHAR, 'NIL'),\n coalesce(((-x) = 0)::VARCHAR, 'NIL')\nFROM neg ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":258,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":18,"query_location_length":37,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":28,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NIL"}}]},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":64,"query_location_length":37,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":84,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":74,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["x"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":86,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NIL"}}]},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":110,"query_location_length":37,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":130,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":120,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":121,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["x"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NIL"}}]},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":156,"query_location_length":37,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":176,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":166,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":167,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":1,"column_names":["x"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":178,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NIL"}}]},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":202,"query_location_length":37,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":222,"query_location_length":9,"child":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":212,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":213,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":214,"query_location_length":1,"column_names":["x"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":220,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":224,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"NIL"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":245,"query_location_length":3,"schema_name":"","table_name":"neg","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["neg"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(payload) FROM s WHERE v IS DISTINCT FROM 'a';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":1,"schema_name":"","table_name":"s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":33,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(payload) FROM long_strings WHERE v \u003e repeat('b', 13);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":12,"schema_name":"","table_name":"long_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["long_strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":44,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["v"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":13}}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(payload) FROM long_strings WHERE v \u003e repeat('c', 12);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":12,"schema_name":"","table_name":"long_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["long_strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":44,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["v"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM substring_pruning WHERE s[2:5] \u003e '4950';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":17,"schema_name":"","table_name":"substring_pruning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["substring_pruning"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":45,"query_location_length":15,"left":{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":46,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["s"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4950"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM substring_pruning_utf8 WHERE substr(s, 2) = '495000';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":22,"schema_name":"","table_name":"substring_pruning_utf8","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["substring_pruning_utf8"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":23,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":12,"function_name":"substr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"495000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM probe_num p\nJOIN build_num b\n ON p.k = b.k\n AND p.g \u003e= b.g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":47,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"probe_num","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe_num"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":38,"query_location_length":11,"schema_name":"","table_name":"build_num","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["build_num"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":3,"column_names":["b","k"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":70,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":3,"column_names":["p","g"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["b","g"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*)\nFROM phj_probe_narrow_cast p\nJOIN phj_build_narrow_cast b\n ON TRY_CAST(p.k AS INTEGER) = b.k","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":45,"query_location_length":64,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":21,"query_location_length":23,"schema_name":"","table_name":"phj_probe_narrow_cast","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["phj_probe_narrow_cast"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":50,"query_location_length":23,"schema_name":"","table_name":"phj_build_narrow_cast","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["phj_build_narrow_cast"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":30,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":79,"query_location_length":24,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":3,"column_names":["p","k"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":true},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":3,"column_names":["b","k"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM date_table WHERE CAST(col AS TIMESTAMP) = '2022-06-15 00:00:00'::TIMESTAMP;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":10,"schema_name":"","table_name":"date_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["date_table"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":57,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["col"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":84,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2022-06-15 00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":86,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from t3 group by cube(a, b, c) order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["c"]}],"group_sets":[[],[0],[0,1],[0,1,2],[0,2],[1],[1,2],[2]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x::BIGINT IN (1::BIGINT, y) FROM (VALUES (1::INTEGER, 2::BIGINT), (2::INTEGER, 3::BIGINT)) tbl(x, y);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":20,"query_location_length":14,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["y"]}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":40,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM rowid_prune WHERE rowid = 300000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"rowid_prune","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_prune"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":39,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":300000}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM services QUALIFY count(*) OVER(PARTITION BY date, train_number) = 1\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":8,"schema_name":"","table_name":"services","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["services"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":50,"left":{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":22,"query_location_length":46,"function_name":"count","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":4,"column_names":["date"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":12,"column_names":["train_number"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}},"named_param_map":[]}]}} -{"sql":"SELECT g, n, sum(n) OVER (PARTITION BY g) s \nFROM (\n\tSELECT nextval('seq') g, i n \n\tFROM t\n) \nORDER BY n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["n"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"s","query_location":13,"query_location_length":28,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["g"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":50,"query_location_length":42,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":60,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"seq"}}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"n","query_location":78,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH t(i) AS MATERIALIZED (\n\tSELECT i FROM range(1000000) tbl(i)\n)\nSELECT (SELECT i FROM t LIMIT 1 OFFSET 100000), (SELECT i FROM t LIMIT 1 OFFSET 900000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":43,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":7,"literal":{"kind":"INTEGER","text":"1000000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":74,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":6,"literal":{"kind":"INTEGER","text":"100000"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":115,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":6,"literal":{"kind":"INTEGER","text":"900000"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":130,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), min(i), max(i) FROM cte_parallel_limit;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":18,"schema_name":"","table_name":"cte_parallel_limit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte_parallel_limit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT memory_usage_bytes, tag\nFROM duckdb_memory()\nWHERE tag IN ('ALLOCATOR', 'IN_MEMORY_TABLE')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["memory_usage_bytes"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":3,"column_names":["tag"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_memory","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_memory"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":65,"query_location_length":32,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":3,"column_names":["tag"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":11,"literal":{"kind":"STRING","text":"ALLOCATOR"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":17,"literal":{"kind":"STRING","text":"IN_MEMORY_TABLE"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t AS MATERIALIZED\n(\n\tSELECT 1 AS x\nUNION\n\tSELECT (SELECT t.x+t2.x FROM t t2 LIMIT 1) AS x\n\tFROM t\n\tWHERE x \u003c 10\n)\nSELECT * FROM t ORDER BY 1 NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"x","query_location":64,"query_location_length":35,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":3,"column_names":["t","x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":4,"column_names":["t2","x"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":86,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":111,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":120,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":136,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":143,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x, y, (WITH RECURSIVE t(z) AS MATERIALIZED (\n SELECT x + y\n UNION ALL\n SELECT z + 1\n FROM (WITH RECURSIVE g(a) AS MATERIALIZED (\n SELECT t.z\n FROM t\n UNION ALL\n SELECT g.a + (x + y) / 2\n FROM g\n WHERE g.a \u003c 3)\n SELECT * FROM g) AS t(z)\n WHERE z \u003c 5\n) SELECT sum(z) FROM t) AS z\nFROM generate_series(1,2) AS _(x), generate_series(1,2) AS __(y) order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["y"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"z","query_location":13,"query_location_length":345,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["z"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["z"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":105,"query_location_length":207,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"g","value":{"aliases":["a"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"g","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":3,"column_names":["t","z"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":182,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":227,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":223,"query_location_length":3,"column_names":["g","a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":229,"query_location_length":11,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":232,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":234,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":239,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["/"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":258,"query_location_length":1,"schema_name":"","table_name":"g","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["g"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":277,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":277,"query_location_length":3,"column_names":["g","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":283,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["a"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":303,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":310,"query_location_length":1,"schema_name":"","table_name":"g","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["g"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["z"]},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":329,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":329,"query_location_length":1,"column_names":["z"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":333,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["z"],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":344,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":348,"query_location_length":1,"column_names":["z"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":356,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":364,"query_location_length":66,"left":{"type":"TABLE_FUNCTION","alias":"_","sample":null,"query_location":371,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":387,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":389,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["x"],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"__","sample":null,"query_location":401,"query_location_length":29,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":417,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":419,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["y"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c(i) AS MATERIALIZED (VALUES (1), (2), (2), (NULL)), b(i) AS (VALUES (2), (3), (NULL))\nSELECT count(*) FROM c INNER JOIN b ON c.i=b.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"b","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":115,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":113,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":126,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":131,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":3,"column_names":["c","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":3,"column_names":["b","i"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c(i) AS MATERIALIZED (VALUES (1), (2), (NULL))\nSELECT sum((SELECT i FROM c WHERE c.i=o.i))\nFROM (VALUES (1), (3)) o(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":36,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":63,"query_location_length":31,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":86,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["c","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":3,"column_names":["o","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"o","sample":null,"query_location":101,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with cte as MATERIALIZED (Select i as j from a) select * from cte where j = (with cte as MATERIALIZED (select max(j) as j from cte) select j from cte);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"j","query_location":33,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":55,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":62,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":78,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["j"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":76,"query_location_length":74,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":110,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":127,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":146,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with cte AS MATERIALIZED (SELECT * FROM va) SELECT * FROM cte;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":33,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":2,"schema_name":"","table_name":"va","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["va"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":51,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH t(x) AS MATERIALIZED (SELECT t FROM generate_series(1,3) AS _(t)) SELECT t1.x, t2.x FROM t AS t1, t AS t2 ORDER BY t1.x, t2.x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":4,"column_names":["t1","x"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":4,"column_names":["t2","x"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["t"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"_","sample":null,"query_location":41,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["t"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":4,"column_names":["t1","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":4,"column_names":["t2","x"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":89,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":94,"query_location_length":7,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":103,"query_location_length":7,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH t(x) AS MATERIALIZED (\n WITH u(x) AS MATERIALIZED (\n SELECT 42\n ) SELECT * FROM u\n) SELECT * FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"u","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":83,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":90,"query_location_length":1,"schema_name":"","table_name":"u","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["u"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":101,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":108,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with recursive t as MATERIALIZED (select 1 as x union all select x+1 from t where x \u003c 3) select * from t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":74,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":82,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":96,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":103,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with recursive t(x) as MATERIALIZED (select 1 union select zzz+1 from t t1(zzz) where zzz \u003c 3) select zz from t t1(zz) order by zz","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":2,"column_names":["zz"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":3,"column_names":["zzz"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":70,"query_location_length":9,"schema_name":"","table_name":"t","column_name_alias":["zzz"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":86,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["zzz"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["x"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":2,"column_names":["zz"]}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":110,"query_location_length":8,"schema_name":"","table_name":"t","column_name_alias":["zz"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(y, arr) AS\n(\n SELECT 1, array[1,2,3,4,5,6]\n UNION ALL\n SELECT y+1, arr\n FROM t, p\n WHERE y \u003c 10\n AND y = loc\n) SELECT * FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["y","arr"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":42,"query_location_length":18,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":3,"column_names":["arr"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":95,"query_location_length":11,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":105,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":115,"query_location_length":22,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":115,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":130,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":1,"column_names":["y"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["loc"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["y","arr"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":147,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":154,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(i, identity_payload) AS (\n\tSELECT 1, 0\n\tUNION\n\tSELECT i, identity_payload + 1 FROM t WHERE identity_payload \u003c 3\n)\nSELECT count(i) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["i","identity_payload"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":16,"column_names":["identity_payload"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":100,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":108,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":16,"column_names":["identity_payload"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["i","identity_payload"],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":138,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":152,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t AS\n(\n\tSELECT 1 AS x\nUNION\n\tSELECT (SELECT t.x+t2.x FROM t t2 LIMIT 1) AS x\n\tFROM t\n\tWHERE x \u003c 10\n)\nSELECT * FROM t ORDER BY 1 NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"x","query_location":51,"query_location_length":35,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":3,"column_names":["t","x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":4,"column_names":["t2","x"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":73,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":98,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":107,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":123,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":130,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE tag_hierarchy(id, source, path, target) AS (\n SELECT id, name, name AS path, NULL::INTEGER AS target -- this should be '' for correct behaviour\n FROM tag\n WHERE subclassof IS NULL\n UNION ALL\n SELECT tag.id, tag.name, tag_hierarchy.path || ' \u003c- ' || tag.name, tag.name AS target\n FROM tag, tag_hierarchy\n WHERE tag.subclassof = tag_hierarchy.id\n)\nSELECT source, path, target\nFROM tag_hierarchy\n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tag_hierarchy","value":{"aliases":["id","source","path","target"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tag_hierarchy","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"path","query_location":79,"query_location_length":4,"column_names":["name"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"target","query_location":97,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":167,"query_location_length":3,"schema_name":"","table_name":"tag","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tag"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":190,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":10,"column_names":["subclassof"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":219,"query_location_length":6,"column_names":["tag","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":227,"query_location_length":8,"column_names":["tag","name"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":237,"query_location_length":40,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":237,"query_location_length":18,"column_names":["tag_hierarchy","path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":259,"query_location_length":6,"literal":{"kind":"STRING","text":" \u003c- "}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":269,"query_location_length":8,"column_names":["tag","name"]}}],"qualified_name":{"path":["||"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"target","query_location":279,"query_location_length":8,"column_names":["tag","name"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":300,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":305,"query_location_length":3,"schema_name":"","table_name":"tag","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tag"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":310,"query_location_length":13,"schema_name":"","table_name":"tag_hierarchy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tag_hierarchy"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":332,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":332,"query_location_length":14,"column_names":["tag","subclassof"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":349,"query_location_length":16,"column_names":["tag_hierarchy","id"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["id","source","path","target"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":375,"query_location_length":6,"column_names":["source"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":383,"query_location_length":4,"column_names":["path"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":389,"query_location_length":6,"column_names":["target"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":401,"query_location_length":13,"schema_name":"","table_name":"tag_hierarchy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tag_hierarchy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE r(i, outgoing) AS (\n\tVALUES (0, 0::BIGINT)\n\tUNION ALL\n\tSELECT r.i + 1, build.outgoing\n\tFROM r\n\tJOIN (\n\t\tSELECT i AS k, count(*) OVER (PARTITION BY i % 10) AS outgoing\n\t\tFROM range(10000) t(i)\n\t) build ON build.k = r.i\n\tWHERE r.i \u003c 3\n)\nSELECT max(i), max(outgoing) FROM r;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"r","value":{"aliases":["i","outgoing"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"r","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["r","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":14,"column_names":["build","outgoing"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":110,"query_location_length":122,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":107,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"right":{"type":"SUBQUERY","alias":"build","sample":null,"query_location":115,"query_location_length":94,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"k","query_location":126,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"outgoing","query_location":134,"query_location_length":35,"function_name":"count","schema":"","catalog":"","partitions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":162,"query_location_length":6,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["%"]}}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":189,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":219,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":219,"query_location_length":7,"column_names":["build","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":229,"query_location_length":3,"column_names":["r","i"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":240,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":240,"query_location_length":3,"column_names":["r","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":246,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["i","outgoing"],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":257,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":261,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":265,"query_location_length":13,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":269,"query_location_length":8,"column_names":["outgoing"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":284,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE tbl(a,b,c) USING KEY (a, c , list(b), max(c)) AS (\n\tSELECT 1, 1, NULL\n\tUNION ALL\n SELECT tbl.a, tbl.b - 1, a.b\n\tFROM tbl, recurring.tbl AS a\n\tWHERE tbl.b \u003e 0)\nSELECT * FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":["a","b","c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["c"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["list"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["max"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tbl","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":5,"column_names":["tbl","a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":120,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":5,"column_names":["tbl","b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":3,"column_names":["a","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":130,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":135,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"right":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":140,"query_location_length":18,"schema_name":"recurring","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","tbl"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":166,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":5,"column_names":["tbl","b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["a","b","c"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["c"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["list"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["max"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":184,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":191,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE tbl(key, iter, b, c) USING KEY (key, bool_and(b), bool_or(c)) AS (\n\tSELECT 1, 1, TRUE, TRUE\n\tUNION ALL\n\tSELECT key, iter + 1, NOT b, NOT c\n\tFROM tbl\n\tWHERE iter \u003c 8\n) TABLE tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":["key","iter","b","c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":11,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["bool_and"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":10,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["bool_or"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tbl","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":136,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":4,"column_names":["iter"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":141,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":1,"column_names":["b"]}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":148,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":1,"column_names":["c"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":160,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":171,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":4,"column_names":["iter"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["key","iter","b","c"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["key"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":11,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["bool_and"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":10,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["bool_or"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE tbl (a,b) USING KEY (a, b+1) AS (\n\tSELECT 1, 1\n\tUNION ALL\n \tSELECT a, b + 1\n \tFROM tbl\n \tWHERE b \u003c 5)\nTABLE tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":["a","b"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"tbl","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":100,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":113,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["a","b"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k) AS (\n\tSELECT i, 0 FROM range(0) r(i)\n\tUNION ALL\n\tSELECT k, v + 1 FROM t WHERE v \u003c 0\n)\nSELECT count(*) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":60,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":107,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":115,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":130,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":144,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k) AS (\n\tSELECT 'a' COLLATE nocase, 0\n\tUNION ALL\n\tSELECT n.k, r.v + 1\n\tFROM (SELECT upper(k) AS k, v FROM t) n\n\tJOIN recurring.t r ON r.k IS NOT DISTINCT FROM n.k\n\tWHERE n.v \u003c 1\n)\nSELECT k, v FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":50,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"collation":"nocase"},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":3,"column_names":["n","k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":3,"column_names":["r","v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":146,"query_location_length":50,"left":{"type":"SUBQUERY","alias":"n","sample":null,"query_location":110,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":118,"query_location_length":8,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["upper"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":140,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":151,"query_location_length":13,"schema_name":"recurring","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","t"]}},"condition":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":168,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":3,"column_names":["r","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":193,"query_location_length":3,"column_names":["n","k"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":204,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":204,"query_location_length":3,"column_names":["n","v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":210,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":221,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":231,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k1, k2, v) USING KEY (k1, k2, sum(v) AS v) AS (\n\tVALUES (1, 1, 0), (1, 2, 0)\n\tUNION ALL\n\tSELECT n.k1, n.k2, r.v + 1\n\tFROM t n JOIN recurring.t r ON r.k1 = n.k1\n\tWHERE n.v = 0\n)\nSELECT * FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k1","k2","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":2,"column_names":["k1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["k2"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":47,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":4,"column_names":["n","k1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":4,"column_names":["n","k2"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":3,"column_names":["r","v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":143,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":139,"query_location_length":3,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":148,"query_location_length":13,"schema_name":"recurring","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","t"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":165,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":4,"column_names":["r","k1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":4,"column_names":["n","k1"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":184,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":3,"column_names":["n","v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k1","k2","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":2,"column_names":["k1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["k2"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":47,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":201,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":208,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k) AS (\n\tSELECT 1, 0\n\tUNION ALL\n\tSELECT n.k, r.v + 1\n\tFROM t n\n\tJOIN recurring.t r USING (k)\n\tWHERE n.v \u003c 3\n)\nSELECT k, v FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["n","k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":3,"column_names":["r","v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":98,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":93,"query_location_length":3,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":103,"query_location_length":13,"schema_name":"recurring","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","t"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["k"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":134,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["n","v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":161,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, total) USING KEY (k, sum(total)) AS (\n\tVALUES (1, 1), (1, 2)\n\tUNION\n\tSELECT k, 0 FROM t WHERE false\n)\nTABLE t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","total"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":5,"column_names":["total"]}}],"qualified_name":{"path":["sum"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["k"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":106,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","total"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":5,"column_names":["total"]}}],"qualified_name":{"path":["sum"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS (\n\tVALUES (1, 10), (2, 10)\n\tUNION\n\tSELECT CASE WHEN i % 4 = 0 THEN 3 ELSE k END,\n\t CASE WHEN i % 4 = 0 THEN 7 WHEN k = 1 THEN 5 ELSE 11 END\n\tFROM t, range(current_setting('standard_vector_size')::BIGINT * 4) r(i)\n\tWHERE v = 10\n)\nTABLE t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":90,"query_location_length":37,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["k"]}},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":137,"query_location_length":56,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":147,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":147,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":169,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":195,"query_location_length":71,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":200,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":203,"query_location_length":63,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":209,"query_location_length":51,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":248,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":209,"query_location_length":39,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":225,"query_location_length":22,"literal":{"kind":"STRING","text":"standard_vector_size"}}}],"qualified_name":{"path":["current_setting"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":250,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":259,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":274,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":274,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k) AS (\n\tSELECT 1, ['a' COLLATE nocase]\n\tUNION\n\tSELECT CASE ascii(v[1]) WHEN 97 THEN 1 ELSE 2 END, ['A' COLLATE nocase] FROM t\n)\nTABLE t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":54,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"collation":"nocase"}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":89,"query_location_length":42,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":11,"function_name":"ascii","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":101,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["v"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}}],"qualified_name":{"path":["ascii"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":2,"literal":{"kind":"INTEGER","text":"97"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":134,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}},"collation":"nocase"}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":159,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS (\n\tSELECT array_value('a' COLLATE nocase), 2\n\tUNION\n\tSELECT array_value('A' COLLATE nocase), v - 1 FROM t WHERE v \u003e 0\n)\nSELECT count(*), min(v), min(k[1]) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":31,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":70,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"collation":"nocase"}}],"qualified_name":{"path":["array_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":31,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":120,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}},"collation":"nocase"}}],"qualified_name":{"path":["array_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":143,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":141,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":152,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":160,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":175,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":185,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":193,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":198,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":1,"column_names":["k"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":199,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":208,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (\n\tWITH RECURSIVE t(i) AS (\n\t\tSELECT 0\n\t\tUNION ALL\n\t\tSELECT i + 1 FROM t\n\t)\n\tSELECT i FROM t LIMIT 2048\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":105,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[{"key":"t","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["i"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":112,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT info.distinct_grouping_work_ns::UBIGINT \u003e 0,\n info.distinct_candidate_rows::UBIGINT = current_setting('standard_vector_size')::UBIGINT * 24 * 8,\n info.distinct_inserted_rows::UBIGINT = current_setting('standard_vector_size')::UBIGINT * 24 * 8,\n info.distinct_duplicate_rows::UBIGINT = 0,\n info.recursive_pipeline_execute_work_ns::UBIGINT \u003e 0\nFROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":43,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":30,"column_names":["info","distinct_grouping_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":59,"query_location_length":97,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":28,"column_names":["info","distinct_candidate_rows"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":57,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":138,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":39,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":22,"literal":{"kind":"STRING","text":"standard_vector_size"}}}],"qualified_name":{"path":["current_setting"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":140,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":2,"literal":{"kind":"INTEGER","text":"24"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["*"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":165,"query_location_length":96,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":192,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":27,"column_names":["info","distinct_inserted_rows"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":194,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":204,"query_location_length":57,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":243,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":204,"query_location_length":39,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":220,"query_location_length":22,"literal":{"kind":"STRING","text":"standard_vector_size"}}}],"qualified_name":{"path":["current_setting"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":245,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":255,"query_location_length":2,"literal":{"kind":"INTEGER","text":"24"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":260,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["*"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":270,"query_location_length":41,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":298,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":270,"query_location_length":28,"column_names":["info","distinct_duplicate_rows"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":300,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":310,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":320,"query_location_length":52,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":359,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":320,"query_location_length":39,"column_names":["info","recursive_pipeline_execute_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":361,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":371,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":378,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":397,"query_location_length":18,"literal":{"kind":"STRING","text":"PhysicalOperator"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":423,"query_location_length":57,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":423,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":423,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":431,"query_location_length":22,"literal":{"kind":"STRING","text":"PhysicalRecursiveCTE"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":458,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":458,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":466,"query_location_length":14,"literal":{"kind":"STRING","text":"EpochSummary"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT info.direct_probe_lookup_work_ns::UBIGINT \u003e 0,\n info.direct_probe_key_gather_work_ns::UBIGINT \u003e 0,\n info.direct_probe_payload_finalize_work_ns::UBIGINT \u003e 0,\n info.keyed_hash_commit_work_ns::UBIGINT \u003e 0,\n info.partial_index_maintenance_work_ns::UBIGINT = 0,\n info.recurring_scan_work_ns::UBIGINT = 0,\n info.final_state_drain_work_ns::UBIGINT \u003e 0\nFROM duckdb_logs_parsed('PhysicalOperator')\nWHERE class = 'PhysicalRecursiveCTE' AND event = 'EpochSummary';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":45,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":32,"column_names":["info","direct_probe_lookup_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":61,"query_location_length":49,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":36,"column_names":["info","direct_probe_key_gather_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":119,"query_location_length":55,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":161,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":42,"column_names":["info","direct_probe_payload_finalize_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":163,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":183,"query_location_length":43,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":213,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":183,"query_location_length":30,"column_names":["info","keyed_hash_commit_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":215,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":225,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":235,"query_location_length":51,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":273,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":235,"query_location_length":38,"column_names":["info","partial_index_maintenance_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":275,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":285,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":295,"query_location_length":40,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":322,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":295,"query_location_length":27,"column_names":["info","recurring_scan_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":324,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":334,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":344,"query_location_length":43,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":374,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":344,"query_location_length":30,"column_names":["info","final_state_drain_work_ns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":376,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":386,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":393,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":412,"query_location_length":18,"literal":{"kind":"STRING","text":"PhysicalOperator"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":438,"query_location_length":57,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":438,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":438,"query_location_length":5,"column_names":["class"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":446,"query_location_length":22,"literal":{"kind":"STRING","text":"PhysicalRecursiveCTE"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":473,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":473,"query_location_length":5,"column_names":["event"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":481,"query_location_length":14,"literal":{"kind":"STRING","text":"EpochSummary"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(k, v) USING KEY (k, min(v)) AS (\n\tVALUES (1, 5), (1, 6), (2, 10)\n\tUNION\n\tSELECT k, CASE k WHEN 1 THEN v + 1 ELSE v - 1 END\n\tFROM t\n\tWHERE (k = 1 AND v = 5) OR (k = 2 AND v = 10)\n)\nTABLE t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["k"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":100,"query_location_length":39,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":121,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":132,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":146,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":155,"query_location_length":39,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":156,"query_location_length":15,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":156,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":166,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":170,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":177,"query_location_length":16,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":177,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":177,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":187,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":187,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":191,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH candidates AS MATERIALIZED (\n\tSELECT i FROM range(8192) r(i)\n)\nSELECT count(*), sum(i)\nFROM candidates c\nWHERE EXISTS (\n\tWITH RECURSIVE t(v) AS (\n\t\tVALUES (0)\n\t\tUNION ALL\n\t\tSELECT v + 1 FROM t WHERE v \u003c c.i % 4\n\t)\n\tSELECT 1 FROM t WHERE v = c.i % 4\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"candidates","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":49,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"INTEGER","text":"8192"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":97,"query_location_length":12,"schema_name":"","table_name":"candidates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["candidates"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":116,"query_location_length":139,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":187,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":185,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":196,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":204,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":204,"query_location_length":1,"column_names":["v"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":208,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":208,"query_location_length":3,"column_names":["c","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":214,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["%"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["v"],"key_targets":[]}}}]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":227,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":234,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":242,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":242,"query_location_length":1,"column_names":["v"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":246,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":246,"query_location_length":3,"column_names":["c","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":252,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["%"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE t(i) AS (\n\tSELECT 1\n\tUNION\n\tSELECT i + 1 FROM t WHERE i \u003c 1000\n)\nSELECT sum(i) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["i"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":69,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["i"],"key_targets":[]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with cte1 as (select i as j from a), cte2 as (select ref.j as k from cte1 as ref), cte3 as (select ref2.j+1 as i from cte1 as ref2) select * from cte2 union all select * FROM cte3;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"j","query_location":21,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"k","query_location":53,"query_location_length":5,"column_names":["ref","j"]}],"from_table":{"type":"BASE_TABLE","alias":"ref","sample":null,"query_location":69,"query_location_length":11,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte3","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":105,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":6,"column_names":["ref2","j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"ref2","sample":null,"query_location":118,"query_location_length":12,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":139,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":146,"query_location_length":4,"schema_name":"","table_name":"cte2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":168,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":175,"query_location_length":4,"schema_name":"","table_name":"cte3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE\n t(b) AS MATERIALIZED (\n (WITH helper(c) AS (\n SELECT 5\n )\n SELECT * FROM helper h\n UNION\n SELECT 7\n )\n )\nSELECT * FROM t ORDER BY b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["b"],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[{"key":"helper","value":{"aliases":["c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":97,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"h","sample":null,"query_location":104,"query_location_length":8,"schema_name":"","table_name":"helper","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["helper"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["b"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":153,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":160,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with a as (select * from va) select * from a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"a","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":2,"schema_name":"","table_name":"va","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["va"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":36,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE\nparent(p,c) AS (\n VALUES ('c1','c2'),\n ('c1','c3'),\n ('c3','c4'),\n ('c3','c5'),\n ('c4','c6'),\n ('c4','c7')\n),\nancestor(a,c) AS (\n FROM parent\n UNION\n SELECT a1.x, a2.y\n FROM recurring.ancestor AS a1(x,z) NATURAL JOIN recurring.ancestor AS a2(z,y)\n)\nFROM ancestor ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[{"key":"parent","value":{"aliases":["p","c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":4,"literal":{"kind":"STRING","text":"c1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":4,"literal":{"kind":"STRING","text":"c2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":4,"literal":{"kind":"STRING","text":"c1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":4,"literal":{"kind":"STRING","text":"c3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"literal":{"kind":"STRING","text":"c3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":4,"literal":{"kind":"STRING","text":"c4"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":4,"literal":{"kind":"STRING","text":"c3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":4,"literal":{"kind":"STRING","text":"c5"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":4,"literal":{"kind":"STRING","text":"c4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":4,"literal":{"kind":"STRING","text":"c6"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":4,"literal":{"kind":"STRING","text":"c4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":4,"literal":{"kind":"STRING","text":"c7"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"ancestor","value":{"aliases":["a","c"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"ancestor","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":192,"query_location_length":6,"schema_name":"","table_name":"parent","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["parent"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":218,"query_location_length":4,"column_names":["a1","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":4,"column_names":["a2","y"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":268,"query_location_length":42,"left":{"type":"BASE_TABLE","alias":"a1","sample":null,"query_location":238,"query_location_length":29,"schema_name":"recurring","table_name":"ancestor","column_name_alias":["x","z"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","ancestor"]}},"right":{"type":"BASE_TABLE","alias":"a2","sample":null,"query_location":281,"query_location_length":29,"schema_name":"recurring","table_name":"ancestor","column_name_alias":["z","y"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","ancestor"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["a","c"],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":318,"query_location_length":8,"schema_name":"","table_name":"ancestor","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ancestor"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with recursive t as (select 1 as x, 'hello' as y union select x+1, y || '-' || 'hello' from t where x \u003c 3) select * from t order by x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":36,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":19,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":100,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":114,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":121,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with recursive t as (select 1 as x union all select m.x+f.x from t as m, t as f where m.x \u003c 3) select * from t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"t","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":3,"column_names":["m","x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["f","x"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":60,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"m","sample":null,"query_location":65,"query_location_length":6,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":73,"query_location_length":6,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":86,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["m","x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":102,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":109,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE r(k,v) USING KEY(k,\"payload calls\".max(v)) AS (VALUES(1,10) UNION ALL SELECT k+1,v+1 FROM r WHERE k\u003c3) SELECT * FROM r;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"r","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":22,"function_name":"max","schema":"payload calls","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["payload calls","max"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"r","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["k"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":105,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":113,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":22,"function_name":"max","schema":"payload calls","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["payload calls","max"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":125,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":132,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM tbl2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t WHERE j = 20;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from t2_copy;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"t2_copy","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2_copy"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from list_int where l is distinct from NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"list_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":36,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM RANGE(1, hello=3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":23,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["hello"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT st FROM chickens, integers, strings;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["st"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":10,"query_location_length":32,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":8,"schema_name":"","table_name":"chickens","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["chickens"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT FIRST(name), FIRST(abv)\nFROM tbl\nGROUP BY style\nORDER BY abv DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":3,"column_names":["abv"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["name"]}}],"qualified_name":{"path":["first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":10,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":3,"column_names":["abv"]}}],"qualified_name":{"path":["first"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":5,"column_names":["style"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY(CASE WHEN x % 2 = 0 THEN 1 // (x - 2) ELSE -1 END) FROM t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":7,"query_location_length":54,"children":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":11,"query_location_length":49,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":21,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":12,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["//"]}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM binding_left WHERE i + length(s) = 6;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"binding_left","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["binding_left"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["length"]}}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM (VALUES\n\t((-128)::TINYINT, (-32768)::SMALLINT, (-2147483648)::INTEGER, (-9223372036854775808)::BIGINT),\n\t(127::TINYINT, 32767::SMALLINT, 2147483647::INTEGER, 9223372036854775807::BIGINT)\n) t(tiny_value, small_value, integer_value, bigint_value)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":188,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-128"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":6,"literal":{"kind":"INTEGER","text":"-32768"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":11,"literal":{"kind":"INTEGER","text":"-2147483648"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":107,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":20,"literal":{"kind":"INTEGER","text":"-9223372036854775808"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":109,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":123,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":3,"literal":{"kind":"INTEGER","text":"127"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":125,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":139,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":5,"literal":{"kind":"INTEGER","text":"32767"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":141,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":161,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":10,"literal":{"kind":"INTEGER","text":"2147483647"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":163,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":191,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775807"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":193,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["tiny_value","small_value","integer_value","bigint_value"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT contains(content, 'sql-num'),\n contains(content, 'sql-str'),\n contains(content, 'sql-comment'),\n contains(content, '\u0026lt;'),\n contains(content, '\u0026amp;')\nFROM read_text('{TEST_DIR}/tree_renderer_profile.html')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":9,"literal":{"kind":"STRING","text":"sql-num"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":28,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":9,"literal":{"kind":"STRING","text":"sql-str"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":32,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":13,"literal":{"kind":"STRING","text":"sql-comment"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":25,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":6,"literal":{"kind":"STRING","text":"\u0026lt;"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":156,"query_location_length":26,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":7,"literal":{"kind":"STRING","text":"\u0026amp;"}}}],"qualified_name":{"path":["contains"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":188,"query_location_length":50,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":39,"literal":{"kind":"STRING","text":"{TEST_DIR}/tree_renderer_profile.html"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM \"table.with-symbols\" ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":20,"schema_name":"","table_name":"table.with-symbols","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table.with-symbols"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT col1::VARCHAR FROM table2 ORDER BY col1::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":4,"column_names":["col1"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["col1"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":6,"schema_name":"","table_name":"table2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from unsupported_value;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":17,"schema_name":"","table_name":"unsupported_value","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unsupported_value"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT prefix FROM duckdb_extension_repositories() WHERE repository_name='acme'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["prefix"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_extension_repositories","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_extension_repositories"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":15,"column_names":["repository_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":6,"literal":{"kind":"STRING","text":"acme"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_extensions() WHERE extension_version != '' AND extension_name == 'sqlite_scanner';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_extensions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_extensions"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":47,"query_location_length":62,"children":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":47,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":17,"column_names":["extension_version"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":14,"column_names":["extension_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":16,"literal":{"kind":"STRING","text":"sqlite_scanner"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(i) FROM null_inputs\nWHERE i%5=2 AND NULL::INTEGER IS NULL AND 42 IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":11,"schema_name":"","table_name":"null_inputs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_inputs"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":47,"query_location_length":50,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":71,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":86,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(n) FROM non_null_runs WHERE NULLIF(n,7) IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":13,"schema_name":"","table_name":"non_null_runs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_null_runs"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":61,"query_location_length":11,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":11,"function_name":"nullif","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["nullif"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON (sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL)) g,\n sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) AS s\nFROM (VALUES (1, 1, 1, NULL), (1, 1, NULL, 1), (2, 1, 1, 1), (2, 1, NULL, NULL)) v(g, x, a, b)\nGROUP BY g\nORDER BY sum(x) FILTER (WHERE COLUMNS(*) IS NOT NULL) DESC, g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":44,"function_name":"sum","schema":"","filter":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":52,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":49,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}]},{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":241,"query_location_length":44,"function_name":"sum","schema":"","filter":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":273,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":270,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":245,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":292,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":76,"query_location_length":44,"function_name":"sum","schema":"","filter":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":108,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":105,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":131,"query_location_length":75,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":191,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":194,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":200,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["g","x","a","b"]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE 2\u003c2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'x'::BLOB AS c0 UNION ALL SELECT c3 FROM t0 ORDER BY c0 LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":2,"column_names":["c0"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"c0","query_location":10,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["c3"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t WHERE c1 LIKE NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":9,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":2,"column_names":["c1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE a=2 AND a\u003e=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":12,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":37,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE a\u003e=5 AND a\u003c\u003e2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":13,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":29,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":38,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE a\u003c2 AND a\u003e4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":29,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":37,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM strings WHERE s='hello' AND s\u003c'z'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":28,"query_location_length":19,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":28,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":42,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test_structs WHERE i.a \u003c 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"test_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_structs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":33,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":3,"column_names":["i","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_parquet('{TEST_DIR}/string_structs.parquet') WHERE s.a = 'foo';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/string_structs.parquet"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":5,"literal":{"kind":"STRING","text":"foo"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM vals1 WHERE i\u003e9 AND j\u003e=i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":12,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":26,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":34,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM vals1 WHERE i\u003c1 AND j\u003ei","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":26,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":34,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM vals1 WHERE j\u003c=i AND i=5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":12,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":26,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":35,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM vals1 WHERE j\u003ci AND i\u003e=10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":13,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":26,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["j"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":34,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c0, c1\nFROM t_decimal\nWHERE TRY(c1 / c0) IS NULL\nORDER BY c0 NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":2,"column_names":["c0"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["c0"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["c1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":9,"schema_name":"","table_name":"t_decimal","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_decimal"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":48,"query_location_length":7,"children":[{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":35,"query_location_length":12,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":7,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":2,"column_names":["c1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["c0"]}}],"qualified_name":{"path":["/"]}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from t where a \u003e 500 or a \u003c= 700","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":29,"query_location_length":19,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"INTEGER","text":"500"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":40,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"INTEGER","text":"700"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM range(5) t(i) WHERE i \u003e 0 AND nextval('transitive_calls') \u003e= i ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":14,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":34,"query_location_length":42,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":34,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":44,"query_location_length":32,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":27,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":18,"literal":{"kind":"STRING","text":"transitive_calls"}}}],"qualified_name":{"path":["nextval"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM bounds WHERE a \u003e 0 AND a = b AND b \u003e a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"bounds","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bounds"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":27,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":27,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":37,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["b"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":47,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["a"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_cosine_similarity([1e-320,0,0]::DOUBLE[3], [1e-320,0,0]::DOUBLE[3])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":73,"function_name":"array_cosine_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":6,"literal":{"kind":"NUMERIC","text":"1e-320"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":6,"literal":{"kind":"NUMERIC","text":"1e-320"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}}],"qualified_name":{"path":["array_cosine_similarity"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select length(a) from arrays;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":6,"schema_name":"","table_name":"arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arrays"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_slice(array_value(1,2,3,4,5), 1, 3) = list_slice([1,2,3,4,5], 1, 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":72,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"list_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":22,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["array_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_slice"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":29,"function_name":"list_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_slice"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_extract(array_value(4,5,6), 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":18,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["array_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('COPY my_') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":29,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":10,"literal":{"kind":"STRING","text":"COPY my_"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE SEQ') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":12,"literal":{"kind":"STRING","text":"CREATE SEQ"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('create table tbl(i INTEGER PRIMARY KE') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":58,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":39,"literal":{"kind":"STRING","text":"create table tbl(i INTEGER PRIMARY KE"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('CREATE TY') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":11,"literal":{"kind":"STRING","text":"CREATE TY"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion_start FROM sql_auto_complete('\nSELECT\n format_m') WHERE suggestion='format_me';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":29,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":22,"literal":{"kind":"STRING","text":"\nSELECT\n format_m"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":10,"column_names":["suggestion"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":11,"literal":{"kind":"STRING","text":"format_me"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT sum(a) filt') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":20,"literal":{"kind":"STRING","text":"SELECT sum(a) filt"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('INSERT INTO tbl(c1, c2) VAL') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":29,"literal":{"kind":"STRING","text":"INSERT INTO tbl(c1, c2) VAL"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('WI') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":23,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":4,"literal":{"kind":"STRING","text":"WI"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM tbl LIMIT 5 OF') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":49,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":30,"literal":{"kind":"STRING","text":"SELECT * FROM tbl LIMIT 5 OF"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM tbl JOIN tbl2 US') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":51,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":32,"literal":{"kind":"STRING","text":"SELECT * FROM tbl JOIN tbl2 US"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT * FROM tbl QUALIFY row_number() OVER () ORD') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":71,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":52,"literal":{"kind":"STRING","text":"SELECT * FROM tbl QUALIFY row_number() OVER () ORD"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SET timez') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":11,"literal":{"kind":"STRING","text":"SET timez"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM sql_auto_complete('SHOW tab') WHERE suggestion = 'tables ';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":29,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":10,"literal":{"kind":"STRING","text":"SHOW tab"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":10,"column_names":["suggestion"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":9,"literal":{"kind":"STRING","text":"tables "}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('select a from t1 inner join t2 on t1.id = t2.id where t1.active = true') = $$SELECT a\nFROM t1\nINNER JOIN t2 ON t1.id = t2.id\nWHERE t1.active = TRUE$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":168,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":91,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":72,"literal":{"kind":"STRING","text":"select a from t1 inner join t2 on t1.id = t2.id where t1.active = true"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":74,"literal":{"kind":"STRING","text":"SELECT a\nFROM t1\nINNER JOIN t2 ON t1.id = t2.id\nWHERE t1.active = TRUE"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('select a from t where x = 1', MAP {'inline_threshold': '0', 'indent_size': '2'}) = $$SELECT\n a\nFROM\n t\nWHERE\n x = 1$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":139,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":99,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":29,"literal":{"kind":"STRING","text":"select a from t where x = 1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":49,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":18,"literal":{"kind":"STRING","text":"inline_threshold"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":13,"literal":{"kind":"STRING","text":"indent_size"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":37,"literal":{"kind":"STRING","text":"SELECT\n a\nFROM\n t\nWHERE\n x = 1"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('CREATE TEMP TABLE t (id INTEGER, name VARCHAR)') = $$CREATE TEMP TABLE t(\n id INTEGER,\n name VARCHAR\n)$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":129,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":48,"literal":{"kind":"STRING","text":"CREATE TEMP TABLE t (id INTEGER, name VARCHAR)"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":59,"literal":{"kind":"STRING","text":"CREATE TEMP TABLE t(\n id INTEGER,\n name VARCHAR\n)"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END') = $$CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":226,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":120,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":101,"literal":{"kind":"STRING","text":"CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":103,"literal":{"kind":"STRING","text":"CREATE OR REPLACE MACRO clamp(x, lo, hi) AS CASE WHEN x \u003c lo THEN lo WHEN x \u003e hi THEN hi ELSE x END"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('WITH RECURSIVE tree AS (SELECT id, parent_id, name, 0 as depth FROM nodes WHERE parent_id IS NULL UNION ALL SELECT n.id, n.parent_id, n.name, t.depth + 1 FROM nodes n INNER JOIN tree t ON n.parent_id = t.id) SELECT * FROM tree ORDER BY depth, name') = $$WITH RECURSIVE tree AS (\n SELECT id, parent_id, name, 0 AS depth\n FROM nodes\n WHERE parent_id IS NULL\n UNION ALL\n SELECT n.id, n.parent_id, n.name, t.depth + 1\n FROM nodes n\n INNER JOIN tree t ON n.parent_id = t.id\n )\nSELECT *\nFROM tree\nORDER BY depth, name$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":584,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":268,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":249,"literal":{"kind":"STRING","text":"WITH RECURSIVE tree AS (SELECT id, parent_id, name, 0 as depth FROM nodes WHERE parent_id IS NULL UNION ALL SELECT n.id, n.parent_id, n.name, t.depth + 1 FROM nodes n INNER JOIN tree t ON n.parent_id = t.id) SELECT * FROM tree ORDER BY depth, name"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":313,"literal":{"kind":"STRING","text":"WITH RECURSIVE tree AS (\n SELECT id, parent_id, name, 0 AS depth\n FROM nodes\n WHERE parent_id IS NULL\n UNION ALL\n SELECT n.id, n.parent_id, n.name, t.depth + 1\n FROM nodes n\n INNER JOIN tree t ON n.parent_id = t.id\n )\nSELECT *\nFROM tree\nORDER BY depth, name"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('SELECT name, count(*) FROM users GROUP BY ALL ORDER BY ALL') = $$SELECT name, count(*)\nFROM users\nGROUP BY ALL\nORDER BY ALL$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":144,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":79,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":60,"literal":{"kind":"STRING","text":"SELECT name, count(*) FROM users GROUP BY ALL ORDER BY ALL"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":62,"literal":{"kind":"STRING","text":"SELECT name, count(*)\nFROM users\nGROUP BY ALL\nORDER BY ALL"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('CREATE OR REPLACE TABLE t AS SELECT a, b FROM s') = $$CREATE OR REPLACE TABLE t AS\nSELECT a, b\nFROM s$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":122,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":49,"literal":{"kind":"STRING","text":"CREATE OR REPLACE TABLE t AS SELECT a, b FROM s"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":51,"literal":{"kind":"STRING","text":"CREATE OR REPLACE TABLE t AS\nSELECT a, b\nFROM s"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql('SELECT 100.00 * sum(CASE WHEN p_type LIKE ''PROMO%'' THEN l_extendedprice * (1 - l_discount) ELSE 0 END) / sum(l_extendedprice * (1 - l_discount)) AS promo_revenue FROM t') = $$SELECT 100.00 * sum(\n CASE\n WHEN p_type LIKE 'PROMO%' THEN l_extendedprice *(1 - l_discount)\n ELSE 0\n END) / sum(l_extendedprice *(1 - l_discount)) AS promo_revenue\nFROM t$$","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":389,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":191,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":172,"literal":{"kind":"STRING","text":"SELECT 100.00 * sum(CASE WHEN p_type LIKE 'PROMO%' THEN l_extendedprice * (1 - l_discount) ELSE 0 END) / sum(l_extendedprice * (1 - l_discount)) AS promo_revenue FROM t"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":201,"query_location_length":195,"literal":{"kind":"STRING","text":"SELECT 100.00 * sum(\n CASE\n WHEN p_type LIKE 'PROMO%' THEN l_extendedprice *(1 - l_discount)\n ELSE 0\n END) / sum(l_extendedprice *(1 - l_discount)) AS promo_revenue\nFROM t"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT duckdb_format_sql($query$SELECT 42 AS `a\n b\n c`$query$) = $query$SELECT 42 AS `a\n b\n c`$query$;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":106,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":61,"function_name":"duckdb_format_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":42,"literal":{"kind":"STRING","text":"SELECT 42 AS `a\n b\n c`"}}}],"qualified_name":{"path":["duckdb_format_sql"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":42,"literal":{"kind":"STRING","text":"SELECT 42 AS `a\n b\n c`"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion FROM sql_auto_complete('COPY tbl FROM ''{DATA_DIR}/csv/all_quote') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":23,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":42,"literal":{"kind":"STRING","text":"COPY tbl FROM '{DATA_DIR}/csv/all_quote"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT min(l_ord') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":37,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":18,"literal":{"kind":"STRING","text":"SELECT min(l_ord"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start, suggestion_type FROM sql_auto_complete('SELECT * FROM partsupp JOIN supplier USING (ps_su') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":15,"column_names":["suggestion_type"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":58,"query_location_length":70,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":51,"literal":{"kind":"STRING","text":"SELECT * FROM partsupp JOIN supplier USING (ps_su"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suggestion, suggestion_start FROM sql_auto_complete('SELECT lag(col1) OVER (PARTITION BY col1, col2 ORD') LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["suggestion"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":16,"column_names":["suggestion_start"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":71,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_auto_complete","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":52,"literal":{"kind":"STRING","text":"SELECT lag(col1) OVER (PARTITION BY col1, col2 ORD"}}}],"qualified_name":{"path":["sql_auto_complete"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT from_base64(base64(encode('')))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"from_base64","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":18,"function_name":"base64","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":10,"function_name":"encode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["encode"]}}}],"qualified_name":{"path":["base64"]}}}],"qualified_name":{"path":["from_base64"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers ORDER BY create_sort_key(i, 'DESC NULLS FIRST')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":38,"function_name":"create_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":18,"literal":{"kind":"STRING","text":"DESC NULLS FIRST"}}}],"qualified_name":{"path":["create_sort_key"]}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.i, s.v FROM structs ORDER BY create_sort_key(s.i, 'DESC NULLS FIRST', s.v, 'DESC NULLS FIRST')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":65,"function_name":"create_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["s","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":18,"literal":{"kind":"STRING","text":"DESC NULLS FIRST"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":3,"column_names":["s","v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":18,"literal":{"kind":"STRING","text":"DESC NULLS FIRST"}}}],"qualified_name":{"path":["create_sort_key"]}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["s","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["s","v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":7,"schema_name":"","table_name":"structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT hex(create_sort_key('\\xAA\\x00\\xBB\\x01\\xCC'::BLOB, 'DESC NULLS LAST'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":69,"function_name":"hex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":64,"function_name":"create_sort_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":22,"literal":{"kind":"STRING","text":"\\xAA\\x00\\xBB\\x01\\xCC"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":17,"literal":{"kind":"STRING","text":"DESC NULLS LAST"}}}],"qualified_name":{"path":["create_sort_key"]}}}],"qualified_name":{"path":["hex"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT decode('\\x00'::BLOB)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"decode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"\\x00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"qualified_name":{"path":["decode"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select array_slice(blob '\\x00\\xF0\\x9F\\xA6\\x86\\x00', 2, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"array_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"\\x00\\xF0\\x9F\\xA6\\x86\\x00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"blob","children":[],"qualified_name":{"path":["blob"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["array_slice"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE_ADD(TIMESTAMP '2008-12-25 00:00:00', INTERVAL 5 DAY) AS five_days_later;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"five_days_later","query_location":7,"query_location_length":57,"function_name":"date_add","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2008-12-25 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["date_add"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(century FROM d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"literal":{"kind":"STRING","text":"CENTURY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(quarter FROM d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"literal":{"kind":"STRING","text":"QUARTER"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_trunc('week', DATE '2024-10-06'), date_trunc('isoyear', DATE '2024-10-06'), date_trunc('week', DATE 'infinity')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"literal":{"kind":"STRING","text":"week"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2024-10-06"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["date_trunc"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":40,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":9,"literal":{"kind":"STRING","text":"isoyear"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2024-10-06"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["date_trunc"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":35,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":6,"literal":{"kind":"STRING","text":"week"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":107,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":107,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_part(s, DATE '1992-01-01') FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_part('isoyear', d::TIMESTAMP) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":9,"literal":{"kind":"STRING","text":"isoyear"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LAST_DAY(d) FROM dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"last_day","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["last_day"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT d, DATE_PART(['year', 'month', 'day', 'epoch'], d) AS parts\nFROM dates\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":10,"query_location_length":47,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":33,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"literal":{"kind":"STRING","text":"month"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":5,"literal":{"kind":"STRING","text":"day"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":7,"literal":{"kind":"STRING","text":"epoch"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_trunc(NULL::VARCHAR, NULL::TIMESTAMP) FROM timestamps LIMIT 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_trunc('yearweek', TIMESTAMP '2019-01-06 04:03:02') FROM timestamps LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":10,"literal":{"kind":"STRING","text":"yearweek"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2019-01-06 04:03:02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT d::DATE, DATE_TRUNC('isoyear', d)::DATE\nFROM generate_series('2000-01-01'::TIMESTAMP, '2023-01-01'::TIMESTAMP, INTERVAL 1 YEAR) tbl(d);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":24,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":9,"literal":{"kind":"STRING","text":"isoyear"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":52,"query_location_length":89,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":80,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":12,"literal":{"kind":"STRING","text":"2000-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":82,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":105,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":12,"literal":{"kind":"STRING","text":"2023-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":107,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":118,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_years"]}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["d"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(day FROM i) FROM dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"literal":{"kind":"STRING","text":"DAY"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(hour FROM i) FROM dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"HOUR"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(dow FROM cast('1970-01-01' AS DATE) - 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"literal":{"kind":"STRING","text":"dow"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":12,"literal":{"kind":"STRING","text":"1970-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(week FROM cast('2006-01-01' AS DATE));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"WEEK"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"literal":{"kind":"STRING","text":"2006-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(week FROM cast('2007-01-01' AS DATE) + 49);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"WEEK"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"literal":{"kind":"STRING","text":"2007-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"49"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(week FROM cast('2007-01-01' AS DATE) + 133);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"WEEK"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"literal":{"kind":"STRING","text":"2007-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"literal":{"kind":"INTEGER","text":"133"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(week FROM cast('2007-01-01' AS DATE) + 217);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"WEEK"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":12,"literal":{"kind":"STRING","text":"2007-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"literal":{"kind":"INTEGER","text":"217"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(year FROM d) FROM dates2 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"YEAR"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":6,"schema_name":"","table_name":"dates2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(NULL::TIMESTAMP, NULL) FROM range(3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":44,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(d, '%A') FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"STRING","text":"%A"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(DATE '2001-01-01', '%-y')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2001-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":5,"literal":{"kind":"STRING","text":"%-y"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(d, '%f') FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"STRING","text":"%f"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(d, 'XX%cXX%xXX%XXX') FROM dates ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":16,"literal":{"kind":"STRING","text":"XX%cXX%xXX%XXX"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select d, time_bucket('2 weeks'::interval, d, '6 days'::interval) from dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":55,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"literal":{"kind":"STRING","text":"2 weeks"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":8,"literal":{"kind":"STRING","text":"6 days"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":71,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select w, d, origin, time_bucket(w, d, origin) from dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["w"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["d"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":6,"column_names":["origin"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":25,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["w"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":6,"column_names":["origin"]}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('1 month 1 day'::interval, '2019-05-05'::date, '2019-05-05'::date);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":78,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":15,"literal":{"kind":"STRING","text":"1 month 1 day"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":12,"literal":{"kind":"STRING","text":"2019-05-05"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":12,"literal":{"kind":"STRING","text":"2019-05-05"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('1 day'::interval, '290309-12-21 (BC)'::date);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"literal":{"kind":"STRING","text":"1 day"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":19,"literal":{"kind":"STRING","text":"290309-12-21 (BC)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('-1 month'::interval, null::date, '2022-12-20'::date);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"literal":{"kind":"STRING","text":"-1 month"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":12,"literal":{"kind":"STRING","text":"2022-12-20"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM mixed WHERE yearweek(d) = -10;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"mixed","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mixed"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":11,"function_name":"yearweek","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["yearweek"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT enum_range(null::rainbow)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"enum_range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"rainbow","children":[],"qualified_name":{"path":["rainbow"]}}}}],"qualified_name":{"path":["enum_range"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT enum_range_boundary(1, 'orange'::rainbow)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"enum_range_boundary","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":8,"literal":{"kind":"STRING","text":"orange"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"rainbow","children":[],"qualified_name":{"path":["rainbow"]}}}}],"qualified_name":{"path":["enum_range_boundary"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT can_cast_implicitly(i, NULL::HUGEINT) FROM tbl LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"can_cast_implicitly","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["can_cast_implicitly"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('case_when_seq');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":15,"literal":{"kind":"STRING","text":"case_when_seq"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_sort(cast_to_type(['a' COLLATE nocase,'B'], [NULL::VARCHAR COLLATE \"binary\"]), 'ASC', 'NULLS FIRST')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":105,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":72,"function_name":"cast_to_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":31,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"collation":"nocase"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":32,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":57,"query_location_length":30,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"collation":"binary"}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["cast_to_type"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":5,"literal":{"kind":"STRING","text":"ASC"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":13,"literal":{"kind":"STRING","text":"NULLS FIRST"}}}],"qualified_name":{"path":["list_sort"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 42=error('hello world')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":23,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":20,"function_name":"error","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}}],"qualified_name":{"path":["error"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT m, HASH(m) FROM maps","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":7,"function_name":"hash","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["m"]}}],"qualified_name":{"path":["hash"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"maps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["maps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FILTER (WHERE a = b), count(*)\nFROM (\n\tSELECT\n\t\tinvoke(lambda x: nextval('invoke_cse_seq'), i) a,\n\t\tinvoke(lambda x: nextval('invoke_cse_seq'), i) b\n\tFROM range(10000) tbl(i)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["b"]}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":140,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":64,"query_location_length":46,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":71,"query_location_length":35,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":25,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":16,"literal":{"kind":"STRING","text":"invoke_cse_seq"}}}],"qualified_name":{"path":["nextval"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["invoke"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":116,"query_location_length":46,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":123,"query_location_length":35,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":25,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":16,"literal":{"kind":"STRING","text":"invoke_cse_seq"}}}],"qualified_name":{"path":["nextval"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["invoke"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":171,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select invoke(lambda a, b: invoke(lambda c: a * 100 + b * 10 + c, 3), 1, 2) as result","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"result","query_location":7,"query_location_length":68,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":14,"query_location_length":54,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":41,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":34,"query_location_length":30,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["c"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":7,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["invoke"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["invoke"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(DISTINCT invoke(lambda x: nextval('invoke_dictionary_seq'), s)) FROM invoke_dictionary_tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":69,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":53,"function_name":"invoke","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":29,"query_location_length":42,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":32,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":23,"literal":{"kind":"STRING","text":"invoke_dictionary_seq"}}}],"qualified_name":{"path":["nextval"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["invoke"]}}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":21,"schema_name":"","table_name":"invoke_dictionary_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["invoke_dictionary_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_type('a');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"make_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["make_type"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(repeat(CAST(NULL AS VARCHAR) || 'z', 2))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":39,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":28,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(nullif('a', 'a') || 'z'), typeof(repeat(nullif('a', 'a') || 'z', 2)), typeof(upper(NULL::VARCHAR) || 'z')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":23,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":16,"function_name":"nullif","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["nullif"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":42,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":34,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":23,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":16,"function_name":"nullif","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["nullif"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":35,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":27,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":20,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["upper"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_extract(NULL::INT, 'a')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["struct_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT replace_type((42, 'duck', true), NULL::INTEGER, NULL::BIGINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":61,"function_name":"replace_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":18,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["replace_type"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sec.s FROM secrets sec JOIN allowed a ON (sec.id = a.id) WHERE sec.s::INT = 42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["sec","s"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"sec","sample":null,"query_location":18,"query_location_length":11,"schema_name":"","table_name":"secrets","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["secrets"]}},"right":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":35,"query_location_length":9,"schema_name":"","table_name":"allowed","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["allowed"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":49,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":6,"column_names":["sec","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":4,"column_names":["a","id"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":15,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":5,"column_names":["sec","s"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL BETWEEN 10 AND 20","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":12,"query_location_length":17,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM integers WHERE 9 BETWEEN 10 AND NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":38,"query_location_length":19,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM integers WHERE i BETWEEN NULL AND NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":38,"query_location_length":21,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM range(4) tbl(i) WHERE i \u003e 1 AND i \u003c= 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":14,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":36,"query_location_length":16,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":36,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":46,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select false is not true","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":13,"query_location_length":11,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"true"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count FROM duckdb_connection_count();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["count"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":18,"query_location_length":25,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_connection_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_connection_count"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, i IN (1, 2, 3, 4, 5, 6, 7, 8) FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":15,"query_location_length":24,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (SELECT MAX(i) FROM integers WHERE i \u003c\u003e i1.i), (SELECT MIN(i) FROM integers WHERE i \u003c= i1.i) FROM integers i1 ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":45,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":45,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":57,"query_location_length":45,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":92,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":108,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LEAST(1, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"least","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["least"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT GREATEST(DATE '1992-01-01', DATE '1994-02-02', DATE '1991-01-01', DATE 'infinity', DATE '-infinity')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":100,"function_name":"greatest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1994-02-02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1991-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":73,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":90,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"-infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["greatest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LEAST(REPEAT(i::VARCHAR, 20), j::VARCHAR) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"least","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":22,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"qualified_name":{"path":["repeat"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["j"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["least"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT round(99999999999999999999999999999999999999::DECIMAL(38,0), -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":64,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":38,"literal":{"kind":"INTEGER","text":"99999999999999999999999999999999999999"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CURRENT_SETTING(i::VARCHAR) FROM range(1) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["current_setting"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":40,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, sleep_ms(1) FROM test_sleep_table WHERE id \u003c 3 ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":11,"function_name":"sleep_ms","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["sleep_ms"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":16,"schema_name":"","table_name":"test_sleep_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_sleep_table"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":51,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1, pg_sleep(0.001), 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":15,"function_name":"pg_sleep","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"0.001"}}}],"qualified_name":{"path":["pg_sleep"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.min, s.max, s.has_null, s.has_no_null FROM (SELECT STATS(i - 5) s FROM integers LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["s","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["s","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":13,"column_names":["s","has_no_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":60,"query_location_length":12,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":80,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT index_key({'catalog': NULL::VARCHAR, 'table': 'tbl1'}, 'PRIMARY_tbl1_0', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":75,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":43,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"catalog","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"catalog","query_location":33,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":53,"query_location_length":6,"literal":{"kind":"STRING","text":"tbl1"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":16,"literal":{"kind":"STRING","text":"PRIMARY_tbl1_0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["index_key"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT index_key({'schema': 'main', 'table': 'tbl3'}, 'tbl3_idx', key1, key2, key3)\nFROM tbl3\nWHERE key1 BETWEEN 1 AND 4\nORDER BY key1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":4,"column_names":["key1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":76,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":35,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"schema","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"schema","query_location":28,"query_location_length":6,"literal":{"kind":"STRING","text":"main"}}},{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":45,"query_location_length":6,"literal":{"kind":"STRING","text":"tbl3"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":10,"literal":{"kind":"STRING","text":"tbl3_idx"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":4,"column_names":["key1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":4,"column_names":["key2"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":4,"column_names":["key3"]}}],"qualified_name":{"path":["index_key"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":4,"schema_name":"","table_name":"tbl3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl3"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":105,"query_location_length":15,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":4,"column_names":["key1"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT index_key({'table': ''}, 'PRIMARY_tbl1_0', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":27,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":16,"literal":{"kind":"STRING","text":"PRIMARY_tbl1_0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["index_key"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT index_key({'table': 'tbl2'}, 'FOREIGN_tbl2_2', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"index_key","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"table","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"tbl2"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":16,"literal":{"kind":"STRING","text":"FOREIGN_tbl2_2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["index_key"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM equal_milliseconds WHERE epoch_ms(i) = 86400000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":18,"schema_name":"","table_name":"equal_milliseconds","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["equal_milliseconds"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":22,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":11,"function_name":"epoch_ms","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["epoch_ms"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":8,"literal":{"kind":"INTEGER","text":"86400000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT dayofyear(i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"dayofyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["dayofyear"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, DATE_PART(['hour', 'minute', 'second', 'epoch'], i) AS parts\nFROM intervals\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":10,"query_location_length":51,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":6,"literal":{"kind":"STRING","text":"hour"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":8,"literal":{"kind":"STRING","text":"minute"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":8,"literal":{"kind":"STRING","text":"second"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":7,"literal":{"kind":"STRING","text":"epoch"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(quarter FROM i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"literal":{"kind":"STRING","text":"QUARTER"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(year FROM interval '14 months ago')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"YEAR"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":15,"literal":{"kind":"STRING","text":"14 months ago"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT span * 8.2 AS product\nFROM INTERVAL_MULDIV_TBL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"product","query_location":7,"query_location_length":10,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["span"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"8.2"}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":19,"schema_name":"","table_name":"INTERVAL_MULDIV_TBL","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["INTERVAL_MULDIV_TBL"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE_TRUNC('hour', i) FROM intervals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"literal":{"kind":"STRING","text":"hour"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_approx_count_distinct([10]), list_approx_count_distinct(['hello']) from list_ints;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"list_approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_approx_count_distinct"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":37,"function_name":"list_approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_approx_count_distinct"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":84,"query_location_length":9,"schema_name":"","table_name":"list_ints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_ints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_avg(i), list_avg(j) FROM vals;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"list_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["list_avg"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":11,"function_name":"list_avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["list_avg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":4,"schema_name":"","table_name":"vals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_bit_or([]) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"list_bit_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_bit_or"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_count([1]) FROM range(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"list_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_first(d), list_first(dt), list_first(t), list_first(s) FROM five_dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"list_first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["list_first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":14,"function_name":"list_first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["list_first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":13,"function_name":"list_first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["list_first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":13,"function_name":"list_first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["list_first"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":10,"schema_name":"","table_name":"five_dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_histogram(['2021-08-20'::TIMESTAMP_NS])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"list_histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":28,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":12,"literal":{"kind":"STRING","text":"2021-08-20"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_histogram"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_aggr('{func_name}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":13,"literal":{"kind":"STRING","text":"{func_name}"}}}],"qualified_name":{"path":["list_aggr"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_aggr([1, 2, NULL], 'regr_r2');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"literal":{"kind":"STRING","text":"regr_r2"}}}],"qualified_name":{"path":["list_aggr"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_aggr([1, 2, NULL], 'argmax');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":8,"literal":{"kind":"STRING","text":"argmax"}}}],"qualified_name":{"path":["list_aggr"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_last(d), list_last(dt), list_last(t), list_last(s) FROM five_dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"list_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["list_last"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":13,"function_name":"list_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["list_last"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":12,"function_name":"list_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["list_last"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":12,"function_name":"list_last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["list_last"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":10,"schema_name":"","table_name":"five_dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["five_dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_mad(x) from (values (['23:59:59.999999'::time, '00:00:00'::time])) tbl(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"list_mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["list_mad"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":24,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":43,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":17,"literal":{"kind":"STRING","text":"23:59:59.999999"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":10,"literal":{"kind":"STRING","text":"00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_median(r) FROM quantile","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"list_median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["r"]}}],"qualified_name":{"path":["list_median"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"quantile","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantile"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MIN(s), MAX(s) FROM multi_member_struct;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":19,"schema_name":"","table_name":"multi_member_struct","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["multi_member_struct"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_mode(v) from dates;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"list_mode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["list_mode"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_aggregate([1, 2], 'min')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_aggregate","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":5,"literal":{"kind":"STRING","text":"min"}}}],"qualified_name":{"path":["list_aggregate"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_sem(l) from sems;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"list_sem","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["list_sem"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":4,"schema_name":"","table_name":"sems","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sems"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_string_agg(['a'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"list_string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_string_agg"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_aggr(n, 'sumKahan') FROM doubles;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":10,"literal":{"kind":"STRING","text":"sumKahan"}}}],"qualified_name":{"path":["list_aggr"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"doubles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["doubles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_var_samp([1])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list_var_samp","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_var_samp"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_aggr([0, 0], 'stddev')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":8,"literal":{"kind":"STRING","text":"stddev"}}}],"qualified_name":{"path":["list_aggr"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT len([1]) FROM range(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["len"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_to_string_comma_default([1,2,3], sep:='-')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"array_to_string_comma_default","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"sep","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"sep","query_location":51,"query_location_length":3,"literal":{"kind":"STRING","text":"-"}}}],"qualified_name":{"path":["array_to_string_comma_default"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cardinality(MAP {'a': 1, 'b': 2})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"cardinality","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":20,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["cardinality"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT flatten([NULL])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"flatten","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["flatten"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, flatten([[1, 2], [3, 4]]) FROM nested_lists","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":25,"function_name":"flatten","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["flatten"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":12,"schema_name":"","table_name":"nested_lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT range(0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["range"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT range(i, 5) FROM range(5) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":24,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT range(50, 1, -20)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-20"}}}],"qualified_name":{"path":["range"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT range(timestamp '2020-01-01', timestamp '2020-01-01', interval '1' day);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":71,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["range"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT generate_subscripts([4,5,6], 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"generate_subscripts","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["generate_subscripts"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT generate_series(start, stop, step) FROM (VALUES\n\t(timestamptz '2020-01-01', timestamptz '2020-07-01', interval '3' month),\n\t(timestamptz '2020-12-04', timestamptz '2020-09-01', interval '-1 month -1 day'),\n\t(timestamptz '2020-03-08', timestamptz '2020-03-09', interval '6' hour),\n\t(timestamptz '2020-11-02', timestamptz '2020-11-01', interval '-43200' second),\n) AS _(start, stop, step);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["start"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":4,"column_names":["stop"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["step"]}}],"qualified_name":{"path":["generate_series"]}}],"from_table":{"type":"SUBQUERY","alias":"_","sample":null,"query_location":47,"query_location_length":322,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":83,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-07-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":3,"literal":{"kind":"STRING","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":132,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-12-04"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":158,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-09-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":158,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":184,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":193,"query_location_length":17,"literal":{"kind":"STRING","text":"-1 month -1 day"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":215,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-03-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":215,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":241,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-03-09"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":241,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":267,"query_location_length":17,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":276,"query_location_length":3,"literal":{"kind":"STRING","text":"6"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_hours"]}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":289,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-11-02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":289,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":315,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-11-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":315,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":341,"query_location_length":24,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":350,"query_location_length":8,"literal":{"kind":"STRING","text":"-43200"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["to_seconds"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["start","stop","step"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(['hello', 'duck', 'sunshine'], str -\u003e CASE WHEN str LIKE '%e%' THEN 'e' ELSE 'other' END)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":104,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":29,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":10,"literal":{"kind":"STRING","text":"sunshine"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":53,"query_location_length":57,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":3,"column_names":["str"]},"expr":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":60,"query_location_length":50,"case_checks":[{"when_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":5,"literal":{"kind":"STRING","text":"%e%"}}}],"qualified_name":{"path":["~~"]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":7,"literal":{"kind":"STRING","text":"other"}}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([2], x -\u003e (SELECT 1 - x) * x)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":27,"query_location_length":23,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":18,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":32,"query_location_length":14,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["*"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_filter([1, NULL, -2, NULL], x -\u003e x % 2 != 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":40,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["x"]},"expr":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":45,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_filter"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n FROM corr_test WHERE list_count(list_filter(l, elem -\u003e length(elem) \u003e= n)) \u003e= n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"corr_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["corr_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":30,"query_location_length":58,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":53,"function_name":"list_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":41,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":56,"query_location_length":25,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":4,"column_names":["elem"]},"expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":64,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":12,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":4,"column_names":["elem"]}}],"qualified_name":{"path":["length"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["n"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_filter"]}}}],"qualified_name":{"path":["list_count"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["n"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([[1], [2], [3]], x -\u003e x[1]) FROM t2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":39,"query_location_length":9,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["x"]},"expr":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":45,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["x"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_has_any(LIST_VALUE(list_has_any([1], [1])), [1])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":53,"function_name":"list_has_any","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":34,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":22,"function_name":"list_has_any","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_has_any"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_has_any"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM demo(3, 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":10,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"demo","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["demo"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT scoping_macro([11, 22], 3, 4);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"scoping_macro","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"22"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["scoping_macro"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with base as (\n\tselect [4,5,6] as l\n)\nselect [x for x,i in l if i != 2] as filtered from base;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"base","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":23,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"filtered","query_location":45,"query_location_length":26,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filter","expression":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":64,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}},{"name":"result","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["struct_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"filter"}}}],"qualified_name":{"path":["struct_extract"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"result"}}}],"qualified_name":{"path":["struct_extract"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":4,"schema_name":"","table_name":"base","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["base"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(['Once', 'upon', 'a', 'time'], (x, y) -\u003e x || ' ' || y);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":29,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":6,"literal":{"kind":"STRING","text":"Once"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":6,"literal":{"kind":"STRING","text":"upon"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":6,"literal":{"kind":"STRING","text":"time"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":50,"query_location_length":23,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":13,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":3,"literal":{"kind":"STRING","text":" "}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["||"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([1, 2, 3], (x, y, x_i) -\u003e list_reduce([4, 5, 6], (a, b, a_i) -\u003e x + y + a + b + x_i + a_i));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":103,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":79,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":3,"column_names":["x_i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":64,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":68,"query_location_length":40,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["a_i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":3,"column_names":["x_i"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":3,"column_names":["a_i"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_reduce"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([1, 2, 3], (x, y) -\u003e list_reduce([4, 5, 6], (a, b) -\u003e list_reduce([7, 8, 9], (c, d) -\u003e x + y + a + b + c + d)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":123,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":99,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":89,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":63,"query_location_length":65,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":55,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":96,"query_location_length":31,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":124,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":120,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":116,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_reduce"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_reduce"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([1, 2, 3], (x, y) -\u003e y - x, -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":15,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(l, (x, y) -\u003e x + y, initial) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":15,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":7,"column_names":["initial"]}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(['a', 'b'], (x, y) -\u003e list_reduce(['1', '2'], (a, b) -\u003e x || y || a || b, 'B'), 'A');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":96,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":31,"query_location_length":66,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":56,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":65,"query_location_length":26,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":16,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["||"]}},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}}],"qualified_name":{"path":["list_reduce"]}},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \nlist_reduce(\n [struct_pack(a:=0, b:=0), struct_pack(a:=0, b:=1), struct_pack(a:=0, b:=2)],\n (curr, next) -\u003e struct_pack(a:=curr.a + (next.b - curr.b), b:=next.b),\n struct_pack(a:=-2, b:=-3)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":200,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":75,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":106,"query_location_length":69,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":106,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":4,"column_names":["curr"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":4,"column_names":["next"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":53,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":144,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":6,"column_names":["curr","a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":154,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":6,"column_names":["next","b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":6,"column_names":["curr","b"]}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}},{"name":"b","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":168,"query_location_length":6,"column_names":["next","b"]}}],"qualified_name":{"path":["struct_pack"]}},"syntax_type":"SINGLE_ARROW"}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":181,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":196,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":203,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-3"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select l, [[{'x+y': x + y, 'x': x, 'y': y, 'l': l} for y in [42, 43]] for x in l] from no_overwrite;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":71,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":58,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x+y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"x+y","query_location":22,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"x","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":32,"query_location_length":1,"column_names":["x"]}},{"name":"y","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"y","query_location":40,"query_location_length":1,"column_names":["y"]}},{"name":"l","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"l","query_location":48,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["struct_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":12,"schema_name":"","table_name":"no_overwrite","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["no_overwrite"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name, prices AS cheap_options FROM cities;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"cheap_options","query_location":13,"query_location_length":6,"column_names":["prices"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":6,"schema_name":"","table_name":"cities","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cities"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(l, x -\u003e x \u003c 2) FROM lists","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":25,"query_location_length":10,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["x"]},"expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":30,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_apply([1, NULL], arr_elem -\u003e arr_elem - 4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"array_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":24,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":8,"column_names":["arr_elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":8,"column_names":["arr_elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["-"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["array_apply"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT list_transform(l, elem -\u003e elem + 1)) FROM corr_test ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":44,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":35,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":16,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":4,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":4,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":9,"schema_name":"","table_name":"corr_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["corr_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([1, 2, 3], x -\u003e list_transform([4, 5, 6], y -\u003e list_transform([7, 8, 9], (z, i) -\u003e x + y + z + i)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":114,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":87,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":82,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":64,"query_location_length":55,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":50,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":95,"query_location_length":23,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["z"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":115,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":107,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["z"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([1, 2, 3], (x, x_i) -\u003e list_transform([4, 5, 6], (y, y_i) -\u003e x + y + x_i + y_i));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":95,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":68,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":3,"column_names":["x_i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":56,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":71,"query_location_length":29,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["y_i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":3,"column_names":["x_i"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":3,"column_names":["y_i"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_filter(['hello', 'duck', 'sunshine'], lambda str: (CASE WHEN str LIKE '%e%' THEN 'e' ELSE 'other' END) LIKE 'e')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":117,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":29,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":10,"literal":{"kind":"STRING","text":"sunshine"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":50,"query_location_length":73,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["str"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":115,"query_location_length":8,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":63,"query_location_length":50,"case_checks":[{"when_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":5,"literal":{"kind":"STRING","text":"%e%"}}}],"qualified_name":{"path":["~~"]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":7,"literal":{"kind":"STRING","text":"other"}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}}}],"qualified_name":{"path":["~~"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_filter([2], lambda x: (SELECT 1 - x) * x \u003e 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":24,"query_location_length":32,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":34,"query_location_length":22,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":18,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":34,"query_location_length":14,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["*"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_filter([5, NULL, 7, NULL], lambda x: x IS NOT NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":39,"query_location_length":23,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":51,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["x"]}]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT list_filter(l, lambda elem: length(elem) \u003e= 1)) FROM corr_test ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":55,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":46,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":30,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":43,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":12,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":4,"column_names":["elem"]}}],"qualified_name":{"path":["length"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":9,"schema_name":"","table_name":"corr_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["corr_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_apply(i, y + 1 -\u003e x + 1) from (values (list_value(1, 2, 3))) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":21,"query_location_length":14,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"syntax_type":"SINGLE_ARROW"}}],"qualified_name":{"path":["list_apply"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":42,"query_location_length":30,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([1], lambda x: lambda y: x + y) FROM dummy_tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":27,"query_location_length":25,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":37,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":9,"schema_name":"","table_name":"dummy_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dummy_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(qualified_tbl.x, lambda x: (qualified_tbl.x)[1] + 1 + x) FROM qualified_tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":71,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":15,"column_names":["qualified_tbl","x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":39,"query_location_length":38,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":66,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":15,"column_names":["qualified_tbl","x"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":84,"query_location_length":13,"schema_name":"","table_name":"qualified_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["qualified_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(list_filter([0, 1, 2, 3, 4, 5], lambda x: x % 2 = 0), lambda y: y * y)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":85,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":52,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":54,"query_location_length":19,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":76,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":5,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["*"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([1, 2, 3], lambda x, y: x * y);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":5,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["*"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(a, lambda x, y: x + y) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([['a', 'b'], ['c', 'd'], ['e', 'f']], lambda x, y: list_pack(list_reduce(x, lambda a, b: a || b) || list_reduce(y, lambda c, d: c || d)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":149,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":36,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"STRING","text":"d"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"STRING","text":"f"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":57,"query_location_length":98,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":85,"function_name":"list_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":74,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":35,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":95,"query_location_length":19,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":6,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["||"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":119,"query_location_length":35,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":134,"query_location_length":19,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["d"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":147,"query_location_length":6,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["||"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["list_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(s, lambda a, b: row(a.v || b.v, a.i + b.i)) FROM t_struct;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":39,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":26,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":10,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":3,"column_names":["a","v"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":3,"column_names":["b","v"]}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":3,"column_names":["a","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":3,"column_names":["b","i"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["row"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":8,"schema_name":"","table_name":"t_struct","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_struct"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(l, lambda acc, x: acc + x + v + initial, 0),\n list_reduce(l, lambda acc, x, i: acc + x + v + i, 0)\nFROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":36,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":3,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":7,"column_names":["initial"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["list_reduce"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":52,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":86,"query_location_length":33,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":116,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":3,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":129,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([1, 2, 3], lambda x, y: x + y, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":18,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce(l, lambda x, y, i: x + y + i, initial) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":22,"query_location_length":25,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":7,"column_names":["initial"]}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([['a', 'b'], ['c', 'd'], ['e', 'f']], lambda x, y: list_pack(list_reduce(x, lambda a, b: a || b) || list_reduce(y, lambda c, d: c || d)), ['-\u003e']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":157,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":36,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"STRING","text":"d"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"STRING","text":"f"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":57,"query_location_length":98,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":85,"function_name":"list_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":74,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":35,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":95,"query_location_length":19,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":6,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["||"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":119,"query_location_length":35,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":134,"query_location_length":19,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["d"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":147,"query_location_length":6,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["||"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_reduce"]}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["list_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":157,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":4,"literal":{"kind":"STRING","text":"-\u003e"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \nlist_reduce(\n [struct_pack(a := 0, b := 0), struct_pack(a := 0, b := 1), struct_pack(a := 0, b := 2)],\n lambda curr, next: struct_pack(a := curr.a + (next.b - curr.b), b := next.b), struct_pack(a := -2, b := -3)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":219,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":87,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":101,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":118,"query_location_length":76,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["curr"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["next"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":161,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":6,"column_names":["curr","a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":171,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":6,"column_names":["next","b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":6,"column_names":["curr","b"]}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}},{"name":"b","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":187,"query_location_length":6,"column_names":["next","b"]}}],"qualified_name":{"path":["struct_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":196,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":213,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":222,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-3"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reduce([1, 2, 3], lambda acc, x: acc + x, NULL::DOUBLE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":60,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":30,"query_location_length":22,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":3,"column_names":["acc"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["list_reduce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([1,2], lambda x: list_transform([3,4], lambda y: x + y));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":71,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":29,"query_location_length":48,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":38,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":61,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM read_parquet('{TEST_DIR}/my_file_' ||\nlist_aggr(list_transform(list_filter(['s', 'c', 'b', NULL, 'a'], lambda x: x IS NOT NULL AND x != 's'),\nlambda s: lower(s)), 'string_agg', '') || '.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":195,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":181,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":21,"literal":{"kind":"STRING","text":"{TEST_DIR}/my_file_"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":142,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":113,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":77,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":3,"literal":{"kind":"STRING","text":"s"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":124,"query_location_length":36,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":134,"query_location_length":26,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":136,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["x"]}]},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":152,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":3,"literal":{"kind":"STRING","text":"s"}}}]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":163,"query_location_length":18,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["s"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":173,"query_location_length":8,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["lower"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":12,"literal":{"kind":"STRING","text":"string_agg"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["list_aggr"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":205,"query_location_length":10,"literal":{"kind":"STRING","text":".parquet"}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([1, 2, 3], lambda x: x + 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([[1], [2], [3]], lambda x : list_concat(\n\tlist_transform(x, lambda y: y + 1),\n\tlist_transform(x, lambda z: z - 1)))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":130,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":39,"query_location_length":97,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":86,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":34,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":82,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":34,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":119,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["z"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":131,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":1,"column_names":["z"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}}],"qualified_name":{"path":["list_concat"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([{'b' : {'a': [{'c': 77}], 'b': 43}}], lambda x: x.b.a[1].c);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":75,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":35,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":30,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":36,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":43,"query_location_length":2,"literal":{"kind":"INTEGER","text":"77"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":61,"query_location_length":20,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":71,"query_location_length":10,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":76,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":5,"column_names":["x","b","a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":2,"literal":{"kind":"STRING","text":"c"}}]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform([1, 2, 3], lambda x: list_transform([4, 5, 6], lambda y, y_i: x + y + y_i));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":90,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":33,"query_location_length":63,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":53,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":69,"query_location_length":26,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["y_i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":3,"column_names":["y_i"]}}],"qualified_name":{"path":["+"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(a, lambda x, i: (c / b ) * (x + i)) FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":25,"query_location_length":31,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["i"]}}],"qualified_name":{"path":["row"]}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":18,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["/"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["*"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_concat(NULL, [3, 4])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_concat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1, 2] || [3, 4]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_concat([{a: 1}, {a: 2}], [{a: 3}, {a: 4}])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"list_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":6,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_concat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_prepend(1, [2, 3])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"array_prepend","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["array_prepend"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, list_contains(i,'a') from STR_TEST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":20,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"STR_TEST","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["STR_TEST"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains(NULL,NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains([NULL],NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains([[1,2,3],[1]],[1,2,3])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains([MAP([1], [2])], MAP([1], [3]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["list_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_cosine_similarity([], []);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"list_cosine_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_cosine_similarity"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_distinct()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_distinct"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_distinct([NULL::VARCHAR])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_distinct"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name FROM wheretest WHERE name ILIKE 'one%' AND list_unique(list_distinct(l)) \u003e 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":9,"schema_name":"","table_name":"wheretest","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["wheretest"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":33,"query_location_length":55,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":12,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":4,"column_names":["name"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":6,"literal":{"kind":"STRING","text":"one%"}}}],"qualified_name":{"path":["~~*"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":55,"query_location_length":33,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":29,"function_name":"list_unique","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":16,"function_name":"list_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["list_distinct"]}}}],"qualified_name":{"path":["list_unique"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_has_all([1,2,3], [2,3,4]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"list_has_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_has_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_has_any([[1,2], [2,4]], ['abc', 'def']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"list_has_any","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"literal":{"kind":"STRING","text":"def"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_has_any"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select l1 @\u003e NULL from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"@\u003e","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["l1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["@\u003e"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_sort(list_intersect([10, 20, 30, 40, 50], [20, 40]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":46,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_intersect"]}}}],"qualified_name":{"path":["list_sort"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_sort(list_intersect([1::INT, 2::INT, 3::INT], [2.0::DOUBLE, 3.0::DOUBLE, 4.0::DOUBLE]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":92,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":81,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":39,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"4.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_intersect"]}}}],"qualified_name":{"path":["list_sort"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_position([7,2,5], 7)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["list_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_position([1,2,3,4],5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_position([NULL, 0],1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_position([[NULL],[1], [1,2,3]],[NULL])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_position([[1,2,3],NULL],NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM no_null_elements WHERE list_position(a, NULL) IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":16,"schema_name":"","table_name":"no_null_elements","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["no_null_elements"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":67,"query_location_length":11,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":22,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_position"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_resize([1,2,3], NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_resize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select list_resize(list_filter([1, 2, 3, 4, 5, 6], lambda x: x \u003e 1), 4);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":64,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":48,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":51,"query_location_length":15,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":61,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_resize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LIST_RESIZE([1, 2, 3], 9999999999999999999);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"list_resize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9999999999999999999"}}}],"qualified_name":{"path":["list_resize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reverse(list_reverse([1, 3, 3, 42, 117, 69, NULL]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":42,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":28,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":3,"literal":{"kind":"INTEGER","text":"117"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":2,"literal":{"kind":"INTEGER","text":"69"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_reverse"]}}}],"qualified_name":{"path":["list_reverse"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_reverse(42)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_reverse"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([[1], [1, 2], NULL, [NULL], [], [1, 2, 3]]).list_reverse()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":14,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":42,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_reverse"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_sort([INTERVAL '25 hours', INTERVAL '1 day 1 hour', INTERVAL '1500 minutes'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":71,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":10,"literal":{"kind":"STRING","text":"25 hours"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":14,"literal":{"kind":"STRING","text":"1 day 1 hour"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":14,"literal":{"kind":"STRING","text":"1500 minutes"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_sort"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_sort([3, 1, 2]), list_grade_up([3, 1, 2]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"list_sort","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_sort"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":24,"function_name":"list_grade_up","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_grade_up"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_unique([1, 1, -5, 10, 10, 2])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_unique","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_unique"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_unique(['2021-08-20 00:00:00.123456'::TIMESTAMP_NS])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"list_unique","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":44,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":28,"literal":{"kind":"STRING","text":"2021-08-20 00:00:00.123456"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_unique"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_value([1.5, 2.5]::DOUBLE[2], [3, 4]::INTEGER[2], [5, 6]::INTEGER[2]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":73,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.5"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_value([1, 2]::INTEGER[2], [3, 4, 5]::INTEGER[3], [6]::INTEGER[1]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":70,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["array"]}}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LIST_VALUE(['a', 'a'], ['b', 'b', 'b'], ['c'], NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_value({'a': 1, 'b': 'a'}, {'a': 2, 'b': 'b'}, {'a': NULL, 'b': 'c'});","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":73,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":32,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":52,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":64,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":75,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_where([true, false, NULL, true, true, NULL], [true, false, true, true, true, true])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":88,"function_name":"list_where","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_where"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_where([INTERVAL 1 YEAR], [true])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"list_where","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_years"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_where"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_zip([1,2,3], [1,2,3])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_zip"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_zip(a.i, b.i, b.i) FROM integers AS a, integers AS b order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["a","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":3,"column_names":["b","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":3,"column_names":["b","i"]}}],"qualified_name":{"path":["list_zip"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":31,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":36,"query_location_length":13,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":51,"query_location_length":13,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_zip(['2021-08-20'::DATE])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":12,"literal":{"kind":"STRING","text":"2021-08-20"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_zip"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_zip(e) FROM enums","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"list_zip","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["e"]}}],"qualified_name":{"path":["list_zip"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":5,"schema_name":"","table_name":"enums","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["enums"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT repeat([1], 10);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["repeat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT repeat([1, 2, 3], 6148914691236517206);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":19,"literal":{"kind":"INTEGER","text":"6148914691236517206"}}}],"qualified_name":{"path":["repeat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (ROW(42, 84))[9223372036854775807]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":20,"query_location_length":21,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"literal":{"kind":"INTEGER","text":"84"}}}],"qualified_name":{"path":["row"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775807"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_update ({a: 1, b: 2}, c := 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_update","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":12,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"c","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["struct_update"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_update(col, i:=col.i+1) FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"struct_update","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":3,"column_names":["col"]}},{"name":"i","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":34,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":5,"column_names":["col","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["struct_update"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 10.0 % 2.4, -10.0 % 2.4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"10.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.4"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":11,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"-10.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.4"}}}],"qualified_name":{"path":["%"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT binom(5, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"binom","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["binom"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT binom(6, -3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"binom","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-3"}}}],"qualified_name":{"path":["binom"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT factorial(0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"factorial","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["factorial"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT fdiv(42, 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"fdiv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["fdiv"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(CEIL(n::float) as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":30,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":14,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}}],"qualified_name":{"path":["ceil"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT gamma(1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"gamma","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["gamma"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lgamma(2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"lgamma","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["lgamma"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lcm(42, NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"lcm","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["lcm"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sqrt(-1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"sqrt","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["sqrt"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select nextafter('bla','bla')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"nextafter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":5,"literal":{"kind":"STRING","text":"bla"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"literal":{"kind":"STRING","text":"bla"}}}],"qualified_name":{"path":["nextafter"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select nextafter(a, b) from test_twoc","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"nextafter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["nextafter"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":9,"schema_name":"","table_name":"test_twoc","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_twoc"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select sqrt(2.0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"sqrt","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.0"}}}],"qualified_name":{"path":["sqrt"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select log(1, 64)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"log","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"literal":{"kind":"INTEGER","text":"64"}}}],"qualified_name":{"path":["log"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select pow(b, a) from powerme","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"pow","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["pow"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"powerme","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["powerme"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select setseed(a), a from seeds;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"setseed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["setseed"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":5,"schema_name":"","table_name":"seeds","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["seeds"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select round(b, 1) from roundme","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":7,"schema_name":"","table_name":"roundme","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["roundme"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT roundBankers(45, -1), roundBankers(35, -1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"roundbankers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"45"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["roundbankers"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":20,"function_name":"roundbankers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":2,"literal":{"kind":"INTEGER","text":"35"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["roundbankers"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT round_even(1.125, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"round_even","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1.125"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["round_even"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT round(32767::SMALLINT, -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":5,"literal":{"kind":"INTEGER","text":"32767"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(SIN(n::tinyint)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":36,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":15,"function_name":"sin","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["n"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"tinyint","children":[],"qualified_name":{"path":["tinyint"]}}}}],"qualified_name":{"path":["sin"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(TAN(n::tinyint)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":36,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":15,"function_name":"tan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["n"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"tinyint","children":[],"qualified_name":{"path":["tinyint"]}}}}],"qualified_name":{"path":["tan"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(ASIN(n::tinyint)*1000 as bigint) FROM numbers WHERE n between -1 and 1 ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":21,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":16,"function_name":"asin","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"tinyint","children":[],"qualified_name":{"path":["tinyint"]}}}}],"qualified_name":{"path":["asin"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":67,"query_location_length":16,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["n"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(ASIN(n)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":12,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":7,"function_name":"asin","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["asin"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(ATAN2(n::double, 42)*1000 as bigint) FROM numbers ORDER BY n","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":41,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":25,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":20,"function_name":"atan2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["n"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["atan2"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":7,"schema_name":"","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select cosh(-1), cosh(0), cosh(1), cosh(1000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"cosh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["cosh"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"cosh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["cosh"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":7,"function_name":"cosh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["cosh"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":10,"function_name":"cosh","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["cosh"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::SMALLINT + 1::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::BIGINT + 1::SMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::REAL + 1::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -+-+-+-+-i FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 2*i=6, 6=2*i FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["*"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":14,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":3,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["*"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 \u003c\u003c 2, NULL \u003c\u003c 2, 2 \u003c\u003c NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["\u003c\u003c"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":9,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["\u003c\u003c"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":9,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["\u003c\u003c"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::UTINYINT \u003c\u003c 7, 1::USMALLINT \u003c\u003c 15, 1::UINT32 \u003c\u003c 31, 1::UBIGINT \u003c\u003c 63","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["\u003c\u003c"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":18,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}}}],"qualified_name":{"path":["\u003c\u003c"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":15,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":6,"catalog":"","schema":"","type_name":"UINT32","children":[],"qualified_name":{"path":["UINT32"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":2,"literal":{"kind":"INTEGER","text":"31"}}}],"qualified_name":{"path":["\u003c\u003c"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":16,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":2,"literal":{"kind":"INTEGER","text":"63"}}}],"qualified_name":{"path":["\u003c\u003c"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '1000' \u003e 20","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":11,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"1000"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT true OR true","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":7,"query_location_length":12,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i\u003e3 AND false FROM a ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":7,"query_location_length":13,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT d, ttz, ttz + d\nFROM dates, timetzs\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":3,"column_names":["ttz"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["ttz"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 7 // 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["//"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT format_bytes(1023);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"format_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1023"}}}],"qualified_name":{"path":["format_bytes"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT format_bytes(9223372036854775807);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"format_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775807"}}}],"qualified_name":{"path":["format_bytes"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT format('{:.3f}', 1.5), printf('%.2f', 2.25), length(format('{:.{}f}', 1.5, 1000000))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":8,"literal":{"kind":"STRING","text":"{:.3f}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["format"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":20,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":6,"literal":{"kind":"STRING","text":"%.2f"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"2.25"}}}],"qualified_name":{"path":["printf"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":39,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":31,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":9,"literal":{"kind":"STRING","text":"{:.{}f}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":7,"literal":{"kind":"INTEGER","text":"1000000"}}}],"qualified_name":{"path":["format"]}}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_binary(columns('^(.*int|varchar|bignum)$')) FROM test_all_types();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"to_binary","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":17,"query_location_length":35,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":26,"literal":{"kind":"STRING","text":"^(.*int|varchar|bignum)$"}},"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["to_binary"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":59,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t0 WHERE t0.c0 LIKE '_';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":8,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["t0","c0"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"STRING","text":"_"}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select md5_number_lower('hello'), md5_number_lower(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"md5_number_lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["md5_number_lower"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":22,"function_name":"md5_number_lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["md5_number_lower"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'a': v} FROM null_byte","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":13,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"null_byte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_byte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT OVERLAY('abcdef', 'XX', 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"overlay","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":8,"literal":{"kind":"STRING","text":"abcdef"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"STRING","text":"XX"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["overlay"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT overlay('33333rce' placing 'resou' from 1 FOR -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"overlay","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":10,"literal":{"kind":"STRING","text":"33333rce"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":7,"literal":{"kind":"STRING","text":"resou"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["overlay"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT overlay('abc' placing 'XY' from 5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"overlay","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"STRING","text":"XY"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["overlay"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_formatted_bytes('2 MB');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"literal":{"kind":"STRING","text":"2 MB"}}}],"qualified_name":{"path":["parse_formatted_bytes"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_formatted_bytes('null');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}}],"qualified_name":{"path":["parse_formatted_bytes"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try(parse_formatted_bytes('-5 MB'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":7,"query_location_length":35,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":30,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":7,"literal":{"kind":"STRING","text":"-5 MB"}}}],"qualified_name":{"path":["parse_formatted_bytes"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_formatted_bytes('18446744073709 KB');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"parse_formatted_bytes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":19,"literal":{"kind":"STRING","text":"18446744073709 KB"}}}],"qualified_name":{"path":["parse_formatted_bytes"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_path(NULL, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["parse_path"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_dirname('\\', 'backslash');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"parse_dirname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":11,"literal":{"kind":"STRING","text":"backslash"}}}],"qualified_name":{"path":["parse_dirname"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_dirname();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"parse_dirname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["parse_dirname"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_dirpath('path/to/file.csv', NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"parse_dirpath","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":18,"literal":{"kind":"STRING","text":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["parse_dirpath"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_filename('path/to/file.csv\\file2', true, 'forward_slash');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":24,"literal":{"kind":"STRING","text":"path/to/file.csv\\file2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":15,"literal":{"kind":"STRING","text":"forward_slash"}}}],"qualified_name":{"path":["parse_filename"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_filename('wh@t3ve%\\42/12 ch,ars.sth', true, 'both_slash');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":27,"literal":{"kind":"STRING","text":"wh@t3ve%\\42/12 ch,ars.sth"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":12,"literal":{"kind":"STRING","text":"both_slash"}}}],"qualified_name":{"path":["parse_filename"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT parse_filename('path/to/file.csv', 'system', 'true');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":18,"literal":{"kind":"STRING","text":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":8,"literal":{"kind":"STRING","text":"system"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":6,"literal":{"kind":"STRING","text":"true"}}}],"qualified_name":{"path":["parse_filename"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (VALUES (parse_path('path\\to\\file.csv/file2.csv', 'system')), (parse_path('path/to/file.csv\\file2.csv', 'both_slash')), (parse_path('path/to/file.csv', 'forward_slash')), (parse_path('path\\to\\file.csv/file2.csv', 'backslash'))) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":227,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":50,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":28,"literal":{"kind":"STRING","text":"path\\to\\file.csv/file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":8,"literal":{"kind":"STRING","text":"system"}}}],"qualified_name":{"path":["parse_path"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":54,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":28,"literal":{"kind":"STRING","text":"path/to/file.csv\\file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":12,"literal":{"kind":"STRING","text":"both_slash"}}}],"qualified_name":{"path":["parse_path"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":135,"query_location_length":47,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":18,"literal":{"kind":"STRING","text":"path/to/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":15,"literal":{"kind":"STRING","text":"forward_slash"}}}],"qualified_name":{"path":["parse_path"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":186,"query_location_length":53,"function_name":"parse_path","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":197,"query_location_length":28,"literal":{"kind":"STRING","text":"path\\to\\file.csv/file2.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":227,"query_location_length":11,"literal":{"kind":"STRING","text":"backslash"}}}],"qualified_name":{"path":["parse_path"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT path_join('dir/subdir', '../sibling');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"path_join","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":12,"literal":{"kind":"STRING","text":"dir/subdir"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":12,"literal":{"kind":"STRING","text":"../sibling"}}}],"qualified_name":{"path":["path_join"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT path_join('/foo', 's3://foo');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"path_join","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"literal":{"kind":"STRING","text":"/foo"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":10,"literal":{"kind":"STRING","text":"s3://foo"}}}],"qualified_name":{"path":["path_join"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT path_join('file://localhost');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"path_join","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":18,"literal":{"kind":"STRING","text":"file://localhost"}}}],"qualified_name":{"path":["path_join"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract(filename, 'rundate_(\\d+-\\d+-\\d+)_pass_(\\d+)', ['rundate', 'pass', 'overflow']) AS groups\nFROM filenames","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"groups","query_location":7,"query_location_length":93,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":8,"column_names":["filename"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":34,"literal":{"kind":"STRING","text":"rundate_(\\d+-\\d+-\\d+)_pass_(\\d+)"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":31,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":9,"literal":{"kind":"STRING","text":"rundate"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":6,"literal":{"kind":"STRING","text":"pass"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":10,"literal":{"kind":"STRING","text":"overflow"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["regexp_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":116,"query_location_length":9,"schema_name":"","table_name":"filenames","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["filenames"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_escape(c) FROM tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"regexp_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["regexp_escape"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract(s, p, i) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["p"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["regexp_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract(s, p, o) FROM test_opts","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["p"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["o"]}}],"qualified_name":{"path":["regexp_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"test_opts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_opts"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('1a 2b 14m', '(\\d+)', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":11,"literal":{"kind":"STRING","text":"1a 2b 14m"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":7,"literal":{"kind":"STRING","text":"(\\d+)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('1a 2b 14m', '(\\\\d+)([a-z]+)', 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":11,"literal":{"kind":"STRING","text":"1a 2b 14m"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":16,"literal":{"kind":"STRING","text":"(\\\\d+)([a-z]+)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regexp_extract_all('', 'abc')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regexp_extract_all('щцф', '.{3}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":8,"literal":{"kind":"STRING","text":"щцф"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":6,"literal":{"kind":"STRING","text":".{3}"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regexp_extract_all('this_is__a___Test', '(.*?)(?:_|$)')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":19,"literal":{"kind":"STRING","text":"this_is__a___Test"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":14,"literal":{"kind":"STRING","text":"(.*?)(?:_|$)"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT str, \n REGEXP_EXTRACT_ALL(str,'a(bc)?d') AS matched\nFROM (\n VALUES ('ad'), ('abd'), ('acd'), ('abcd'), ('abce'), ('abcxd'), ('abcbcd')\n) AS t(str)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["str"]},{"class":"FUNCTION","type":"FUNCTION","alias":"matched","query_location":15,"query_location_length":33,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":9,"literal":{"kind":"STRING","text":"a(bc)?d"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":65,"query_location_length":80,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"STRING","text":"ad"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":5,"literal":{"kind":"STRING","text":"abd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":5,"literal":{"kind":"STRING","text":"acd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":6,"literal":{"kind":"STRING","text":"abcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":6,"literal":{"kind":"STRING","text":"abce"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":7,"literal":{"kind":"STRING","text":"abcxd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":8,"literal":{"kind":"STRING","text":"abcbcd"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["str"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT str, \n REGEXP_EXTRACT_ALL(str,'(ab){2}cd') AS m1,\n REGEXP_EXTRACT_ALL(str,'(ab){1,}cd') AS m2,\n REGEXP_EXTRACT_ALL(str,'(ab){1,2}cd') AS m3,\n REGEXP_EXTRACT_ALL(str,'(ab){0,2}cd') AS m4\nFROM (\n VALUES ('acd'), ('bcd'),('abcd'), ('abbcd'), ('ababcd'), ('ab1cd')\n) AS t(str)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["str"]},{"class":"FUNCTION","type":"FUNCTION","alias":"m1","query_location":15,"query_location_length":35,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":11,"literal":{"kind":"STRING","text":"(ab){2}cd"}}}],"qualified_name":{"path":["regexp_extract_all"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"m2","query_location":62,"query_location_length":36,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":12,"literal":{"kind":"STRING","text":"(ab){1,}cd"}}}],"qualified_name":{"path":["regexp_extract_all"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"m3","query_location":109,"query_location_length":37,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":13,"literal":{"kind":"STRING","text":"(ab){1,2}cd"}}}],"qualified_name":{"path":["regexp_extract_all"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"m4","query_location":156,"query_location_length":37,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":13,"literal":{"kind":"STRING","text":"(ab){0,2}cd"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":205,"query_location_length":72,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":217,"query_location_length":5,"literal":{"kind":"STRING","text":"acd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":5,"literal":{"kind":"STRING","text":"bcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":234,"query_location_length":6,"literal":{"kind":"STRING","text":"abcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":244,"query_location_length":7,"literal":{"kind":"STRING","text":"abbcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":255,"query_location_length":8,"literal":{"kind":"STRING","text":"ababcd"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":267,"query_location_length":7,"literal":{"kind":"STRING","text":"ab1cd"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["str"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select regexp_extract_all('foobarbaz', '(BA[R|Z])', 1, 'i');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":11,"literal":{"kind":"STRING","text":"foobarbaz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":11,"literal":{"kind":"STRING","text":"(BA[R|Z])"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"literal":{"kind":"STRING","text":"i"}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('ab ac a', '(a)(b)?(c)?', ['a','b','c']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":59,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":9,"literal":{"kind":"STRING","text":"ab ac a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":13,"literal":{"kind":"STRING","text":"(a)(b)?(c)?"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('hi', '(h|i)?(Z)?', ['ch','z']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":50,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"STRING","text":"hi"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":12,"literal":{"kind":"STRING","text":"(h|i)?(Z)?"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":4,"literal":{"kind":"STRING","text":"ch"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('abcd', 'a(bc)*', ['g1']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":44,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":6,"literal":{"kind":"STRING","text":"abcd"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":8,"literal":{"kind":"STRING","text":"a(bc)*"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"literal":{"kind":"STRING","text":"g1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('abbbcd', '(ab){0,2}cd', ['g1']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":51,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":8,"literal":{"kind":"STRING","text":"abbbcd"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":13,"literal":{"kind":"STRING","text":"(ab){0,2}cd"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":4,"literal":{"kind":"STRING","text":"g1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_extract_all('', '()', ['empty']) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":39,"function_name":"regexp_extract_all","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"STRING","text":"()"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":7,"literal":{"kind":"STRING","text":"empty"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["regexp_extract_all"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM strings WHERE regexp_extract(s, '(missing)', 1, 'k') = s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":35,"query_location_length":42,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":38,"function_name":"regexp_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":11,"literal":{"kind":"STRING","text":"(missing)"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":3,"literal":{"kind":"STRING","text":"k"}}}],"qualified_name":{"path":["regexp_extract"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["s"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s FROM regex WHERE REGEXP_MATCHES(s, 'as(c|d|e)f') AND s = 'asdf'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"regex","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["regex"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":46,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":31,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":12,"literal":{"kind":"STRING","text":"as(c|d|e)f"}}}],"qualified_name":{"path":["regexp_matches"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":6,"literal":{"kind":"STRING","text":"asdf"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'abc' ~ ANY(['b', 'z'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":23,"case_checks":[{"when_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]}}],"qualified_name":{"path":["regexp_matches"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["list_contains"]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"true"}}},{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]}}],"qualified_name":{"path":["regexp_matches"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_match"]},"expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_match"]}]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}}],"qualified_name":{"path":["len"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"false"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'abc' ~* ANY(['B', 'ABC'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":26,"case_checks":[{"when_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":5,"literal":{"kind":"STRING","text":"ABC"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"i"}}}],"qualified_name":{"path":["regexp_matches"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["list_contains"]}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"true"}}},{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":5,"literal":{"kind":"STRING","text":"ABC"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_pattern"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"i"}}}],"qualified_name":{"path":["regexp_matches"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_match"]},"expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__regex_match"]}]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}}],"qualified_name":{"path":["len"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"BOOLEAN","text":"false"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_replace('hello\nworld', '.*', 'x', 'sg')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":13,"literal":{"kind":"STRING","text":"hello\nworld"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"STRING","text":".*"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"literal":{"kind":"STRING","text":"sg"}}}],"qualified_name":{"path":["regexp_replace"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_replace('left-right', '^([^-]+)-([^-]+)$', '\\2');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":12,"literal":{"kind":"STRING","text":"left-right"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":19,"literal":{"kind":"STRING","text":"^([^-]+)-([^-]+)$"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"STRING","text":"\\2"}}}],"qualified_name":{"path":["regexp_replace"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_replace(s, pat, repl) FROM t_repl_invalid;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":3,"column_names":["pat"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":4,"column_names":["repl"]}}],"qualified_name":{"path":["regexp_replace"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":14,"schema_name":"","table_name":"t_repl_invalid","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_repl_invalid"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_matches('', '.*yu.*')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":8,"literal":{"kind":"STRING","text":".*yu.*"}}}],"qualified_name":{"path":["regexp_matches"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_matches('as^/$df', '^/$')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"literal":{"kind":"STRING","text":"as^/$df"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"literal":{"kind":"STRING","text":"^/$"}}}],"qualified_name":{"path":["regexp_matches"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT regexp_replace('ä', '\\C', 'x')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"STRING","text":"ä"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"STRING","text":"\\C"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}}],"qualified_name":{"path":["regexp_replace"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strip_accents(regexp_replace(s, p, '')) FROM t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"strip_accents","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":24,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["p"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["regexp_replace"]}}}],"qualified_name":{"path":["strip_accents"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"from data\nwhere regexp_matches(zipcode, '^00\\x{0020}001$')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":4,"schema_name":"","table_name":"data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":42,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":7,"column_names":["zipcode"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":17,"literal":{"kind":"STRING","text":"^00\\x{0020}001$"}}}],"qualified_name":{"path":["regexp_matches"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sha1()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sha1","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["sha1"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_extract('🦆ab', 4), array_extract('abc', 4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"array_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":8,"literal":{"kind":"STRING","text":"🦆ab"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["array_extract"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":23,"function_name":"array_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["array_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_extract(s, -2147483647) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"array_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":11,"literal":{"kind":"INTEGER","text":"-2147483647"}}}],"qualified_name":{"path":["array_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ASCII()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"ascii","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["ascii"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select bar(100, 200, 0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"bar","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["bar"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select bar(1, 0, 'infinity'::double)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"bar","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}}}],"qualified_name":{"path":["bar"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select bar(1, 0, 1, 1.5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"bar","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["bar"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select UPPER('áaaá'), UPPER('ö'), LOWER('S̈'), UPPER('ω')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":8,"literal":{"kind":"STRING","text":"áaaá"}}}],"qualified_name":{"path":["upper"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":11,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"STRING","text":"ö"}}}],"qualified_name":{"path":["upper"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":12,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":5,"literal":{"kind":"STRING","text":"S̈"}}}],"qualified_name":{"path":["lower"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":11,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"STRING","text":"ω"}}}],"qualified_name":{"path":["upper"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT length_grapheme('🤦🏼‍♂️ L🤦🏼‍♂️R 🤦🏼‍♂️')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":74,"function_name":"length_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":57,"literal":{"kind":"STRING","text":"🤦🏼‍♂️ L🤦🏼‍♂️R 🤦🏼‍♂️"}}}],"qualified_name":{"path":["length_grapheme"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT substring_grapheme('S̈a︍', 2, 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"substring_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":9,"literal":{"kind":"STRING","text":"S̈a︍"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["substring_grapheme"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [1] || [2];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [1] || [2] || [3];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select CONCAT_WS(a, b, 'SUFFIX') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"concat_ws","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":8,"literal":{"kind":"STRING","text":"SUFFIX"}}}],"qualified_name":{"path":["concat_ws"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select CONCAT_WS(',', '', '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"concat_ws","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":","}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["concat_ws"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select CONCAT_WS(',', ['a', NULL, 'b'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"concat_ws","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":","}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["concat_ws"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CONTAINS('hello world', 'h'),\n CONTAINS('hello world', 'he'),\n CONTAINS('hello world', 'hel'),\n CONTAINS('hello world', 'hell'),\n CONTAINS('hello world', 'hello'),\n CONTAINS('hello world', 'hello '),\n CONTAINS('hello world', 'hello w'),\n CONTAINS('hello world', 'hello wo'),\n CONTAINS('hello world', 'hello wor'),\n CONTAINS('hello world', 'hello worl')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"STRING","text":"h"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":29,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"literal":{"kind":"STRING","text":"he"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":30,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":5,"literal":{"kind":"STRING","text":"hel"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":121,"query_location_length":31,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":6,"literal":{"kind":"STRING","text":"hell"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":161,"query_location_length":32,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":170,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":202,"query_location_length":33,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":211,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":8,"literal":{"kind":"STRING","text":"hello "}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":244,"query_location_length":34,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":253,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":268,"query_location_length":9,"literal":{"kind":"STRING","text":"hello w"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":287,"query_location_length":35,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":296,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":311,"query_location_length":10,"literal":{"kind":"STRING","text":"hello wo"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":331,"query_location_length":36,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":340,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":355,"query_location_length":11,"literal":{"kind":"STRING","text":"hello wor"}}}],"qualified_name":{"path":["contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":376,"query_location_length":37,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":385,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":400,"query_location_length":12,"literal":{"kind":"STRING","text":"hello worl"}}}],"qualified_name":{"path":["contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT contains(s,NULL) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["contains"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT contains(s,'ñ') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"STRING","text":"ñ"}}}],"qualified_name":{"path":["contains"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT damerau_levenshtein('abcdefghi', 'bzacdefig')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":11,"literal":{"kind":"STRING","text":"abcdefghi"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":11,"literal":{"kind":"STRING","text":"bzacdefig"}}}],"qualified_name":{"path":["damerau_levenshtein"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT damerau_levenshtein(NULL, 'drive')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":7,"literal":{"kind":"STRING","text":"drive"}}}],"qualified_name":{"path":["damerau_levenshtein"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT damerau_levenshtein(s, '') FROM strings ORDER BY s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["damerau_levenshtein"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT damerau_levenshtein('null', s) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"damerau_levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["damerau_levenshtein"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT format('{:04d}', 33), format('{} {:02d}:{:02d}:{:02d} {}', 'time', 12, 3, 16, 'AM'), format('{:10d}', 1992)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":8,"literal":{"kind":"STRING","text":"{:04d}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"33"}}}],"qualified_name":{"path":["format"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":61,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":28,"literal":{"kind":"STRING","text":"{} {:02d}:{:02d}:{:02d} {}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":6,"literal":{"kind":"STRING","text":"time"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":2,"literal":{"kind":"INTEGER","text":"16"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":4,"literal":{"kind":"STRING","text":"AM"}}}],"qualified_name":{"path":["format"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":22,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":8,"literal":{"kind":"STRING","text":"{:10d}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1992"}}}],"qualified_name":{"path":["format"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select format('{:d}', 123456789)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"{:d}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"literal":{"kind":"INTEGER","text":"123456789"}}}],"qualified_name":{"path":["format"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select format('{:t|}', 123456789)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"literal":{"kind":"STRING","text":"{:t|}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":9,"literal":{"kind":"INTEGER","text":"123456789"}}}],"qualified_name":{"path":["format"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select format('{L}', 123456789)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"format","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":5,"literal":{"kind":"STRING","text":"{L}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":9,"literal":{"kind":"INTEGER","text":"123456789"}}}],"qualified_name":{"path":["format"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'aaa' GLOB 'a?'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":9,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"STRING","text":"a?"}}}],"qualified_name":{"path":["~~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'a' GLOB '[!0-9]'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":13,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":8,"literal":{"kind":"STRING","text":"[!0-9]"}}}],"qualified_name":{"path":["~~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1245' GLOB '**1***2*******4*5***'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":27,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"1245"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":22,"literal":{"kind":"STRING","text":"**1***2*******4*5***"}}}],"qualified_name":{"path":["~~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'xxa' GLOB '*\\*'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":10,"function_name":"~~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"xxa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"literal":{"kind":"STRING","text":"*\\*"}}}],"qualified_name":{"path":["~~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'aaa' ILIKE 'A%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":10,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"STRING","text":"A%"}}}],"qualified_name":{"path":["~~*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s FROM strings WHERE s LIKE 'ab%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":5,"literal":{"kind":"STRING","text":"ab%"}}}],"qualified_name":{"path":["~~"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM t WHERE s ILIKE 'duckdb%' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":15,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"literal":{"kind":"STRING","text":"duckdb%"}}}],"qualified_name":{"path":["~~*"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM t WHERE s ILIKE NULL ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":10,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["~~*"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 'a%c' ilike 'a$%C' escape '$';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":23,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"a%c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":6,"literal":{"kind":"STRING","text":"a$%C"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"$"}}}],"qualified_name":{"path":["ilike_escape"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT str ILIKE pat ESCAPE str FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":20,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["pat"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":3,"column_names":["str"]}}],"qualified_name":{"path":["ilike_escape"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM t WHERE s ILIKE '%DÉJÀ%' ESCAPE '\\' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":27,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":10,"literal":{"kind":"STRING","text":"%DÉJÀ%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}}],"qualified_name":{"path":["ilike_escape"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM t WHERE s ILIKE '' ESCAPE '\\' ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":19,"function_name":"ilike_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}}],"qualified_name":{"path":["ilike_escape"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT instr(s,'he') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"instr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"he"}}}],"qualified_name":{"path":["instr"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INSTR(s,'你好世界') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"instr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":14,"literal":{"kind":"STRING","text":"你好世界"}}}],"qualified_name":{"path":["instr"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT jaccard('hello', 'hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"jaccard","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["jaccard"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT round(jaccard('aabbccddeeffg', 'ab'), 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":30,"function_name":"jaccard","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":15,"literal":{"kind":"STRING","text":"aabbccddeeffg"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"STRING","text":"ab"}}}],"qualified_name":{"path":["jaccard"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select round(jaccard(s, ''), 1) from strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":14,"function_name":"jaccard","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["jaccard"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select jaro_winkler_similarity(null, null)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"jaro_winkler_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["jaro_winkler_similarity"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select jaro_winkler_similarity('fly', 'ant')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"jaro_winkler_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":5,"literal":{"kind":"STRING","text":"fly"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":5,"literal":{"kind":"STRING","text":"ant"}}}],"qualified_name":{"path":["jaro_winkler_similarity"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select jaro_winkler_similarity('000000000000000000000000000000000000000000000000000000000000000', '00000000000000000000000000000000000000000000000000000000000000000', 0.995)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":166,"function_name":"jaro_winkler_similarity","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":65,"literal":{"kind":"STRING","text":"000000000000000000000000000000000000000000000000000000000000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":67,"literal":{"kind":"STRING","text":"00000000000000000000000000000000000000000000000000000000000000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"0.995"}}}],"qualified_name":{"path":["jaro_winkler_similarity"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT levenshtein('hallo', 'hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"literal":{"kind":"STRING","text":"hallo"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["levenshtein"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT levenshtein(NULL, '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["levenshtein"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT levenshtein(s, 'hi') from strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"levenshtein","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"STRING","text":"hi"}}}],"qualified_name":{"path":["levenshtein"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'aaa' LIKE 'aaa'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":10,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"literal":{"kind":"STRING","text":"aaa"}}}],"qualified_name":{"path":["~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'ababac' LIKE 'abab%%%%%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":16,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"literal":{"kind":"STRING","text":"ababac"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":11,"literal":{"kind":"STRING","text":"abab%%%%%"}}}],"qualified_name":{"path":["~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'zebra elephant tiger horse' LIKE 'zebra elephant tiger horse blabla%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":41,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"literal":{"kind":"STRING","text":"zebra elephant tiger horse"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":36,"literal":{"kind":"STRING","text":"zebra elephant tiger horse blabla%"}}}],"qualified_name":{"path":["~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'zebra elephant tiger horse' NOT LIKE '%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":8,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"literal":{"kind":"STRING","text":"zebra elephant tiger horse"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"%"}}}],"qualified_name":{"path":["!~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'zebra elephant tiger horse' NOT LIKE 'zebra%tiger%elephant%horse'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":33,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"literal":{"kind":"STRING","text":"zebra elephant tiger horse"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":28,"literal":{"kind":"STRING","text":"zebra%tiger%elephant%horse"}}}],"qualified_name":{"path":["!~~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ' a ' LIKE '*_ ' ESCAPE '*';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":21,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":" a "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"literal":{"kind":"STRING","text":"*_ "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"STRING","text":"*"}}}],"qualified_name":{"path":["like_escape"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'abc' LIKE 'abc%%' ESCAPE '%', 'abc%' LIKE 'abc%%' ESCAPE '%'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":23,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":7,"literal":{"kind":"STRING","text":"abc%%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"%"}}}],"qualified_name":{"path":["like_escape"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":23,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":6,"literal":{"kind":"STRING","text":"abc%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":7,"literal":{"kind":"STRING","text":"abc%%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":3,"literal":{"kind":"STRING","text":"%"}}}],"qualified_name":{"path":["like_escape"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT like_escape('x%y%z', '%\\%%\\%%\\%%', '\\');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"literal":{"kind":"STRING","text":"x%y%z"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":12,"literal":{"kind":"STRING","text":"%\\%%\\%%\\%%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}}],"qualified_name":{"path":["like_escape"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT mismatches(NULL, s) FROM strings ORDER BY s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"mismatches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["mismatches"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT hamming(s, 'hallo') FROM strings WHERE s = 'hello'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"hamming","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":7,"literal":{"kind":"STRING","text":"hallo"}}}],"qualified_name":{"path":["hamming"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select LPAD(a, 12, b), RPAD(a, 12, b), UCASE(a), LCASE(a) FROM strings WHERE b IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"lpad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["lpad"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":14,"function_name":"rpad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["rpad"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":8,"function_name":"ucase","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["ucase"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":8,"function_name":"lcase","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["lcase"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":79,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["b"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select RPAD('', 1100000000, '😀')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"rpad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"literal":{"kind":"INTEGER","text":"1100000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":6,"literal":{"kind":"STRING","text":"😀"}}}],"qualified_name":{"path":["rpad"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT prefix('abcdefgh', 'ab')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":10,"literal":{"kind":"STRING","text":"abcdefgh"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"STRING","text":"ab"}}}],"qualified_name":{"path":["prefix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT prefix('abcdefghijklmnopqrstuvwxyz', 'abcfefghijklmnopqrstuvwx')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":64,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":28,"literal":{"kind":"STRING","text":"abcdefghijklmnopqrstuvwxyz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":26,"literal":{"kind":"STRING","text":"abcfefghijklmnopqrstuvwx"}}}],"qualified_name":{"path":["prefix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT prefix('two ñ three ₡ four 🦆 end', 'two n')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"prefix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":32,"literal":{"kind":"STRING","text":"two ñ three ₡ four 🦆 end"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":7,"literal":{"kind":"STRING","text":"two n"}}}],"qualified_name":{"path":["prefix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT printf('%d', 33), printf('%d + %d = %d', 3, 5, 3 + 5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"STRING","text":"%d"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"33"}}}],"qualified_name":{"path":["printf"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":35,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":14,"literal":{"kind":"STRING","text":"%d + %d = %d"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["printf"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select printf('%x', 255::utinyint);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"STRING","text":"%x"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"INTEGER","text":"255"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":8,"catalog":"","schema":"","type_name":"utinyint","children":[],"qualified_name":{"path":["utinyint"]}}}}],"qualified_name":{"path":["printf"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT printf('%c', i) FROM range(200, 300) t(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"STRING","text":"%c"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["printf"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":28,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"literal":{"kind":"INTEGER","text":"300"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT printf(fmt, 10, pstring) FROM strings ORDER BY idx","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["idx"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"printf","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["fmt"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":7,"column_names":["pstring"]}}],"qualified_name":{"path":["printf"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select REPEAT(NULL, NULL), REPEAT(NULL, 3), REPEAT('MySQL', NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["repeat"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["repeat"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":21,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":7,"literal":{"kind":"STRING","text":"MySQL"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["repeat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select REPEAT('hello', 'world', 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":7,"literal":{"kind":"STRING","text":"world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["repeat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select REPLACE(1, 2, 3, 4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["replace"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT right_grapheme('a', 9223372036854775808);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"right_grapheme","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775808"}}}],"qualified_name":{"path":["right_grapheme"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'aaa' SIMILAR TO '[a-z]{3}'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":21,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"aaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":10,"literal":{"kind":"STRING","text":"[a-z]{3}"}}}],"qualified_name":{"path":["regexp_full_match"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s FROM strings WHERE s NOT SIMILAR TO p","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":28,"query_location_length":18,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":12,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["p"]}}],"qualified_name":{"path":["regexp_full_match"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select split_part('',',',1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"split_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":","}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["split_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT starts_with(s,'he') FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"STRING","text":"he"}}}],"qualified_name":{"path":["starts_with"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'hello world' ^@ 'h',\n 'hello world' ^@ 'he',\n 'hello world' ^@ 'hel',\n 'hello world' ^@ 'hell',\n 'hello world' ^@ 'hello',\n 'hello world' ^@ 'hello ',\n 'hello world' ^@ 'hello w',\n 'hello world' ^@ 'hello wo',\n 'hello world' ^@ 'hello wor',\n 'hello world' ^@ 'hello worl'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"h"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":21,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"literal":{"kind":"STRING","text":"he"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":22,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":5,"literal":{"kind":"STRING","text":"hel"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":97,"query_location_length":23,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":6,"literal":{"kind":"STRING","text":"hell"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":24,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":162,"query_location_length":25,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":8,"literal":{"kind":"STRING","text":"hello "}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":196,"query_location_length":26,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":196,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":9,"literal":{"kind":"STRING","text":"hello w"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":231,"query_location_length":27,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":248,"query_location_length":10,"literal":{"kind":"STRING","text":"hello wo"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":267,"query_location_length":28,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":267,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":284,"query_location_length":11,"literal":{"kind":"STRING","text":"hello wor"}}}],"qualified_name":{"path":["^@"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":304,"query_location_length":29,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":304,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":321,"query_location_length":12,"literal":{"kind":"STRING","text":"hello worl"}}}],"qualified_name":{"path":["^@"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s ^@ '你好世界' FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"^@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":14,"literal":{"kind":"STRING","text":"你好世界"}}}],"qualified_name":{"path":["^@"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_slice(s, off, 2+off) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"array_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":3,"column_names":["off"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":3,"column_names":["off"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["array_slice"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT array_slice(s, -4, -2) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"array_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}}],"qualified_name":{"path":["array_slice"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'MotörHead'[:5]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":19,"query_location_length":4,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"MotörHead"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n[NULL:length+NULL] FROM strings, nulltable","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":18,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["length"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["+"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":9,"schema_name":"","table_name":"nulltable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nulltable"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s[(-2147483646-1):-2147483647] FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":29,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":11,"literal":{"kind":"INTEGER","text":"-2147483646"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":11,"literal":{"kind":"INTEGER","text":"-2147483647"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST(string_split('🦆🐈🐈🦆🐈🐈🦆🐈🐈🦆🐈🐈🦆', '🐈🐈'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":88,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":80,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":54,"literal":{"kind":"STRING","text":"🦆🐈🐈🦆🐈🐈🦆🐈🐈🦆🐈🐈🦆"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":10,"literal":{"kind":"STRING","text":"🐈🐈"}}}],"qualified_name":{"path":["string_split"]}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST(string_split('aaaaa', NULL))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":27,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":7,"literal":{"kind":"STRING","text":"aaaaa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["string_split"]}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select UNNEST(string_split_regex('abc', '(,|abc)'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":36,"function_name":"string_split_regex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":9,"literal":{"kind":"STRING","text":"(,|abc)"}}}],"qualified_name":{"path":["string_split_regex"]}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '🦆ab'[1], 'abc'[2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":15,"query_location_length":3,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"literal":{"kind":"STRING","text":"🦆ab"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":25,"query_location_length":3,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT substring(s from 1 for 2) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"substring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["substring"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT substring(NULL from NULL for NULL) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"substring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["substring"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suffix('abcd', 'cd')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"abcd"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"STRING","text":"cd"}}}],"qualified_name":{"path":["suffix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suffix('abcdefghijklmnopqrstuvwxyz', 'yz')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":28,"literal":{"kind":"STRING","text":"abcdefghijklmnopqrstuvwxyz"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"STRING","text":"yz"}}}],"qualified_name":{"path":["suffix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT suffix('omotá', 'a')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":8,"literal":{"kind":"STRING","text":"omotá"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["suffix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_base(-10, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"to_base","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["to_base"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_base(42, 36)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"to_base","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"literal":{"kind":"INTEGER","text":"36"}}}],"qualified_name":{"path":["to_base"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select TRANSLATE('12345', '14367', 'ax')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"translate","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":7,"literal":{"kind":"STRING","text":"12345"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":7,"literal":{"kind":"STRING","text":"14367"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":4,"literal":{"kind":"STRING","text":"ax"}}}],"qualified_name":{"path":["translate"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select TRANSLATE(1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"translate","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["translate"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select LTRIM('', 'ho'), LTRIM('hello', 'ho'), LTRIM('papapapa', 'pa'), LTRIM('blaHblabla', 'bla'), LTRIM('blabla', NULL), LTRIM(NULL, 'blabla'), LTRIM('blabla', '')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"STRING","text":"ho"}}}],"qualified_name":{"path":["ltrim"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":20,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"STRING","text":"ho"}}}],"qualified_name":{"path":["ltrim"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":23,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":10,"literal":{"kind":"STRING","text":"papapapa"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":4,"literal":{"kind":"STRING","text":"pa"}}}],"qualified_name":{"path":["ltrim"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":26,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":12,"literal":{"kind":"STRING","text":"blaHblabla"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":5,"literal":{"kind":"STRING","text":"bla"}}}],"qualified_name":{"path":["ltrim"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":99,"query_location_length":21,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":8,"literal":{"kind":"STRING","text":"blabla"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["ltrim"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":122,"query_location_length":21,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":8,"literal":{"kind":"STRING","text":"blabla"}}}],"qualified_name":{"path":["ltrim"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":145,"query_location_length":19,"function_name":"ltrim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":8,"literal":{"kind":"STRING","text":"blabla"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["ltrim"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select UNICODE(a) FROM strings WHERE b IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"unicode","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["unicode"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":39,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["b"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_duckdb('__TEST_DIR__/rd_empty_projection.db', table_name := 't')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":69,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_duckdb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":37,"literal":{"kind":"STRING","text":"__TEST_DIR__/rd_empty_projection.db"}}},{"name":"table_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"table_name","query_location":86,"query_location_length":3,"literal":{"kind":"STRING","text":"t"}}}],"qualified_name":{"path":["read_duckdb"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT abs(i), upper(s), i + 10 FROM executor_input ORDER BY rowid;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":5,"column_names":["rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["abs"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["upper"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":14,"schema_name":"","table_name":"executor_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["executor_input"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_part('hour', d) FROM times;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"literal":{"kind":"STRING","text":"hour"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT isodow(i) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"isodow","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["isodow"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT d, DATE_PART('{partcode}', d) AS p, DATE_PART(['{partcode}'], d) AS st\nFROM times\nWHERE p \u003c\u003e st['{partcode}'];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":10,"query_location_length":26,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":12,"literal":{"kind":"STRING","text":"{partcode}"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"st","query_location":43,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":12,"literal":{"kind":"STRING","text":"{partcode}"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":83,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":95,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["p"]},"right":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":102,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":2,"column_names":["st"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":12,"literal":{"kind":"STRING","text":"{partcode}"}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(microseconds FROM i) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":12,"literal":{"kind":"STRING","text":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(week FROM i) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"literal":{"kind":"STRING","text":"WEEK"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('3 months'::interval, null::time, '2 seconds'::interval) from times;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"literal":{"kind":"STRING","text":"3 months"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":11,"literal":{"kind":"STRING","text":"2 seconds"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('-3 hours'::interval, '00:00:00'::time, '00:00:00'::time);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":69,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"literal":{"kind":"STRING","text":"-3 hours"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":10,"literal":{"kind":"STRING","text":"00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":10,"literal":{"kind":"STRING","text":"00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('3 months'::interval, '00:00:00'::time, '2000000000 months'::interval);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"literal":{"kind":"STRING","text":"3 months"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":10,"literal":{"kind":"STRING","text":"00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":19,"literal":{"kind":"STRING","text":"2000000000 months"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('-1 month'::interval, null::time, '10:00:00'::time);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":10,"literal":{"kind":"STRING","text":"-1 month"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":10,"literal":{"kind":"STRING","text":"10:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t1 - t2 FROM timestamp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["t1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":2,"column_names":["t2"]}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT AGE('{lspecial}'::TIMESTAMP, '{rspecial}'::TIMESTAMP);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":53,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":12,"literal":{"kind":"STRING","text":"{lspecial}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":12,"literal":{"kind":"STRING","text":"{rspecial}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["age"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUFFIX(CURRENT_TIMESTAMP::VARCHAR, '-06');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"suffix","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":17,"column_names":["CURRENT_TIMESTAMP"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":5,"literal":{"kind":"STRING","text":"-06"}}}],"qualified_name":{"path":["suffix"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM wt WHERE yearweek(x) = -9910;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"wt","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["wt"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":11,"function_name":"yearweek","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["yearweek"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"literal":{"kind":"INTEGER","text":"-9910"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TIMESTAMPTZ_NS '2262-04-11 23:47:16.854775+00'::DATE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":46,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2262-04-11 23:47:16.854775+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tmake_date(2021, 12, 30),\n\tmake_date(NULL, 12, 30),\n\tmake_date(2021, NULL, 30),\n\tmake_date(2021, 12, NULL)\n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":23,"function_name":"make_date","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2021"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}}],"qualified_name":{"path":["make_date"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":23,"function_name":"make_date","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}}],"qualified_name":{"path":["make_date"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":25,"function_name":"make_date","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2021"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}}],"qualified_name":{"path":["make_date"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":25,"function_name":"make_date","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2021"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["make_date"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamp_ns(9223372036854775806);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"make_timestamp_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775806"}}}],"qualified_name":{"path":["make_timestamp_ns"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \n\tstart_ts, \n\tend_ts, \n\tDATEDIFF('millisecond', start_ts, end_ts) AS dd_second \nFROM VALUES (\n\t'1970-01-01 00:00:12.456789'::TIMESTAMP, \n\t'1969-12-31 23:59:05.123456'::TIMESTAMP\n\t) x(start_ts, end_ts);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":8,"column_names":["start_ts"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":6,"column_names":["end_ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"dd_second","query_location":31,"query_location_length":41,"function_name":"datediff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":13,"literal":{"kind":"STRING","text":"millisecond"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":8,"column_names":["start_ts"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":6,"column_names":["end_ts"]}}],"qualified_name":{"path":["datediff"]}}],"from_table":{"type":"SUBQUERY","alias":"x","sample":null,"query_location":92,"query_location_length":115,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":130,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":28,"literal":{"kind":"STRING","text":"1970-01-01 00:00:12.456789"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":173,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":28,"literal":{"kind":"STRING","text":"1969-12-31 23:59:05.123456"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":175,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["start_ts","end_ts"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE_PART(['weekday', 'isodow', 'doy', 'julian'], '2008-01-01 00:00:01.894'::TIMESTAMP) AS parts","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"parts","query_location":7,"query_location_length":87,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":38,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":9,"literal":{"kind":"STRING","text":"weekday"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":8,"literal":{"kind":"STRING","text":"isodow"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":5,"literal":{"kind":"STRING","text":"doy"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":8,"literal":{"kind":"STRING","text":"julian"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":25,"literal":{"kind":"STRING","text":"2008-01-01 00:00:01.894"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts, epoch_us(ts) FROM timestamps ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":12,"function_name":"epoch_us","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["epoch_us"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE_PART(['year', NULL, 'month'], ts) FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":7,"literal":{"kind":"STRING","text":"month"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(DOW FROM i) FROM timestamps","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"literal":{"kind":"STRING","text":"DOW"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(microseconds FROM i) FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":12,"literal":{"kind":"STRING","text":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT AGE(t1, t2) FROM timestamps WHERE t1 \u003e '2001-12-12';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["t1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":2,"column_names":["t2"]}}],"qualified_name":{"path":["age"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":41,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":2,"column_names":["t1"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":12,"literal":{"kind":"STRING","text":"2001-12-12"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 'epoch'::timestamptz + '-9223372022400001000 microseconds'::interval","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"epoch"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":35,"literal":{"kind":"STRING","text":"-9223372022400001000 microseconds"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2000-04-09 17:00:00-07'::timestamptz - interval 2400 hours","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"2000-04-09 17:00:00-07"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":19,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2400"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_hours"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts + (INTERVAL (-1) hour) FROM limits WHERE label = 'tsmin';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":18,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_hours"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":6,"schema_name":"","table_name":"limits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":5,"column_names":["label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":7,"literal":{"kind":"STRING","text":"tsmin"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT iv, ts + iv FROM limits, intervals\nWHERE label = 'tsmax'\n AND iv \u003c (INTERVAL (-1) millisecond);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["iv"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["iv"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":22,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":6,"schema_name":"","table_name":"limits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":9,"schema_name":"","table_name":"intervals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intervals"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":48,"query_location_length":54,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":48,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":5,"column_names":["label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":7,"literal":{"kind":"STRING","text":"tsmax"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":70,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":2,"column_names":["iv"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":25,"function_name":"to_milliseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["to_milliseconds"]}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts + (INTERVAL 6 minute) FROM limits WHERE label = 'tsmax';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":17,"function_name":"to_minutes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_minutes"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":6,"schema_name":"","table_name":"limits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":5,"column_names":["label"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":7,"literal":{"kind":"STRING","text":"tsmax"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TIMESTAMPTZ 'Infinity' - TIMESTAMPTZ 'Infinity';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"Infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"Infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATEDIFF('day', 'infinity'::TIMESTAMPTZ_NS, enddate) FROM datetime_ns;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"datediff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"literal":{"kind":"STRING","text":"day"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[],"qualified_name":{"path":["TIMESTAMPTZ_NS"]}}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":7,"column_names":["enddate"]}}],"qualified_name":{"path":["datediff"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":65,"query_location_length":11,"schema_name":"","table_name":"datetime_ns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["datetime_ns"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT starttime, recordtime, date_diff('minute', starttime, recordtime)\nFROM issue9673_ns;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["starttime"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":10,"column_names":["recordtime"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":42,"function_name":"date_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":8,"literal":{"kind":"STRING","text":"minute"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":9,"column_names":["starttime"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":10,"column_names":["recordtime"]}}],"qualified_name":{"path":["date_diff"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":12,"schema_name":"","table_name":"issue9673_ns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue9673_ns"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT millisecond(ts), millisecond(ts::TIMESTAMP) FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"millisecond","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["millisecond"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":26,"function_name":"millisecond","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":2,"column_names":["ts"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["millisecond"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT isoyear(ts), isoyear(ts::TIMESTAMP) FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"isoyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["isoyear"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":22,"function_name":"isoyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["ts"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["isoyear"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE_PART('timezone_hour', '2021-07-31 00:00:00-07'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":15,"literal":{"kind":"STRING","text":"timezone_hour"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":24,"literal":{"kind":"STRING","text":"2021-07-31 00:00:00-07"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE_PART(['epoch', 'second', 'timezone', 'timezone_hour', 'timezone_minute'], ts), ts\nFROM timestamps\nORDER BY 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":67,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":7,"literal":{"kind":"STRING","text":"epoch"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":8,"literal":{"kind":"STRING","text":"second"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":10,"literal":{"kind":"STRING","text":"timezone"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":15,"literal":{"kind":"STRING","text":"timezone_hour"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":17,"literal":{"kind":"STRING","text":"timezone_minute"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["date_part"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":2,"column_names":["ts"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DAYOFMONTH(c0), DAYOFMONTH(c0) IS NULL FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"dayofmonth","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":2,"column_names":["c0"]}}],"qualified_name":{"path":["dayofmonth"]}},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":38,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":14,"function_name":"dayofmonth","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["c0"]}}],"qualified_name":{"path":["dayofmonth"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select DATESUB('decade', '1994-02-28 12:00:00-08'::TIMESTAMPTZ, '2004-02-29 13:00:00-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":95,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":8,"literal":{"kind":"STRING","text":"decade"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":24,"literal":{"kind":"STRING","text":"1994-02-28 12:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":24,"literal":{"kind":"STRING","text":"2004-02-29 13:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["datesub"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select DATESUB('{datepart}', '2004-01-31 12:00:00-08'::TIMESTAMPTZ, '2004-02-28 13:00:00-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":99,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":12,"literal":{"kind":"STRING","text":"{datepart}"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":24,"literal":{"kind":"STRING","text":"2004-01-31 12:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":92,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":24,"literal":{"kind":"STRING","text":"2004-02-28 13:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":94,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["datesub"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select DATESUB('millisecond', '2004-01-31 12:00:00-08'::TIMESTAMPTZ, '2004-02-01 12:00:00-08'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":100,"function_name":"datesub","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":13,"literal":{"kind":"STRING","text":"millisecond"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":24,"literal":{"kind":"STRING","text":"2004-01-31 12:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":93,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":24,"literal":{"kind":"STRING","text":"2004-02-01 12:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["datesub"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_trunc('minute', TIMESTAMPTZ '1992-02-02 04:03:02Z') FROM timestamps LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"minute"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":34,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-02-02 04:03:02Z"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_trunc('year', TIMESTAMPTZ '2019-01-06 04:03:02-08') FROM timestamps LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2019-01-06 04:03:02-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts, mts\nFROM (SELECT ts, make_timestamptz(yeartz(ts), month(ts), day(ts), hour(ts), minute(ts), microsecond(ts) / 1000000.0) mts\n\tFROM timestamps) t\nWHERE mts IS DISTINCT FROM ts\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["mts"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":20,"query_location_length":133,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"mts","query_location":32,"query_location_length":99,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":10,"function_name":"yeartz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["yeartz"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":9,"function_name":"month","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["month"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":7,"function_name":"day","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["day"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":8,"function_name":"hour","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["hour"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":10,"function_name":"minute","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["minute"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":27,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":15,"function_name":"microsecond","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["microsecond"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":9,"literal":{"kind":"NUMERIC","text":"1000000.0"}}}],"qualified_name":{"path":["/"]}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":142,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":162,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":3,"column_names":["mts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":183,"query_location_length":2,"column_names":["ts"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(2021, 12, 30, 10, 12, 4.123, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2021"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"4.123"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts, strftime(ts, '%Y-%m-%d %H:%M:%S.%f %Z') FROM timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":39,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":25,"literal":{"kind":"STRING","text":"%Y-%m-%d %H:%M:%S.%f %Z"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '1582-01-01 10:33:41+01'::timestamptz","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-01-01 10:33:41+01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 'infinity'::timestamptz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('3 years'::interval, null::timestamptz) from timestamps_tz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"literal":{"kind":"STRING","text":"3 years"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":13,"schema_name":"","table_name":"timestamps_tz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps_tz"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select t, time_bucket(null::interval, t, '1990-01-06 08:08:10'::timestamptz) from timestamps_tz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":66,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":21,"literal":{"kind":"STRING","text":"1990-01-06 08:08:10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":13,"schema_name":"","table_name":"timestamps_tz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps_tz"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select w, t, timezone, time_bucket(w, t, timezone) from timestamps_tz;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["w"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["t"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":8,"column_names":["timezone"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":27,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["w"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":8,"column_names":["timezone"]}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":13,"schema_name":"","table_name":"timestamps_tz","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps_tz"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('1 month 1 day'::interval, '2018-05-05 00:00:00+02'::timestamptz, '2018-05-05 00:00:00+02'::timestamptz);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":116,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":15,"literal":{"kind":"STRING","text":"1 month 1 day"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":24,"literal":{"kind":"STRING","text":"2018-05-05 00:00:00+02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":109,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":24,"literal":{"kind":"STRING","text":"2018-05-05 00:00:00+02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":111,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n time_bucket(interval '1' day, timestamptz '2000-01-03 17:40:00+00', origin)\nfrom\n generate_series(timestamptz '2000-01-03 00:00:00+00',\n timestamptz '2000-01-04 00:00:00+00',\n\t\t interval '1' hour) as t(origin)\norder by\n origin\n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":249,"query_location_length":6,"column_names":["origin"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":75,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2000-01-03 17:40:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":6,"column_names":["origin"]}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":92,"query_location_length":145,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2000-01-03 00:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":108,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":164,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2000-01-04 00:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":164,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":206,"query_location_length":17,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_hours"]}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["origin"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(d, '%d') FROM timestamps ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"STRING","text":"%d"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(d, '%-H') FROM timestamps ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":5,"literal":{"kind":"STRING","text":"%-H"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(d, '%Z') FROM timestamps ORDER BY d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["d"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"STRING","text":"%Z"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('20182010', '%Y%d%m')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"literal":{"kind":"STRING","text":"20182010"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":8,"literal":{"kind":"STRING","text":"%Y%d%m"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('30', '%U'), strftime('1900-07-29'::DATE, '%U')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"STRING","text":"%U"}}}],"qualified_name":{"path":["strptime"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":34,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":12,"literal":{"kind":"STRING","text":"1900-07-29"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"literal":{"kind":"STRING","text":"%U"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select strptime('2024 100', '%Y %j');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"literal":{"kind":"STRING","text":"2024 100"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":7,"literal":{"kind":"STRING","text":"%Y %j"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (\n SELECT dt, strftime(dt, '%Y-%W-%w') AS ft, strptime(strftime(dt, '%Y-%W-%w'), '%Y-%W-%w') AS rt\n FROM (SELECT '2021-01-01'::DATE + (INTERVAL (d) DAY) AS dt FROM range(365) tbl(d)) days\n) diffs\nWHERE rt \u003c\u003e dt","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"diffs","sample":null,"query_location":14,"query_location_length":195,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["dt"]},{"class":"FUNCTION","type":"FUNCTION","alias":"ft","query_location":31,"query_location_length":24,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["dt"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%W-%w"}}}],"qualified_name":{"path":["strftime"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"rt","query_location":63,"query_location_length":46,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":24,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":2,"column_names":["dt"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%W-%w"}}}],"qualified_name":{"path":["strftime"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%W-%w"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"SUBQUERY","alias":"days","sample":null,"query_location":125,"query_location_length":77,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"dt","query_location":152,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":145,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":12,"literal":{"kind":"STRING","text":"2021-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":147,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":155,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":184,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":3,"literal":{"kind":"INTEGER","text":"365"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["d"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":222,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":222,"query_location_length":2,"column_names":["rt"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":228,"query_location_length":2,"column_names":["dt"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select strptime('2020-12-31 21:25:58.745232-02', '%Y-%m-%d %H:%M:%S.%f%z');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":31,"literal":{"kind":"STRING","text":"2020-12-31 21:25:58.745232-02"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":24,"literal":{"kind":"STRING","text":"%Y-%m-%d %H:%M:%S.%f%z"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('Mon Oct 17 2022 22:00:00 GMT+0000 (GMT', '%a %b %d %Y %X GMT%z (%Z') as working;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"working","query_location":7,"query_location_length":78,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":40,"literal":{"kind":"STRING","text":"Mon Oct 17 2022 22:00:00 GMT+0000 (GMT"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":26,"literal":{"kind":"STRING","text":"%a %b %d %Y %X GMT%z (%Z"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('2000/10/10', '%Y-%m-%d')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":12,"literal":{"kind":"STRING","text":"2000/10/10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%m-%d"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime(' ', '%d')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":14,"literal":{"kind":"STRING","text":" "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"STRING","text":"%d"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('500', '%j')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"literal":{"kind":"STRING","text":"500"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"STRING","text":"%j"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('20 19', '%U %j')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"literal":{"kind":"STRING","text":"20 19"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":7,"literal":{"kind":"STRING","text":"%U %j"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strptime('2021 1950', '%Y %G')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":11,"literal":{"kind":"STRING","text":"2021 1950"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":7,"literal":{"kind":"STRING","text":"%Y %G"}}}],"qualified_name":{"path":["strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('2024 01 002', '%G %V %j') IS NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":47,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":13,"literal":{"kind":"STRING","text":"2024 01 002"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":10,"literal":{"kind":"STRING","text":"%G %V %j"}}}],"qualified_name":{"path":["try_strptime"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select t, time_bucket('3 years'::interval, t) from timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":35,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"literal":{"kind":"STRING","text":"3 years"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select t, time_bucket('11 days'::interval, t, '1990-01-06 08:08:10'::timestamp) from timestamps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":69,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":9,"literal":{"kind":"STRING","text":"11 days"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":21,"literal":{"kind":"STRING","text":"1990-01-06 08:08:10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":85,"query_location_length":10,"schema_name":"","table_name":"timestamps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('1 day - 172800 seconds'::interval, '2018-05-05 00:00:00'::timestamp);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":24,"literal":{"kind":"STRING","text":"1 day - 172800 seconds"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":76,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":21,"literal":{"kind":"STRING","text":"2018-05-05 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select time_bucket('1 microseconds'::interval, '294247-01-10 04:00:54.775807'::timestamp);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"time_bucket","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":16,"literal":{"kind":"STRING","text":"1 microseconds"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":77,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":30,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775807"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":79,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["time_bucket"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('2018-20-10', '%Y-%d-%m')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":12,"literal":{"kind":"STRING","text":"2018-20-10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%d-%m"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('1', '%U')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"STRING","text":"%U"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('1992-01-30 30', '%Y-%m-%d %j')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":15,"literal":{"kind":"STRING","text":"1992-01-30 30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":13,"literal":{"kind":"STRING","text":"%Y-%m-%d %j"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (\n SELECT dt, strftime(dt, '%G-%V-%u') AS ft, try_strptime(strftime(dt, '%G-%V-%u'), '%G-%V-%u') AS rt\n FROM (SELECT '2021-01-01'::DATE + (INTERVAL (d) DAY) AS dt FROM range(365) tbl(d)) days\n) diffs\nWHERE rt \u003c\u003e dt","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"diffs","sample":null,"query_location":14,"query_location_length":199,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["dt"]},{"class":"FUNCTION","type":"FUNCTION","alias":"ft","query_location":31,"query_location_length":24,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["dt"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":10,"literal":{"kind":"STRING","text":"%G-%V-%u"}}}],"qualified_name":{"path":["strftime"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"rt","query_location":63,"query_location_length":50,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":24,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":2,"column_names":["dt"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":10,"literal":{"kind":"STRING","text":"%G-%V-%u"}}}],"qualified_name":{"path":["strftime"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":10,"literal":{"kind":"STRING","text":"%G-%V-%u"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"SUBQUERY","alias":"days","sample":null,"query_location":129,"query_location_length":77,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"dt","query_location":156,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":149,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":12,"literal":{"kind":"STRING","text":"2021-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":151,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":159,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":1,"column_names":["d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":188,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":194,"query_location_length":3,"literal":{"kind":"INTEGER","text":"365"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["d"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":226,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":226,"query_location_length":2,"column_names":["rt"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":2,"column_names":["dt"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_strptime('2020-12-31 03:25:58.745232+04', '%Y-%m-%d %H:%M:%S.%f%z');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":71,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":31,"literal":{"kind":"STRING","text":"2020-12-31 03:25:58.745232+04"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":24,"literal":{"kind":"STRING","text":"%Y-%m-%d %H:%M:%S.%f%z"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('2018-20-10', '%Y-%m-%d')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":12,"literal":{"kind":"STRING","text":"2018-20-10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%m-%d"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('2000-10-01 23:59:59.1000000000000000000000000000', '%Y-%m-%d %H:%M:%S.%f')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":88,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":50,"literal":{"kind":"STRING","text":"2000-10-01 23:59:59.1000000000000000000000000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":22,"literal":{"kind":"STRING","text":"%Y-%m-%d %H:%M:%S.%f"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('junee', '%B')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":7,"literal":{"kind":"STRING","text":"junee"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"STRING","text":"%B"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('20 2021', '%U %G')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":9,"literal":{"kind":"STRING","text":"20 2021"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":7,"literal":{"kind":"STRING","text":"%U %G"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_strptime('2021 1950', '%G %Y')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"try_strptime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":11,"literal":{"kind":"STRING","text":"2021 1950"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":7,"literal":{"kind":"STRING","text":"%G %Y"}}}],"qualified_name":{"path":["try_strptime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '12:00:00'::TIMETZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"STRING","text":"12:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_part('hour', d) FROM timetzs;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"literal":{"kind":"STRING","text":"hour"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT isodow(d) FROM timetzs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"isodow","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["isodow"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT EXTRACT(second FROM i) FROM timetzs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"literal":{"kind":"STRING","text":"SECOND"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"timetzs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timetzs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select start, token_type, word from sql_tokenize($$select a;$$);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["start"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":10,"column_names":["token_type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":4,"column_names":["word"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_tokenize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":13,"literal":{"kind":"STRING","text":"select a;"}}}],"qualified_name":{"path":["sql_tokenize"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select start, token_type, word from sql_tokenize($$select 'O''Neil', \"My \"\"Table\"\"\";$$);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["start"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":10,"column_names":["token_type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":4,"column_names":["word"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":51,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"sql_tokenize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":37,"literal":{"kind":"STRING","text":"select 'O''Neil', \"My \"\"Table\"\"\";"}}}],"qualified_name":{"path":["sql_tokenize"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT substring(uuidv7()::varchar, 15, 1) FROM range(100);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":35,"function_name":"substring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":8,"function_name":"uuidv7","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["uuidv7"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["substring"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":10,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), bool_and(\n v[1]::VARCHAR IS NOT DISTINCT FROM a AND\n v[2]::VARCHAR IS NOT DISTINCT FROM b AND\n v[3]::VARCHAR IS NOT DISTINCT FROM c\n) FROM encoded;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":142,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":31,"query_location_length":126,"children":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":31,"query_location_length":36,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":32,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["v"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["a"]}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":76,"query_location_length":36,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":80,"query_location_length":9,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":77,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["v"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":82,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["b"]}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":121,"query_location_length":36,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":125,"query_location_length":9,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":122,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":1,"column_names":["v"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":127,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":156,"query_location_length":1,"column_names":["c"]}}]}}],"qualified_name":{"path":["bool_and"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":165,"query_location_length":7,"schema_name":"","table_name":"encoded","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["encoded"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_array_length(NULL, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"variant_array_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["variant_array_length"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select range % 2 g, sum(variant_array_length(j, 'duck')) c\nfrom t1\ngroup by g\norder by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":7,"query_location_length":9,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["range"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"c","query_location":20,"query_location_length":36,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":31,"function_name":"variant_array_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["variant_array_length"]}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ((300000000000000000000000000000000000000::UHUGEINT)::VARIANT)::UHUGEINT =\n 300000000000000000000000000000000000000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":121,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":39,"literal":{"kind":"INTEGER","text":"300000000000000000000000000000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":39,"literal":{"kind":"INTEGER","text":"300000000000000000000000000000000000000"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ((12345678901234567890.123456::DECIMAL(38,6))::VARIANT)::DECIMAL(38,6) =\n 12345678901234567890.123456;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":107,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":15,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":27,"literal":{"kind":"NUMERIC","text":"12345678901234567890.123456"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],"qualified_name":{"path":["DECIMAL"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":27,"literal":{"kind":"NUMERIC","text":"12345678901234567890.123456"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_cast((42::VARIANT) AS TUPLE(INTEGER));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":41,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":14,"catalog":"","schema":"","type_name":"TUPLE","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["TUPLE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n variant_contains('{\"a\": {\"b\": [{\"c\": 1, \"d\": 2}]}}'::JSON::VARIANT,\n '{\"d\": 2}'::JSON::VARIANT),\n variant_contains('{\"a\": {\"b\": [{\"c\": 1, \"d\": 2}]}}'::JSON::VARIANT,\n '{\"a\": {\"b\": [{\"c\": 1}]}}'::JSON::VARIANT),\n variant_contains('{\"a\": {\"b\": 42}}'::JSON::VARIANT, '{\"a\": 42}'::JSON::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":115,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":34,"literal":{"kind":"STRING","text":"{\"a\": {\"b\": [{\"c\": 1, \"d\": 2}]}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":116,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":110,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":10,"literal":{"kind":"STRING","text":"{\"d\": 2}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":118,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":132,"query_location_length":131,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":189,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":183,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":34,"literal":{"kind":"STRING","text":"{\"a\": {\"b\": [{\"c\": 1, \"d\": 2}]}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":185,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":191,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":253,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":247,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":26,"literal":{"kind":"STRING","text":"{\"a\": {\"b\": [{\"c\": 1}]}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":249,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":255,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":269,"query_location_length":79,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":310,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":304,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":286,"query_location_length":18,"literal":{"kind":"STRING","text":"{\"a\": {\"b\": 42}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":306,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":312,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":338,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":332,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":321,"query_location_length":11,"literal":{"kind":"STRING","text":"{\"a\": 42}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":334,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":340,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n variant_contains({'a': NULL}::VARIANT, {'a': NULL}::VARIANT),\n variant_contains({'x': {'a': NULL}}::VARIANT, {'a': NULL}::VARIANT),\n variant_contains([{'a': NULL}]::VARIANT, {'a': NULL}::VARIANT),\n variant_contains({'a': 1}::VARIANT, {'a': NULL}::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":60,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":34,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":56,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":67,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":112,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":100,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":106,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":114,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":134,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":123,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":129,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":136,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":150,"query_location_length":62,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":180,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":167,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":168,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":174,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":182,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":202,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":191,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":197,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":204,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":218,"query_location_length":57,"function_name":"variant_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":243,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":235,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":241,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":245,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":265,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":254,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":260,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":267,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_exists(a, 'c') from struct_cast_data();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"variant_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["variant_exists"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_cast_data","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["struct_cast_data"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_exists({'a': 1}::VARIANT, [1]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"variant_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["variant_exists"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_extract({'a': 1234}::VARIANT, 'a')::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"variant_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":29,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1234"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["variant_extract"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT variant_extract( ['A','B']::variant, 1::UINTEGER)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"variant_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}}],"qualified_name":{"path":["variant_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_extract_string('{}'::VARIANT, '');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"STRING","text":"{}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["variant_extract_string"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT variant_extract_string({'geometry': geometry}::VARIANT, '')\nFROM test_all_types()\nWHERE bool = false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":59,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"geometry","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"geometry","query_location":43,"query_location_length":8,"column_names":["geometry"]}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["variant_extract_string"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":72,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":4,"column_names":["bool"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_extract_string({'a': 1}::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"variant_extract_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_extract_string"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select col.a_number::BIGINT from tbl order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["col","a_number"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_array_length(variant_group_array(i)) from integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"variant_array_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":22,"function_name":"variant_group_array","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["variant_group_array"]}}}],"qualified_name":{"path":["variant_array_length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_keys(a, ['', 'c']) from struct_cast_data();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["variant_keys"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_cast_data","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["struct_cast_data"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_keys(j, ['a', 'b']) from (values ({'a': {'x': 1}}::VARIANT), (NULL::VARIANT)) t(j);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["variant_keys"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":40,"query_location_length":52,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":15,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":55,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":81,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["j"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select range % 2 g, sum(length(variant_keys(j))) c\nfrom t1\ngroup by g\norder by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":7,"query_location_length":9,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["range"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"c","query_location":20,"query_location_length":28,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":23,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":15,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["variant_keys"]}}}],"qualified_name":{"path":["length"]}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_type('{\"a\": 1, \"b\": {\"c\": 12, \"d\": 10}}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"variant_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":35,"literal":{"kind":"STRING","text":"{\"a\": 1, \"b\": {\"c\": 12, \"d\": 10}}"}}}],"qualified_name":{"path":["variant_type"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [*COLUMNS(*)] FROM (\n\tSELECT variant_type(\n\t\tCOLUMNS(lambda c: NOT regexp_matches(c, 'array|struct|map|union|tuple'))::VARIANT\n\t)\n\tFROM test_all_types()\n\t-- strip NULLs from output\n\tWHERE bool IS NOT NULL\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":8,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":17,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":26,"query_location_length":187,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":100,"function_name":"variant_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":124,"query_location_length":9,"child":{"class":"STAR","type":"STAR","alias":"","query_location":52,"query_location_length":72,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":60,"query_location_length":63,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["c"]},"expr":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":70,"query_location_length":53,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":49,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":30,"literal":{"kind":"STRING","text":"array|struct|map|union|tuple"}}}],"qualified_name":{"path":["regexp_matches"]}}]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}},"qualified_exclude_list":[],"rename_list":[]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_type"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":143,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":200,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":195,"query_location_length":4,"column_names":["bool"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_type({'a': 1}::VARIANT, [NULL::VARCHAR]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"variant_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["variant_type"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select variant_typeof(struct_pack(*COLUMNS(*))::VARIANT) test from test_all_types();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"test","query_location":7,"query_location_length":49,"function_name":"variant_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":34,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":43,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_typeof"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":67,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT profit_total FROM unit2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["profit_total"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":5,"schema_name":"","table_name":"unit2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unit2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select column_name, generation_expression from duckdb_columns order by column_index;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":12,"column_names":["column_index"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":21,"column_names":["generation_expression"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":14,"schema_name":"","table_name":"duckdb_columns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_columns"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tz from t1 WHERE tr \u003c 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["tz"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":24,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":2,"column_names":["tr"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, u, rowid FROM tunion_5807 WHERE id = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["u"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["rowid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":11,"schema_name":"","table_name":"tunion_5807","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tunion_5807"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c FROM a WHERE id=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, payload FROM tbl WHERE id = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(i) FROM integers WHERE i \u003c 5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":36,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE i \u003e= 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":29,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE j=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM up WHERE b = 10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"up","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["up"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT j FROM integers WHERE j=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT payload\nFROM db.t\nWHERE k = repeat('a', 80) || 'gath' || repeat('b', 80) || 'tail';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["payload"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":4,"schema_name":"db","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":31,"query_location_length":58,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["k"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":54,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"literal":{"kind":"INTEGER","text":"80"}}}],"qualified_name":{"path":["repeat"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":6,"literal":{"kind":"STRING","text":"gath"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":2,"literal":{"kind":"INTEGER","text":"80"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":6,"literal":{"kind":"STRING","text":"tail"}}}],"qualified_name":{"path":["||"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(i) FROM integers WHERE i \u003e= 10 AND i \u003c= 15","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":34,"query_location_length":19,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":34,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":46,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM blobs WHERE b \u003e= '\\x01' ORDER BY b::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"blobs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["blobs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":26,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":6,"literal":{"kind":"STRING","text":"\\x01"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c0 FROM t0_varchar WHERE t0_varchar.c0 \u003c= 'a';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["c0"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":10,"schema_name":"","table_name":"t0_varchar","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0_varchar"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":32,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":13,"column_names":["t0_varchar","c0"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM tbl WHERE i IS NOT DISTINCT FROM 499995;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":31,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":6,"literal":{"kind":"INTEGER","text":"499995"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from t where id = getvariable('u3');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["id"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":17,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"STRING","text":"u3"}}}],"qualified_name":{"path":["getvariable"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM tbl WHERE i = 3000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"INTEGER","text":"3000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, name FROM pk_tbl ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"pk_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pk_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM upgrade_db.old_t WHERE k=1023","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":16,"schema_name":"upgrade_db","table_name":"old_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["upgrade_db","old_t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":44,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1023"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM int128_point WHERE id = 2048;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":12,"schema_name":"","table_name":"int128_point","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int128_point"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l FROM integers WHERE l \u003c= 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":29,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(i) FROM strings WHERE i = 'test';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":35,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":6,"literal":{"kind":"STRING","text":"test"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM tbl2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":4,"schema_name":"","table_name":"tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t5","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t5"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM a_t ASOF JOIN b_t ON a_t.k = b_t.k AND a_t.t \u003e= b_t.t AND a_t.m NOT IN ('sad', 'ok', 'happy');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":89,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"","table_name":"a_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a_t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":3,"schema_name":"","table_name":"b_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b_t"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":42,"query_location_length":72,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":5,"column_names":["a_t","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":5,"column_names":["b_t","k"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":60,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":5,"column_names":["a_t","t"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":5,"column_names":["b_t","t"]}},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":79,"query_location_length":35,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":92,"query_location_length":22,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":5,"column_names":["a_t","m"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":5,"literal":{"kind":"STRING","text":"sad"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":4,"literal":{"kind":"STRING","text":"ok"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":7,"literal":{"kind":"STRING","text":"happy"}}]}]}]},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT p.begin, e.value\nFROM range(0,10) p(begin) ASOF JOIN events0 e\nUSING (begin)\nORDER BY p.begin ASC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":7,"column_names":["p","begin"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["p","begin"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["e","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":50,"query_location_length":33,"left":{"type":"TABLE_FUNCTION","alias":"p","sample":null,"query_location":29,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["begin"],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":60,"query_location_length":9,"schema_name":"","table_name":"events0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events0"]}},"condition":null,"join_type":"INNER","ref_type":"ASOF","using_columns":["begin"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT p.key, p.begin, e.value\nFROM \n\t(SELECT key, ts AS begin FROM probes) p \nASOF LEFT JOIN \n\tevents e\nUSING (key, begin)\nORDER BY 1, 2 ASC NULLS FIRST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ASCENDING","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["p","key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":7,"column_names":["p","begin"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":7,"column_names":["e","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":79,"query_location_length":44,"left":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":38,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":3,"column_names":["key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"begin","query_location":51,"query_location_length":2,"column_names":["ts"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":6,"schema_name":"","table_name":"probes","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probes"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":96,"query_location_length":8,"schema_name":"","table_name":"events","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events"]}},"condition":null,"join_type":"LEFT","ref_type":"ASOF","using_columns":["key","begin"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table l\nASOF LEFT JOIN right_table r\nON l.symbol = r.symbol AND l.ts \u003e= r.ts AND l.price + r.bid \u003e 300;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":94,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":42,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":59,"query_location_length":62,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":59,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":8,"column_names":["l","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":8,"column_names":["r","symbol"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":83,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":4,"column_names":["l","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":4,"column_names":["r","ts"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":100,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":108,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":7,"column_names":["l","price"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":5,"column_names":["r","bid"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":3,"literal":{"kind":"INTEGER","text":"300"}}}]},"join_type":"LEFT","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT p.begin, e.value\nFROM probe0 p ASOF LEFT JOIN events0 e\nON p.begin \u003e= e.begin\nORDER BY p.begin ASC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":7,"column_names":["p","begin"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["p","begin"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["e","value"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":38,"query_location_length":46,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"probe0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe0"]}},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":53,"query_location_length":9,"schema_name":"","table_name":"events0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events0"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":66,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":7,"column_names":["p","begin"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":7,"column_names":["e","begin"]}},"join_type":"LEFT","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), count(*) FILTER (l2.g \u003c\u003e r.g) FROM l2 ASOF JOIN r ON row(l2.g, 1) = row(r.g, 1) AND l2.ts \u003e= r.ts;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":29,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":34,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":4,"column_names":["l2","g"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":3,"column_names":["r","g"]}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":55,"query_location_length":59,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":2,"schema_name":"","table_name":"l2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["l2"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":65,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":70,"query_location_length":44,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":26,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":4,"column_names":["l2","g"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["row"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":85,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":3,"column_names":["r","g"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["row"]}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":101,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":5,"column_names":["l2","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":4,"column_names":["r","ts"]}}]},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.id, p.id\nFROM (VALUES (1, NULL::INTEGER, 1)) t(id, symbol, ts)\nASOF LEFT JOIN (VALUES (40, NULL::INTEGER, 65537)) p(id, symbol, ts)\n ON t.symbol IS NOT DISTINCT FROM p.symbol AND t.ts \u003c= p.ts;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["t","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["p","id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":72,"query_location_length":129,"left":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":23,"query_location_length":30,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","symbol","ts"]},"right":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":87,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":104,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":106,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":5,"literal":{"kind":"INTEGER","text":"65537"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","symbol","ts"]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":146,"query_location_length":55,"children":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":146,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":8,"column_names":["t","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":176,"query_location_length":8,"column_names":["p","symbol"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":189,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":4,"column_names":["t","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":4,"column_names":["p","ts"]}}]},"join_type":"LEFT","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.*, p.price\nFROM trades_multiple t ASOF JOIN prices_multiple p \n ON t.symbol = p.symbol \n AND t.exchange = p.exchange\n AND t.when \u003e= p.when","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":3,"relation_name":"t","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":7,"column_names":["p","price"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":43,"query_location_length":105,"left":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":25,"query_location_length":17,"schema_name":"","table_name":"trades_multiple","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["trades_multiple"]}},"right":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":53,"query_location_length":17,"schema_name":"","table_name":"prices_multiple","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["prices_multiple"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":77,"query_location_length":71,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":8,"column_names":["t","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":8,"column_names":["p","symbol"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":103,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":10,"column_names":["t","exchange"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":10,"column_names":["p","exchange"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":132,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":6,"column_names":["t","when"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":6,"column_names":["p","when"]}}]},"join_type":"INNER","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM r t1\nASOF LEFT JOIN (SELECT * FROM a EXCEPT ALL SELECT * FROM b) t0 ON t1.d \u003e= t0.d\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":78,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"right":{"type":"SUBQUERY","alias":"t0","sample":null,"query_location":34,"query_location_length":44,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":42,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":69,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":85,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":4,"column_names":["t1","d"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":4,"column_names":["t0","d"]}},"join_type":"LEFT","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * \nFROM left_table l \nASOF SEMI JOIN right_table r \n\t ON l.symbol = r.symbol \n\tAND l.ts \u003e= r.ts \n\tAND l.price + r.bid \u003e 300\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":29,"query_location_length":101,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":15,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":44,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":64,"query_location_length":66,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":8,"column_names":["l","symbol"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":8,"column_names":["r","symbol"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":90,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":4,"column_names":["l","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":4,"column_names":["r","ts"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":109,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":117,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":7,"column_names":["l","price"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":5,"column_names":["r","bid"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":3,"literal":{"kind":"INTEGER","text":"300"}}}]},"join_type":"SEMI","ref_type":"ASOF","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM integers_empty JOIN integers2 ON (integers_empty.i\u003eintegers2.i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":36,"query_location_length":48,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"integers_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers_empty"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":55,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":16,"column_names":["integers_empty","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":11,"column_names":["integers2","i"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers RIGHT JOIN integers2_empty USING (i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":36,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":15,"schema_name":"","table_name":"integers2_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2_empty"]}},"condition":null,"join_type":"RIGHT","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM bigtable RIGHT OUTER JOIN smalltable USING (a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":37,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"bigtable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigtable"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":10,"schema_name":"","table_name":"smalltable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smalltable"]}},"condition":null,"join_type":"RIGHT","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, j, k, l FROM integers FULL OUTER JOIN integers2 ON integers.i\u003c\u003eintegers2.k ORDER BY 1, 2, 3, 4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["l"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":52,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":61,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":10,"column_names":["integers","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":11,"column_names":["integers2","k"]}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (DESCRIBE SELECT 1 AS a, 2 AS b) l FULL JOIN (DESCRIBE SELECT 1 AS c, 2 AS d, 3 AS e) r ON true;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":56,"query_location_length":60,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":21,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":66,"query_location_length":40,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"e","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT 'CHF' AS ccy, id FROM fact) t LEFT JOIN dim d ON t.ccy = d.k WHERE d.k IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":59,"query_location_length":30,"left":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":21,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"ccy","query_location":29,"query_location_length":5,"literal":{"kind":"STRING","text":"CHF"}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"d","sample":null,"query_location":69,"query_location_length":5,"schema_name":"","table_name":"dim","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":5,"column_names":["t","ccy"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["d","k"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":100,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":3,"column_names":["d","k"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n.n_name, COUNT(*) AS cnt\nFROM nation n\nJOIN customer c ON n.nk = c.nk\nJOIN orders_c o ON o.ck = c.ck\nJOIN lineitem l ON l.ok = o.ok\nGROUP BY n.n_name ORDER BY n.n_name","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":167,"query_location_length":8,"column_names":["n","n_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["n","n_name"]},{"class":"FUNCTION","type":"FUNCTION","alias":"cnt","query_location":17,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":109,"query_location_length":30,"left":{"type":"JOIN","alias":"","sample":null,"query_location":78,"query_location_length":30,"left":{"type":"JOIN","alias":"","sample":null,"query_location":47,"query_location_length":30,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"nation","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nation"]}},"right":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":52,"query_location_length":10,"schema_name":"","table_name":"customer","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["customer"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":4,"column_names":["n","nk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":4,"column_names":["c","nk"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":83,"query_location_length":10,"schema_name":"","table_name":"orders_c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders_c"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":4,"column_names":["o","ck"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":4,"column_names":["c","ck"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":114,"query_location_length":10,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":128,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":4,"column_names":["l","ok"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":4,"column_names":["o","ok"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":8,"column_names":["n","n_name"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n.n_names[1] AS nm, COUNT(*) AS cnt\nFROM nation_list n JOIN customer c ON n.nk = c.nk JOIN orders o ON o.ck = c.ck\nGROUP BY nm ORDER BY nm","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":2,"column_names":["nm"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"nm","query_location":16,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["n","n_names"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"cnt","query_location":27,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":93,"query_location_length":28,"left":{"type":"JOIN","alias":"","sample":null,"query_location":62,"query_location_length":30,"left":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":48,"query_location_length":13,"schema_name":"","table_name":"nation_list","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nation_list"]}},"right":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":67,"query_location_length":10,"schema_name":"","table_name":"customer","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["customer"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":4,"column_names":["n","nk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":4,"column_names":["c","nk"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":98,"query_location_length":8,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":4,"column_names":["o","ck"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":4,"column_names":["c","ck"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":2,"column_names":["nm"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c AS MATERIALIZED (FROM mixed_dictionaries)\nSELECT count(*), count(DISTINCT b.label)\nFROM probe p JOIN (\n SELECT c.k, c.label FROM c JOIN small_dim d ON c.k % 25=d.k WHERE c.k % 2000 \u003c 1000\n) b ON p.k=b.k","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":18,"schema_name":"","table_name":"mixed_dictionaries","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mixed_dictionaries"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":23,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["b","label"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":103,"query_location_length":109,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":95,"query_location_length":7,"schema_name":"","table_name":"probe","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe"]}},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":108,"query_location_length":91,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":3,"column_names":["c","k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":7,"column_names":["c","label"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":141,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":139,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"d","sample":null,"query_location":146,"query_location_length":11,"schema_name":"","table_name":"small_dim","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["small_dim"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":161,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":161,"query_location_length":8,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":3,"column_names":["c","k"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":2,"literal":{"kind":"INTEGER","text":"25"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":3,"column_names":["d","k"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":180,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":180,"query_location_length":10,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":180,"query_location_length":3,"column_names":["c","k"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":186,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2000"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":193,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":205,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":205,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":209,"query_location_length":3,"column_names":["b","k"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE r(iter, k, x) AS (\n SELECT 0, 0::BIGINT, NULL::BIGINT\n UNION ALL\n SELECT r.iter + 1, b.ck, b.x\n FROM r JOIN (\n SELECT c.ck, n.x\n FROM customer2 c\n JOIN (\n SELECT nk, nextval('dict_epoch') AS x FROM nation2\n ) n ON c.nk = n.nk\n ) b ON r.k = b.ck\n WHERE r.iter \u003c 3\n)\nSELECT iter, k, x FROM r ORDER BY iter","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":371,"query_location_length":4,"column_names":["iter"]}}]}],"cte_map":{"map":[{"key":"r","value":{"aliases":["iter","k","x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"r","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":104,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":6,"column_names":["r","iter"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":4,"column_names":["b","ck"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":3,"column_names":["b","x"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":130,"query_location_length":183,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":128,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":135,"query_location_length":162,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":4,"column_names":["c","ck"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":158,"query_location_length":3,"column_names":["n","x"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":195,"query_location_length":96,"left":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":175,"query_location_length":11,"schema_name":"","table_name":"customer2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["customer2"]}},"right":{"type":"SUBQUERY","alias":"n","sample":null,"query_location":200,"query_location_length":74,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":221,"query_location_length":2,"column_names":["nk"]},{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":225,"query_location_length":21,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":233,"query_location_length":12,"literal":{"kind":"STRING","text":"dict_epoch"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":257,"query_location_length":7,"schema_name":"","table_name":"nation2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nation2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":280,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":280,"query_location_length":4,"column_names":["c","nk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":287,"query_location_length":4,"column_names":["n","nk"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":303,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":303,"query_location_length":3,"column_names":["r","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":309,"query_location_length":4,"column_names":["b","ck"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":324,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":324,"query_location_length":6,"column_names":["r","iter"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":333,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["iter","k","x"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":344,"query_location_length":4,"column_names":["iter"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":350,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":353,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":360,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT in_dim, count(*) FROM (\n SELECT f.id, f.k IN (SELECT k FROM dim WHERE name IN ('Alpha','Beta')) AS in_dim FROM fact f\n) GROUP BY in_dim ORDER BY in_dim NULLS FIRST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":6,"column_names":["in_dim"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["in_dim"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":29,"query_location_length":100,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":4,"column_names":["f","id"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"in_dim","query_location":55,"query_location_length":50,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":70,"query_location_length":3,"schema_name":"","table_name":"dim","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":88,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":4,"column_names":["name"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":7,"literal":{"kind":"STRING","text":"Alpha"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":6,"literal":{"kind":"STRING","text":"Beta"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":3,"column_names":["f","k"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":121,"query_location_length":6,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":6,"column_names":["in_dim"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT o.o_orderkey, o.o_custkey, o.o_totalprice, o.o_orderstatus, l.l_orderkey, l.l_partkey, l.l_quantity, l.l_extendedprice\nFROM orders o\nLEFT JOIN lineitem l ON o.o_orderkey = l.l_orderkey\n AND o.o_orderstatus != 'O';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["o","o_orderkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":11,"column_names":["o","o_custkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":14,"column_names":["o","o_totalprice"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":15,"column_names":["o","o_orderstatus"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":12,"column_names":["l","l_orderkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":11,"column_names":["l","l_partkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":12,"column_names":["l","l_quantity"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":17,"column_names":["l","l_extendedprice"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":140,"query_location_length":82,"left":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":131,"query_location_length":8,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"right":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":150,"query_location_length":10,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":164,"query_location_length":58,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":164,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":12,"column_names":["o","o_orderkey"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":12,"column_names":["l","l_orderkey"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":200,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":15,"column_names":["o","o_orderstatus"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":3,"literal":{"kind":"STRING","text":"O"}}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM lineitem l\nINNER JOIN orders o ON l.l_orderkey = o.o_orderkey\n AND l.l_quantity + l.l_extendedprice \u003e o.o_totalprice\n AND l.l_quantity + o.o_totalprice \u003e 100;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":152,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":21,"query_location_length":10,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"right":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":43,"query_location_length":8,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":129,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":12,"column_names":["l","l_orderkey"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":12,"column_names":["o","o_orderkey"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":91,"query_location_length":49,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":104,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":12,"column_names":["l","l_quantity"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":17,"column_names":["l","l_extendedprice"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":14,"column_names":["o","o_totalprice"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":149,"query_location_length":35,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":162,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":12,"column_names":["l","l_quantity"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":14,"column_names":["o","o_totalprice"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(r.u), count(*) FROM l LEFT JOIN r ON l.i \u003c r.i AND l.i + 2 \u003e r.i AND (l.i + r.i) % 7 = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["r","u"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":66,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":1,"schema_name":"","table_name":"l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["l"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":50,"query_location_length":51,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":50,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":3,"column_names":["l","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["r","i"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":64,"query_location_length":13,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":3,"column_names":["l","i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["+"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["r","i"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":82,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":15,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":3,"column_names":["l","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":3,"column_names":["r","i"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with joined as (\n\tselect lhs.k l, rhs.k r\n\tfrom states lhs \n\tinner join states rhs\n\t on lhs.b \u003c rhs.e\n\t and rhs.b \u003c lhs.e\n\t and lhs.k = rhs.k\n)\nselect count(*) \nfrom joined","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"joined","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"l","query_location":25,"query_location_length":5,"column_names":["lhs","k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"r","query_location":34,"query_location_length":5,"column_names":["rhs","k"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":61,"query_location_length":84,"left":{"type":"BASE_TABLE","alias":"lhs","sample":null,"query_location":48,"query_location_length":10,"schema_name":"","table_name":"states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["states"]}},"right":{"type":"BASE_TABLE","alias":"rhs","sample":null,"query_location":72,"query_location_length":10,"schema_name":"","table_name":"states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["states"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":90,"query_location_length":55,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":90,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":5,"column_names":["lhs","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":5,"column_names":["rhs","e"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":111,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":5,"column_names":["rhs","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":5,"column_names":["lhs","e"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":132,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":5,"column_names":["lhs","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":5,"column_names":["rhs","k"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":155,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":170,"query_location_length":6,"schema_name":"","table_name":"joined","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["joined"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH data_table AS (\n SELECT epoch(ts) as ts\n FROM issue3486\n WHERE ts IS NOT NULL\n ),\n S AS (\n SELECT\n min(ts) as minVal,\n max(ts) as maxVal,\n (max(ts) - min(ts)) as range\n FROM data_table\n ),\n buckets AS (\n SELECT\n range as bucket,\n (range) * (select range FROM S) / 40 + (select minVal from S) as low,\n (range + 1) * (select range FROM S) / 40 + (select minVal from S) as high\n FROM range(0, 40, 1)\n )\n SELECT\n bucket,\n low,\n high,\n count(data_table.ts) as count\n FROM buckets\n LEFT JOIN data_table ON (data_table.ts \u003e= low AND data_table.ts \u003c high)\n GROUP BY bucket, low, high\n ORDER BY bucket;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":682,"query_location_length":6,"column_names":["bucket"]}}]}],"cte_map":{"map":[{"key":"data_table","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"ts","query_location":32,"query_location_length":9,"function_name":"epoch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["epoch"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":9,"schema_name":"","table_name":"issue3486","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue3486"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":80,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":2,"column_names":["ts"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"S","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"minVal","query_location":123,"query_location_length":7,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"maxVal","query_location":148,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"range","query_location":182,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":174,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":178,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["max"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":184,"query_location_length":7,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["min"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":213,"query_location_length":10,"schema_name":"","table_name":"data_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"buckets","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"bucket","query_location":261,"query_location_length":5,"column_names":["range"]},{"class":"FUNCTION","type":"FUNCTION","alias":"low","query_location":321,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":284,"query_location_length":36,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":285,"query_location_length":5,"column_names":["range"]}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":294,"query_location_length":21,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":302,"query_location_length":5,"column_names":["range"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":313,"query_location_length":1,"schema_name":"","table_name":"S","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["S"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":318,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}}],"qualified_name":{"path":["/"]}}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":323,"query_location_length":22,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":331,"query_location_length":6,"column_names":["minVal"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":343,"query_location_length":1,"schema_name":"","table_name":"S","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["S"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["+"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"high","query_location":401,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":360,"query_location_length":40,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":367,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":361,"query_location_length":5,"column_names":["range"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":369,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":374,"query_location_length":21,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":382,"query_location_length":5,"column_names":["range"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":393,"query_location_length":1,"schema_name":"","table_name":"S","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["S"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":398,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}}],"qualified_name":{"path":["/"]}}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":403,"query_location_length":22,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":411,"query_location_length":6,"column_names":["minVal"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":423,"query_location_length":1,"schema_name":"","table_name":"S","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["S"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":443,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":449,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":452,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":456,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":478,"query_location_length":6,"column_names":["bucket"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":492,"query_location_length":3,"column_names":["low"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":503,"query_location_length":4,"column_names":["high"]},{"class":"FUNCTION","type":"FUNCTION","alias":"count","query_location":515,"query_location_length":20,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":521,"query_location_length":13,"column_names":["data_table","ts"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":566,"query_location_length":71,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":554,"query_location_length":7,"schema_name":"","table_name":"buckets","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["buckets"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":576,"query_location_length":10,"schema_name":"","table_name":"data_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":591,"query_location_length":45,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":591,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":591,"query_location_length":13,"column_names":["data_table","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":608,"query_location_length":3,"column_names":["low"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":616,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":616,"query_location_length":13,"column_names":["data_table","ts"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":632,"query_location_length":4,"column_names":["high"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":651,"query_location_length":6,"column_names":["bucket"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":659,"query_location_length":3,"column_names":["low"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":664,"query_location_length":4,"column_names":["high"]}],"group_sets":[[0,1,2]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select l.k100 as lid, r.k100 as rid\nfrom tleft l \nleft join tleft r \non l.b100 \u003c r.e100\nand r.b100 \u003c l.e100\nand l.k100 + r.k100 \u003c 10\norder by 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"lid","query_location":7,"query_location_length":6,"column_names":["l","k100"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"rid","query_location":22,"query_location_length":6,"column_names":["r","k100"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":50,"query_location_length":82,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":41,"query_location_length":7,"schema_name":"","table_name":"tleft","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tleft"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":60,"query_location_length":7,"schema_name":"","table_name":"tleft","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tleft"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":72,"query_location_length":60,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":72,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":6,"column_names":["l","b100"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":6,"column_names":["r","e100"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":92,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":6,"column_names":["r","b100"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":6,"column_names":["l","e100"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":112,"query_location_length":20,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":119,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":6,"column_names":["l","k100"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":6,"column_names":["r","k100"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t1 INNER JOIN t2 ON t1.c0 = t2.c0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":17,"query_location_length":30,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":5,"column_names":["t1","c0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":5,"column_names":["t2","c0"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM p WHERE p.pb NOT IN (SELECT x.f FROM v x JOIN v y ON x.s = y.s);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":29,"query_location_length":55,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":41,"query_location_length":43,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":3,"column_names":["x","f"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":62,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":58,"query_location_length":3,"schema_name":"","table_name":"v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":67,"query_location_length":3,"schema_name":"","table_name":"v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["x","s"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":3,"column_names":["y","s"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":4,"column_names":["p","pb"]},"comparison_type":"COMPARE_EQUAL"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test WHERE EXISTS(SELECT * FROM test2 WHERE test.a=test2.a AND test.b\u003c\u003etest2.c) AND NOT EXISTS(SELECT * FROM test2 WHERE test.a=test2.a AND test.b\u003ctest2.c);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":25,"query_location_length":144,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":25,"query_location_length":68,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":39,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":58,"query_location_length":34,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":6,"column_names":["test","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":7,"column_names":["test2","a"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":77,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["test2","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":98,"query_location_length":71,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":102,"query_location_length":67,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":116,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":123,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":135,"query_location_length":33,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":135,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":6,"column_names":["test","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":7,"column_names":["test2","a"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":154,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":7,"column_names":["test2","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table l\nINNER JOIN right_table r ON l.id = r.id AND l.amount + r.budget \u003e 1100;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":70,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":38,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":42,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["r","id"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":71,"query_location_length":26,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":8,"column_names":["l","amount"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":8,"column_names":["r","budget"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1100"}}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, test.b, c FROM test INNER JOIN test2 ON NULL = 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":6,"column_names":["test","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":8,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x.col1, y.col1 FROM tbl_null x JOIN tbl_null y\nON x.col0 = y.col0 AND (x.col1 IS DISTINCT FROM y.col1)\nORDER BY x.col1, y.col1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":6,"column_names":["x","col1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":6,"column_names":["y","col1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["x","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["y","col1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":38,"query_location_length":71,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":27,"query_location_length":10,"schema_name":"","table_name":"tbl_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_null"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":43,"query_location_length":10,"schema_name":"","table_name":"tbl_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_null"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":57,"query_location_length":52,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":6,"column_names":["x","col0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":6,"column_names":["y","col0"]}},{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":78,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":6,"column_names":["x","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":6,"column_names":["y","col1"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x.col1, y.col1 FROM tbl_l_null x JOIN tbl_l_null y\nON x.col0 = y.col0 AND x.col1 = y.col1\nORDER BY x.col1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":6,"column_names":["x","col1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["x","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["y","col1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":56,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":27,"query_location_length":12,"schema_name":"","table_name":"tbl_l_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_l_null"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":45,"query_location_length":12,"schema_name":"","table_name":"tbl_l_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_l_null"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":61,"query_location_length":35,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":6,"column_names":["x","col0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":6,"column_names":["y","col0"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":6,"column_names":["x","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":6,"column_names":["y","col1"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x.col1, y.col1 FROM tbl_s_null x JOIN tbl_s_null y\nON x.col0 = y.col0 AND x.col1 = y.col1\nORDER BY x.col1.x, y.col1.x NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":8,"column_names":["x","col1","x"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":8,"column_names":["y","col1","x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["x","col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["y","col1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":56,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":27,"query_location_length":12,"schema_name":"","table_name":"tbl_s_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_s_null"]}},"right":{"type":"BASE_TABLE","alias":"y","sample":null,"query_location":45,"query_location_length":12,"schema_name":"","table_name":"tbl_s_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_s_null"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":61,"query_location_length":35,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":6,"column_names":["x","col0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":6,"column_names":["y","col0"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":6,"column_names":["x","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":6,"column_names":["y","col1"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM probe_varchar p\nJOIN build_varchar b\n ON p.k = b.k\n AND p.g \u003e= b.g;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":51,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":21,"query_location_length":15,"schema_name":"","table_name":"probe_varchar","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe_varchar"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":42,"query_location_length":15,"schema_name":"","table_name":"build_varchar","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["build_varchar"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":63,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":3,"column_names":["b","k"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":78,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":3,"column_names":["p","g"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":3,"column_names":["b","g"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT test.b, test2.b FROM test, test2 WHERE test.b \u003c\u003e test2.b AND test.b \u003c\u003e 1 AND test2.b \u003c\u003e 2 ORDER BY test.b, test2.b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":6,"column_names":["test","b"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":7,"column_names":["test2","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["test","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["test2","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":16,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":46,"query_location_length":50,"children":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":46,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":7,"column_names":["test2","b"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":68,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":6,"column_names":["test","b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":84,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":7,"column_names":["test2","b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a+1 FROM t1 JOIN t2 USING(a) ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":19,"query_location_length":16,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["a"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from t1 left join t2 on t1.id \u003e t2.id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":17,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":33,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["t1","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":5,"column_names":["t2","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table l\nLEFT JOIN right_table r ON l.id = r.id AND r.category = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":57,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":37,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":54,"query_location_length":30,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":4,"column_names":["r","id"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":10,"column_names":["r","category"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers LEFT OUTER JOIN integers2 ON TRUE ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers LEFT OUTER JOIN integers2 ON i=1 OR l=20 ORDER BY i, k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":40,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":52,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":59,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT f.fk, f.value, d.label\nFROM fact f LEFT JOIN dim_unique d ON f.fk = d.id\nWHERE f.fk \u003c= 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["f","fk"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":7,"column_names":["f","value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":7,"column_names":["d","label"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":37,"left":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":35,"query_location_length":6,"schema_name":"","table_name":"fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fact"]}},"right":{"type":"BASE_TABLE","alias":"d","sample":null,"query_location":52,"query_location_length":12,"schema_name":"","table_name":"dim_unique","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dim_unique"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":4,"column_names":["f","fk"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":4,"column_names":["d","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":86,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":4,"column_names":["f","fk"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT p.i,__mark_join_marker FROM probe p JOIN BY (TYPE MARK) build b ON 2=b.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["p","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":43,"query_location_length":36,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"probe","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":63,"query_location_length":7,"schema_name":"","table_name":"build","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["build"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":3,"column_names":["b","i"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT __mark_join_marker FROM (SELECT NULL::INTEGER AS dummy) l JOIN BY(TYPE MARK) (SELECT 1 AS i) r ON 1=r.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":65,"query_location_length":45,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":31,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"dummy","query_location":43,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":84,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":5,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":3,"column_names":["r","i"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a,__mark_join_marker FROM distinct_probe JOIN BY (TYPE MARK) distinct_build ON a\u003c\u003eb;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":48,"query_location_length":42,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":14,"schema_name":"","table_name":"distinct_probe","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_probe"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":14,"schema_name":"","table_name":"distinct_build","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["distinct_build"]}},"condition":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":86,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["b"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT __mark_join_marker FROM (VALUES (1,2)) p(a,c) JOIN BY(TYPE MARK) (VALUES (1,3)) b(b,d) ON a=b-1 AND a=a+1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":53,"query_location_length":59,"left":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":31,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","c"]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":72,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b","d"]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":97,"query_location_length":15,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["a"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":107,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":1,"column_names":["a"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":110,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}]},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, p.v = ANY(SELECT c.v FROM candidates c WHERE p.g IS NOT DISTINCT FROM c.g) FROM probes p ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":11,"query_location_length":74,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":3,"column_names":["c","v"]}],"from_table":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":37,"query_location_length":12,"schema_name":"","table_name":"candidates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["candidates"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":56,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["p","g"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":3,"column_names":["c","g"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["p","v"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":91,"query_location_length":8,"schema_name":"","table_name":"probes","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probes"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT __mark_join_marker FROM (VALUES (row(1,NULL::INT))) p(c) JOIN BY(TYPE MARK) (VALUES (row(1,2))) b(d) ON c = d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":64,"query_location_length":52,"left":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":31,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":16,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["row"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c"]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":83,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["d"]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":111,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["d"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM residual_vectors_probe JOIN BY(TYPE SEMI) residual_vectors_build ON a\u003c2 AND a+b=2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":58,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":22,"schema_name":"","table_name":"residual_vectors_probe","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["residual_vectors_probe"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":22,"schema_name":"","table_name":"residual_vectors_build","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["residual_vectors_build"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":82,"query_location_length":13,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":82,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":90,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT row(NULL::INT,2) \u003c ANY (SELECT row(1,2));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":40,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_LESSTHAN"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from (select 42) tbl(a) natural join (select 42) tbl2(a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":32,"left":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":11,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"tbl2","sample":null,"query_location":46,"query_location_length":11,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.product_id FROM (SELECT [1.0,0.0,0.0]::FLOAT[3] AS embedding) q\n INNER JOIN products t EXACT NEAREST 3 BY DISTANCE array_distance(q.embedding, t.embedding)\n ORDER BY t.product_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":177,"query_location_length":12,"column_names":["t","product_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["t","product_id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":75,"query_location_length":90,"left":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":25,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"embedding","query_location":46,"query_location_length":10,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":86,"query_location_length":10,"schema_name":"","table_name":"products","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["products"]}},"condition":null,"join_type":"INNER","ref_type":"NEAREST","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":125,"query_location_length":40,"function_name":"array_distance","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":11,"column_names":["q","embedding"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":11,"column_names":["t","embedding"]}}],"qualified_name":{"path":["array_distance"]}},"nearest_count":3,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT q.id, t.y FROM lnums q\n INNER JOIN all_null t NEAREST 2 BY DISTANCE abs(q.x - t.y)\n ORDER BY q.id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":4,"column_names":["q","id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["q","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["t","y"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":32,"query_location_length":58,"left":{"type":"BASE_TABLE","alias":"q","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"lnums","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lnums"]}},"right":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":43,"query_location_length":10,"schema_name":"","table_name":"all_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_null"]}},"condition":null,"join_type":"INNER","ref_type":"NEAREST","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":14,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":3,"column_names":["q","x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["t","y"]}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["abs"]}},"nearest_count":2,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sql LIKE '%EXACT NEAREST 2 BY DISTANCE%' FROM duckdb_views() WHERE view_name = 'default_view';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":36,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["sql"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":31,"literal":{"kind":"STRING","text":"%EXACT NEAREST 2 BY DISTANCE%"}}}],"qualified_name":{"path":["~~"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":53,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_views","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_views"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":9,"column_names":["view_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":14,"literal":{"kind":"STRING","text":"default_view"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.a, r.b, s.c, (SELECT coalesce(l.a, r.b, s.c)) AS first_value\nFROM ((VALUES (1), (2)) l(a)\nFULL OUTER JOIN (VALUES (10), (20)) r(b)\n\tON EXISTS (SELECT 1 WHERE l.a = 1 AND r.b = 10))\nFULL OUTER JOIN (VALUES (100), (200)) s(c)\n\tON EXISTS (SELECT 1 WHERE l.a = 1 AND s.c = 100)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["s","c"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"first_value","query_location":22,"query_location_length":32,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":30,"query_location_length":23,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":3,"column_names":["r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":3,"column_names":["s","c"]}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":190,"query_location_length":92,"left":{"type":"JOIN","alias":"","sample":null,"query_location":99,"query_location_length":89,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":76,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":115,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":144,"query_location_length":44,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":167,"query_location_length":20,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":167,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":167,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":179,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":3,"column_names":["r","b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"s","sample":null,"query_location":206,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":222,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":237,"query_location_length":45,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":252,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":260,"query_location_length":21,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":260,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":260,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":266,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":272,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":272,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":278,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM LATERAL (SELECT r.b) l(a)\nRIGHT JOIN (VALUES (1)) r(b) ON EXISTS (\n\tSELECT 1 WHERE l.a = r.b\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":68,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":22,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":51,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":72,"query_location_length":36,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":3,"column_names":["r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.i, r.i, r.j\nFROM non_inner_l l\nFULL OUTER JOIN non_inner_r r ON l.i = (SELECT MIN(i) FROM non_inner_s)\nORDER BY l.i, r.i NULLS LAST, r.j NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":3,"column_names":["l","i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":3,"column_names":["r","i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":3,"column_names":["r","j"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["r","j"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":71,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":26,"query_location_length":13,"schema_name":"","table_name":"non_inner_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":56,"query_location_length":13,"schema_name":"","table_name":"non_inner_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_r"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":3,"column_names":["l","i"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":79,"query_location_length":32,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":11,"schema_name":"","table_name":"non_inner_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["non_inner_s"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM (VALUES (1, 1)) l(a, x)\nLEFT JOIN (VALUES (2, 1)) r(b, y)\nON #1 = 1\nAND #3 = 2\nAND EXISTS (\n\tSELECT 1\n\tWHERE l.x = r.y\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":38,"query_location_length":96,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":14,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","x"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":48,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b","y"]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":75,"query_location_length":59,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":6,"left":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":75,"query_location_length":2,"index":1},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":86,"query_location_length":6,"left":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":86,"query_location_length":2,"index":3},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":97,"query_location_length":37,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":123,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":3,"column_names":["l","x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":3,"column_names":["r","y"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.a, r.b\nFROM pair_l l\nFULL OUTER JOIN pair_r r ON r.b IN (\n\tSELECT s.b FROM pair_s s WHERE s.a = l.a\n)\nORDER BY l.a NULLS LAST, r.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":3,"column_names":["l","a"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":3,"column_names":["r","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":30,"query_location_length":80,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":46,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":65,"query_location_length":45,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["s","b"]}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":84,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":99,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":3,"column_names":["l","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":3,"column_names":["r","b"]},"comparison_type":"COMPARE_EQUAL"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM pair_nested_outer_o o\nWHERE EXISTS (\n\tSELECT 1\n\tFROM pair_nested_l l\n\tFULL OUTER JOIN pair_nested_r r ON EXISTS (\n\t\tSELECT 1\n\t\tFROM pair_nested_local_t t\n\t\tWHERE EXISTS (\n\t\t\tSELECT 1\n\t\t\tFROM pair_nested_local_s s\n\t\t\tWHERE s.a = l.a\n\t\t\t AND s.b = r.b\n\t\t\t AND s.c = t.c\n\t\t\t AND s.c = o.x\n\t\t)\n\t)\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":14,"query_location_length":21,"schema_name":"","table_name":"pair_nested_outer_o","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_outer_o"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":42,"query_location_length":269,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":84,"query_location_length":225,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":67,"query_location_length":15,"schema_name":"","table_name":"pair_nested_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":100,"query_location_length":15,"schema_name":"","table_name":"pair_nested_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":119,"query_location_length":190,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":146,"query_location_length":21,"schema_name":"","table_name":"pair_nested_local_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_local_t"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":176,"query_location_length":130,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":205,"query_location_length":21,"schema_name":"","table_name":"pair_nested_local_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_nested_local_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":236,"query_location_length":66,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":236,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":236,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":242,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":255,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":255,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":261,"query_location_length":3,"column_names":["r","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":274,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":274,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":280,"query_location_length":3,"column_names":["t","c"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":293,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":293,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":299,"query_location_length":3,"column_names":["o","x"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.rowid, l.a, r.rowid, r.b\nFROM pair_rowid_l l\nFULL OUTER JOIN pair_rowid_r r ON EXISTS (\n\tSELECT 1 FROM pair_rowid_s s WHERE s.a = l.a AND s.b = r.b\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["l","rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":7,"column_names":["r","rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":54,"query_location_length":104,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":39,"query_location_length":14,"schema_name":"","table_name":"pair_rowid_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_rowid_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":70,"query_location_length":14,"schema_name":"","table_name":"pair_rowid_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_rowid_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":88,"query_location_length":70,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":112,"query_location_length":14,"schema_name":"","table_name":"pair_rowid_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_rowid_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":133,"query_location_length":23,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":133,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":147,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":3,"column_names":["r","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.a, r.b, r2.c\nFROM pair_multi_l l\nFULL OUTER JOIN (\n\tpair_multi_r r\n\tJOIN pair_multi_l2 r2 ON true\n) ON EXISTS (\n\tSELECT 1\n\tFROM pair_multi_s s\n\tWHERE s.a = l.a\n\t AND s.b = r.b\n\t AND s.c = r2.c\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["r2","c"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":163,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":27,"query_location_length":14,"schema_name":"","table_name":"pair_multi_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_l"]}},"right":{"type":"JOIN","alias":"","sample":null,"query_location":77,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":61,"query_location_length":14,"schema_name":"","table_name":"pair_multi_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_r"]}},"right":{"type":"BASE_TABLE","alias":"r2","sample":null,"query_location":82,"query_location_length":16,"schema_name":"","table_name":"pair_multi_l2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_l2"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":112,"query_location_length":93,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":137,"query_location_length":14,"schema_name":"","table_name":"pair_multi_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_multi_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":159,"query_location_length":44,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":159,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":159,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":176,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":176,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":3,"column_names":["r","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":193,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":193,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":4,"column_names":["r2","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.a, r.b\nFROM pair_empty_l l\nFULL OUTER JOIN pair_empty_r r ON EXISTS (\n\tSELECT 1\n\tFROM pair_empty_s s\n\tWHERE s.a = l.a\n\t AND s.b = r.b\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":36,"query_location_length":109,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"pair_empty_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_empty_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":52,"query_location_length":14,"schema_name":"","table_name":"pair_empty_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_empty_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":70,"query_location_length":75,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":95,"query_location_length":14,"schema_name":"","table_name":"pair_empty_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_empty_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":117,"query_location_length":26,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":117,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":134,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":3,"column_names":["r","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.a, l.x, r.b\nFROM pair_l l\nLEFT JOIN pair_r r ON l.a IN (\n\tSELECT s.a FROM pair_s s WHERE s.b = r.b\n)\nORDER BY l.x, r.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":3,"column_names":["l","x"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":3,"column_names":["r","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["l","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":74,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":26,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":64,"query_location_length":45,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["s","a"]}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":83,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":3,"column_names":["r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":3,"column_names":["l","a"]},"comparison_type":"COMPARE_EQUAL"},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.a, l.x, r.b\nFROM pair_l l\nLEFT JOIN pair_r r ON EXISTS (\n\tSELECT 1\n\tFROM pair_left_nested_t t\n\tWHERE EXISTS (\n\t\tSELECT 1\n\t\tFROM pair_left_multi_s s\n\t\tWHERE s.a = l.a\n\t\t AND s.b = r.b\n\t\t AND s.c = t.c\n\t)\n)\nORDER BY l.a, l.x, r.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":3,"column_names":["l","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":3,"column_names":["l","x"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":235,"query_location_length":3,"column_names":["r","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["l","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":180,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":26,"query_location_length":8,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":57,"query_location_length":158,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":82,"query_location_length":20,"schema_name":"","table_name":"pair_left_nested_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_nested_t"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":110,"query_location_length":103,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":137,"query_location_length":19,"schema_name":"","table_name":"pair_left_multi_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_multi_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":165,"query_location_length":45,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":165,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":3,"column_names":["l","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":183,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":183,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":3,"column_names":["r","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":201,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":201,"query_location_length":3,"column_names":["s","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":207,"query_location_length":3,"column_names":["t","c"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH q AS (\n\tSELECT count(*)::INTEGER AS count_value\n\tFROM pair_left_effect_l l\n\tSEMI JOIN (SELECT b, nextval('pair_exists_right_effect_seq') AS v FROM pair_left_effect_r) r ON EXISTS (\n\t\tSELECT 1 WHERE l.a = r.v\n\t)\n)\nSELECT count_value, currval('pair_exists_right_effect_seq') FROM q;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"q","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"count_value","query_location":28,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":81,"query_location_length":134,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":59,"query_location_length":20,"schema_name":"","table_name":"pair_left_effect_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_effect_l"]}},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":91,"query_location_length":80,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["b"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":102,"query_location_length":39,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":30,"literal":{"kind":"STRING","text":"pair_exists_right_effect_seq"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":152,"query_location_length":18,"schema_name":"","table_name":"pair_left_effect_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_left_effect_r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":177,"query_location_length":38,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":203,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":209,"query_location_length":3,"column_names":["r","v"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":11,"column_names":["count_value"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":238,"query_location_length":39,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":246,"query_location_length":30,"literal":{"kind":"STRING","text":"pair_exists_right_effect_seq"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":283,"query_location_length":1,"schema_name":"","table_name":"q","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["q"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), count(lid), currval('pair_volatile_right_seq')\nFROM pair_volatile_right_result;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":3,"column_names":["lid"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":34,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":25,"literal":{"kind":"STRING","text":"pair_volatile_right_seq"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":26,"schema_name":"","table_name":"pair_volatile_right_result","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_volatile_right_result"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT outer_l.a, q.a, q.x, q.b\nFROM pair_right_corr_outer_l outer_l\nLEFT JOIN LATERAL (\n\tWITH cl AS (SELECT a, x FROM pair_l WHERE pair_l.a = outer_l.a)\n\tSELECT cl.a, cl.x, r.b\n\tFROM cl\n\tLEFT JOIN pair_r r ON EXISTS (\n\t\tSELECT 1\n\t\tFROM pair_s s\n\t\tWHERE s.a = cl.a\n\t\t AND s.b = r.b\n\t)\n) q ON true\nORDER BY outer_l.a, q.a, q.x, q.b NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":307,"query_location_length":9,"column_names":["outer_l","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":318,"query_location_length":3,"column_names":["q","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":323,"query_location_length":3,"column_names":["q","x"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":328,"query_location_length":3,"column_names":["q","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["outer_l","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["q","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":3,"column_names":["q","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":3,"column_names":["q","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":69,"query_location_length":228,"left":{"type":"BASE_TABLE","alias":"outer_l","sample":null,"query_location":37,"query_location_length":31,"schema_name":"","table_name":"pair_right_corr_outer_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_right_corr_outer_l"]}},"right":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":87,"query_location_length":200,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cl","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":119,"query_location_length":6,"schema_name":"","table_name":"pair_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_l"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":132,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":8,"column_names":["pair_l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":9,"column_names":["outer_l","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":4,"column_names":["cl","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":168,"query_location_length":4,"column_names":["cl","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":174,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":188,"query_location_length":97,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":184,"query_location_length":2,"schema_name":"","table_name":"cl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cl"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":198,"query_location_length":8,"schema_name":"","table_name":"pair_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_r"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":210,"query_location_length":75,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":228,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":237,"query_location_length":8,"schema_name":"","table_name":"pair_s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pair_s"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":254,"query_location_length":28,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":254,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":254,"query_location_length":3,"column_names":["s","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":260,"query_location_length":4,"column_names":["cl","a"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":273,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":273,"query_location_length":3,"column_names":["s","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":279,"query_location_length":3,"column_names":["r","b"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":293,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT r.b\nFROM (VALUES (1), (2)) l(a)\nJOIN BY (TYPE RIGHT_SEMI) (VALUES (1), (3)) r(b)\nON EXISTS (SELECT 1 WHERE l.a = r.b)\nORDER BY r.b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["r","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["r","b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":39,"query_location_length":85,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":16,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":65,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":91,"query_location_length":33,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":114,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":3,"column_names":["l","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":3,"column_names":["r","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"RIGHT_SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM \n\t(SELECT * FROM threek WHERE id % 2 = 0) t1\n\tPOSITIONAL JOIN\n\t(SELECT * FROM threek WHERE id % 2 = 1) t2\nWHERE t1.id + 1 \u003c\u003e t2.id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":60,"query_location_length":59,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":16,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":6,"schema_name":"","table_name":"threek","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["threek"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":44,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":6,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":77,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":85,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":6,"schema_name":"","table_name":"threek","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["threek"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":6,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"POSITIONAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":126,"query_location_length":18,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":132,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":5,"column_names":["t1","id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":5,"column_names":["t2","id"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE i IN (SELECT MAX(i) FROM integers)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":34,"query_location_length":29,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table l\nRIGHT JOIN right_table r ON l.id = r.id AND r.category = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":58,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":38,"query_location_length":13,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":30,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["r","id"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":10,"column_names":["r","category"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT integers.*, integers2.* FROM integers2 RIGHT OUTER JOIN integers ON l=20 ORDER BY i, k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":10,"relation_name":"integers","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"STAR","type":"STAR","alias":"","query_location":19,"query_location_length":11,"relation_name":"integers2","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":46,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"integers2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers2"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["l"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select l.* from test_int l anti join test_int_del r on l.k is not distinct from r.pk;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":3,"relation_name":"l","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":57,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":16,"query_location_length":10,"schema_name":"","table_name":"test_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_int"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":37,"query_location_length":14,"schema_name":"","table_name":"test_int_del","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_int_del"]}},"condition":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":55,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":3,"column_names":["l","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":4,"column_names":["r","pk"]}},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table ANTI JOIN right_table ON (left_table.a \u003e right_table.a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":55,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":51,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":12,"column_names":["left_table","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":13,"column_names":["right_table","a"]}},"join_type":"ANTI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT r.i FROM left_input l JOIN BY (TYPE RIGHT_SEMI) right_input r ON r.i IS NOT DISTINCT FROM NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["r","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":29,"query_location_length":72,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":16,"query_location_length":12,"schema_name":"","table_name":"left_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_input"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":55,"query_location_length":13,"schema_name":"","table_name":"right_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_input"]}},"condition":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":72,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":3,"column_names":["r","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},"join_type":"RIGHT_SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table SEMI JOIN right_table ON ([left_table.a, left_table.b] = [right_table.a, right_table.b]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":88,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":61,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":28,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":12,"column_names":["left_table","a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":12,"column_names":["left_table","b"]}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":30,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":13,"column_names":["right_table","a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":13,"column_names":["right_table","b"]}}],"qualified_name":{"path":["list_value"]}}},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a as outer_a, (SELECT ANY_VALUE(b) FROM right_table where right_table.a != outer_a) right_table_b FROM left_table SEMI JOIN right_table ON (left_table.a = right_table.a) Order by outer_a, right_table_b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":186,"query_location_length":7,"column_names":["outer_a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":195,"query_location_length":13,"column_names":["right_table_b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"outer_a","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"right_table_b","query_location":21,"query_location_length":69,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":12,"function_name":"any_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["any_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":65,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":13,"column_names":["right_table","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":7,"column_names":["outer_a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":121,"query_location_length":55,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":110,"query_location_length":10,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":131,"query_location_length":11,"schema_name":"","table_name":"right_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["right_table"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":147,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":12,"column_names":["left_table","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":13,"column_names":["right_table","a"]}},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * FROM t1 WHERE NOT EXISTS (SELECT 1 FROM t0 WHERE null);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":23,"query_location_length":40,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":27,"query_location_length":36,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (\n SELECT 1 FROM t1 RIGHT JOIN (SELECT 1 AS col0 FROM t1) AS sub0\n ON ((EXISTS (SELECT 1 FROM t1 WHERE t1.c2 \u003c 0)) NOT BETWEEN (t1.c2 = t1.c1) AND t1.c0)\n UNION ALL\n SELECT 1 FROM t1 RIGHT JOIN (SELECT 1 AS col0 FROM t1) AS sub0\n ON ((EXISTS (SELECT 1 FROM t1 WHERE t1.c2 \u003c 0)) NOT BETWEEN (t1.c2 = t1.c1) AND t1.c0)\n) x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"x","sample":null,"query_location":21,"query_location_length":327,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":136,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"SUBQUERY","alias":"sub0","sample":null,"query_location":53,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col0","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":96,"query_location_length":81,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":144,"query_location_length":33,"input":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":97,"query_location_length":41,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":119,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":128,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":5,"column_names":["t1","c2"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"lower":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":153,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":5,"column_names":["t1","c2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":5,"column_names":["t1","c1"]}},"upper":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":5,"column_names":["t1","c0"]}}]},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":200,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":210,"query_location_length":136,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":207,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"SUBQUERY","alias":"sub0","sample":null,"query_location":221,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col0","query_location":229,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":244,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":264,"query_location_length":81,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":312,"query_location_length":33,"input":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":265,"query_location_length":41,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":280,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":287,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":296,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":296,"query_location_length":5,"column_names":["t1","c2"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":304,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"lower":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":321,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":321,"query_location_length":5,"column_names":["t1","c2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":329,"query_location_length":5,"column_names":["t1","c1"]}},"upper":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":340,"query_location_length":5,"column_names":["t1","c0"]}}]},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, z\nFROM wide_nulls, limits_nulls\nWHERE c0 \u003c z\n AND c1 \u003c z\n AND c2 \u003c z\n AND c3 \u003c z\n AND c4 \u003c z\n AND c5 \u003c z\n AND c6 \u003c z\n AND c7 \u003c z\n AND c8 \u003c z\n AND c9 \u003c z\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["z"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":12,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":10,"schema_name":"","table_name":"wide_nulls","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["wide_nulls"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":12,"schema_name":"","table_name":"limits_nulls","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["limits_nulls"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":48,"query_location_length":123,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":48,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":2,"column_names":["c0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":61,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":2,"column_names":["c1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":74,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":2,"column_names":["c2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":87,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":2,"column_names":["c3"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":100,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":2,"column_names":["c4"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":113,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":2,"column_names":["c5"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":126,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":2,"column_names":["c6"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":139,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":2,"column_names":["c7"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":152,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":2,"column_names":["c8"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":157,"query_location_length":1,"column_names":["z"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":165,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":2,"column_names":["c9"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":1,"column_names":["z"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM left_table l\nSEMI JOIN empty_table e ON TRUE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":31,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"left_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_table"]}},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":37,"query_location_length":13,"schema_name":"","table_name":"empty_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empty_table"]}},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t1 JOIN BY (TYPE left) t2 ON (a = b);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":33,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["b"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select l.c2\nfrom tleft l\nleft join tright r\non l.c0 \u003e= r.c0\nand l.c2 != r.c1\nand l.c2\norder by 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["l","c2"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":25,"query_location_length":60,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":17,"query_location_length":7,"schema_name":"","table_name":"tleft","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tleft"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":35,"query_location_length":8,"schema_name":"","table_name":"tright","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tright"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":47,"query_location_length":38,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":47,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":4,"column_names":["l","c0"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["r","c0"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":64,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":4,"column_names":["l","c2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":4,"column_names":["r","c1"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":4,"column_names":["l","c2"]}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t1.i, t1.s1, t1.s2, t2.s1, t2.s2 FROM test1 t1, test2 t2 WHERE t1.i = t2.i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["t1","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["t1","s1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":5,"column_names":["t1","s2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":5,"column_names":["t2","s1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":5,"column_names":["t2","s2"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":40,"query_location_length":23,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"test1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test1"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":55,"query_location_length":8,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":4,"column_names":["t1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":4,"column_names":["t2","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT replace(replace(trim(content, chr(10)), chr(10), ' '), chr(9), '') FROM read_text('{TEST_DIR}/formats.geojsonl');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":66,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":45,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":22,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}}],"qualified_name":{"path":["trim"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":3,"literal":{"kind":"STRING","text":" "}}}],"qualified_name":{"path":["replace"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":6,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["chr"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["replace"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":79,"query_location_length":40,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":29,"literal":{"kind":"STRING","text":"{TEST_DIR}/formats.geojsonl"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT replace(replace(trim(content, chr(10)), chr(10), ' '), chr(9), '') FROM read_text('{TEST_DIR}/no_geom_ok.geojsonl');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":66,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":45,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":22,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}}],"qualified_name":{"path":["trim"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":3,"literal":{"kind":"STRING","text":" "}}}],"qualified_name":{"path":["replace"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":6,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["chr"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["replace"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":79,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":32,"literal":{"kind":"STRING","text":"{TEST_DIR}/no_geom_ok.geojsonl"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_json('{DATA_DIR}/json/internal_2732.json', map_inference_threshold=0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":74,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":36,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/internal_2732.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":23,"column_names":["map_inference_threshold"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_json_auto('{DATA_DIR}/json/arr.json', columns={'v':'VARCHAR','k':'VARCHAR'});","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":81,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":26,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/arr.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":37,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v","query_location":70,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"name":"k","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"k","query_location":84,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_json_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select typeof(test) from '{TEST_DIR}/manynulls.json' limit 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":4,"column_names":["test"]}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":27,"schema_name":"","table_name":"{TEST_DIR}/manynulls.json","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/manynulls.json"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH path AS (\n SELECT '$.\"Status / SubStatus\"' p\n)\nSELECT '{\"Status / SubStatus\": \"test\"}' -\u003e p\nFROM path","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"path","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"p","query_location":26,"query_location_length":24,"literal":{"kind":"STRING","text":"$.\"Status / SubStatus\""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":62,"query_location_length":37,"lhs":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":32,"literal":{"kind":"STRING","text":"{\"Status / SubStatus\": \"test\"}"}},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":1,"column_names":["p"]},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":105,"query_location_length":4,"schema_name":"","table_name":"path","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["path"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT to_json((1::UHUGEINT \u003c\u003c 100)::DECIMAL(38,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"to_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":15,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":18,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["\u003c\u003c"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["to_json"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select from_hex('aa')::json;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"from_hex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"aa"}}}],"qualified_name":{"path":["from_hex"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":4,"catalog":"","schema":"","type_name":"json","children":[],"qualified_name":{"path":["json"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT JSON_OBJECT('key_1', 'one', 'key_2', NULL) AS KEEP_NULL_1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"KEEP_NULL_1","query_location":7,"query_location_length":42,"function_name":"json_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"literal":{"kind":"STRING","text":"key_1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"literal":{"kind":"STRING","text":"one"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"literal":{"kind":"STRING","text":"key_2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["json_object"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM '{DATA_DIR}/json/duplicate_column_names.json'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":45,"schema_name":"","table_name":"{DATA_DIR}/json/duplicate_column_names.json","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/json/duplicate_column_names.json"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select cast(['[1, 2]', '[3, 4]'] as json[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":36,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":8,"literal":{"kind":"STRING","text":"[1, 2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":8,"literal":{"kind":"STRING","text":"[3, 4]"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":4,"catalog":"","schema":"","type_name":"json","children":[],"qualified_name":{"path":["json"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST('{\"duck\":42' AS JSON)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":30,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":12,"literal":{"kind":"STRING","text":"{\"duck\":42"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST('{\"duck\":42}'::JSON AS MAP(INTEGER, INTEGER))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":54,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"literal":{"kind":"STRING","text":"{\"duck\":42}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '[{\"some_key\":\"some_v}alue\"}]'::json[];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":30,"literal":{"kind":"STRING","text":"[{\"some_key\":\"some_v}alue\"}]"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":4,"catalog":"","schema":"","type_name":"json","children":[],"qualified_name":{"path":["json"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT from_json('{\"x\":{\"b\":1}}', '{\"x\":{\"b\":\"INT\",\"B\":\"INT\"}}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"from_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"x\":{\"b\":1}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":29,"literal":{"kind":"STRING","text":"{\"x\":{\"b\":\"INT\",\"B\":\"INT\"}}"}}}],"qualified_name":{"path":["from_json"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsText(from_json('{\"g\":{\"type\":\"Point\",\"coordinates\":[5,6]}}', '{\"g\":\"GEOMETRY\"}').g);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":88,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":17,"query_location_length":77,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":75,"function_name":"from_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":44,"literal":{"kind":"STRING","text":"{\"g\":{\"type\":\"Point\",\"coordinates\":[5,6]}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":18,"literal":{"kind":"STRING","text":"{\"g\":\"GEOMETRY\"}"}}}],"qualified_name":{"path":["from_json"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":2,"literal":{"kind":"STRING","text":"g"}}]}}],"qualified_name":{"path":["st_astext"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT json_extract(example, k) AS v FROM (SELECT 'key' AS k) keys)\nFROM testjson;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":68,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":15,"query_location_length":24,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":7,"column_names":["example"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"SUBQUERY","alias":"keys","sample":null,"query_location":50,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"k","query_location":58,"query_location_length":5,"literal":{"kind":"STRING","text":"key"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":8,"schema_name":"","table_name":"testjson","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["testjson"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_contains('{\"a\": {\"b\": [{\"c\": 1, \"d\": 2}]}}', '[{\"d\": 2, \"c\": 1}]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":71,"function_name":"json_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":34,"literal":{"kind":"STRING","text":"{\"a\": {\"b\": [{\"c\": 1, \"d\": 2}]}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":20,"literal":{"kind":"STRING","text":"[{\"d\": 2, \"c\": 1}]"}}}],"qualified_name":{"path":["json_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [{'a': 1, 'b': [1]}::VARIANT]::JSON","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":22,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_object('nested', map(['duck', 'goose'], [42, 7]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"json_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":8,"literal":{"kind":"STRING","text":"nested"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":31,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":7,"literal":{"kind":"STRING","text":"goose"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["json_object"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_quote(map(list(b), list(c))) from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_quote","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":21,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["list"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["list"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["json_quote"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select array_to_json({a: 42})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"array_to_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":7,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["array_to_json"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_object('a',2,'c',json_object('e',5));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"json_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":18,"function_name":"json_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["json_object"]}}}],"qualified_name":{"path":["json_object"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deep_merge('{\"a\": 1}', '{\"b\": 2}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":10,"literal":{"kind":"STRING","text":"{\"a\": 1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":10,"literal":{"kind":"STRING","text":"{\"b\": 2}"}}}],"qualified_name":{"path":["json_deep_merge"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deep_merge('{\"name\": \"x\"}', '{\"id\": 47}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"name\": \"x\"}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":12,"literal":{"kind":"STRING","text":"{\"id\": 47}"}}}],"qualified_name":{"path":["json_deep_merge"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deep_merge('{\"a\":1}', '{\"b\":2}', '{\"c\":3}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"b\":2}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"c\":3}"}}}],"qualified_name":{"path":["json_deep_merge"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deep_merge('{\"a\":{\"b\":1},\"c\":{\"d\":2}}', '{\"a\":null,\"c\":{\"d\":null}}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":73,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":27,"literal":{"kind":"STRING","text":"{\"a\":{\"b\":1},\"c\":{\"d\":2}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":27,"literal":{"kind":"STRING","text":"{\"a\":null,\"c\":{\"d\":null}}"}}}],"qualified_name":{"path":["json_deep_merge"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deep_merge('{\"a\":1}', '{\"b\":null}') FROM range(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"json_deep_merge","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":12,"literal":{"kind":"STRING","text":"{\"b\":null}"}}}],"qualified_name":{"path":["json_deep_merge"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":53,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select ('{\"my_field\": {\"my_nested_field\": [\"goose\", \"duck\"]}}'::JSON).my_field.my_nested_field.\"1\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":91,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":54,"literal":{"kind":"STRING","text":"{\"my_field\": {\"my_nested_field\": [\"goose\", \"duck\"]}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":9,"literal":{"kind":"STRING","text":"my_field"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":16,"literal":{"kind":"STRING","text":"my_nested_field"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":4,"literal":{"kind":"STRING","text":"1"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json('{\"a\":2,\"c\":[4,5,{\"f\":7}]}').x","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":35,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":27,"literal":{"kind":"STRING","text":"{\"a\":2,\"c\":[4,5,{\"f\":7}]}"}}}],"qualified_name":{"path":["json"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"literal":{"kind":"STRING","text":"x"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with path AS (\n SELECT '$.goose' p\n)\nSELECT json_exists('{\"duck\": null}', p) FROM path","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"path","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"p","query_location":26,"query_location_length":9,"literal":{"kind":"STRING","text":"$.goose"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":32,"function_name":"json_exists","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":16,"literal":{"kind":"STRING","text":"{\"duck\": null}"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["p"]}}],"qualified_name":{"path":["json_exists"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":85,"query_location_length":4,"schema_name":"","table_name":"path","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["path"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '{\"my_field\": {\"my_nested_field\": [\"goose\", \"duck\"]}}'::JSON-\u003e\u003e'/my_field/my_nested_field/1'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":92,"function_name":"-\u003e\u003e","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":54,"literal":{"kind":"STRING","text":"{\"my_field\": {\"my_nested_field\": [\"goose\", \"duck\"]}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":29,"literal":{"kind":"STRING","text":"/my_field/my_nested_field/1"}}}],"qualified_name":{"path":["-\u003e\u003e"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_extract('{\"a\":2,\"c\":[4,5,{\"f\":7}]}', '$.x');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":27,"literal":{"kind":"STRING","text":"{\"a\":2,\"c\":[4,5,{\"f\":7}]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"literal":{"kind":"STRING","text":"$.x"}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_extract(j, '$.b[#-4]'), json_extract(j, '$.b[-4]') FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":10,"literal":{"kind":"STRING","text":"$.b[#-4]"}}}],"qualified_name":{"path":["json_extract"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":26,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":9,"literal":{"kind":"STRING","text":"$.b[-4]"}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_extract(j, '$.b[#-1') FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":9,"literal":{"kind":"STRING","text":"$.b[#-1"}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '{\"\\\"du\\nck\\\"\": 42}'-\u003e('$.\"\\\"du' || chr(10) || 'ck\\\"\"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":7,"query_location_length":55,"lhs":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"literal":{"kind":"STRING","text":"{\"\\\"du\\nck\\\"\": 42}"}},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":31,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":9,"literal":{"kind":"STRING","text":"$.\"\\\"du"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":7,"literal":{"kind":"STRING","text":"ck\\\"\""}}}],"qualified_name":{"path":["||"]}},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ('{\"a\":[10,20,30]}'::JSON)-\u003e'$.a[#-1]'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":7,"query_location_length":38,"lhs":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":18,"literal":{"kind":"STRING","text":"{\"a\":[10,20,30]}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":10,"literal":{"kind":"STRING","text":"$.a[#-1]"}},"syntax_type":"SINGLE_ARROW"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_insert('[1,2]', '$[5]', '9')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_insert","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"literal":{"kind":"STRING","text":"[1,2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":6,"literal":{"kind":"STRING","text":"$[5]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"9"}}}],"qualified_name":{"path":["json_insert"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_insert('{\"a\":1}', '$.b', '2') FROM range(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"json_insert","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":5,"literal":{"kind":"STRING","text":"$.b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}}],"qualified_name":{"path":["json_insert"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":47,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_insert('{}', '$.a[0]', '1')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"json_insert","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"STRING","text":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":8,"literal":{"kind":"STRING","text":"$.a[0]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}}],"qualified_name":{"path":["json_insert"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT length(json_merge_patch(repeat('{\"a\":', 200000) || '1' || repeat('}', 200000), '{}'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":85,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":77,"function_name":"json_merge_patch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":53,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":23,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":7,"literal":{"kind":"STRING","text":"{\"a\":"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":6,"literal":{"kind":"INTEGER","text":"200000"}}}],"qualified_name":{"path":["repeat"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":19,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":6,"literal":{"kind":"INTEGER","text":"200000"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"literal":{"kind":"STRING","text":"{}"}}}],"qualified_name":{"path":["json_merge_patch"]}}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT JSON_MERGE_PATCH('{ \"a\": 1, \"b\":2 }','{ \"a\": 3, \"c\":4 }');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"json_merge_patch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":19,"literal":{"kind":"STRING","text":"{ \"a\": 1, \"b\":2 }"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":19,"literal":{"kind":"STRING","text":"{ \"a\": 3, \"c\":4 }"}}}],"qualified_name":{"path":["json_merge_patch"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_merge_patch_diff('{\"a\":1}', '{\"a\":1,\"b\":2}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"a\":1,\"b\":2}"}}}],"qualified_name":{"path":["json_merge_patch_diff"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_merge_patch_diff('\"hello\"', '\"world\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":9,"literal":{"kind":"STRING","text":"\"hello\""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":9,"literal":{"kind":"STRING","text":"\"world\""}}}],"qualified_name":{"path":["json_merge_patch_diff"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_merge_patch_diff('{\"a\":1}', NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["json_merge_patch_diff"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_merge_patch('{\"a\":1,\"b\":2}', json_merge_patch_diff('{\"a\":1,\"b\":2}', '{\"a\":1}')) = '{\"a\":1}'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":96,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":84,"function_name":"json_merge_patch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"a\":1,\"b\":2}"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":49,"function_name":"json_merge_patch_diff","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"a\":1,\"b\":2}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}}],"qualified_name":{"path":["json_merge_patch_diff"]}}}],"qualified_name":{"path":["json_merge_patch"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_normalize('{\"b\":1,\"a\":2}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"b\":1,\"a\":2}"}}}],"qualified_name":{"path":["json_normalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_normalize(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["json_normalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_normalize('{\"z\":1,\"a\":2}'::JSON)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"z\":1,\"a\":2}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}}],"qualified_name":{"path":["json_normalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_normalize('{\"b\":{\"c\":[{\"z\":1,\"a\":2}]},\"a\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"json_normalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":35,"literal":{"kind":"STRING","text":"{\"b\":{\"c\":[{\"z\":1,\"a\":2}]},\"a\":1}"}}}],"qualified_name":{"path":["json_normalize"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_extract(j, '$.my_field.my_nested_field[-2]') from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":32,"literal":{"kind":"STRING","text":"$.my_field.my_nested_field[-2]"}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":62,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_extract('{\"a\": {\"b\": \"c\"}}', '$[[');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":19,"literal":{"kind":"STRING","text":"{\"a\": {\"b\": \"c\"}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":5,"literal":{"kind":"STRING","text":"$[["}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with tbl as (\n select '{\"aaaaaaaaaaaa\":1}' j, '$.aaaaaaaaaaaa.*' p\n)\nselect json_extract(j, p) from tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"tbl","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":25,"query_location_length":20,"literal":{"kind":"STRING","text":"{\"aaaaaaaaaaaa\":1}"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"p","query_location":49,"query_location_length":18,"literal":{"kind":"STRING","text":"$.aaaaaaaaaaaa.*"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":18,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["p"]}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":103,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_extract('[[{\"a\":[1,2,3]}], [{\"a\":[4,5,6]}]]','$[*]..a[*]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":36,"literal":{"kind":"STRING","text":"[[{\"a\":[1,2,3]}], [{\"a\":[4,5,6]}]]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":12,"literal":{"kind":"STRING","text":"$[*]..a[*]"}}}],"qualified_name":{"path":["json_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_remove('[1,2,3]', '$[0]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"literal":{"kind":"STRING","text":"[1,2,3]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":6,"literal":{"kind":"STRING","text":"$[0]"}}}],"qualified_name":{"path":["json_remove"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_remove('{\"a\":1,\"b\":2}', 'a')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"a\":1,\"b\":2}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["json_remove"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_remove('[1,2]', '$[#-5]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":7,"literal":{"kind":"STRING","text":"[1,2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":8,"literal":{"kind":"STRING","text":"$[#-5]"}}}],"qualified_name":{"path":["json_remove"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_remove(d, '$.x') FROM (VALUES ('{\"x\":1,\"y\":2}'), (NULL)) t(d)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"json_remove","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":5,"literal":{"kind":"STRING","text":"$.x"}}}],"qualified_name":{"path":["json_remove"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":34,"query_location_length":34,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"x\":1,\"y\":2}"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["d"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_replace('{\"a\":{\"x\":1}}', '$.a', '42')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"json_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"a\":{\"x\":1}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":5,"literal":{"kind":"STRING","text":"$.a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"STRING","text":"42"}}}],"qualified_name":{"path":["json_replace"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, json_replace(payload, '$.status', '\"done\"') FROM events ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":43,"function_name":"json_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":7,"column_names":["payload"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":10,"literal":{"kind":"STRING","text":"$.status"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":8,"literal":{"kind":"STRING","text":"\"done\""}}}],"qualified_name":{"path":["json_replace"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":6,"schema_name":"","table_name":"events","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["events"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_set('{\"a\":1}', '$.a', '99')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"literal":{"kind":"STRING","text":"$.a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"literal":{"kind":"STRING","text":"99"}}}],"qualified_name":{"path":["json_set"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_set('{}', '$.obj', '{\"x\":1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":7,"literal":{"kind":"STRING","text":"$.obj"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"x\":1}"}}}],"qualified_name":{"path":["json_set"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_set('{\"a\":1}', '$.b', '2') FROM range(3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"literal":{"kind":"STRING","text":"$.b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}}],"qualified_name":{"path":["json_set"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":44,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_set('{\"log\":[{\"v\":1},{\"v\":2}]}', '$.log[#-1].v', '9')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":27,"literal":{"kind":"STRING","text":"{\"log\":[{\"v\":1},{\"v\":2}]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":14,"literal":{"kind":"STRING","text":"$.log[#-1].v"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":3,"literal":{"kind":"STRING","text":"9"}}}],"qualified_name":{"path":["json_set"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_set('[1,2]', '$[#-]', '9')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"literal":{"kind":"STRING","text":"[1,2]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":7,"literal":{"kind":"STRING","text":"$[#-]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"9"}}}],"qualified_name":{"path":["json_set"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_set('{\"a\":1}', '$.a[0]', '2')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"json_set","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":9,"literal":{"kind":"STRING","text":"{\"a\":1}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":8,"literal":{"kind":"STRING","text":"$.a[0]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}}],"qualified_name":{"path":["json_set"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_strip_nulls('{\"a\":1,\"b\":null,\"c\":null,\"d\":2}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"json_strip_nulls","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":33,"literal":{"kind":"STRING","text":"{\"a\":1,\"b\":null,\"c\":null,\"d\":2}"}}}],"qualified_name":{"path":["json_strip_nulls"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_strip_nulls('null')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"json_strip_nulls","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}}],"qualified_name":{"path":["json_strip_nulls"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_structure('null')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"json_structure","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}}],"qualified_name":{"path":["json_structure"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_structure('[null,null]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"json_structure","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":13,"literal":{"kind":"STRING","text":"[null,null]"}}}],"qualified_name":{"path":["json_structure"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_structure('[1, {\"a\": 1}]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"json_structure","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":15,"literal":{"kind":"STRING","text":"[1, {\"a\": 1}]"}}}],"qualified_name":{"path":["json_structure"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform('4.2', '\"DOUBLE\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":5,"literal":{"kind":"STRING","text":"4.2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":10,"literal":{"kind":"STRING","text":"\"DOUBLE\""}}}],"qualified_name":{"path":["json_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform('{\"a\": 42}', '{\"a\":\"ARRAY\"}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":11,"literal":{"kind":"STRING","text":"{\"a\": 42}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":15,"literal":{"kind":"STRING","text":"{\"a\":\"ARRAY\"}"}}}],"qualified_name":{"path":["json_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform('[{\"a\": 42}, {\"a\": null, \"b\": 33}, {\"b\": 7}]', '[{\"a\": \"UBIGINT\", \"b\": \"UBIGINT\"}]')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":99,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":45,"literal":{"kind":"STRING","text":"[{\"a\": 42}, {\"a\": null, \"b\": 33}, {\"b\": 7}]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":36,"literal":{"kind":"STRING","text":"[{\"a\": \"UBIGINT\", \"b\": \"UBIGINT\"}]"}}}],"qualified_name":{"path":["json_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform_strict('{}', '\"{type}\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"json_transform_strict","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"STRING","text":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":10,"literal":{"kind":"STRING","text":"\"{type}\""}}}],"qualified_name":{"path":["json_transform_strict"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform('{}', '\"VARCHAR\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"STRING","text":"{}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":11,"literal":{"kind":"STRING","text":"\"VARCHAR\""}}}],"qualified_name":{"path":["json_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform('true', '\"DECIMAL(3,1)\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"literal":{"kind":"STRING","text":"true"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":16,"literal":{"kind":"STRING","text":"\"DECIMAL(3,1)\""}}}],"qualified_name":{"path":["json_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform_strict('42', '\"UUID\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"json_transform_strict","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"STRING","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":8,"literal":{"kind":"STRING","text":"\"UUID\""}}}],"qualified_name":{"path":["json_transform_strict"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform('null', '\"DATE\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"json_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"literal":{"kind":"STRING","text":"null"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":8,"literal":{"kind":"STRING","text":"\"DATE\""}}}],"qualified_name":{"path":["json_transform"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_transform_strict('42', '\"TIMESTAMP\"')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"json_transform_strict","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"STRING","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":13,"literal":{"kind":"STRING","text":"\"TIMESTAMP\""}}}],"qualified_name":{"path":["json_transform_strict"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_type(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["json_type"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_type(json, 'double') from test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["json"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":8,"literal":{"kind":"STRING","text":"double"}}}],"qualified_name":{"path":["json_type"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_type('{\"a\":[2,3.5,true,false,null,\"x\"]}','$.a[2]');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":55,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":35,"literal":{"kind":"STRING","text":"{\"a\":[2,3.5,true,false,null,\"x\"]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":8,"literal":{"kind":"STRING","text":"$.a[2]"}}}],"qualified_name":{"path":["json_type"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('{\"a\":55,\"b\":72}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":17,"literal":{"kind":"STRING","text":"{\"a\":55,\"b\":72}"}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\) \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\) \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\5 \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\5 \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\A \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\A \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\M \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\M \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\Y \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\Y \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\e \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\e \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\q \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\q \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('\" \\w \"');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":8,"literal":{"kind":"STRING","text":"\" \\w \""}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_valid('{\"x\":0.1}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"json_valid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":11,"literal":{"kind":"STRING","text":"{\"x\":0.1}"}}}],"qualified_name":{"path":["json_valid"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_value('{\"my_field\": {\"my_nested_field\": [\"goose\", \"duck\"]}}', '/my_field/my_nested_field/1')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":97,"function_name":"json_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":54,"literal":{"kind":"STRING","text":"{\"my_field\": {\"my_nested_field\": [\"goose\", \"duck\"]}}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":29,"literal":{"kind":"STRING","text":"/my_field/my_nested_field/1"}}}],"qualified_name":{"path":["json_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_value(j, '$.b[#]') FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"json_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["j"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":8,"literal":{"kind":"STRING","text":"$.b[#]"}}}],"qualified_name":{"path":["json_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_value(x, '$.settings.layer2.\"tris.legomenon\"') FROM t12;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"json_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":36,"literal":{"kind":"STRING","text":"$.settings.layer2.\"tris.legomenon\""}}}],"qualified_name":{"path":["json_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":3,"schema_name":"","table_name":"t12","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t12"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsGeoJSON('POINT(-122.4194 37.7749)'::GEOMETRY);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"st_asgeojson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":26,"literal":{"kind":"STRING","text":"POINT(-122.4194 37.7749)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}}],"qualified_name":{"path":["st_asgeojson"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_GeomFromGeoJSON(NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"st_geomfromgeojson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["st_geomfromgeojson"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_GeomFromGeoJSON('{\"type\":\"GeometryCollection\",\"geometries\":[' || repeat('{\"type\":\"GeometryCollection\",\"geometries\":[', 100000) || '{\"type\":\"Point\",\"coordinates\":[1,2]}' || repeat(']}', 100000) || ']}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":204,"function_name":"st_geomfromgeojson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":184,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":45,"literal":{"kind":"STRING","text":"{\"type\":\"GeometryCollection\",\"geometries\":["}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":61,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":45,"literal":{"kind":"STRING","text":"{\"type\":\"GeometryCollection\",\"geometries\":["}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":6,"literal":{"kind":"INTEGER","text":"100000"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":38,"literal":{"kind":"STRING","text":"{\"type\":\"Point\",\"coordinates\":[1,2]}"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":182,"query_location_length":20,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":4,"literal":{"kind":"STRING","text":"]}"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":195,"query_location_length":6,"literal":{"kind":"INTEGER","text":"100000"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":206,"query_location_length":4,"literal":{"kind":"STRING","text":"]}"}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["st_geomfromgeojson"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select *, parse_filename(filename) from read_json_auto('{DATA_DIR}/json/example_*.ndjson') order by all","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":24,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["parse_filename"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":40,"query_location_length":50,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":34,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/example_*.ndjson"}}}],"qualified_name":{"path":["read_json_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_json_auto(['{DATA_DIR}/json/with_uuid.json', '{DATA_DIR}/json/example_n.ndjson'], sample_size=1, union_by_name=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":121,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":70,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":32,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/with_uuid.json"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":34,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/example_n.ndjson"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":101,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":11,"column_names":["sample_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":13,"column_names":["union_by_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_json_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM json_each('{\"a.b\": 1, \"a b\": 2, \"0a\": 3, \"_x\": 4, \"a[0]\": 6, \"a\\\"b\": 7, \"a\\\\b\": 8, \"é\": 9, \"x1\": 10}')\nWHERE json_extract('{\"a.b\": 1, \"a b\": 2, \"0a\": 3, \"_x\": 4, \"a[0]\": 6, \"a\\\"b\": 7, \"a\\\\b\": 8, \"é\": 9, \"x1\": 10}',\n fullkey) IS DISTINCT FROM value","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":103,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_each","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":92,"literal":{"kind":"STRING","text":"{\"a.b\": 1, \"a b\": 2, \"0a\": 3, \"_x\": 4, \"a[0]\": 6, \"a\\\"b\": 7, \"a\\\\b\": 8, \"é\": 9, \"x1\": 10}"}}}],"qualified_name":{"path":["json_each"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":131,"query_location_length":157,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":131,"query_location_length":134,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":92,"literal":{"kind":"STRING","text":"{\"a.b\": 1, \"a b\": 2, \"0a\": 3, \"_x\": 4, \"a[0]\": 6, \"a\\\"b\": 7, \"a\\\\b\": 8, \"é\": 9, \"x1\": 10}"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":257,"query_location_length":7,"column_names":["fullkey"]}}],"qualified_name":{"path":["json_extract"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":283,"query_location_length":5,"column_names":["value"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsText(geometry), name, pop, area\nFROM read_json('data/json/geojson/features.geojson');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["geometry"]}}],"qualified_name":{"path":["st_astext"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":3,"column_names":["pop"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":4,"column_names":["area"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":49,"query_location_length":47,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":36,"literal":{"kind":"STRING","text":"data/json/geojson/features.geojson"}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsText(geometry), k FROM read_json('{TEST_DIR}/fc_reorder.geojson');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["geometry"]}}],"qualified_name":{"path":["st_astext"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":35,"query_location_length":42,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":31,"literal":{"kind":"STRING","text":"{TEST_DIR}/fc_reorder.geojson"}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_json('data/json/geojson/features.geojsonl');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":37,"literal":{"kind":"STRING","text":"data/json/geojson/features.geojsonl"}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_name, column_type\nFROM (DESCRIBE SELECT * FROM read_json('data/json/geojson/pseudo_columns.geojsonl'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":37,"query_location_length":79,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":54,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":61,"query_location_length":54,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":43,"literal":{"kind":"STRING","text":"data/json/geojson/pseudo_columns.geojsonl"}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsText(geometry), id, name FROM feature_ids ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["geometry"]}}],"qualified_name":{"path":["st_astext"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":11,"schema_name":"","table_name":"feature_ids","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["feature_ids"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_json_auto('{DATA_DIR}/json/example_n.ndjson')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":50,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":34,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/example_n.ndjson"}}}],"qualified_name":{"path":["read_json_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_json('{DATA_DIR}/json/top_level_array.json', columns={conclusion: 'VARCHAR'}, format='unstructured', records=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":119,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":38,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/top_level_array.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":31,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"conclusion","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"conclusion","query_location":85,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}}],"qualified_name":{"path":["struct_pack"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":6,"column_names":["format"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":14,"literal":{"kind":"STRING","text":"unstructured"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":120,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":7,"column_names":["records"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_json('{TEMP_DIR}/my_file.json', format='array', records='false', auto_detect=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":87,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEMP_DIR}/my_file.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":6,"column_names":["format"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":7,"literal":{"kind":"STRING","text":"array"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":7,"column_names":["records"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":7,"literal":{"kind":"STRING","text":"false"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":84,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":11,"column_names":["auto_detect"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select typeof(t), t from '{TEMP_DIR}/my_file.json'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["typeof"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["t"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":25,"schema_name":"","table_name":"{TEMP_DIR}/my_file.json","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/my_file.json"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(ts1), ts1, typeof(ts2), ts2, typeof(ts3), ts3, typeof(ts4), ts4\nFROM read_json_auto('{TEMP_DIR}/issue_22103.json')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["ts1"]}}],"qualified_name":{"path":["typeof"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":3,"column_names":["ts1"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":11,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":3,"column_names":["ts2"]}}],"qualified_name":{"path":["typeof"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":3,"column_names":["ts2"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":11,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":3,"column_names":["ts3"]}}],"qualified_name":{"path":["typeof"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["ts3"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":11,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":3,"column_names":["ts4"]}}],"qualified_name":{"path":["typeof"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["ts4"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":83,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_auto","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":29,"literal":{"kind":"STRING","text":"{TEMP_DIR}/issue_22103.json"}}}],"qualified_name":{"path":["read_json_auto"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select t from '{TEMP_DIR}/my_file.json'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":25,"schema_name":"","table_name":"{TEMP_DIR}/my_file.json","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/my_file.json"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT filename, trim(content, chr(10))\nFROM read_text('{TEMP_DIR}/timestamptz_ns_partition/*/*.json') ORDER BY filename;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":8,"column_names":["filename"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["filename"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":22,"function_name":"trim","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":7,"column_names":["content"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}}],"qualified_name":{"path":["trim"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":45,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":46,"literal":{"kind":"STRING","text":"{TEMP_DIR}/timestamptz_ns_partition/*/*.json"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_ndjson_objects('{DATA_DIR}/json/example_n.ndjson')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":55,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson_objects","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":34,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/example_n.ndjson"}}}],"qualified_name":{"path":["read_ndjson_objects"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) from read_ndjson_objects('{DATA_DIR}/json/example_*n.ndjson')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson_objects","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":35,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/example_*n.ndjson"}}}],"qualified_name":{"path":["read_ndjson_objects"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from read_json_objects('{DATA_DIR}/json/top_level_array.json')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json_objects","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":38,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/top_level_array.json"}}}],"qualified_name":{"path":["read_json_objects"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('__TEST_DIR__/r.csv', hive_types := {})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":20,"literal":{"kind":"STRING","text":"__TEST_DIR__/r.csv"}}},{"name":"hive_types","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"hive_types","query_location":59,"query_location_length":2,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_ndjson('{DATA_DIR}/json/malformed/union/bad_key.ndjson', columns={data: 'UNION(name VARCHAR, age INT, veteran BOOL)'})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":123,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_ndjson","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":48,"literal":{"kind":"STRING","text":"{DATA_DIR}/json/malformed/union/bad_key.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":76,"query_location_length":60,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":7,"column_names":["columns"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":52,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"data","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"data","query_location":91,"query_location_length":44,"literal":{"kind":"STRING","text":"UNION(name VARCHAR, age INT, veteran BOOL)"}}}],"qualified_name":{"path":["struct_pack"]}}}}],"qualified_name":{"path":["read_ndjson"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_single_json_file(['data/json/example_n.ndjson'])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":53,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_single_json_file","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":30,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":28,"literal":{"kind":"STRING","text":"data/json/example_n.ndjson"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_single_json_file"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM read_json('data/json/unterminated_quotes.ndjson', ignore_errors=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":69,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":38,"literal":{"kind":"STRING","text":"data/json/unterminated_quotes.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":13,"column_names":["ignore_errors"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM read_json('{TEST_DIR}/sample_schema_*.ndjson', maximum_sample_files=1) ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":70,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/sample_schema_*.ndjson"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":20,"column_names":["maximum_sample_files"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_type FROM (DESCRIBE SELECT * FROM read_json('{TEST_DIR}/combine_list_*.ndjson'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":24,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":41,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":48,"query_location_length":45,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":34,"literal":{"kind":"STRING","text":"{TEST_DIR}/combine_list_*.ndjson"}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json.duck.goose FROM read_json('{TEST_DIR}/nested.json', records=false)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":15,"column_names":["json","duck","goose"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":50,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_json","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":24,"literal":{"kind":"STRING","text":"{TEST_DIR}/nested.json"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":7,"column_names":["records"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}}],"qualified_name":{"path":["read_json"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::TINYINT::JSON::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::DECIMAL(10, 2)::JSON::DECIMAL(10, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":16,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'blob'::BLOB::JSON::BLOB","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"blob"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'POINT(0 1)'::GEOMETRY::JSON::GEOMETRY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(0 1)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(v AS JSON[]) FROM (VALUES ('[1,null,{\"a\":2}]')) t(v)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":21,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["v"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":34,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":18,"literal":{"kind":"STRING","text":"[1,null,{\"a\":2}]"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deserialize_sql('{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"OPERATOR\",\"type\":\"OPERATOR_IS_NULL\",\"alias\":\"\",\"query_location\":9,\"query_location_length\":7,\"children\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}},{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}}]}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":819,"function_name":"json_deserialize_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":797,"literal":{"kind":"STRING","text":"{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"OPERATOR\",\"type\":\"OPERATOR_IS_NULL\",\"alias\":\"\",\"query_location\":9,\"query_location_length\":7,\"children\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}},{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}}]}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}"}}}],"qualified_name":{"path":["json_deserialize_sql"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deserialize_sql('{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"STAR\",\"type\":\"STAR\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"relation_name\":\"\",\"exclude_list\":[],\"replace_list\":[],\"columns\":false,\"expr\":null,\"qualified_exclude_list\":[],\"rename_list\":[]}],\"from_table\":{\"type\":\"JOIN\",\"alias\":\"\",\"sample\":null,\"query_location\":30,\"query_location_length\":35,\"left\":{\"type\":\"SUBQUERY\",\"alias\":\"t1\",\"sample\":null,\"query_location\":14,\"query_location_length\":12,\"subquery\":{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"a\",\"query_location\":22,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]},\"column_name_alias\":[]},\"right\":{\"type\":\"SUBQUERY\",\"alias\":\"t2\",\"sample\":null,\"query_location\":35,\"query_location_length\":12,\"subquery\":{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"a\",\"query_location\":43,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]},\"column_name_alias\":[]},\"condition\":null,\"join_type\":\"INNER\",\"ref_type\":\"REGULAR\",\"using_columns\":[],\"delim_flipped\":false,\"duplicate_eliminated_columns\":[],\"is_implicit\":false,\"ranking_expression\":null,\"nearest_count\":1,\"nearest_order_type\":\"ASCENDING\",\"nearest_approx\":false},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2162,"function_name":"json_deserialize_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2140,"literal":{"kind":"STRING","text":"{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"STAR\",\"type\":\"STAR\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"relation_name\":\"\",\"exclude_list\":[],\"replace_list\":[],\"columns\":false,\"expr\":null,\"qualified_exclude_list\":[],\"rename_list\":[]}],\"from_table\":{\"type\":\"JOIN\",\"alias\":\"\",\"sample\":null,\"query_location\":30,\"query_location_length\":35,\"left\":{\"type\":\"SUBQUERY\",\"alias\":\"t1\",\"sample\":null,\"query_location\":14,\"query_location_length\":12,\"subquery\":{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"a\",\"query_location\":22,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]},\"column_name_alias\":[]},\"right\":{\"type\":\"SUBQUERY\",\"alias\":\"t2\",\"sample\":null,\"query_location\":35,\"query_location_length\":12,\"subquery\":{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"a\",\"query_location\":43,\"query_location_length\":1,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]},\"column_name_alias\":[]},\"condition\":null,\"join_type\":\"INNER\",\"ref_type\":\"REGULAR\",\"using_columns\":[],\"delim_flipped\":false,\"duplicate_eliminated_columns\":[],\"is_implicit\":false,\"ranking_expression\":null,\"nearest_count\":1,\"nearest_order_type\":\"ASCENDING\",\"nearest_approx\":false},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}"}}}],"qualified_name":{"path":["json_deserialize_sql"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_deserialize_sql('{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"STAR\",\"type\":\"STAR\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"relation_name\":\"\",\"exclude_list\":[],\"replace_list\":[],\"columns\":false,\"expr\":null,\"qualified_exclude_list\":[],\"rename_list\":[]}],\"from_table\":{\"type\":\"TABLE_FUNCTION\",\"alias\":\"\",\"sample\":null,\"query_location\":14,\"query_location_length\":8,\"function\":{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":0,\"query_location_length\":0,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}},\"column_name_alias\":[],\"with_ordinality\":\"WITHOUT_ORDINALITY\"},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":841,"function_name":"json_deserialize_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":819,"literal":{"kind":"STRING","text":"{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"STAR\",\"type\":\"STAR\",\"alias\":\"\",\"query_location\":7,\"query_location_length\":1,\"relation_name\":\"\",\"exclude_list\":[],\"replace_list\":[],\"columns\":false,\"expr\":null,\"qualified_exclude_list\":[],\"rename_list\":[]}],\"from_table\":{\"type\":\"TABLE_FUNCTION\",\"alias\":\"\",\"sample\":null,\"query_location\":14,\"query_location_length\":8,\"function\":{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":0,\"query_location_length\":0,\"literal\":{\"kind\":\"INTEGER\",\"text\":\"1\"}},\"column_name_alias\":[],\"with_ordinality\":\"WITHOUT_ORDINALITY\"},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}"}}}],"qualified_name":{"path":["json_deserialize_sql"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM json_execute_serialized_sql($json$\n{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":7,\"value\":{\"type\":{\"id\":\"VARCHAR\",\"type_info\":{\"type\":\"GENERIC_TYPE_INFO\",\"alias\":\"JSON\"}},\"is_null\":false,\"value\":\"[42]\"}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}\n$json$);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":610,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":581,"literal":{"kind":"STRING","text":"\n{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":7,\"value\":{\"type\":{\"id\":\"VARCHAR\",\"type_info\":{\"type\":\"GENERIC_TYPE_INFO\",\"alias\":\"JSON\"}},\"is_null\":false,\"value\":\"[42]\"}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":18446744073709551615},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}\n"}}}],"qualified_name":{"path":["json_execute_serialized_sql"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM json_execute_serialized_sql('{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":0,\"query_location_length\":0,\"value\":{\"type\":{\"id\":\"DECIMAL\",\"type_info\":{\"type\":\"DECIMAL_TYPE_INFO\",\"alias\":\"\",\"extension_info\":null,\"width\":4,\"scale\":2}},\"is_null\":false,\"value\":12345}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":0,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":668,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":639,"literal":{"kind":"STRING","text":"{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":0,\"query_location_length\":0,\"value\":{\"type\":{\"id\":\"DECIMAL\",\"type_info\":{\"type\":\"DECIMAL_TYPE_INFO\",\"alias\":\"\",\"extension_info\":null,\"width\":4,\"scale\":2}},\"is_null\":false,\"value\":12345}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":0,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}"}}}],"qualified_name":{"path":["json_execute_serialized_sql"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM json_execute_serialized_sql('{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":0,\"query_location_length\":0,\"value\":{\"type\":{\"id\":\"MAP\",\"type_info\":{\"type\":\"LIST_TYPE_INFO\",\"alias\":\"\",\"extension_info\":null,\"child_type\":{\"id\":\"STRUCT\",\"type_info\":{\"type\":\"STRUCT_TYPE_INFO\",\"alias\":\"\",\"extension_info\":null,\"child_types\":[{\"first\":\"key\",\"second\":{\"id\":\"INTEGER\",\"type_info\":null}},{\"first\":\"value\",\"second\":{\"id\":\"INTEGER\",\"type_info\":null}}]}}}},\"is_null\":false,\"value\":{\"children\":[{\"is_null\":false,\"value\":{\"children\":[{\"is_null\":false,\"value\":1},{\"is_null\":false,\"value\":2}]}}]}}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":0,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":985,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":956,"literal":{"kind":"STRING","text":"{\"error\":false,\"statements\":[{\"node\":{\"type\":\"SELECT_NODE\",\"modifiers\":[],\"cte_map\":{\"map\":[]},\"select_list\":[{\"class\":\"CONSTANT\",\"type\":\"VALUE_CONSTANT\",\"alias\":\"\",\"query_location\":0,\"query_location_length\":0,\"value\":{\"type\":{\"id\":\"MAP\",\"type_info\":{\"type\":\"LIST_TYPE_INFO\",\"alias\":\"\",\"extension_info\":null,\"child_type\":{\"id\":\"STRUCT\",\"type_info\":{\"type\":\"STRUCT_TYPE_INFO\",\"alias\":\"\",\"extension_info\":null,\"child_types\":[{\"first\":\"key\",\"second\":{\"id\":\"INTEGER\",\"type_info\":null}},{\"first\":\"value\",\"second\":{\"id\":\"INTEGER\",\"type_info\":null}}]}}}},\"is_null\":false,\"value\":{\"children\":[{\"is_null\":false,\"value\":{\"children\":[{\"is_null\":false,\"value\":1},{\"is_null\":false,\"value\":2}]}}]}}}],\"from_table\":{\"type\":\"EMPTY\",\"alias\":\"\",\"sample\":null,\"query_location\":0,\"query_location_length\":0},\"where_clause\":null,\"group_expressions\":[],\"group_sets\":[],\"aggregate_handling\":\"STANDARD_HANDLING\",\"having\":null,\"sample\":null,\"qualify\":null},\"named_param_map\":[]}]}"}}}],"qualified_name":{"path":["json_execute_serialized_sql"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM json_execute_serialized_sql('{\"error\": false, \"statements\": [{\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 7, \"query_location_length\": 1, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"SUBQUERY\", \"alias\": \"t\", \"sample\": null, \"query_location\": 14, \"query_location_length\": 12, \"subquery\": {\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"EXPRESSION_LIST\", \"alias\": \"valueslist\", \"sample\": null, \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"expected_names\": [], \"expected_types\": [{\"id\": \"LIST\", \"type_info\": {\"type\": \"STRUCT_TYPE_INFO\", \"alias\": \"\", \"child_types\": []}}], \"values\": [[{\"class\": \"CONSTANT\", \"type\": \"VALUE_CONSTANT\", \"alias\": \"\", \"query_location\": 23, \"query_location_length\": 1, \"literal\": {\"kind\": \"INTEGER\", \"text\": \"1\"}}]]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}, \"column_name_alias\": [\"a\"]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}]}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":1717,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1688,"literal":{"kind":"STRING","text":"{\"error\": false, \"statements\": [{\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 7, \"query_location_length\": 1, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"SUBQUERY\", \"alias\": \"t\", \"sample\": null, \"query_location\": 14, \"query_location_length\": 12, \"subquery\": {\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"EXPRESSION_LIST\", \"alias\": \"valueslist\", \"sample\": null, \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"expected_names\": [], \"expected_types\": [{\"id\": \"LIST\", \"type_info\": {\"type\": \"STRUCT_TYPE_INFO\", \"alias\": \"\", \"child_types\": []}}], \"values\": [[{\"class\": \"CONSTANT\", \"type\": \"VALUE_CONSTANT\", \"alias\": \"\", \"query_location\": 23, \"query_location_length\": 1, \"literal\": {\"kind\": \"INTEGER\", \"text\": \"1\"}}]]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}, \"column_name_alias\": [\"a\"]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}]}"}}}],"qualified_name":{"path":["json_execute_serialized_sql"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM json_execute_serialized_sql('{\"error\": false, \"statements\": [{\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 7, \"query_location_length\": 1, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"SUBQUERY\", \"alias\": \"t\", \"sample\": null, \"query_location\": 14, \"query_location_length\": 12, \"subquery\": {\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"EXPRESSION_LIST\", \"alias\": \"valueslist\", \"sample\": null, \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"expected_names\": [], \"expected_types\": [{\"id\": \"INTEGER\", \"type_info\": {\"type\": \"GENERIC_TYPE_INFO\", \"alias\": \"myint\"}}], \"values\": [[{\"class\": \"CONSTANT\", \"type\": \"VALUE_CONSTANT\", \"alias\": \"\", \"query_location\": 23, \"query_location_length\": 1, \"literal\": {\"kind\": \"INTEGER\", \"text\": \"1\"}}]]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}, \"column_name_alias\": [\"a\"]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}]}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":1707,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1678,"literal":{"kind":"STRING","text":"{\"error\": false, \"statements\": [{\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 7, \"query_location_length\": 1, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"SUBQUERY\", \"alias\": \"t\", \"sample\": null, \"query_location\": 14, \"query_location_length\": 12, \"subquery\": {\"node\": {\"type\": \"SELECT_NODE\", \"modifiers\": [], \"cte_map\": {\"map\": []}, \"select_list\": [{\"class\": \"STAR\", \"type\": \"STAR\", \"alias\": \"\", \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"relation_name\": \"\", \"exclude_list\": [], \"replace_list\": [], \"columns\": false, \"expr\": null, \"qualified_exclude_list\": [], \"rename_list\": []}], \"from_table\": {\"type\": \"EXPRESSION_LIST\", \"alias\": \"valueslist\", \"sample\": null, \"query_location\": 18446744073709551615, \"query_location_length\": 0, \"expected_names\": [], \"expected_types\": [{\"id\": \"INTEGER\", \"type_info\": {\"type\": \"GENERIC_TYPE_INFO\", \"alias\": \"myint\"}}], \"values\": [[{\"class\": \"CONSTANT\", \"type\": \"VALUE_CONSTANT\", \"alias\": \"\", \"query_location\": 23, \"query_location_length\": 1, \"literal\": {\"kind\": \"INTEGER\", \"text\": \"1\"}}]]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}, \"column_name_alias\": [\"a\"]}, \"where_clause\": null, \"group_expressions\": [], \"group_sets\": [], \"aggregate_handling\": \"STANDARD_HANDLING\", \"having\": null, \"sample\": null, \"qualify\": null}, \"named_param_map\": []}]}"}}}],"qualified_name":{"path":["json_execute_serialized_sql"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select json_group_object(n, v) from t1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"json_group_object","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["json_group_object"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_serialize_plan('SELECT *, 1 + 2 FROM tbl1', skip_null := true, skip_empty := true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":87,"function_name":"json_serialize_plan","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":27,"literal":{"kind":"STRING","text":"SELECT *, 1 + 2 FROM tbl1"}}},{"name":"skip_null","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_null","query_location":69,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"skip_empty","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_empty","query_location":89,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["json_serialize_plan"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT json_serialize_sql('SELECT * FROM (SELECT 1 + 2)', skip_default := true, skip_empty := true, skip_null := true, format := true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":127,"function_name":"json_serialize_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":30,"literal":{"kind":"STRING","text":"SELECT * FROM (SELECT 1 + 2)"}}},{"name":"skip_default","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_default","query_location":74,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"skip_empty","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_empty","query_location":94,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"skip_null","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_null","query_location":113,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"format","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"format","query_location":129,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["json_serialize_sql"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM json_execute_serialized_sql(json_serialize_sql('SELECT * FROM tbl2', skip_null := true, skip_empty := true));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":108,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"json_execute_serialized_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":79,"function_name":"json_serialize_sql","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":20,"literal":{"kind":"STRING","text":"SELECT * FROM tbl2"}}},{"name":"skip_null","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_null","query_location":96,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"skip_empty","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"skip_empty","query_location":116,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["json_serialize_sql"]}}}],"qualified_name":{"path":["json_execute_serialized_sql"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"TA\"\"BLE\".\"COL\"\"UMN\" FROM \"SCH\"\"EMA\".\"TA\"\"BLE\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":20,"column_names":["TA\"BLE","COL\"UMN"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":20,"schema_name":"SCH\"EMA","table_name":"TA\"BLE","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["SCH\"EMA","TA\"BLE"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"SCHEMA\".\"TABLE\".\"COLUMN\".\"SOME\".\"IN\" FROM \"SCHEMA\".\"TABLE\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":37,"column_names":["SCHEMA","TABLE","COLUMN","SOME","IN"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":16,"schema_name":"SCHEMA","table_name":"TABLE","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["SCHEMA","TABLE"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MIN(i), MAX(i), COUNT(*) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM 'https://raw.githubusercontent.com/duckdb/duckdb/v2.0-cyanoptera/data/csv/header.csv';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":85,"schema_name":"","table_name":"https://raw.githubusercontent.com/duckdb/duckdb/v2.0-cyanoptera/data/csv/header.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["https://raw.githubusercontent.com/duckdb/duckdb/v2.0-cyanoptera/data/csv/header.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT write_log('hello from the connection log scope', level := 'error', scope := 'connection') from range(0,2999);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":89,"function_name":"write_log","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":37,"literal":{"kind":"STRING","text":"hello from the connection log scope"}}},{"name":"level","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"level","query_location":65,"query_location_length":7,"literal":{"kind":"STRING","text":"error"}}},{"name":"scope","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"scope","query_location":83,"query_location_length":12,"literal":{"kind":"STRING","text":"connection"}}}],"qualified_name":{"path":["write_log"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":102,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2999"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n transaction_id - getvariable('base_transaction_id') as relative_transaction_id,\n query_id - getvariable('base_query_id') as relative_query_id,\nFROM duckdb_logs\nWHERE\n connection_id=current_connection_id() and\n type='test_logging_autocommit';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"relative_transaction_id","query_location":26,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":14,"column_names":["transaction_id"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":34,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":21,"literal":{"kind":"STRING","text":"base_transaction_id"}}}],"qualified_name":{"path":["getvariable"]}}}],"qualified_name":{"path":["-"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"relative_query_id","query_location":104,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":8,"column_names":["query_id"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":106,"query_location_length":28,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":15,"literal":{"kind":"STRING","text":"base_query_id"}}}],"qualified_name":{"path":["getvariable"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":162,"query_location_length":11,"schema_name":"","table_name":"duckdb_logs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_logs"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":184,"query_location_length":76,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":184,"query_location_length":37,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":13,"column_names":["connection_id"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":198,"query_location_length":23,"function_name":"current_connection_id","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["current_connection_id"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":230,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":4,"column_names":["type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":235,"query_location_length":25,"literal":{"kind":"STRING","text":"test_logging_autocommit"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) FROM \"{TEMP_DIR}/logging_csv_logs_normalized/duckdb_log_contexts.csv\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":64,"schema_name":"","table_name":"{TEMP_DIR}/logging_csv_logs_normalized/duckdb_log_contexts.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/logging_csv_logs_normalized/duckdb_log_contexts.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM \"{TEMP_DIR}/logging_truncate_rewrite.csv\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":41,"schema_name":"","table_name":"{TEMP_DIR}/logging_truncate_rewrite.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEMP_DIR}/logging_truncate_rewrite.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT type, log_level, scope, fs, parse_filename(path), op, sum(bytes), min(pos), max(pos + bytes)\nFROM duckdb_logs_parsed('FileSystem')\nWHERE op = 'WRITE'\nGROUP BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":9,"column_names":["log_level"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":5,"column_names":["scope"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["fs"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":20,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":4,"column_names":["path"]}}],"qualified_name":{"path":["parse_filename"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":2,"column_names":["op"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":5,"column_names":["bytes"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":8,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["pos"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":16,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":3,"column_names":["pos"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":5,"column_names":["bytes"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":105,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":12,"literal":{"kind":"STRING","text":"FileSystem"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":144,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":2,"column_names":["op"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":7,"literal":{"kind":"STRING","text":"WRITE"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT write_log('hello', scope := 'thread');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"write_log","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"scope","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"scope","query_location":35,"query_location_length":8,"literal":{"kind":"STRING","text":"thread"}}}],"qualified_name":{"path":["write_log"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM target6 ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"target6","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["target6"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT k, v FROM tc;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"tc","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tc"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_parquet('{TEMP_DIR}/frn_*.parquet', file_row_number=true, filename=true) ORDER BY filename, v","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":8,"column_names":["filename"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":77,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":26,"literal":{"kind":"STRING","text":"{TEMP_DIR}/frn_*.parquet"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":15,"column_names":["file_row_number"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv([{'filename': '{TEST_DIR}/open_options.csv'}])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":55,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":45,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":43,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filename","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"filename","query_location":37,"query_location_length":29,"literal":{"kind":"STRING","text":"{TEST_DIR}/open_options.csv"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'file_size': 631}])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":83,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":69,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":67,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filename","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"filename","query_location":41,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/open_options_1.parquet"}}},{"name":"file_size","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"file_size","query_location":91,"query_location_length":3,"literal":{"kind":"INTEGER","text":"631"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_parquet([{'filename': '{TEST_DIR}/open_options_1.parquet', 'footer_size': 1::UBIGINT}])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":92,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":78,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":76,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filename","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"filename","query_location":41,"query_location_length":35,"literal":{"kind":"STRING","text":"{TEST_DIR}/open_options_1.parquet"}}},{"name":"footer_size","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"footer_size","query_location":94,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":96,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, parse_filename(filename) FROM read_csv('{TEMP_DIR}/schema_*.csv', schema=map {\n\t'a': {name: 'id', type: 'BIGINT', default_value: NULL}\n}, filename=true) ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":24,"function_name":"parse_filename","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":8,"column_names":["filename"]}}],"qualified_name":{"path":["parse_filename"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":122,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":25,"literal":{"kind":"STRING","text":"{TEMP_DIR}/schema_*.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":70,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":6,"column_names":["schema"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":63,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":49,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"name","query_location":103,"query_location_length":4,"literal":{"kind":"STRING","text":"id"}}},{"name":"type","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"type","query_location":115,"query_location_length":8,"literal":{"kind":"STRING","text":"BIGINT"}}},{"name":"default_value","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"default_value","query_location":140,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":149,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":8,"column_names":["filename"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT g, min(x) AS m FROM tn GROUP BY g HAVING m \u003c= 20000) sub;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"sub","sample":null,"query_location":21,"query_location_length":60,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":32,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":2,"schema_name":"","table_name":"tn","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tn"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":70,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["m"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":5,"literal":{"kind":"INTEGER","text":"20000"}}},"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x \u003e ANY(SELECT y FROM t2 WHERE t2.id = t1.id) FROM t1 WHERE id = 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":45,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":5,"column_names":["t2","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":5,"column_names":["t1","id"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},"comparison_type":"COMPARE_GREATERTHAN"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM nullable_arrays WHERE a[2] IS NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":15,"schema_name":"","table_name":"nullable_arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nullable_arrays"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":48,"query_location_length":7,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":44,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(x) FROM tb WHERE b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":2,"schema_name":"","table_name":"tb","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tb"]}},"where_clause":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["b"]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM case_pruning\nWHERE (CASE WHEN x % 2 = 0 THEN x ELSE 0 END) \u003e 5000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"case_pruning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["case_pruning"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":40,"query_location_length":46,"left":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":41,"query_location_length":37,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["x"]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM const_db.constant_strings WHERE reverse(s) = '0lkjihgfedcba';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":25,"schema_name":"const_db","table_name":"constant_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["const_db","constant_strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":28,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":10,"function_name":"reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["reverse"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":15,"literal":{"kind":"STRING","text":"0lkjihgfedcba"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(x) FROM t WHERE x \u003c 100 OR s \u003e '00008000' OR y = 3000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":37,"query_location_length":37,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":37,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":48,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["s"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":10,"literal":{"kind":"STRING","text":"00008000"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"literal":{"kind":"INTEGER","text":"3000"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM months WHERE month(d) BETWEEN 6 AND 9;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"months","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["months"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":43,"query_location_length":15,"input":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":8,"function_name":"month","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["month"]}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM cross_month WHERE day(d) = 30;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"cross_month","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cross_month"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":39,"query_location_length":11,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":6,"function_name":"day","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["day"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM pre_epoch WHERE hour(ts) = 12;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"pre_epoch","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pre_epoch"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":37,"query_location_length":13,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":8,"function_name":"hour","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["hour"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM divide_pruning WHERE i / 0.0 = 123;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"divide_pruning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["divide_pruning"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":13,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":7,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}}],"qualified_name":{"path":["/"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"literal":{"kind":"INTEGER","text":"123"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM dates WHERE date_trunc('dow', d) \u003c= DATE '2020-06-15'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":33,"query_location_length":41,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":20,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"literal":{"kind":"STRING","text":"dow"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["date_trunc"]}},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-06-15"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM guard_check WHERE m IS NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"guard_check","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["guard_check"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":41,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["m"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(\n\tlist_filter(list_transform(l, lambda x: struct_pack(filter := x, result := x)),\n\t lambda s: s.filter::DECIMAL(1,0)::BOOLEAN),\n\tlambda s: s.result\n) FROM (VALUES ([0.1,0.9])) t(l);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":175,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":135,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":66,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":54,"query_location_length":47,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":37,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filter","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"filter","query_location":86,"query_location_length":1,"column_names":["x"]}},{"name":"result","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"result","query_location":99,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["struct_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":117,"query_location_length":41,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["s"]},"expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":149,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":135,"query_location_length":14,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":8,"column_names":["s","filter"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":137,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":151,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":162,"query_location_length":18,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["s"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":8,"column_names":["s","result"]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":188,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":197,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":202,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.9"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["l"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [x + c FOR x IN l IF x \u003e c] FROM capture_t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_filter","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_apply","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"filter","expression":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":28,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["c"]}}},{"name":"result","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["struct_pack"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"filter"}}}],"qualified_name":{"path":["struct_extract"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_filter"]}}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":18446744073709551615,"query_location_length":0,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]},"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["elem"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"result"}}}],"qualified_name":{"path":["struct_extract"]}},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_apply"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":9,"schema_name":"","table_name":"capture_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["capture_t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM integers WHERE (i=1) OR (i=1) ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":29,"query_location_length":14,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":39,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (i IS NOT NULL AND i\u003e1) OR (i IS NOT NULL AND i\u003c10) FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":7,"query_location_length":51,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":8,"query_location_length":21,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":10,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["i"]}]},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":26,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":35,"query_location_length":22,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":37,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":53,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":64,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tsym NOT IN (\n\t\t'0',\n\t\t'1',\n\t\t'2',\n\t\t'3',\n\t\t'4',\n\t\t'5',\n\t\t'6',\n\t\t'7',\n\t\t'8',\n\t\t'9'\n\t),\n\tNOT (sym IN (\n\t\t'0',\n\t\t'1',\n\t\t'2',\n\t\t'3',\n\t\t'4',\n\t\t'5',\n\t\t'6',\n\t\t'7',\n\t\t'8',\n\t\t'9'\n\t))\nFROM (VALUES ('0'::sym_enum), ('1'::sym_enum)) tbl(sym)\nORDER BY sym","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":247,"query_location_length":3,"column_names":["sym"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":8,"query_location_length":84,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":19,"query_location_length":73,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":3,"column_names":["sym"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"STRING","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"literal":{"kind":"STRING","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"literal":{"kind":"STRING","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":3,"literal":{"kind":"STRING","text":"6"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"7"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":3,"literal":{"kind":"STRING","text":"8"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":3,"literal":{"kind":"STRING","text":"9"}}]}]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":95,"query_location_length":86,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":107,"query_location_length":73,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":3,"column_names":["sym"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":3,"literal":{"kind":"STRING","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":3,"literal":{"kind":"STRING","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":3,"literal":{"kind":"STRING","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":153,"query_location_length":3,"literal":{"kind":"STRING","text":"6"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":3,"literal":{"kind":"STRING","text":"7"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":3,"literal":{"kind":"STRING","text":"8"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":3,"literal":{"kind":"STRING","text":"9"}}]}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":187,"query_location_length":41,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":199,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":196,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":201,"query_location_length":8,"catalog":"","schema":"","type_name":"sym_enum","children":[],"qualified_name":{"path":["sym_enum"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":216,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":218,"query_location_length":8,"catalog":"","schema":"","type_name":"sym_enum","children":[],"qualified_name":{"path":["sym_enum"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["sym"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM test WHERE (i IS NULL AND j IS NULL) OR (i=j);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":25,"query_location_length":34,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":26,"query_location_length":23,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":28,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":42,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["j"]}]}]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["j"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DOUBLE = 1, i::DOUBLE \u003c 1.5, i::DOUBLE IS DISTINCT FROM NULL, i::DOUBLE IS NOT DISTINCT FROM 1\nFROM integers\nORDER BY i NULLS FIRST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":13,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":22,"query_location_length":15,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}},{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":39,"query_location_length":31,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":72,"query_location_length":32,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":110,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -v FROM vals WHERE id\u003e0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":4,"schema_name":"","table_name":"vals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":26,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a - 0 FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 0 / rowid FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["/"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select timestamp_str, cast(timestamp_str as timestamp)\nfrom table1\nwhere cast(timestamp_str as timestamp) \u003e cast('2024-05-03T01:00:00+00:00' as timestamp);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["timestamp_str"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":32,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":13,"column_names":["timestamp_str"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":6,"schema_name":"","table_name":"table1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":73,"query_location_length":81,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":32,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":13,"column_names":["timestamp_str"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":46,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":27,"literal":{"kind":"STRING","text":"2024-05-03T01:00:00+00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":144,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(payload) FROM nullable_strings WHERE s NOT IN ('a', 'z');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":16,"schema_name":"","table_name":"nullable_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nullable_strings"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":48,"query_location_length":19,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":57,"query_location_length":10,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["s"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x FROM pushdown_extract_multi WHERE s.a + s.b = 12","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":22,"schema_name":"","table_name":"pushdown_extract_multi","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pushdown_extract_multi"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":14,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["s","a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":3,"column_names":["s","b"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM left_pruning WHERE left(s, 4) = '0010';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"left_pruning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["left_pruning"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":40,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":10,"function_name":"left","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["left"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":6,"literal":{"kind":"STRING","text":"0010"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM lists WHERE list_position(l, 3000) IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":56,"query_location_length":11,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":22,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"literal":{"kind":"INTEGER","text":"3000"}}}],"qualified_name":{"path":["list_position"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t WHERE floor(x::DOUBLE) \u003e 495000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":25,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":16,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["floor"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":6,"literal":{"kind":"INTEGER","text":"495000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM e WHERE year(dt) \u003e= 2020;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"e","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["e"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":29,"query_location_length":16,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["year"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2020"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM edge WHERE epoch(t) \u003e -9223372036854775807;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"edge","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["edge"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":32,"query_location_length":31,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":8,"function_name":"epoch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["epoch"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":20,"literal":{"kind":"INTEGER","text":"-9223372036854775807"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM tinyints WHERE +x \u003e 127::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":36,"query_location_length":17,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":2,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["+"]}},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"INTEGER","text":"127"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list(a ORDER BY a) FROM t WHERE TRY_CAST(a AS TINYINT) IN (51, 127, 128);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["a"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":65,"query_location_length":14,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["a"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":2,"literal":{"kind":"INTEGER","text":"51"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":3,"literal":{"kind":"INTEGER","text":"127"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":3,"literal":{"kind":"INTEGER","text":"128"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT st::VARIANT IS NOT NULL, st::VARIANT IS NULL FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":19,"query_location_length":11,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["st"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":44,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":2,"column_names":["st"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t WHERE x = 5 OR NULL::BOOLEAN;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":29,"query_location_length":22,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x FROM dense_or WHERE x = 2 OR -1 = x OR x = 1 OR x = 0 ORDER BY x","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"dense_or","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dense_or"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":29,"query_location_length":33,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":6,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["x"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":48,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH a AS MATERIALIZED (SELECT x FROM dense_or WHERE x BETWEEN 0 AND 3)\nSELECT x FROM a WHERE x = 1 UNION ALL SELECT x FROM a WHERE x = 2 ORDER BY x","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"a","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"dense_or","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dense_or"]}},"where_clause":{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":55,"query_location_length":15,"input":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["x"]},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":94,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":124,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":132,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers i1 JOIN integers i2 ON i1.i=i2.i WHERE i1.i\u003e1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":26,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":31,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":4,"column_names":["i2","i"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":62,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers i1 WHERE NOT EXISTS(SELECT i FROM integers WHERE i=i1.i) ORDER BY i1.i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":4,"column_names":["i1","i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":32,"query_location_length":47,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":36,"query_location_length":43,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":72,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, k FROM (SELECT DISTINCT i, k FROM vals1, vals2) tbl1 WHERE i=k AND i\u003c5 ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"SUBQUERY","alias":"tbl1","sample":null,"query_location":17,"query_location_length":40,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":39,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":69,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["k"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":77,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT * FROM vals1, vals2 UNION SELECT * FROM vals1, vals2) tbl1 WHERE i=3 AND k=5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl1","sample":null,"query_location":14,"query_location_length":61,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":22,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":55,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":57,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":62,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":87,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":87,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM (SELECT * FROM vals1, vals2) tbl1, (SELECT * FROM vals1, vals2) tbl2 WHERE tbl1.i=5000 AND tbl1.i=tbl2.i AND tbl1.i=tbl2.k AND tbl1.i=tbl1.k AND tbl2.i\u003c\u003e5001;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":73,"left":{"type":"SUBQUERY","alias":"tbl1","sample":null,"query_location":21,"query_location_length":28,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":29,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":31,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"tbl2","sample":null,"query_location":56,"query_location_length":28,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":64,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":66,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":71,"query_location_length":5,"schema_name":"","table_name":"vals1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":5,"schema_name":"","table_name":"vals2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vals2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":96,"query_location_length":82,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":96,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":6,"column_names":["tbl1","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5000"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":112,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":6,"column_names":["tbl1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":6,"column_names":["tbl2","i"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":130,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":6,"column_names":["tbl1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":6,"column_names":["tbl2","k"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":148,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":6,"column_names":["tbl1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":6,"column_names":["tbl1","k"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":166,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":6,"column_names":["tbl2","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5001"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (TRUE OR a1.a=a2.b) FROM test a1, test a2 WHERE a1.a=11 AND a2.a\u003e=10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":8,"query_location_length":17,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":16,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":4,"column_names":["a1","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":4,"column_names":["a2","b"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"a1","sample":null,"query_location":32,"query_location_length":7,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"right":{"type":"BASE_TABLE","alias":"a2","sample":null,"query_location":41,"query_location_length":7,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":20,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["a1","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":67,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["a2","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t WHERE (a=1 AND b=5) OR (a=1 AND c\u003e2) OR (a=1 AND b=2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":22,"query_location_length":47,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":23,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":23,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":31,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":40,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":40,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":48,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":57,"query_location_length":11,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM prefix_truncated WHERE NOT starts_with(s, 'ppppppppppppp');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":16,"schema_name":"","table_name":"prefix_truncated","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["prefix_truncated"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":44,"query_location_length":35,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":31,"function_name":"starts_with","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":15,"literal":{"kind":"STRING","text":"ppppppppppppp"}}}],"qualified_name":{"path":["starts_with"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, s.b FROM flat WHERE s.a AND i \u003c j ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":3,"column_names":["s","b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":4,"schema_name":"","table_name":"flat","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["flat"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":13,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":3,"column_names":["s","a"]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":38,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["j"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT count(*) FROM neg WHERE (-x) \u003e 0),\n (SELECT sum(CASE WHEN (-x) \u003e 0 THEN 1 ELSE 0 END) FROM neg),\n (SELECT count(*) FROM neg WHERE (-x) \u003e= 0),\n (SELECT sum(CASE WHEN (-x) \u003e= 0 THEN 1 ELSE 0 END) FROM neg)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":41,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":3,"schema_name":"","table_name":"neg","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["neg"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":39,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":57,"query_location_length":59,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":41,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":69,"query_location_length":36,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":79,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":112,"query_location_length":3,"schema_name":"","table_name":"neg","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["neg"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":125,"query_location_length":42,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":133,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":147,"query_location_length":3,"schema_name":"","table_name":"neg","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["neg"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":157,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":158,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":159,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":176,"query_location_length":60,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":184,"query_location_length":42,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":188,"query_location_length":37,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":198,"query_location_length":9,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":199,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["-"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":206,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":220,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":232,"query_location_length":3,"schema_name":"","table_name":"neg","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["neg"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM small_secure_view WHERE nextval('seq') \u003e= 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":17,"schema_name":"","table_name":"small_secure_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["small_secure_view"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":45,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":5,"literal":{"kind":"STRING","text":"seq"}}}],"qualified_name":{"path":["nextval"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM visible_modulo WHERE s::INT = 55","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"visible_modulo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["visible_modulo"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":11,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["s"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"55"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT stats(id)::VARCHAR FROM public_employees LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":2,"column_names":["id"]}}],"qualified_name":{"path":["stats"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":16,"schema_name":"","table_name":"public_employees","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["public_employees"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT stats(i)::VARCHAR FROM secure_view_over_secure_view LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["stats"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":28,"schema_name":"","table_name":"secure_view_over_secure_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["secure_view_over_secure_view"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(payload) FROM s WHERE v \u003e= 'b';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":1,"schema_name":"","table_name":"s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":33,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(payload) FROM long_strings WHERE v \u003c repeat('b', 13);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":12,"schema_name":"","table_name":"long_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["long_strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":44,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["v"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}}],"qualified_name":{"path":["repeat"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(payload) FROM long_strings WHERE v \u003c repeat('c', 12);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["payload"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":12,"schema_name":"","table_name":"long_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["long_strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":44,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["v"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}}],"qualified_name":{"path":["repeat"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM substring_pruning WHERE substr(s, 2, 4) = '4950';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":17,"schema_name":"","table_name":"substring_pruning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["substring_pruning"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":24,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":15,"function_name":"substr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["substr"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":6,"literal":{"kind":"STRING","text":"4950"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM substring_pruning WHERE substr(s, 0, 3) \u003e 'p3';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":17,"schema_name":"","table_name":"substring_pruning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["substring_pruning"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":45,"query_location_length":22,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":15,"function_name":"substr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["substr"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"literal":{"kind":"STRING","text":"p3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT sum(x) AS s FROM t HAVING sum(x) \u003e 100000000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":53,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":29,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":55,"query_location_length":18,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":9,"literal":{"kind":"INTEGER","text":"100000000"}}},"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM probe_num p\nJOIN build_num b\n ON p.k = b.k\n AND p.g \u003e= b.g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":47,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"probe_num","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["probe_num"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":38,"query_location_length":11,"schema_name":"","table_name":"build_num","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["build_num"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":3,"column_names":["b","k"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":70,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":3,"column_names":["p","g"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["b","g"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM phj_probe_narrow_cast p\nJOIN phj_build_narrow_cast b\n ON TRY_CAST(p.k AS INTEGER) = b.k","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":45,"query_location_length":64,"left":{"type":"BASE_TABLE","alias":"p","sample":null,"query_location":21,"query_location_length":23,"schema_name":"","table_name":"phj_probe_narrow_cast","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["phj_probe_narrow_cast"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":50,"query_location_length":23,"schema_name":"","table_name":"phj_build_narrow_cast","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["phj_build_narrow_cast"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":79,"query_location_length":30,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":79,"query_location_length":24,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":3,"column_names":["p","k"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":3,"column_names":["b","k"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM date_table WHERE CAST(col AS TIMESTAMP) = '2022-06-15 00:00:00'::TIMESTAMP;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":10,"schema_name":"","table_name":"date_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["date_table"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":57,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["col"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":84,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":21,"literal":{"kind":"STRING","text":"2022-06-15 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":86,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n col1,\n col2,\n col3\n from t1\n join t2\n on t1.col1 = t2.col3\n group by grouping sets (col1, col2, col3), (col1, col2), (col1) order by 1, 2 ,3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":171,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":4,"column_names":["col2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":4,"column_names":["col3"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":58,"query_location_length":34,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":7,"column_names":["t1","col1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["t2","col3"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":4,"column_names":["col1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":4,"column_names":["col2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":4,"column_names":["col3"]}],"group_sets":[[0,1],[0,1],[0,1,2]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from t where i in ('1','2','y');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":27,"query_location_length":13,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"y"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM rowid_prune WHERE rowid = 245759;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"rowid_prune","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_prune"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":39,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":6,"literal":{"kind":"INTEGER","text":"245759"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM lineitem WHERE l_orderkey % 20000 == 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":23,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":18,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":10,"column_names":["l_orderkey"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":5,"literal":{"kind":"INTEGER","text":"20000"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT grp, sum(seq) OVER (PARTITION BY grp ORDER BY seq\n ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)\nFROM (VALUES (1,1),(1,2),(1,3),(2,1),(2,2)) t(grp,seq)\nORDER BY 1,2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["grp"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":12,"query_location_length":96,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":3,"column_names":["grp"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":3,"column_names":["seq"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["seq"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":114,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["grp","seq"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM ts_us WHERE ts \u003e '2000-01-01 02:50:00'::TIMESTAMP_NS;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"ts_us","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ts_us"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":33,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":2,"column_names":["ts"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":21,"literal":{"kind":"STRING","text":"2000-01-01 02:50:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT key, v, note FROM (\n SELECT key, ts, TRY_CAST(val AS INTEGER) AS v, note FROM try_cast_t)\nQUALIFY row_number() OVER (PARTITION BY key ORDER BY ts DESC) = 1\nORDER BY key","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":3,"column_names":["key"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["v"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":4,"column_names":["note"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":25,"query_location_length":72,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":3,"column_names":["key"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":2,"column_names":["ts"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":45,"query_location_length":24,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["val"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":4,"column_names":["note"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":10,"schema_name":"","table_name":"try_cast_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["try_cast_t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":57,"left":{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":106,"query_location_length":53,"function_name":"row_number","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":3,"column_names":["key"]}],"orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":2,"column_names":["ts"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},"named_param_map":[]}]}} +{"sql":"SELECT id, p\nFROM topn_unique_rowids\nQUALIFY ROW_NUMBER() OVER (ORDER BY s DESC NULLS LAST) \u003c= 1\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["p"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":18,"schema_name":"","table_name":"topn_unique_rowids","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["topn_unique_rowids"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":45,"query_location_length":51,"left":{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":45,"query_location_length":46,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["s"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}},"named_param_map":[]}]}} +{"sql":"SELECT t2.bar::INTEGER FROM foo","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["t2","bar"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":3,"schema_name":"","table_name":"foo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["foo"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, (v.b::JSON)::VARCHAR, json_type(v.b::JSON),\n (v.i::JSON)::VARCHAR, json_type(v.i::JSON),\n (v.d::JSON)::VARCHAR, json_type(v.d::JSON)\nFROM '{TEST_DIR}/variant_json_primitives.parquet' ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":215,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["v","b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":20,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["v","b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}}],"qualified_name":{"path":["json_type"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":66,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":3,"column_names":["v","i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":20,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":3,"column_names":["v","i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}}],"qualified_name":{"path":["json_type"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":124,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":117,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":3,"column_names":["v","d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":119,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":135,"query_location_length":20,"function_name":"json_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":148,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":3,"column_names":["v","d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":150,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}}],"qualified_name":{"path":["json_type"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":161,"query_location_length":44,"schema_name":"","table_name":"{TEST_DIR}/variant_json_primitives.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/variant_json_primitives.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"SELECT * FROM test order by a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM (SELECT * FROM range(5) UNION ALL SELECT * FROM range(5) LIMIT 7) tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":21,"query_location_length":65,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":29,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":62,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":69,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 42 ORDER BY -9223372036854775808;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775808}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers OFFSET nextval('of_seq');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":null,"offset":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":17,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"of_seq"}}}]},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t ORDER BY x LIMIT (SELECT 3) OFFSET (SELECT 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["x"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":33,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"offset":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":51,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a FROM test LIMIT 79.9%","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":1}},"is_null":false,"value":799}},"offset":null,"limit_type":"PERCENTAGE"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM range(10000) LIMIT 0.1% OFFSET 9999","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":1}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9999}},"limit_type":"PERCENTAGE"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT STRUCT_PACK(a := 42, b := 43)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":24,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":43}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test ORDER BY i NULLS LAST, j NULLS LAST LIMIT 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["j"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, b FROM test WHERE a \u003c 13 ORDER BY b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":28,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":13}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a FROM test ORDER BY 'hello world', a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a FROM t ORDER BY true, a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM range(1) WITH ORDINALITY AS _(ordinality);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"_","sample":null,"query_location":14,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":["ordinality"],"with_ordinality":"WITH_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT column00, row_number() OVER () AS ordinality FROM read_csv('{DATA_DIR}/csv/customer.csv') ORDER BY ordinality,column00;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":10,"column_names":["ordinality"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":8,"column_names":["column00"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["column00"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"ordinality","query_location":17,"query_location_length":20,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/customer.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1080863910568919040::BIGINT * 1080863910568919040::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1080863910568919040}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1080863910568919040}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (-9223372036854775808)::BIGINT * 1::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775808}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 2e38::FLOAT * 2e38::FLOAT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":2e38}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":2e38}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 0::INTEGER + -2147483647::INTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":20,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":10,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2147483647}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 0::SMALLINT - 32767::SMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":32767}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -1::TINYINT * 127::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":127}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -2::INTEGER * 1073741825::INTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":10,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1073741825}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i*15::TINYINT FROM tinyints ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":15}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::TINYINT+120::TINYINT FROM smallints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":120}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ALL CAST ( - SUM ( DISTINCT - CAST ( NULL AS INTEGER ) ) AS INTEGER ) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":65,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":45,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":43,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":26,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a + b FROM (SELECT cast(100 AS TINYINT) AS a, cast(100 AS TINYINT) AS b) tbl1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl1","sample":null,"query_location":18,"query_location_length":61,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":26,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":53,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select first([a]) from t group by b%2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM v1 t1 JOIN v1 t2 USING (i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":20,"query_location_length":20,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":25,"query_location_length":5,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT price, amount_sold, total_profit FROM (SELECT COLUMNS(*)::VARCHAR FROM tbl)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["price"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":11,"column_names":["amount_sold"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":12,"column_names":["total_profit"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":45,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":9,"child":{"class":"STAR","type":"STAR","alias":"","query_location":61,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1000__000__000'::INT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1000__000__000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1_2.12'::FLOAT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1_2.12"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '_1_000_000_000_000_000_000_000'::DOUBLE == 1e+21","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":49,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"_1_000_000_000_000_000_000_000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":5,"value":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":1e21}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '0b0_1_0_1'::INT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0b0_1_0_1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 1_2e1_0::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":120000000000.0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '' = $$$$;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":7,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t ORDER BY a FETCH NEXT 1 ROW ONLY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM integers JOIN integers i2 USING (i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":14,"query_location_length":26,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":19,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT v.split(' ').length() FROM varchars","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":8,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"split","schema":"v","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":8,"schema_name":"","table_name":"varchars","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["varchars"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"S","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"S","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["S"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers ORDER BY * + 42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":32,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * REPLACE (\"odder col\" + 1 AS \"odder col\") FROM \"weird name\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":42,"relation_name":"","exclude_list":[],"replace_list":[{"key":"odder col","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":11,"column_names":["odder col"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":12,"schema_name":"","table_name":"weird name","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["weird name"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT switch(val, MAP { 1 : 'one', NULL : 'is_null'}, 'other') FROM null_test ORDER BY val;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":3,"column_names":["val"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"switch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["val"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":34,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"one"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"is_null"}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"other"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":9,"schema_name":"","table_name":"null_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COLUMNS(*) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":15,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COLUMNS(*) + COLUMNS(* EXCLUDE(j)) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":15,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":28,"query_location_length":12,"relation_name":"","exclude_list":["j"],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COLUMNS(['i']) + COLUMNS(['i']) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":14,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}}]},"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":14,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}}]},"qualified_exclude_list":[],"rename_list":[]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COLUMNS(NULL::VARCHAR[]) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":24,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false},"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select column_name from (describe select COALESCE(*COLUMNS(*)) from (select NULL, 2, 3) t(a, b, c));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":24,"query_location_length":75,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":41,"query_location_length":21,"children":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":50,"query_location_length":11,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":59,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}]}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":68,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b","c"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *COLUMNS(COLUMNS(*)) FROM (VALUES ('test'))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":7,"query_location_length":20,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]},"qualified_exclude_list":[],"rename_list":[]}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":33,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select\n\t[UNPACK(COLUMNS(*)::VARCHAR)]\nfrom (\n\tselect\n\t\t21::INTEGER a,\n\t\tTrue::BOOL b,\n\t\t0.1234::DOUBLE c\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":29,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":9,"query_location_length":27,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}]}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":43,"query_location_length":63,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":57,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":21}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":76,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":4,"catalog":"","schema":"","type_name":"BOOL","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"c","query_location":94,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":6,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":5,"scale":4}},"is_null":false,"value":1234}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":96,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl WHERE * \u003e= 2 ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":24,"query_location_length":6,"left":{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (16/2)**4;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"**","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":4,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":16}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select a as localtime from (VALUES ('2018-01-01'), ('2022-01-01')) t(a) where localtime \u003e= '2020-01-01'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"localtime","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":27,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2018-01-01"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2022-01-01"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":78,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":9,"column_names":["localtime"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'a': 42, 'b': 84,}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":13,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":84}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT e'\\7' = chr(7);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":14,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\u0007"}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"bar: 1 + 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"bar","query_location":7,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 a$c;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a$c","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select B'1010'; ","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b1010"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM pg_catalog.pg_depend ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":20,"schema_name":"pg_catalog","table_name":"pg_depend","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_catalog","pg_depend"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT has_column_privilege('main', 'test', 'col'), has_column_privilege(current_user, 'main', 'test', 'col')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"has_column_privilege","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"main"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"col"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":57,"function_name":"has_column_privilege","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":12,"column_names":["current_user"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"main"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"col"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM pg_catalog.pg_type","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":18,"schema_name":"pg_catalog","table_name":"pg_type","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_catalog","pg_type"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT oid FROM pg_type WHERE typname = 'interval' AND oid IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["oid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":7,"schema_name":"","table_name":"pg_type","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_type"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":40,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":7,"column_names":["typname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"interval"}}},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":59,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":3,"column_names":["oid"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT viewname, viewowner FROM pg_views WHERE viewname='v1'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["viewname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":9,"column_names":["viewowner"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":8,"schema_name":"","table_name":"pg_views","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_views"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":8,"column_names":["viewname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"v1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT c.relname FROM pg_class c\nJOIN pg_namespace n ON n.oid = c.relnamespace\nWHERE n.nspname = 'main' AND c.relkind in ('r', 'p')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["c","relname"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":45,"left":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":22,"query_location_length":10,"schema_name":"","table_name":"pg_class","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_class"]}},"right":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":38,"query_location_length":14,"schema_name":"","table_name":"pg_namespace","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_namespace"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["n","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":14,"column_names":["c","relnamespace"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":85,"query_location_length":46,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":9,"column_names":["n","nspname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"main"}}},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":121,"query_location_length":10,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":9,"column_names":["c","relkind"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"r"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"p"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\ti.relname as relname,\n\tix.indisunique, ix.indexprs,\n\ta.attname, a.attnum, c.conrelid, ix.indkey::varchar,\n\tix.indoption::varchar, i.reloptions, am.amname,\n\tpg_get_expr(ix.indpred, ix.indrelid)\nFROM\n\tpg_class t\n\t\tjoin pg_index ix on t.oid = ix.indrelid\n\t\tjoin pg_class i on i.oid = ix.indexrelid\n\t\tleft outer join\n\t\t\tpg_attribute a\n\t\t\ton t.oid = a.attrelid and a.attnum = ANY(ix.indkey)\n\t\tleft outer join\n\t\t\tpg_constraint c\n\t\t\ton (ix.indrelid = c.conrelid and\n\t\t\t\tix.indexrelid = c.conindid and\n\t\t\t\tc.contype in ('p', 'u', 'x'))\n\t\tleft outer join\n\t\t\tpg_am am\n\t\t\ton i.relam = am.oid\nWHERE\n\tt.relkind IN ('r', 'v', 'f', 'm', 'p')\n\tand t.oid = (SELECT MIN(table_oid) FROM duckdb_tables)\n\tand ix.indisprimary = 'f'\nORDER BY\n\tt.relname,\n\ti.relname","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":728,"query_location_length":9,"column_names":["t","relname"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":740,"query_location_length":9,"column_names":["i","relname"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"relname","query_location":8,"query_location_length":9,"column_names":["i","relname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":14,"column_names":["ix","indisunique"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":11,"column_names":["ix","indexprs"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":9,"column_names":["a","attname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":8,"column_names":["a","attnum"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":10,"column_names":["c","conrelid"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":103,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":9,"column_names":["ix","indkey"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":105,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":127,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":12,"column_names":["ix","indoption"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":129,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":12,"column_names":["i","reloptions"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":9,"column_names":["am","amname"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":164,"query_location_length":36,"function_name":"pg_get_expr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":176,"query_location_length":10,"column_names":["ix","indpred"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":11,"column_names":["ix","indrelid"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":538,"query_location_length":50,"left":{"type":"JOIN","alias":"","sample":null,"query_location":396,"query_location_length":139,"left":{"type":"JOIN","alias":"","sample":null,"query_location":305,"query_location_length":88,"left":{"type":"JOIN","alias":"","sample":null,"query_location":262,"query_location_length":40,"left":{"type":"JOIN","alias":"","sample":null,"query_location":220,"query_location_length":39,"left":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":207,"query_location_length":10,"schema_name":"","table_name":"pg_class","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_class"]}},"right":{"type":"BASE_TABLE","alias":"ix","sample":null,"query_location":225,"query_location_length":11,"schema_name":"","table_name":"pg_index","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_index"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":240,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":240,"query_location_length":5,"column_names":["t","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":248,"query_location_length":11,"column_names":["ix","indrelid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"i","sample":null,"query_location":267,"query_location_length":10,"schema_name":"","table_name":"pg_class","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_class"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":281,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":281,"query_location_length":5,"column_names":["i","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":289,"query_location_length":13,"column_names":["ix","indexrelid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":324,"query_location_length":14,"schema_name":"","table_name":"pg_attribute","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_attribute"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":345,"query_location_length":48,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":345,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":345,"query_location_length":5,"column_names":["t","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":353,"query_location_length":10,"column_names":["a","attrelid"]}},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":368,"query_location_length":25,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":383,"query_location_length":9,"column_names":["ix","indkey"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":368,"query_location_length":8,"column_names":["a","attnum"]},"comparison_type":"COMPARE_EQUAL"}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":415,"query_location_length":15,"schema_name":"","table_name":"pg_constraint","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_constraint"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":438,"query_location_length":96,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":438,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":438,"query_location_length":11,"column_names":["ix","indrelid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":452,"query_location_length":10,"column_names":["c","conrelid"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":471,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":471,"query_location_length":13,"column_names":["ix","indexrelid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":487,"query_location_length":10,"column_names":["c","conindid"]}},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":519,"query_location_length":15,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":506,"query_location_length":9,"column_names":["c","contype"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":520,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"p"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":525,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"u"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":530,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}]}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"am","sample":null,"query_location":557,"query_location_length":8,"schema_name":"","table_name":"pg_am","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_am"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":572,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":572,"query_location_length":7,"column_names":["i","relam"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":582,"query_location_length":6,"column_names":["am","oid"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":596,"query_location_length":121,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":609,"query_location_length":25,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":596,"query_location_length":9,"column_names":["t","relkind"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":610,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"r"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":615,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"v"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":620,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"f"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":625,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"m"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":630,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"p"}}]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":640,"query_location_length":50,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":640,"query_location_length":5,"column_names":["t","oid"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":648,"query_location_length":42,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":656,"query_location_length":14,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":660,"query_location_length":9,"column_names":["table_oid"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":676,"query_location_length":13,"schema_name":"","table_name":"duckdb_tables","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_tables"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":696,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":696,"query_location_length":15,"column_names":["ix","indisprimary"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":714,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"f"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT pg_catalog.current_query();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"current_query","schema":"pg_catalog","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"pivot p using sum (col2) group by col1 order by col1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":4,"column_names":["col1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["col1"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":4,"column_names":["col2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":6,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["col1"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM Cities\nPIVOT (\n array_agg(id)\n FOR\n name IN ('test','Test')\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":24,"query_location_length":53,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":6,"schema_name":"","table_name":"Cities","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["Cities"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":13,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]}}]}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":4,"column_names":["name"]}],"unpivot_names":[],"entries":[{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Test"}],"star_expr":null,"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"PIVOT Cities ON Country IN ('xx') USING SUM(Population);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":6,"query_location_length":6,"schema_name":"","table_name":"Cities","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["Cities"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":10,"column_names":["Population"]}}]}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["Country"]}],"unpivot_names":[],"entries":[{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"xx"}],"star_expr":null,"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT v,\n regexp_replace(a, '__pivot_enum_[0-9a-f\\-]+', '__pivot_enum_X') AS a,\n regexp_replace(b, '__pivot_enum_[0-9a-f\\-]+', '__pivot_enum_X') AS b\nFROM captured ORDER BY v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":186,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":17,"query_location_length":63,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"__pivot_enum_[0-9a-f\\-]+"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"__pivot_enum_X"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":94,"query_location_length":63,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"__pivot_enum_[0-9a-f\\-]+"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"__pivot_enum_X"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":168,"query_location_length":8,"schema_name":"","table_name":"captured","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["captured"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\n FROM monthly_sales\n PIVOT(SUM(amount) FOR MONTH IN ('JAN', 'FEB', 'MAR', 'APR'))\n AS p\n ORDER BY EMPID;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":5,"column_names":["EMPID"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"p","sample":null,"query_location":40,"query_location_length":53,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":6,"column_names":["amount"]}}]}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"JAN"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"FEB"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MAR"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"APR"}],"star_expr":null,"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\nFROM monthly_sales\nPIVOT(COS(amount) FOR MONTH IN ('JAN', 'FEB', 'MAR', 'APR'))\n AS p (EMP_ID_renamed, JAN, FEB, MAR, APR)\nORDER BY EMP_ID_renamed;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":14,"column_names":["EMP_ID_renamed"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"p","sample":null,"query_location":34,"query_location_length":53,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":11,"function_name":"cos","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":6,"column_names":["amount"]}}]}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"JAN"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"FEB"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MAR"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"APR"}],"star_expr":null,"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":["EMP_ID_renamed","JAN","FEB","MAR","APR"],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM monthly_sales\n UNPIVOT((a, b, c) FOR month IN ((jan, feb), (mar, april)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":40,"query_location_length":49,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[],"unpivot_names":["a","b","c"],"pivots":[{"pivot_expressions":[],"unpivot_names":["month"],"entries":[{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":10,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":3,"column_names":["jan"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":3,"column_names":["feb"]}}]},"alias":""},{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":3,"column_names":["mar"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":5,"column_names":["april"]}}]},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"PIVOT monthly_sales ON MONTH IN ('1-JAN', '2-FEB', '3-MAR', '4-APR') USING SUM(AMOUNT) GROUP BY empid","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":6,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":6,"column_names":["AMOUNT"]}}]}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1-JAN"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2-FEB"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3-MAR"}],"star_expr":null,"alias":""},{"values":[{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4-APR"}],"star_expr":null,"alias":""}],"pivot_enum":""}],"groups":["empid"],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"unpivot (select 42 as col1, 'woot' as col2)\n on t.col1::VARCHAR, col2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"source":{"type":"SUBQUERY","alias":"","sample":null,"query_location":8,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":16,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":28,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"woot"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"aggregates":[],"unpivot_names":["value"],"pivots":[{"pivot_expressions":[],"unpivot_names":["name"],"entries":[{"values":[],"star_expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":6,"column_names":["t","col1"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"alias":""},{"values":[],"star_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":4,"column_names":["col2"]},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":1,"schema_name":"","table_name":"v","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\tCASE WHEN storage.attach_replay_wal_latency \u003e= 0 THEN 'true'\n\tELSE 'false' END\nFROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":8,"query_location_length":78,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":18,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":33,"column_names":["storage","attach_replay_wal_latency"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"false"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CASE WHEN storage.attach_replay_wal_latency \u003e 0 THEN 'true' ELSE 'false' END FROM replay_metrics;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":76,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":17,"query_location_length":37,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":33,"column_names":["storage","attach_replay_wal_latency"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"false"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":14,"schema_name":"","table_name":"replay_metrics","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["replay_metrics"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n CASE WHEN optimizer.join_order \u003e 0 THEN 'true'\n ELSE 'false' END\nFROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":11,"query_location_length":68,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":21,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":20,"column_names":["optimizer","join_order"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"false"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":85,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\tCASE WHEN system.total_memory_allocated \u003e= 0 THEN 'true'\n\tELSE 'false' END\nFROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":8,"query_location_length":74,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":18,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":29,"column_names":["system","total_memory_allocated"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"false"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":88,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT operator[1].extra_info,\n\toperator[1].intermediate_size_bytes,\n\tquery.cpu_time,\n\tquery.total_intermediate_rows,\n\tquery.total_rows_scanned,\n\tquery.total_time,\n\tquery.sql,\n\tsystem.blocked_thread_time,\n\tsystem.peak_buffer_memory,\n\tsystem.peak_temp_dir_size,\n\tsystem.total_memory_allocated\nFROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":22,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":15,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["operator"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"extra_info"}}]},{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":32,"query_location_length":35,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":40,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":8,"column_names":["operator"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"intermediate_size_bytes"}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":14,"column_names":["query","cpu_time"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":29,"column_names":["query","total_intermediate_rows"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":24,"column_names":["query","total_rows_scanned"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":146,"query_location_length":16,"column_names":["query","total_time"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":9,"column_names":["query","sql"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":177,"query_location_length":26,"column_names":["system","blocked_thread_time"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":206,"query_location_length":25,"column_names":["system","peak_buffer_memory"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":234,"query_location_length":25,"column_names":["system","peak_temp_dir_size"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":262,"query_location_length":29,"column_names":["system","total_memory_allocated"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":297,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT children[1].operator_type, children[1].operator_timing FROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":25,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":15,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["children"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"operator_type"}}]},{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":34,"query_location_length":27,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":42,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":8,"column_names":["children"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"operator_timing"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM profile_fs.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":14,"schema_name":"profile_fs","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["profile_fs","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from pragma_version();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_version","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"DESCRIBE t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SHOW TABLES FROM DB1.DB1_SCHEMA","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":null,"show_type":"SHOW_FROM","catalog_name":"DB1","schema_name":"DB1_SCHEMA"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i from '{TEST_DIR}/res.csv' tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"tbl","sample":null,"query_location":14,"query_location_length":27,"schema_name":"","table_name":"{TEST_DIR}/res.csv","column_name_alias":["i"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/res.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT result_types IS NULL FROM duckdb_prepared_statements() WHERE name = 'cached_insert';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":20,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["result_types"]}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":33,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_prepared_statements","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"cached_insert"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COALESCE(NULL, 'hello'::INT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":7,"query_location_length":28,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT integers.* EXCLUDE (i, j) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":25,"relation_name":"integers","exclude_list":["i","j"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * EXCLUDE (integers.i, integers.j, integers2.i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":47,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[{"catalog":"","schema":"","table":"integers","column":"i"},{"catalog":"","schema":"","table":"integers2","column":"i"},{"catalog":"","schema":"","table":"integers","column":"j"}],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT integers.* EXCEPT (i, j) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":24,"relation_name":"integers","exclude_list":["i","j"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * EXCEPT (integers.i, integers.j, integers2.i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":46,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[{"catalog":"","schema":"","table":"integers","column":"i"},{"catalog":"","schema":"","table":"integers2","column":"i"},{"catalog":"","schema":"","table":"integers","column":"j"}],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT val FROM (\nSELECT * NOT LIKE '%number%' AS val FROM (SELECT 1 AS number1, 2 AS number2, 3 AS end)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["val"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":16,"query_location_length":90,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"val","query_location":31,"query_location_length":15,"function_name":"!~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":25,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"%number%"}}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":59,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"number1","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"number2","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"end","query_location":95,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT renamed_col FROM (SELECT COLUMNS(* RENAME i AS renamed_col) FROM integers)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["renamed_col"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":24,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":40,"query_location_length":25,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[{"key":{"catalog":"","schema":"","table":"","column":"i"},"value":"renamed_col"}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * EXCLUDE (j, k) REPLACE (i+100 AS i), * EXCLUDE (j) REPLACE (i+100 AS i), * EXCLUDE (j, k) REPLACE (i+101 AS i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":37,"relation_name":"","exclude_list":["j","k"],"replace_list":[{"key":"i","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}}],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"STAR","type":"STAR","alias":"","query_location":46,"query_location_length":34,"relation_name":"","exclude_list":["j"],"replace_list":[{"key":"i","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}}],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"STAR","type":"STAR","alias":"","query_location":82,"query_location_length":37,"relation_name":"","exclude_list":["j","k"],"replace_list":[{"key":"i","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":101}}}]}}],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":125,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i.* FROM a, b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":3,"relation_name":"i","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":11,"query_location_length":9,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COLUMNS(* REPLACE (concat(a::VARCHAR, '_joined') AS a)) FROM test_t1 NATURAL JOIN test_t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":15,"query_location_length":46,"relation_name":"","exclude_list":[],"replace_list":[{"key":"a","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":29,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"_joined"}}}]}}],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":76,"query_location_length":20,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":7,"schema_name":"","table_name":"test_t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":7,"schema_name":"","table_name":"test_t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_t2"]}},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM intest WHERE a IN (b)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"intest","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intest"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":32,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["b"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a FROM strtest WHERE b \u003c\u003e 'a'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strtest","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strtest"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":28,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT rowid \u003c i, rowid = NULL, rowid = i, rowid \u003c\u003e 0 FROM a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["i"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":32,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":43,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM a WHERE rowid=0 OR rowid=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":22,"query_location_length":18,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'hello'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT test.* FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":6,"relation_name":"test","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (VALUES (1 + 1, 2, 3), (1 + 3, 2, 3)) v1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"v1","sample":null,"query_location":14,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM v0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"v0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a3, b3, c3 IN (1, 2, 3, 100, 200) FROM table3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["a3"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["b3"]},{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":21,"query_location_length":19,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":2,"column_names":["c3"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":200}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":6,"schema_name":"","table_name":"table3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select avg(a) \u003e 200, avg(a) \u003c 800 from duckdb_table_sample('t1');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":200}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":21,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":6,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":800}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":25,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_table_sample","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t1"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from duckdb_table_sample('string_samples') where a is NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":37,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_table_sample","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"string_samples"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":67,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["a"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from duckdb_table_sample('a');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_table_sample","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM small_table USING SAMPLE 20 ROWS (system);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":{"sample_size":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":20},"is_percentage":false,"method":"System","seed":-1,"repeatable":false,"sample_rate":-1.0},"query_location":21,"query_location_length":41,"schema_name":"","table_name":"small_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["small_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select scope from duckdb_secrets() where name='scope_as_struct'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["scope"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":18,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_secrets","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":41,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"scope_as_struct"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t.t.t.t.t.t.t.t FROM t.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":15,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["t","t","t","t"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":3,"schema_name":"t","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT #1+#2 FROM range(1) tbl, range(1) tbl2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":7,"query_location_length":2,"index":1}},{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":10,"query_location_length":2,"index":2}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":13,"query_location_length":32,"left":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":18,"query_location_length":12,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"tbl2","sample":null,"query_location":32,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \"hel lo\" : 42;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"hel lo","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from \"my_wonderful_values\" : (values(42))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"my_wonderful_values","sample":null,"query_location":5,"query_location_length":36,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":30,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 42 WHERE 1=0 INTERSECT SELECT 42 WHERE 1=0","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":16,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM v1 JOIN v1 v2 USING (i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":20,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"right":{"type":"BASE_TABLE","alias":"v2","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"v1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v1"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 AS two UNION ALL SELECT 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"two","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT 1.1 AS three UNION SELECT 2 UNION ALL SELECT 2 ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"three","query_location":7,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":11}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT q2 FROM int8_tbl INTERSECT ALL SELECT q1 FROM int8_tbl ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["q2"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":8,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":2,"column_names":["q1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":8,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT f1 FROM float8_tbl EXCEPT SELECT f1 FROM int4_tbl ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["f1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":10,"schema_name":"","table_name":"float8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["float8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["f1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":8,"schema_name":"","table_name":"int4_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int4_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT 1, 'a' UNION ALL SELECT 2, 'b'","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT b FROM test WHERE a \u003c 13 UNION SELECT b FROM test WHERE a \u003e 11 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":25,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":13}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":64,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT 1 UNION ALL BY NAME SELECT * FROM range(2, 100) UNION ALL BY NAME SELECT 999 LIMIT 5;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":34,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":999}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT x, x FROM t1 UNION ALL BY NAME SELECT y FROM t2;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT a FROM test UNION SELECT b FROM test2 ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT a FROM test UNION SELECT * FROM test2 ORDER BY test.a;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":6,"column_names":["test","a"]}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":32,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"(SELECT x FROM t1 UNION ALL SELECT y FROM t1) UNION BY NAME SELECT 5 ORDER BY y;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["y"]}}]}],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":false,"children":[{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"select '0' as c union all select 0 as c;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT 1 UNION SELECT 1.0","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (\n\tSELECT 1\n\tUNION\n\tSELECT 2\n\tUNION\n\tSELECT 3\n\tUNION\n\tSELECT 4\n\tUNION\n\tSELECT 5\n) tbl(i)\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":81,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from (select 'hello' i union all select 'h' i) t1 where i='h'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":14,"query_location_length":41,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":22,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":49,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"h"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"h"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM (SELECT * FROM range(1000000) tbl(i) UNION ALL SELECT * FROM range(1000000) tbl(i) UNION ALL SELECT * FROM range(1000000) tbl(i) UNION ALL SELECT * FROM range(1000000) tbl(i) UNION ALL SELECT * FROM range(1000000) tbl(i)) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":21,"query_location_length":221,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":29,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":36,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":75,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":82,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":121,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":128,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":167,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":174,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":213,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":220,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{DATA_DIR}/csv/glob/a1/../f_1.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":35,"schema_name":"","table_name":"{DATA_DIR}/csv/glob/a1/../f_1.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/glob/a1/../f_1.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM '{DATA_DIR}/parquet-testing/glob/t1.parquet'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":44,"schema_name":"","table_name":"{DATA_DIR}/parquet-testing/glob/t1.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/parquet-testing/glob/t1.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select corr('hello'::VARCHAR, 'world'::VARCHAR)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"corr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"world"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(i) FROM range(1000000) t(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":19,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":7,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM generate_series(0, 10000, 1) tbl(i) ORDER BY i DESC LIMIT (SELECT k FROM integers)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":72,"query_location_length":24,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":14,"query_location_length":35,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT c, k, i FROM tiny_fixed ORDER BY k, c, i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["k"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["c"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":10,"schema_name":"","table_name":"tiny_fixed","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tiny_fixed"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM test LIMIT SUM(42)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["sum"]}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers as int LIMIT (SELECT -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":36,"query_location_length":11,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"int","sample":null,"query_location":14,"query_location_length":15,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH cte AS (SELECT 3) SELECT * FROM range(10000000) LIMIT (SELECT * FROM cte)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":59,"query_location_length":19,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":67,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":74,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":30,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":37,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":8,"literal":{"kind":"INTEGER","text":"10000000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM test LIMIT 20 %","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}},"offset":null,"limit_type":"PERCENTAGE"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM test LIMIT 50% OFFSET 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"limit_type":"PERCENTAGE"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from test limit \"Hello World\" %;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":13,"column_names":["Hello World"]},"offset":null,"limit_type":"PERCENTAGE"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, j, row_number() OVER (PARTITION BY i ORDER BY j NULLS FIRST) FROM test ORDER BY i NULLS FIRST, j NULLS FIRST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["j"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":13,"query_location_length":57,"function_name":"row_number","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["j"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, b FROM test ORDER BY b, a DESC LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["b"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["a"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a-10 AS k FROM test UNION SELECT a-10 AS l FROM test ORDER BY 1-k;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["-"]}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":8,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":41,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT a % 2, b FROM test UNION SELECT a % 2 AS k FROM test ORDER BY -1","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":39,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT ON (false) a, b FROM t ORDER BY a, b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH\n cte1 AS (\n SELECT\n struct_pack(f := json_extract('[]', '$[*]')) AS s0, struct_pack(ff := c) AS s1, t1.a AS p\n FROM t3\n JOIN t1 USING (c)\n ),\n cte2 AS (\n SELECT\n cte1.s1, cte1.s0, struct_pack(fff := cte1.p) AS s2\n FROM cte1\n JOIN t2 AS t22 ON cte1.p = t22.a\n LEFT JOIN t2 ON t22.b = t2.a\n ),\n cte3 AS (\n SELECT cte2.*\n FROM cte2\n ORDER BY s1, s2\n )\nSELECT *\nFROM cte3\nLIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":489,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[{"key":"cte1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s0","query_location":46,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"f","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"f","query_location":63,"query_location_length":26,"function_name":"json_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"STRING","text":"[]"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":6,"literal":{"kind":"STRING","text":"$[*]"}}}],"qualified_name":{"path":["json_extract"]}}}],"qualified_name":{"path":["struct_pack"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"s1","query_location":98,"query_location_length":20,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"ff","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"ff","query_location":116,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["struct_pack"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"p","query_location":126,"query_location_length":4,"column_names":["t1","a"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":160,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":149,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":165,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["c"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":226,"query_location_length":7,"column_names":["cte1","s1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":235,"query_location_length":7,"column_names":["cte1","s0"]},{"class":"FUNCTION","type":"FUNCTION","alias":"s2","query_location":244,"query_location_length":26,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"fff","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"fff","query_location":263,"query_location_length":6,"column_names":["cte1","p"]}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":344,"query_location_length":28,"left":{"type":"JOIN","alias":"","sample":null,"query_location":303,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":290,"query_location_length":4,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"right":{"type":"BASE_TABLE","alias":"t22","sample":null,"query_location":308,"query_location_length":9,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":321,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":321,"query_location_length":6,"column_names":["cte1","p"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":330,"query_location_length":5,"column_names":["t22","a"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":354,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":360,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":360,"query_location_length":5,"column_names":["t22","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":368,"query_location_length":4,"column_names":["t2","a"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"cte3","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":451,"query_location_length":2,"column_names":["s1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":455,"query_location_length":2,"column_names":["s2"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":409,"query_location_length":6,"relation_name":"cte2","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":429,"query_location_length":4,"schema_name":"","table_name":"cte2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":471,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":478,"query_location_length":4,"schema_name":"","table_name":"cte3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM repeat('x', 9) WITH ORDINALITY WHERE ordinality \u003e 4 ORDER BY ordinality;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":10,"column_names":["ordinality"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":30,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["repeat"]}},"column_name_alias":[],"with_ordinality":"WITH_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":51,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":10,"column_names":["ordinality"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE ordinalityCTE AS (\n SELECT 1 AS ordinality\n UNION\n SELECT oCTE.ordinality + r.ordinality AS ordinality\n FROM\n ordinalityCTE AS oCTE,\n LATERAL range(oCTE.ordinality) WITH ORDINALITY AS r(range,ordinality)\n WHERE oCTE.ordinality \u003c 5\n) SELECT ordinality FROM ordinalityCTE ORDER BY ordinality;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":323,"query_location_length":10,"column_names":["ordinality"]}}]}],"cte_map":{"map":[{"key":"ordinalityCTE","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"ordinalityCTE","union_all":false,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"ordinality","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"ordinality","query_location":98,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":15,"column_names":["oCTE","ordinality"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":12,"column_names":["r","ordinality"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":131,"query_location_length":113,"left":{"type":"BASE_TABLE","alias":"oCTE","sample":null,"query_location":144,"query_location_length":21,"schema_name":"","table_name":"ordinalityCTE","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ordinalityCTE"]}},"right":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":175,"query_location_length":69,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":15,"column_names":["oCTE","ordinality"]}}],"qualified_name":{"path":["range"]}},"column_name_alias":["range","ordinality"],"with_ordinality":"WITH_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":255,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":255,"query_location_length":15,"column_names":["oCTE","ordinality"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":273,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":[],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":284,"query_location_length":10,"column_names":["ordinality"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":300,"query_location_length":13,"schema_name":"","table_name":"ordinalityCTE","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ordinalityCTE"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1073741823::BIGINT * 10737418240::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"INTEGER","text":"1073741823"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":11,"literal":{"kind":"INTEGER","text":"10737418240"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -2::BIGINT * (-9223372036854775807)::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["-"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":20,"literal":{"kind":"INTEGER","text":"-9223372036854775807"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT 1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":1351,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":15,"query_location_length":1342,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":23,"query_location_length":1333,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":31,"query_location_length":1324,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":39,"query_location_length":1315,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":47,"query_location_length":1306,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":55,"query_location_length":1297,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":63,"query_location_length":1288,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":71,"query_location_length":1279,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":79,"query_location_length":1270,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":87,"query_location_length":1261,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":95,"query_location_length":1252,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":103,"query_location_length":1243,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":111,"query_location_length":1234,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":119,"query_location_length":1225,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":127,"query_location_length":1216,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":135,"query_location_length":1207,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":143,"query_location_length":1198,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":151,"query_location_length":1189,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":159,"query_location_length":1180,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":167,"query_location_length":1171,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":175,"query_location_length":1162,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":183,"query_location_length":1153,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":191,"query_location_length":1144,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":199,"query_location_length":1135,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":207,"query_location_length":1126,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":215,"query_location_length":1117,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":223,"query_location_length":1108,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":231,"query_location_length":1099,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":239,"query_location_length":1090,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":247,"query_location_length":1081,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":255,"query_location_length":1072,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":263,"query_location_length":1063,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":271,"query_location_length":1054,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":279,"query_location_length":1045,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":287,"query_location_length":1036,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":295,"query_location_length":1027,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":303,"query_location_length":1018,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":311,"query_location_length":1009,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":319,"query_location_length":1000,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":327,"query_location_length":991,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":335,"query_location_length":982,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":343,"query_location_length":973,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":351,"query_location_length":964,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":359,"query_location_length":955,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":367,"query_location_length":946,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":375,"query_location_length":937,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":383,"query_location_length":928,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":391,"query_location_length":919,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":399,"query_location_length":910,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":407,"query_location_length":901,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":415,"query_location_length":892,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":423,"query_location_length":883,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":431,"query_location_length":874,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":439,"query_location_length":865,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":447,"query_location_length":856,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":455,"query_location_length":847,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":463,"query_location_length":838,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":471,"query_location_length":829,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":479,"query_location_length":820,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":487,"query_location_length":811,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":495,"query_location_length":802,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":503,"query_location_length":793,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":511,"query_location_length":784,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":519,"query_location_length":775,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":527,"query_location_length":766,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":535,"query_location_length":757,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":543,"query_location_length":748,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":551,"query_location_length":739,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":559,"query_location_length":730,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":567,"query_location_length":721,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":575,"query_location_length":712,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":583,"query_location_length":703,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":591,"query_location_length":694,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":599,"query_location_length":685,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":607,"query_location_length":676,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":615,"query_location_length":667,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":623,"query_location_length":658,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":631,"query_location_length":649,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":639,"query_location_length":640,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":647,"query_location_length":631,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":655,"query_location_length":622,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":663,"query_location_length":613,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":671,"query_location_length":604,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":679,"query_location_length":595,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":687,"query_location_length":586,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":695,"query_location_length":577,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":703,"query_location_length":568,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":711,"query_location_length":559,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":719,"query_location_length":550,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":727,"query_location_length":541,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":735,"query_location_length":532,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":743,"query_location_length":523,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":751,"query_location_length":514,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":759,"query_location_length":505,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":767,"query_location_length":496,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":775,"query_location_length":487,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":783,"query_location_length":478,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":791,"query_location_length":469,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":799,"query_location_length":460,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":807,"query_location_length":451,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":815,"query_location_length":442,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":823,"query_location_length":433,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":831,"query_location_length":424,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":839,"query_location_length":415,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":847,"query_location_length":406,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":855,"query_location_length":397,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":863,"query_location_length":388,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":871,"query_location_length":379,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":879,"query_location_length":370,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":887,"query_location_length":361,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":895,"query_location_length":352,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":903,"query_location_length":343,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":911,"query_location_length":334,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":919,"query_location_length":325,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":927,"query_location_length":316,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":935,"query_location_length":307,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":943,"query_location_length":298,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":951,"query_location_length":289,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":959,"query_location_length":280,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":967,"query_location_length":271,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":975,"query_location_length":262,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":983,"query_location_length":253,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":991,"query_location_length":244,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":999,"query_location_length":235,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1007,"query_location_length":226,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1015,"query_location_length":217,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1023,"query_location_length":208,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1031,"query_location_length":199,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1039,"query_location_length":190,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1047,"query_location_length":181,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1055,"query_location_length":172,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1063,"query_location_length":163,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1071,"query_location_length":154,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1079,"query_location_length":145,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1087,"query_location_length":136,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1095,"query_location_length":127,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1103,"query_location_length":118,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1111,"query_location_length":109,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1119,"query_location_length":100,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1127,"query_location_length":91,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1135,"query_location_length":82,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1143,"query_location_length":73,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1151,"query_location_length":64,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1159,"query_location_length":55,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1167,"query_location_length":46,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1175,"query_location_length":37,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1183,"query_location_length":28,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1191,"query_location_length":19,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":1199,"query_location_length":10,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1207,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -2::INTEGER + -2147483647::INTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["-"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":20,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":10,"literal":{"kind":"INTEGER","text":"2147483647"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -2::SMALLINT - 32767::SMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}}],"qualified_name":{"path":["-"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":5,"literal":{"kind":"INTEGER","text":"32767"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -2::TINYINT * 64::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["-"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"64"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 4611686018427387900::BIGINT * 2::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"literal":{"kind":"INTEGER","text":"4611686018427387900"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (i*10::TINYINT)*10::TINYINT FROM tinyints ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":13,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::TINYINT+120::TINYINT FROM smallints WHERE i=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"literal":{"kind":"INTEGER","text":"120"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1e308+1e308","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1e308"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1e308"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(100 AS TINYINT) + cast(100 AS TINYINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), SUM(i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select min({'i': a, 'j': a % 2}), max({'i': a, 'j': a % 2}) from t group by b%2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":20,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"i","query_location":17,"query_location_length":1,"column_names":["a"]}},{"name":"j","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":25,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":25,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":20,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"i","query_location":44,"query_location_length":1,"column_names":["a"]}},{"name":"j","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":52,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":65,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT i, rowid - min(rowid) OVER () AS pos FROM t2) WHERE i \u003c\u003e pos","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":53,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"pos","query_location":38,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":5,"column_names":["rowid"]}},{"name":"","expression":{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":40,"query_location_length":18,"function_name":"min","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["min"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":71,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":81,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["pos"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT B'1010'\n'0101';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"literal":{"kind":"BIT","text":"10100101"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM `my table`;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":10,"schema_name":"","table_name":"my table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["my table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT `b col` || `b col` FROM `my table`;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["b col"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":7,"column_names":["b col"]}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":10,"schema_name":"","table_name":"my table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["my table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a nulls, b rows, a range FROM t ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"nulls","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"rows","query_location":16,"query_location_length":1,"column_names":["b"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"range","query_location":24,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'a%' LIKE 'a\\%' ESCAPE '\\';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":21,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"STRING","text":"a%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":5,"literal":{"kind":"STRING","text":"a\\%"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}}],"qualified_name":{"path":["like_escape"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MIN(COLUMNS('([a-z])\\d+')) AS \"\\a\" FROM numerics","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"\\a","query_location":7,"query_location_length":26,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":11,"query_location_length":21,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":12,"literal":{"kind":"STRING","text":"([a-z])\\d+"}},"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":8,"schema_name":"","table_name":"numerics","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numerics"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT @5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"@","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["@"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1000__000__000'::INT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":16,"literal":{"kind":"STRING","text":"1000__000__000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1_2.12'::FLOAT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"literal":{"kind":"STRING","text":"1_2.12"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '_1_000_000_000_000_000_000_000'::DOUBLE == 1e+21","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":49,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":32,"literal":{"kind":"STRING","text":"_1_000_000_000_000_000_000_000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"1e+21"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0b0_1_0_1'::INT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":11,"literal":{"kind":"STRING","text":"0b0_1_0_1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 1_2e1_0::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"NUMERIC","text":"1_2e1_0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '' = $$$$;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":9,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"STRING","text":""}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"literal":{"kind":"STRING","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM duckdb_external_resources()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_external_resources","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_external_resources"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t ORDER BY a OFFSET 1 ROW FETCH NEXT ROW ONLY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT main.lower() FROM varchars AS t(main)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"lower","schema":"main","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["main","lower"]}}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":25,"query_location_length":19,"schema_name":"","table_name":"varchars","column_name_alias":["main"],"catalog_name":"","at_clause":null,"qualified_name":{"path":["varchars"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime(ci.purchasedate.nullif('1899-12-30T00:00:00'), '%Y-%m-%d')\nFROM (VALUES (TIMESTAMP '2026-01-01')) AS ci(\"PurchaseDate\")","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":45,"function_name":"nullif","schema":"purchasedate","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"ci","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":21,"literal":{"kind":"STRING","text":"1899-12-30T00:00:00"}}}],"qualified_name":{"path":["ci","purchasedate","nullif"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":10,"literal":{"kind":"STRING","text":"%Y-%m-%d"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"SUBQUERY","alias":"ci","sample":null,"query_location":80,"query_location_length":33,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":89,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2026-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["PurchaseDate"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 10 NOTNULL::VARCHAR, 10 ISNULL::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":10,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":31,"query_location_length":6,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"from (\n (values (1), (2)) as t1 (a)\n cross join\n (values (3), (4)) as t2 (b)\n) as t(x, y, z)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":5,"query_location_length":90,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":39,"query_location_length":40,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":9,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":52,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y","z"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'a' COLLATE NOCASE = 'A'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":24,"left":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"collation":"NOCASE"},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT true = NOT NOT true","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":19,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"right":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":14,"query_location_length":12,"children":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}]}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (NULL::INTEGER).ifnull(5);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":7,"query_location_length":25,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([1,2]).unpack();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":7,"query_location_length":16,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"coalesce\"(NULL, 5), s.coalesce(NULL, 5);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"coalesce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["coalesce"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":19,"function_name":"coalesce","schema":"s","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["s","coalesce"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT m(), m(a := 5);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["m"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":9,"function_name":"m","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["m"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM VALUES (1), (2), (3) v(x) TABLESAMPLE 1 ROWS;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"v","sample":{"sample_size":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1},"is_percentage":false,"method":"Reservoir","seed":-1,"repeatable":false,"sample_rate":-1.0},"query_location":21,"query_location_length":44,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers GROUP BY COLUMNS(*)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"STAR","type":"STAR","alias":"","query_location":40,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"odder col\" AS \"a b\" FROM \"weird name\" AS \"al ias\" ORDER BY \"a b\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":5,"column_names":["a b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a b","query_location":7,"query_location_length":11,"column_names":["odder col"]}],"from_table":{"type":"BASE_TABLE","alias":"al ias","sample":null,"query_location":33,"query_location_length":24,"schema_name":"","table_name":"weird name","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["weird name"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH \"cte name\"(\"c one\") AS (SELECT 1) SELECT \"c one\" FROM \"cte name\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte name","value":{"aliases":["c one"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":7,"column_names":["c one"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":10,"schema_name":"","table_name":"cte name","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte name"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT switch(val, MAP {}, 'other') FROM null_test ORDER BY val;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":3,"column_names":["val"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"switch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["val"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":7,"literal":{"kind":"STRING","text":"other"}}}],"qualified_name":{"path":["switch"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":9,"schema_name":"","table_name":"null_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT switch(val, MAP {1: 'one', 2: 'two'}, 'other') FROM null_test ORDER BY val;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":3,"column_names":["val"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"switch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":3,"column_names":["val"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":24,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":5,"literal":{"kind":"STRING","text":"one"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":5,"literal":{"kind":"STRING","text":"two"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":7,"literal":{"kind":"STRING","text":"other"}}}],"qualified_name":{"path":["switch"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":9,"schema_name":"","table_name":"null_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COLUMNS(*) + 1 FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":15,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM grouped_table ORDER BY COLUMNS(*);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":45,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"","table_name":"grouped_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["grouped_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * + 42 FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM tbl ORDER BY COLUMNS('col1|col3')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":27,"query_location_length":20,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":11,"literal":{"kind":"STRING","text":"col1|col3"}},"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select *COLUMNS('[a|c]') from contains_test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":7,"query_location_length":17,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"literal":{"kind":"STRING","text":"[a|c]"}},"qualified_exclude_list":[],"rename_list":[]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":13,"schema_name":"","table_name":"contains_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["contains_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select struct_pack(*COLUMNS('id')) a, struct_pack(*COLUMNS('name')) from data","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":7,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":19,"query_location_length":14,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"STRING","text":"id"}},"qualified_exclude_list":[],"rename_list":[]}]}}],"qualified_name":{"path":["struct_pack"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":50,"query_location_length":16,"children":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":6,"literal":{"kind":"STRING","text":"name"}},"qualified_exclude_list":[],"rename_list":[]}]}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":73,"query_location_length":4,"schema_name":"","table_name":"data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n\t[\n\t\tUNPACK(\n\t\t\t[\n\t\t\t\tCOLUMNS(['d'])\n\t\t\t]\n\t\t)\n\t]\nfrom (select 21 a, 42 b, 1337 c)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":47,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_UNPACK","alias":"","query_location":12,"query_location_length":40,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":29,"query_location_length":14,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"STRING","text":"d"}}}],"qualified_name":{"path":["list_value"]}},"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["list_value"]}}]}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":61,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":69,"query_location_length":2,"literal":{"kind":"INTEGER","text":"21"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":75,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c","query_location":81,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1337"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM query('SELECT 1' || repeat(' IS NULL', 150))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":44,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":37,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":10,"literal":{"kind":"STRING","text":"SELECT 1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":23,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":10,"literal":{"kind":"STRING","text":" IS NULL"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"INTEGER","text":"150"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["query"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM query('SELECT x IS NULL FROM (SELECT NULL::' || repeat('STRUCT(a ', 50) || 'INTEGER' || repeat(')', 50) || ' AS x)')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":116,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":109,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":38,"literal":{"kind":"STRING","text":"SELECT x IS NULL FROM (SELECT NULL::"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":23,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":11,"literal":{"kind":"STRING","text":"STRUCT(a "}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":9,"literal":{"kind":"STRING","text":"INTEGER"}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":15,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":3,"literal":{"kind":"STRING","text":")"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":8,"literal":{"kind":"STRING","text":" AS x)"}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["query"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 2^2 + 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"^","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["^"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ~1 * 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":5,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["~"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT user FROM (VALUES (42)) user(x)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["user"]}],"from_table":{"type":"SUBQUERY","alias":"user","sample":null,"query_location":17,"query_location_length":13,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers,","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT _0_db._2_schema._3_table._4_col FROM _0_db._2_schema._3_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":31,"column_names":["_0_db","_2_schema","_3_table","_4_col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":24,"schema_name":"_2_schema","table_name":"_3_table","column_name_alias":[],"catalog_name":"_0_db","at_clause":null,"qualified_name":{"path":["_0_db","_2_schema","_3_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT E'it\\'s a test' = 'it''s a test';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":32,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":15,"literal":{"kind":"STRING","text":"it's a test"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":14,"literal":{"kind":"STRING","text":"it's a test"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT e'\\n' = chr(10);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":15,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"\n"}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":7,"function_name":"chr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["chr"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 3 IN (1, 2) IN (FALSE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":22,"query_location_length":7,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":12,"query_location_length":6,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'a' LIKE 'a' ESCAPE '' = TRUE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":29,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":18,"function_name":"like_escape","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}],"qualified_name":{"path":["like_escape"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v.col0 FROM v: VALUES (42) ORDER BY v.col0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":6,"column_names":["v","col0"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["v","col0"]}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":19,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT index_name, sql, expressions\nFROM duckdb_indexes()\nWHERE table_name = 'create_index_syntax'\nORDER BY index_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":10,"column_names":["index_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["index_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":3,"column_names":["sql"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":11,"column_names":["expressions"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_indexes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_indexes"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":21,"literal":{"kind":"STRING","text":"create_index_syntax"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 5 NOT BETWEEN ASYMMETRIC 10 AND 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":33,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":13,"query_location_length":27,"input":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"lower":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"upper":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (1 + 2) IS NULL = FALSE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":23,"left":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":15,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["+"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select relname, attname, attnum from pg_attribute join pg_class on (pg_attribute.attrelid=pg_class.oid) where relname='integers' and attnum\u003e=0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["relname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":7,"column_names":["attname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":6,"column_names":["attnum"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":50,"query_location_length":53,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":12,"schema_name":"","table_name":"pg_attribute","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_attribute"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":8,"schema_name":"","table_name":"pg_class","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_class"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":21,"column_names":["pg_attribute","attrelid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":12,"column_names":["pg_class","oid"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":110,"query_location_length":32,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":7,"column_names":["relname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":10,"literal":{"kind":"STRING","text":"integers"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":133,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":6,"column_names":["attnum"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM pg_catalog.pg_indexes","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":21,"schema_name":"pg_catalog","table_name":"pg_indexes","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_catalog","pg_indexes"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sequencename, min_value, max_value, start_value, cycle FROM pg_sequences","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["sequencename"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":9,"column_names":["min_value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":9,"column_names":["max_value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":11,"column_names":["start_value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["cycle"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":12,"schema_name":"","table_name":"pg_sequences","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_sequences"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT oid FROM pg_type WHERE typname = 'date' AND oid IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["oid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":7,"schema_name":"","table_name":"pg_type","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_type"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":36,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":7,"column_names":["typname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":6,"literal":{"kind":"STRING","text":"date"}}},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":55,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":3,"column_names":["oid"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT oid FROM pg_type WHERE typname = 'numeric' AND oid IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["oid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":7,"schema_name":"","table_name":"pg_type","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_type"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":39,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":7,"column_names":["typname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":9,"literal":{"kind":"STRING","text":"numeric"}}},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":58,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["oid"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT relname FROM pg_class c join pg_namespace n on\nn.oid=c.relnamespace where relkind='S' and\nn.nspname='main' and relname='seq'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["relname"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":31,"query_location_length":43,"left":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":20,"query_location_length":10,"schema_name":"","table_name":"pg_class","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_class"]}},"right":{"type":"BASE_TABLE","alias":"n","sample":null,"query_location":36,"query_location_length":14,"schema_name":"","table_name":"pg_namespace","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_namespace"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":5,"column_names":["n","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":14,"column_names":["c","relnamespace"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":81,"query_location_length":50,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["relkind"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"STRING","text":"S"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":9,"column_names":["n","nspname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":6,"literal":{"kind":"STRING","text":"main"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":118,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":7,"column_names":["relname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":5,"literal":{"kind":"STRING","text":"seq"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a.attname,\n\tCASE WHEN (a.attcollation != 0 AND (\n\t\tSELECT t.typcollation\n\t\tFROM pg_catalog.pg_type t\n\t\tWHERE t.oid = a.atttypid\n\t) != a.attcollation) THEN (\n\t\tSELECT c.collname\n\t\tFROM pg_catalog.pg_collation c\n\t\tWHERE c.oid = a.attcollation\n\t) ELSE NULL END AS collation\nFROM pg_catalog.pg_attribute a\nWHERE a.attrelid = (SELECT MIN(oid) FROM pg_class WHERE relname='integral_values')\nAND a.attnum \u003e 0 AND NOT a.attisdropped\nORDER BY a.attnum;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":441,"query_location_length":8,"column_names":["a","attnum"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["a","attname"]},{"class":"CASE","type":"CASE_EXPR","alias":"collation","query_location":19,"query_location_length":245,"case_checks":[{"when_expr":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":30,"query_location_length":125,"children":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":30,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":14,"column_names":["a","attcollation"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":54,"query_location_length":101,"left":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":54,"query_location_length":83,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":14,"column_names":["t","typcollation"]}],"from_table":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":87,"query_location_length":20,"schema_name":"pg_catalog","table_name":"pg_type","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_catalog","pg_type"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":116,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":5,"column_names":["t","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":10,"column_names":["a","atttypid"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":141,"query_location_length":14,"column_names":["a","attcollation"]}}]},"then_expr":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":162,"query_location_length":88,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":173,"query_location_length":10,"column_names":["c","collname"]}],"from_table":{"type":"BASE_TABLE","alias":"c","sample":null,"query_location":191,"query_location_length":25,"schema_name":"pg_catalog","table_name":"pg_collation","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_catalog","pg_collation"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":225,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":225,"query_location_length":5,"column_names":["c","oid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":233,"query_location_length":14,"column_names":["a","attcollation"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":256,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":283,"query_location_length":25,"schema_name":"pg_catalog","table_name":"pg_attribute","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_catalog","pg_attribute"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":315,"query_location_length":116,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":315,"query_location_length":76,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":315,"query_location_length":10,"column_names":["a","attrelid"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":328,"query_location_length":63,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":336,"query_location_length":8,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":340,"query_location_length":3,"column_names":["oid"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":350,"query_location_length":8,"schema_name":"","table_name":"pg_class","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pg_class"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":365,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":365,"query_location_length":7,"column_names":["relname"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":373,"query_location_length":17,"literal":{"kind":"STRING","text":"integral_values"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":396,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":396,"query_location_length":8,"column_names":["a","attnum"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":407,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":413,"query_location_length":18,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":417,"query_location_length":14,"column_names":["a","attisdropped"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CURRENT_CATALOG","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":15,"column_names":["CURRENT_CATALOG"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select txid_current();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"txid_current","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["txid_current"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM\n (SELECT product, sales, quarter FROM Produce)\n PIVOT(SUM(sales) FOR quarter IN ('Q1', 'Q2', 'Q3', 'Q4'))\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":70,"query_location_length":50,"source":{"type":"SUBQUERY","alias":"","sample":null,"query_location":16,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":7,"column_names":["product"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["sales"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":7,"column_names":["quarter"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":7,"schema_name":"","table_name":"Produce","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["Produce"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":5,"column_names":["sales"]}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["quarter"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"literal":{"kind":"STRING","text":"Q1"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":4,"literal":{"kind":"STRING","text":"Q2"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":4,"literal":{"kind":"STRING","text":"Q3"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":4,"literal":{"kind":"STRING","text":"Q4"}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\n FROM sales\n PIVOT (sum(sales)\n FOR (quarter, region)\n IN ((1, 'east') AS q1_east, (1, 'east') AS q1_east_2));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":35,"query_location_length":98,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":5,"schema_name":"","table_name":"sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":5,"column_names":["sales"]}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":7,"column_names":["quarter"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":6,"column_names":["region"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"q1_east","query_location":84,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":6,"literal":{"kind":"STRING","text":"east"}}}],"qualified_name":{"path":["row"]}},"alias":"q1_east"},{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"q1_east_2","query_location":108,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":6,"literal":{"kind":"STRING","text":"east"}}}],"qualified_name":{"path":["row"]}},"alias":"q1_east_2"}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\n FROM monthly_sales\n PIVOT(SUM(amount) FOR MONTH IN unique_monthsx)\n AS p\n ORDER BY EMPID;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":5,"column_names":["EMPID"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"p","sample":null,"query_location":40,"query_location_length":39,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":6,"column_names":["amount"]}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[],"pivot_enum":"unique_monthsx"}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t PIVOT (count(*) FOR col IN (map()));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":23,"query_location_length":27,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":3,"column_names":["col"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":5,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["map"]}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\n FROM sales\n PIVOT(\n SUM(amount + year)\n FOR YEAR IN (2020, 2021)\n MONTH IN ('JAN', 'FEB', 'MAR', 'APR')\n ) AS p\n ORDER BY EMPID;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":5,"column_names":["EMPID"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"p","sample":null,"query_location":41,"query_location_length":101,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":5,"schema_name":"","table_name":"sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":18,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":6,"column_names":["amount"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":4,"column_names":["year"]}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":4,"column_names":["YEAR"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2020"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2021"}},"alias":""}],"pivot_enum":""},{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":5,"literal":{"kind":"STRING","text":"JAN"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":5,"literal":{"kind":"STRING","text":"FEB"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":5,"literal":{"kind":"STRING","text":"MAR"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":5,"literal":{"kind":"STRING","text":"APR"}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\n FROM monthly_sales\n PIVOT(SUM(amount) FOR MONTH IN ('JAN', 'FEB', 'MAR'))\n AS p\n ORDER BY EMPID;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":5,"column_names":["EMPID"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"p","sample":null,"query_location":40,"query_location_length":46,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":6,"column_names":["amount"]}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":5,"literal":{"kind":"STRING","text":"JAN"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":5,"literal":{"kind":"STRING","text":"FEB"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":5,"literal":{"kind":"STRING","text":"MAR"}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\n FROM monthly_sales\n PIVOT(SUM(amount) FOR MONTH IN (*))\n AS p\n ORDER BY EMPID;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":5,"column_names":["EMPID"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"p","sample":null,"query_location":40,"query_location_length":28,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":6,"column_names":["amount"]}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["MONTH"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"STAR","type":"STAR","alias":"","query_location":66,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"UNPIVOT (SELECT * FROM monthly_sales)\n ON jan, feb, mar april\n INTO\n NAME month\n VALUE sales;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"source":{"type":"SUBQUERY","alias":"","sample":null,"query_location":8,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":16,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":13,"schema_name":"","table_name":"monthly_sales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["monthly_sales"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"aggregates":[],"unpivot_names":["sales"],"pivots":[{"pivot_expressions":[],"unpivot_names":["month"],"entries":[{"values":[],"star_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":3,"column_names":["jan"]},"alias":""},{"values":[],"star_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":3,"column_names":["feb"]},"alias":""},{"values":[],"star_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"april","query_location":55,"query_location_length":3,"column_names":["mar"]},"alias":"april"}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"unpivot (select 42 as col1, 'woot' as col2)\n on COLUMNS(*)::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"source":{"type":"SUBQUERY","alias":"","sample":null,"query_location":8,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col1","query_location":16,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"col2","query_location":28,"query_location_length":6,"literal":{"kind":"STRING","text":"woot"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"aggregates":[],"unpivot_names":["value"],"pivots":[{"pivot_expressions":[],"unpivot_names":["name"],"entries":[{"values":[],"star_expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":9,"child":{"class":"STAR","type":"STAR","alias":"","query_location":59,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"UNPIVOT test ON (metric_1, value_x), (metric_2, value_q), (metric_3, value_j) INTO NAME metric VALUE metric_value;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"source":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":8,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"aggregates":[],"unpivot_names":["metric_value"],"pivots":[{"pivot_expressions":[],"unpivot_names":["metric"],"entries":[{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":19,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":8,"column_names":["metric_1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":7,"column_names":["value_x"]}}],"qualified_name":{"path":["row"]}},"alias":""},{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":19,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":8,"column_names":["metric_2"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":7,"column_names":["value_q"]}}],"qualified_name":{"path":["row"]}},"alias":""},{"values":[],"star_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":19,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":8,"column_names":["metric_3"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["value_j"]}}],"qualified_name":{"path":["row"]}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CURRENT_SETTING('profiling_mode');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":16,"literal":{"kind":"STRING","text":"profiling_mode"}}}],"qualified_name":{"path":["current_setting"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE WHEN latency \u003e 0 THEN 'true' ELSE 'false' END FROM first_cp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":50,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":17,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":7,"column_names":["latency"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":6,"literal":{"kind":"STRING","text":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":7,"literal":{"kind":"STRING","text":"false"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":8,"schema_name":"","table_name":"first_cp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["first_cp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT query.cpu_time FROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":14,"column_names":["query","cpu_time"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n CASE\n WHEN operator[1].intermediate_size_bytes \u003c 10_000 THEN NULL\n ELSE operator[1].intermediate_size_bytes\n END AS result\nFROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"result","query_location":11,"query_location_length":129,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":44,"left":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":29,"query_location_length":35,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":37,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":8,"column_names":["operator"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":24,"literal":{"kind":"STRING","text":"intermediate_size_bytes"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":6,"literal":{"kind":"INTEGER","text":"10_000"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":97,"query_location_length":35,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":105,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":8,"column_names":["operator"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":24,"literal":{"kind":"STRING","text":"intermediate_size_bytes"}}]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":156,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test WHERE id \u003c 1000 ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":25,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * EXCLUDE(value, description) FROM duckdb_profiling_settings();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":29,"relation_name":"","exclude_list":["value","description"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":42,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_profiling_settings","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_profiling_settings"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT operator IS NOT NULL FROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":16,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["operator"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT io.total_bytes_written FROM metrics_output;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":22,"column_names":["io","total_bytes_written"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":14,"schema_name":"","table_name":"metrics_output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["metrics_output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM pragma_metadata_info(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":26,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_metadata_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["pragma_metadata_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CURRENT_SETTING('log_query_path')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":16,"literal":{"kind":"STRING","text":"log_query_path"}}}],"qualified_name":{"path":["current_setting"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SHOW TABLES FROM db.main","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":null,"show_type":"SHOW_FROM","catalog_name":"db","schema_name":"main","qualified_name":{"path":["db","main",""]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM v2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":2,"schema_name":"","table_name":"v2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x FROM generate_series(1, 10) t(x) OFFSET 3 LIMIT 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":14,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["x"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT result_types IS NULL FROM duckdb_prepared_statements() WHERE name = 'cached_scan';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":20,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["result_types"]}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":33,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_prepared_statements","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_prepared_statements"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":13,"literal":{"kind":"STRING","text":"cached_scan"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM repeat_row(1, 'hello', num_rows=100000)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat_row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":44,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":8,"column_names":["num_rows"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":6,"literal":{"kind":"INTEGER","text":"100000"}}}}],"qualified_name":{"path":["repeat_row"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT i, count(*) FROM range(500000) t(i) GROUP BY i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":55,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":46,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":6,"literal":{"kind":"INTEGER","text":"500000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(i) FROM range(2) t(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":19,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH p AS MATERIALIZED (\n SELECT s, r, i AS j, l, i AS duplicate FROM projection_input\n WHERE i \u003c 2 OR md5(i::VARCHAR) = ''\n)\nSELECT count(*), sum(j) FROM p","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"p","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["s"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"j","query_location":42,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["l"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"duplicate","query_location":53,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":73,"query_location_length":16,"schema_name":"","table_name":"projection_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["projection_input"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":100,"query_location_length":29,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":100,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":109,"query_location_length":20,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":15,"function_name":"md5","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":114,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":116,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["md5"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":2,"literal":{"kind":"STRING","text":""}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":139,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":149,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":161,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT integers.* EXCLUDE (i, j, k) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":28,"relation_name":"integers","exclude_list":["i","j","k"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * EXCLUDE (integers2.i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":23,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[{"catalog":"","schema":"","table":"integers2","column":"i"}],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT integers.* EXCEPT (i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":21,"relation_name":"integers","exclude_list":["i"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT integers.* EXCEPT (integers.i, integers.j) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":42,"relation_name":"integers","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[{"catalog":"","schema":"","table":"integers","column":"i"},{"catalog":"","schema":"","table":"integers","column":"j"}],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * EXCLUDE (col1) SIMILAR TO '.*col.*' FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":20,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":16,"relation_name":"","exclude_list":["col1"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":9,"literal":{"kind":"STRING","text":".*col.*"}}}],"qualified_name":{"path":["regexp_full_match"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t1.* LIKE 'col%', t2.* LIKE 'col%' FROM t1, t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":11,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":4,"relation_name":"t1","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":6,"literal":{"kind":"STRING","text":"col%"}}}],"qualified_name":{"path":["~~"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":11,"function_name":"~~","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":25,"query_location_length":4,"relation_name":"t2","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":6,"literal":{"kind":"STRING","text":"col%"}}}],"qualified_name":{"path":["~~"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":11,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT new_col, new_col2 FROM (SELECT * RENAME (i1.i AS new_col, i1.j AS new_col2) FROM integers i1 JOIN integers i2 USING (i))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["new_col"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":8,"column_names":["new_col2"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":30,"query_location_length":97,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":38,"query_location_length":44,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[{"key":{"catalog":"","schema":"","table":"i1","column":"i"},"value":"new_col"},{"key":{"catalog":"","schema":"","table":"i1","column":"j"},"value":"new_col2"}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":100,"query_location_length":26,"left":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":88,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":105,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT test_star.* REPLACE ('computed: ' || (id * 2)::VARCHAR AS col1) FROM test_star;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":63,"relation_name":"test_star","exclude_list":[],"replace_list":[{"key":"col1","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":33,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":12,"literal":{"kind":"STRING","text":"computed: "}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["*"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["||"]}}}],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":9,"schema_name":"","table_name":"test_star","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_star"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COLUMNS(* REPLACE (a * 2 AS a)) FROM range(3) t1(a) NATURAL JOIN range(3) t2(a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":15,"query_location_length":22,"relation_name":"","exclude_list":[],"replace_list":[{"key":"a","value":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":5,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["*"]}}}],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":59,"query_location_length":27,"left":{"type":"TABLE_FUNCTION","alias":"t1","sample":null,"query_location":44,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["a"],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"t2","sample":null,"query_location":72,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["a"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"NATURAL","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE WHEN a = 42 THEN 100 WHEN a = 43 THEN 200 END FROM exprtest","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":50,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":17,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":8,"schema_name":"","table_name":"exprtest","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["exprtest"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM intest WHERE a NOT IN (NULL, NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"intest","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["intest"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":27,"query_location_length":21,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":36,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT rowid, * FROM a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"STAR","type":"STAR","alias":"","query_location":14,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM a, a a2 WHERE a.rowid=a2.rowid","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":12,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"a2","sample":null,"query_location":17,"query_location_length":4,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":28,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":7,"column_names":["a","rowid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":8,"column_names":["a2","rowid"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 0 IN (SELECT rowid FROM a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":12,"query_location_length":21,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":5,"column_names":["rowid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT + CASE WHEN NOT + 84 NOT BETWEEN - 78 + 98 * 51 AND - ( ( - 28 ) ) * COUNT ( * ) + + - 65 THEN NULL ELSE 16 // + 34 + + - 98 END // + 70 - ( - - CASE - COALESCE ( + 73, + - 66 * - 89 * - 72 ) WHEN COUNT ( * ) // + 4 * CAST ( - - 18 AS INTEGER ) + + + COUNT ( * ) - - 88 THEN NULL WHEN 92 THEN NULL ELSE COUNT ( * ) END ) AS col0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"col0","query_location":144,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":136,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":128,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":9,"query_location_length":126,"case_checks":[{"when_expr":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":19,"query_location_length":77,"children":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":23,"query_location_length":73,"children":[{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":32,"query_location_length":64,"input":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":4,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"84"}}}],"qualified_name":{"path":["+"]}},"lower":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-78"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":7,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"literal":{"kind":"INTEGER","text":"98"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":2,"literal":{"kind":"INTEGER","text":"51"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["+"]}},"upper":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":28,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":14,"literal":{"kind":"INTEGER","text":"28"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":11,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"-65"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["+"]}}}]}]},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":123,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":112,"query_location_length":10,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":2,"literal":{"kind":"INTEGER","text":"16"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":118,"query_location_length":4,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":2,"literal":{"kind":"INTEGER","text":"34"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["//"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":125,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"-98"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["+"]}}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":139,"query_location_length":4,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":2,"literal":{"kind":"INTEGER","text":"70"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["//"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":148,"query_location_length":177,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":152,"query_location_length":173,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":157,"query_location_length":41,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":159,"query_location_length":39,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":4,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":2,"literal":{"kind":"INTEGER","text":"73"}}}],"qualified_name":{"path":["+"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":176,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":176,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"-66"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-89"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":192,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-72"}}}],"qualified_name":{"path":["*"]}}]}}],"qualified_name":{"path":["-"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":270,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":252,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":204,"query_location_length":47,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":204,"query_location_length":11,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":219,"query_location_length":3,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["//"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":225,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":232,"query_location_length":6,"literal":{"kind":"INTEGER","text":"18"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":242,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":254,"query_location_length":15,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":258,"query_location_length":11,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":272,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-88"}}}],"qualified_name":{"path":["-"]}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":282,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":157,"query_location_length":41,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":159,"query_location_length":39,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":4,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":172,"query_location_length":2,"literal":{"kind":"INTEGER","text":"73"}}}],"qualified_name":{"path":["+"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":176,"query_location_length":20,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":176,"query_location_length":6,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"-66"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-89"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":192,"query_location_length":4,"literal":{"kind":"INTEGER","text":"-72"}}}],"qualified_name":{"path":["*"]}}]}}],"qualified_name":{"path":["-"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":292,"query_location_length":2,"literal":{"kind":"INTEGER","text":"92"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":300,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":310,"query_location_length":11,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select t1.i, t1.j as a, t2.j as b from r4 t1 inner join r4 t2 using(i,j) ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["t1","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":13,"query_location_length":4,"column_names":["t1","j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"b","query_location":24,"query_location_length":4,"column_names":["t2","j"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":45,"query_location_length":27,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"r4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r4"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":56,"query_location_length":5,"schema_name":"","table_name":"r4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r4"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i","j"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (VALUES (NULL, NULL)) v1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"v1","sample":null,"query_location":14,"query_location_length":21,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM indexed_returning ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":17,"schema_name":"","table_name":"indexed_returning","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["indexed_returning"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from all_types_parquet_2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":19,"schema_name":"","table_name":"all_types_parquet_2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["all_types_parquet_2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), min(x) FROM test TABLESAMPLE BERNOULLI (25 PERCENT) REPEATABLE (42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":{"sample_size":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":25.0},"is_percentage":true,"method":"Bernoulli","seed":42,"repeatable":true,"sample_rate":-1.0},"query_location":29,"query_location_length":55,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from duckdb_table_sample('t1') where a \u003e 102400;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":25,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_table_sample","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"STRING","text":"t1"}}}],"qualified_name":{"path":["duckdb_table_sample"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":53,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":6,"literal":{"kind":"INTEGER","text":"102400"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from duckdb_table_sample('integral_samples') where a NOT null;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_table_sample","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":18,"literal":{"kind":"STRING","text":"integral_samples"}}}],"qualified_name":{"path":["duckdb_table_sample"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":69,"query_location_length":8,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["a"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM test_table USING SAMPLE 500 ROWS (system);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":10,"schema_name":"","table_name":"test_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":{"sample_size":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":500},"is_percentage":false,"method":"System","seed":-1,"repeatable":false,"sample_rate":-1.0},"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH base AS (\n SELECT i FROM test_table\n)\nSELECT COUNT(*) FROM base USING SAMPLE 37 ROWS (system);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"base","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":10,"schema_name":"","table_name":"test_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":4,"schema_name":"","table_name":"base","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["base"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":{"sample_size":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":37},"is_percentage":false,"method":"System","seed":-1,"repeatable":false,"sample_rate":-1.0},"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT scope = ['https://b.example.com'] FROM duckdb_secrets() WHERE name = 's1' AND storage = 'connection'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["scope"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":23,"literal":{"kind":"STRING","text":"https://b.example.com"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":46,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_secrets","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_secrets"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":69,"query_location_length":38,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"STRING","text":"s1"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":7,"column_names":["storage"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":12,"literal":{"kind":"STRING","text":"connection"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name FROM which_secret('https://example.com/data/file.csv', 'http')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":57,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"which_secret","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":35,"literal":{"kind":"STRING","text":"https://example.com/data/file.csv"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":6,"literal":{"kind":"STRING","text":"http"}}}],"qualified_name":{"path":["which_secret"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.t FROM t.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["t","t"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":3,"schema_name":"t","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT test.tblX.col FROM test.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["test","tblX","col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":8,"schema_name":"test","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name FROM pragma_table_info('tbl') ORDER BY name","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":4,"column_names":["name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_table_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":5,"literal":{"kind":"STRING","text":"tbl"}}}],"qualified_name":{"path":["pragma_table_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM b : a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM operator_update;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":15,"schema_name":"","table_name":"operator_update","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["operator_update"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 42 WHERE 1=0 EXCEPT SELECT 42","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":16,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t1 INTERSECT SELECT * FROM t2 ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":34,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM v3 FULL OUTER JOIN v4 USING (i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"v3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v3"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":2,"schema_name":"","table_name":"v4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v4"]}},"condition":null,"join_type":"FULL","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 AS one UNION SELECT 1.0::float8 ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"one","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":6,"catalog":"","schema":"","type_name":"float8","children":[],"qualified_name":{"path":["float8"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT '[' || CAST(f1 AS char(4)) || ']' AS value FROM VARCHAR_TBL\nUNION\nSELECT '[' || f1 || ']' FROM CHAR_TBL\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"value","query_location":7,"query_location_length":33,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"["}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":19,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["f1"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"STRING","text":"]"}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":11,"schema_name":"","table_name":"VARCHAR_TBL","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["VARCHAR_TBL"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":16,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":3,"literal":{"kind":"STRING","text":"["}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":2,"column_names":["f1"]}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":3,"literal":{"kind":"STRING","text":"]"}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":8,"schema_name":"","table_name":"CHAR_TBL","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["CHAR_TBL"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"(SELECT 1,2,3 UNION SELECT 4,5,6) INTERSECT SELECT 4,5,6;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":false,"children":[{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT q1,q2 FROM int8_tbl EXCEPT SELECT q2,q1 FROM int8_tbl\nORDER BY q2,q1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":2,"column_names":["q2"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":2,"column_names":["q1"]}}]}],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["q1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":2,"column_names":["q2"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":8,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":2,"column_names":["q2"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["q1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":8,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT NULL INTERSECT SELECT NULL","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"INTERSECT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT t1.x FROM t1 UNION ALL BY NAME SELECT x FROM t1 ORDER BY t1.x;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":4,"column_names":["t1","x"]}}]}],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["t1","x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"(SELECT x FROM t1 ORDER BY y) UNION ALL BY NAME (SELECT y FROM t2 ORDER BY z) ORDER BY x DESC;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["y"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["z"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":63,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT * FROM new_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"new_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["new_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM test UNION SELECT b FROM test2 UNION SELECT b + 1 FROM test2 ORDER BY b + 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT a FROM test UNION SELECT * FROM test2 UNION SELECT * FROM test t1 ORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":32,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":58,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":65,"query_location_length":7,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT x, y FROM t1 UNION BY NAME SELECT y, z FROM t2 ORDER BY 3, 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["y"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["z"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT [{'a': 42}, {'b': 84}];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":14,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"84"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 UNION (SELECT '1' UNION SELECT '1' UNION SELECT '1') UNION SELECT 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"select COUNT(*) from (SELECT DISTINCT * FROM (SELECT DISTINCT i, j, k, l FROM a UNION ALL SELECT * FROM b) t1) t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":21,"query_location_length":89,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":38,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":45,"query_location_length":61,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["l"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":97,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":104,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'select count(case'a union all select 'when a='||range||' then 1' from range(2) union all select 'end) from t' LIMIT 5;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":7,"query_location_length":19,"literal":{"kind":"STRING","text":"select count(case"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":27,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":9,"literal":{"kind":"STRING","text":"when a="}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":5,"column_names":["range"]}}],"qualified_name":{"path":["||"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":9,"literal":{"kind":"STRING","text":" then 1"}}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":78,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":13,"literal":{"kind":"STRING","text":"end) from t"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT i, s FROM t1 EXCEPT SELECT i, s FROM t2 ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT * FROM vunion WHERE i=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"vunion","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["vunion"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":27,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM '{DATA_DIR}/csv/glob//../all_quotes.csv'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":40,"schema_name":"","table_name":"{DATA_DIR}/csv/glob//../all_quotes.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/glob//../all_quotes.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM tbl ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers ORDER BY i DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1/2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["/"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name, value, input_type FROM duckdb_settings() WHERE name = 'operator_memory_limit'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":10,"column_names":["input_type"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":36,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_settings","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_settings"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":23,"literal":{"kind":"STRING","text":"operator_memory_limit"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT current_setting('extension_directories') = ['first', 'second']","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":62,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":23,"literal":{"kind":"STRING","text":"extension_directories"}}}],"qualified_name":{"path":["current_setting"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":7,"literal":{"kind":"STRING","text":"first"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":8,"literal":{"kind":"STRING","text":"second"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"SELECT duckdb_tables.schema_name, duckdb_tables.table_name, column_name FROM duckdb_tables JOIN duckdb_columns USING (table_oid);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":25,"column_names":["duckdb_tables","schema_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":24,"column_names":["duckdb_tables","table_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":11,"column_names":["column_name"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":91,"query_location_length":37,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":13,"schema_name":"","table_name":"duckdb_tables","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_tables"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":96,"query_location_length":14,"schema_name":"","table_name":"duckdb_columns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_columns"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["table_oid"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT regexp_matches(user_agent, '^duckdb/.*(.*)') FROM pragma_user_agent()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":10,"column_names":["user_agent"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"^duckdb/.*(.*)"}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_user_agent","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"DESCRIBE integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"DESCRIBE SELECT alias_name as alias_alias_name FROM (SELECT base_name AS alias_name FROM base_table)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"alias_alias_name","query_location":16,"query_location_length":10,"column_names":["alias_name"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":52,"query_location_length":48,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"alias_name","query_location":60,"query_location_length":9,"column_names":["base_name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":10,"schema_name":"","table_name":"base_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["base_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SHOW SELECT * FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":12,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SUMMARIZE SELECT 9223372036854775296;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":9223372036854775296}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"SUMMARY","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MIN(i) = 0 AND MAX(i) = 99 FROM overflow_test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":7,"query_location_length":26,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":11,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":99}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":13,"schema_name":"","table_name":"overflow_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["overflow_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select min(j), max(j) from t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["j"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, b FROM mmap_db.t ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":9,"schema_name":"mmap_db","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mmap_db","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from test_default;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"test_default","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_default"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM my_seq(0,6);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":11,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"my_seq","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test ORDER BY a, b, c","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["c"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MEDIAN(count) FROM pragma_storage_info('integers_parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["count"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"integers_parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select d, f from tbl2_uncompressed;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["f"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":17,"schema_name":"","table_name":"tbl2_uncompressed","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl2_uncompressed"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT compression FROM pragma_storage_info('random_alp_float') WHERE segment_type == 'float' AND compression != 'ALP';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"random_alp_float"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":70,"query_location_length":48,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"float"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":98,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ALP"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT compression FROM pragma_storage_info('all_types') WHERE segment_type == '{type}' AND compression != 'ALPRD';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"all_types"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":63,"query_location_length":51,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{type}"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":92,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ALPRD"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(col), MIN(col), MAX(col), COUNT(*) FROM test WHERE col=1337","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["col"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":8,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":3,"column_names":["col"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":8,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["col"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":3,"column_names":["col"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1337}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT compression FROM pragma_storage_info('test') WHERE segment_type ILIKE 'INTEGER' LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":15,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":12,"column_names":["segment_type"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM pragma_storage_info('partial_segment')\nWHERE column_name = 'task_id'\n AND segment_type = 'VARCHAR'\n AND compression = 'DICT_FSST'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"partial_segment"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":66,"query_location_length":86,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"task_id"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":96,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":127,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":141,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"DICT_FSST"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from compressed_data order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":15,"schema_name":"","table_name":"compressed_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["compressed_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(\"XXX XXX/XXX\") FROM db.t WHERE \"XXX XXX/XXX\" IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":13,"column_names":["XXX XXX/XXX"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":4,"schema_name":"db","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","t"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":58,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":13,"column_names":["XXX XXX/XXX"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(length(STREET)) FROM dict_end_db.tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":14,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":6,"column_names":["STREET"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":15,"schema_name":"dict_end_db","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dict_end_db","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT compression FROM pragma_storage_info('t') WHERE segment_type ILIKE 'VARCHAR'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":33,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":15,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":12,"column_names":["segment_type"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl WHERE id = 5040 AND rle_val=100","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":24,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5040}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":38,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":7,"column_names":["rle_val"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT message.split(': ')[2]::INTEGER FROM duckdb_logs\nwhere\n\tmessage.starts_with('ColumnDataCheckpointer FinalAnalyze') and\n\tmessage.contains('test_uncompressed') and\n\tmessage.contains('VALIDITY') and\n\tmessage.contains('UNCOMPRESSED');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":26,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"split","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":": "}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":11,"schema_name":"","table_name":"duckdb_logs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_logs"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":63,"query_location_length":173,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":58,"function_name":"starts_with","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ColumnDataCheckpointer FinalAnalyze"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":127,"query_location_length":37,"function_name":"contains","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test_uncompressed"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":28,"function_name":"contains","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VALIDITY"}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":204,"query_location_length":32,"function_name":"contains","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"UNCOMPRESSED"}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from test WHERE a IS false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":34,"query_location_length":8,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"BOOLEAN","type_info":null},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":false}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FILTER (\n WHERE column_name='n' AND segment_type='INTEGER' AND compression!='RLE'),\n count(*) FILTER (\n WHERE column_name='z' AND segment_type='VARCHAR' AND compression!='ZSTD'),\n count(*) FILTER (\n WHERE column_name='d' AND segment_type='VARCHAR' AND compression!='Uncompressed')\nFROM pragma_storage_info('test')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":101,"function_name":"count_star","schema":"","filter":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":42,"query_location_length":65,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"n"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"INTEGER"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":89,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"RLE"}}}]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":117,"query_location_length":102,"function_name":"count_star","schema":"","filter":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":152,"query_location_length":66,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":152,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":164,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"z"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":172,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":199,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":212,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ZSTD"}}}]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":228,"query_location_length":110,"function_name":"count_star","schema":"","filter":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":263,"query_location_length":74,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":263,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":263,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":275,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"d"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":283,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":283,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":296,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VARCHAR"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":310,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":310,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":323,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Uncompressed"}}}]},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":344,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":364,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*), min(a[1]), max(a[1]) from test_empty_large limit 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":22,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":9,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":33,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":16,"schema_name":"","table_name":"test_empty_large","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_empty_large"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select sum(a::INT) from test_2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":6,"schema_name":"","table_name":"test_2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT current_setting('debug_order_verification') = 'none'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":52,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":26,"literal":{"kind":"STRING","text":"debug_order_verification"}}}],"qualified_name":{"path":["current_setting"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":6,"literal":{"kind":"STRING","text":"none"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT current_setting('custom_user_agent')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":19,"literal":{"kind":"STRING","text":"custom_user_agent"}}}],"qualified_name":{"path":["current_setting"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"DESCRIBE SELECT * FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":16,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"DESCRIBE SELECT base_name AS alias_name FROM base_table","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"alias_name","query_location":16,"query_location_length":9,"column_names":["base_name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":10,"schema_name":"","table_name":"base_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["base_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SHOW DATABASES;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"\"databases\"","query":null,"show_type":"SHOW_SPECIAL","catalog_name":"","schema_name":"","qualified_name":{"path":["\"databases\""]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"describe defg.\"a.b.c\";","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"defg","table_name":"a.b.c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["defg","a.b.c"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"summarize \nSELECT range::DATE AS range from range('2024-01-01'::DATE, '2024-04-10'::DATE, INTERVAL 1 DAY);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"range","query_location":23,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":5,"column_names":["range"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":44,"query_location_length":61,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":12,"literal":{"kind":"STRING","text":"2024-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":12,"literal":{"kind":"STRING","text":"2024-04-10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"SUMMARY","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT string_agg(DISTINCT v, '|' ORDER BY length(v), v)\nFROM (VALUES ('aa'),('b'),('b'),(NULL)) t(v)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["length"]}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["v"]}}]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":62,"query_location_length":34,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"STRING","text":"aa"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(i) FROM aggregate_values;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":16,"schema_name":"","table_name":"aggregate_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggregate_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT first(i ORDER BY i DESC NULLS LAST), last(i ORDER BY i DESC NULLS LAST) FROM aggregate_values;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":34,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["i"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["last"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":84,"query_location_length":16,"schema_name":"","table_name":"aggregate_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["aggregate_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT f.v FROM reuse_fact f JOIN reuse_owner o USING(k) WHERE o.dim_id\u003e10 ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["f","v"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":29,"query_location_length":27,"left":{"type":"BASE_TABLE","alias":"f","sample":null,"query_location":16,"query_location_length":12,"schema_name":"","table_name":"reuse_fact","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["reuse_fact"]}},"right":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":34,"query_location_length":13,"schema_name":"","table_name":"reuse_owner","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["reuse_owner"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["k"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":63,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":8,"column_names":["o","dim_id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM readable_scan;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"","table_name":"readable_scan","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["readable_scan"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT constant_or_null(42, 1, CAST(i AS INTEGER)) FROM (VALUES ('bad')) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"constant_or_null","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["constant_or_null"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":56,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"literal":{"kind":"STRING","text":"bad"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT platform FROM pragma_platform();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["platform"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_platform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["pragma_platform"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(getvariable('collated_max_state')), finalize(getvariable('collated_max_state'))='z';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":33,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":20,"literal":{"kind":"STRING","text":"collated_max_state"}}}],"qualified_name":{"path":["getvariable"]}}}],"qualified_name":{"path":["finalize"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":47,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":43,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":33,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":20,"literal":{"kind":"STRING","text":"collated_max_state"}}}],"qualified_name":{"path":["getvariable"]}}}],"qualified_name":{"path":["finalize"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT finalize(getvariable('ordered_collated_state'))='A';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":51,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":37,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":24,"literal":{"kind":"STRING","text":"ordered_collated_state"}}}],"qualified_name":{"path":["getvariable"]}}}],"qualified_name":{"path":["finalize"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE WHEN v IS NULL THEN NULL ELSE v END COLLATE nocase FROM collated_values;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":55,"child":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":40,"case_checks":[{"when_expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":19,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}]},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["v"]}},"collation":"nocase"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":15,"schema_name":"","table_name":"collated_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["collated_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n,n+1 FROM (SELECT count(*) n FROM composition_input WHERE false) q;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["n"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":18,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"n","query_location":26,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":17,"schema_name":"","table_name":"composition_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["composition_input"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT k,count(*) FROM (SELECT NULL k FROM composition_input) q GROUP BY k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":23,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"k","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":17,"schema_name":"","table_name":"composition_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["composition_input"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s, sum(v) FROM compressed_strings GROUP BY s ORDER BY s NULLS LAST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":18,"schema_name":"","table_name":"compressed_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["compressed_strings"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["s"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT signbit(x) FROM (VALUES ('-0.0'::DOUBLE)) t(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"signbit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["signbit"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":23,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":6,"literal":{"kind":"STRING","text":"-0.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (WITH c AS MATERIALIZED (SELECT i x) SELECT a.x FROM c a, c b WHERE a.x=b.x) FROM range(3) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":76,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":42,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":3,"column_names":["a","x"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":58,"query_location_length":13,"left":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":63,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":68,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":3,"column_names":["a","x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":3,"column_names":["b","x"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":92,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT o.k,o.x,o.x\u003c\u003eALL(SELECT r.y FROM rhs r WHERE r.k=o.k) FROM lhs o;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["o","k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["o","x"]},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":15,"query_location_length":45,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["r","y"]}],"from_table":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":40,"query_location_length":5,"schema_name":"","table_name":"rhs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rhs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":3,"column_names":["r","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["o","k"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["o","x"]},"comparison_type":"COMPARE_EQUAL"}]}],"from_table":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":66,"query_location_length":5,"schema_name":"","table_name":"lhs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lhs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c AS MATERIALIZED (SELECT * FROM cte_input) SELECT z,x,z FROM c;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":9,"schema_name":"","table_name":"cte_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte_input"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["z"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["z"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM c WHERE x\u003c5) SELECT x FROM c ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[{"key":"c","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"c","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":67,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["x"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c AS MATERIALIZED (SELECT nextval('cte_sequence') v FROM range(5)) SELECT a.v,b.v FROM c a JOIN c b ON a.v=b.v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":31,"query_location_length":23,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":14,"literal":{"kind":"STRING","text":"cte_sequence"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":62,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":3,"column_names":["a","v"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":3,"column_names":["b","v"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":96,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":92,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":101,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":108,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":3,"column_names":["a","v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":3,"column_names":["b","v"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH d1 AS (DELETE FROM dml_cte_multi RETURNING a),\n s AS (SELECT a + 10 AS b FROM d1),\n d2 AS (DELETE FROM dml_cte_aux WHERE a IN (SELECT b - 9 FROM s) RETURNING a)\nSELECT * FROM d2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"d1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":null,"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"dml_cte_multi","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dml_cte_multi"]}},"using_clauses":[],"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["a"]}]}}},{"key":"s","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":72,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":2,"schema_name":"","table_name":"d1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"d2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":139,"query_location_length":21,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":149,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":158,"query_location_length":1,"schema_name":"","table_name":"s","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["s"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["a"]},"comparison_type":"COMPARE_EQUAL"},"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"dml_cte_aux","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dml_cte_aux"]}},"using_clauses":[],"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":1,"column_names":["a"]}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":181,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":188,"query_location_length":2,"schema_name":"","table_name":"d2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l, t FROM nested_any_states WHERE false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["t"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":17,"schema_name":"","table_name":"nested_any_states","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_any_states"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM explain_target;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"explain_target","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["explain_target"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c AS MATERIALIZED (SELECT i FROM explain_data)\nSELECT a.i,b.i FROM c a JOIN c b ON a.i=b.i WHERE a.i=2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":12,"schema_name":"","table_name":"explain_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["explain_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":3,"column_names":["a","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":3,"column_names":["b","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":76,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":72,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":81,"query_location_length":3,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":3,"column_names":["a","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":3,"column_names":["b","i"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":102,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":3,"column_names":["a","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*),sum(i) FROM read_csv('{TEST_DIR}/explain_source.csv', header=true, delim=',');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":31,"literal":{"kind":"STRING","text":"{TEST_DIR}/explain_source.csv"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":70,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":6,"column_names":["header"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":5,"column_names":["delim"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"STRING","text":","}}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 AS result UNION ALL SELECT 1;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"result","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT abs(i) FROM (VALUES (-7), (NULL), (2), (-7)) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["abs"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":19,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-7"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-7"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT first_value([g]) OVER () FROM (SELECT ST_SetCRS('POINT(0 1)'::GEOMETRY, 'GEäDCRS') g FROM range(2)) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":7,"query_location_length":24,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["g"]}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["first_value"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":37,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":45,"query_location_length":45,"function_name":"st_setcrs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(0 1)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":10,"literal":{"kind":"STRING","text":"GEäDCRS"}}}],"qualified_name":{"path":["st_setcrs"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":98,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM export_dates WHERE\ndate_part('year',ts) IS DISTINCT FROM year(ts)\nOR date_part('epoch',ts) IS DISTINCT FROM epoch(ts);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"export_dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["export_dates"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":40,"query_location_length":98,"children":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":40,"query_location_length":46,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["date_part"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["year"]}}},{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":90,"query_location_length":48,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":21,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":7,"literal":{"kind":"STRING","text":"epoch"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["date_part"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":9,"function_name":"epoch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["epoch"]}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (VALUES (1,10),(2,20),(2,21),(NULL,30)) l(a,x) SEMI JOIN (VALUES (2,100),(3,200),(NULL,300)) r(b,y) ON a=b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":61,"query_location_length":59,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":14,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"21"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","x"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":71,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"literal":{"kind":"INTEGER","text":"300"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b","y"]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":117,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["b"]}},"join_type":"SEMI","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (VALUES (1,10),(2,20),(2,20),(NULL,30)) l(a,x) LEFT JOIN (VALUES (2,20),(3,30),(NULL,40)) r(b,y) ON a=b OR x=y;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":61,"query_location_length":63,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":14,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","x"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":71,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b","y"]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":114,"query_location_length":10,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":114,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":116,"query_location_length":1,"column_names":["b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":121,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":1,"column_names":["x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":1,"column_names":["y"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v, typeof(v) FROM json_ordering ORDER BY v NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":9,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":13,"schema_name":"","table_name":"json_ordering","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["json_ordering"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l.i,__mark_join_marker FROM mark_boundary_l l JOIN BY (TYPE MARK) mark_boundary_r r ON l.i IS DISTINCT FROM r.i ORDER BY l.i NULLS FIRST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":3,"column_names":["l","i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["l","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":53,"query_location_length":65,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":35,"query_location_length":17,"schema_name":"","table_name":"mark_boundary_l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mark_boundary_l"]}},"right":{"type":"BASE_TABLE","alias":"r","sample":null,"query_location":73,"query_location_length":17,"schema_name":"","table_name":"mark_boundary_r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mark_boundary_r"]}},"condition":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":94,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":3,"column_names":["l","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":3,"column_names":["r","i"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::STRUCT(a INTEGER,b INTEGER)),(1,{'a':1,'b':2}),(2,{'a':2,'b':1}),(3,{'a':1,'b':2}),(4,{'a':1,'b':NULL::INTEGER})) p(id,k) JOIN BY(TYPE MARK) (VALUES ({'a':1,'b':2}),({'a':1,'b':2}),({'a':1,'b':NULL::INTEGER})) b(k) ON p.k \u003c\u003e b.k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"markers","query_location":7,"query_location_length":36,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["id"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":18,"column_names":["__mark_join_marker"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":199,"query_location_length":106,"left":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":60,"query_location_length":130,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":29,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":27,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":86,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":96,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":120,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":127,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":132,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":138,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":145,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":150,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":156,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":163,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":168,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":178,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":180,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["struct_pack"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","k"]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":218,"query_location_length":68,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":227,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":232,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":238,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":243,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":248,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":254,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":259,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":264,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":274,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":270,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":276,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["struct_pack"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k"]},"condition":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":295,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":295,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":302,"query_location_length":3,"column_names":["b","k"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::INTEGER[]),(1,[1,2]),(2,[2,1]),(3,[1,2]),(4,[1,NULL::INTEGER])) p(id,k) JOIN BY(TYPE MARK) (VALUES ([1,2]),([1,2]),([1,NULL::INTEGER])) b(k) ON p.k \u003e= b.k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"markers","query_location":7,"query_location_length":36,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["id"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":18,"column_names":["__mark_join_marker"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":149,"query_location_length":82,"left":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":60,"query_location_length":80,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":121,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":128,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":130,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","k"]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":168,"query_location_length":44,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":177,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":185,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":186,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":188,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":193,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":194,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":200,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":196,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":202,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k"]},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":221,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":221,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":228,"query_location_length":3,"column_names":["b","k"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list(__mark_join_marker ORDER BY id) AS markers FROM (VALUES (0,NULL::TUPLE(INTEGER,INTEGER)),(1,row(1,NULL::INTEGER))) p(id,k) JOIN BY(TYPE MARK) (SELECT row(1,2) k WHERE false) b ON p.k \u003c\u003e b.k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"markers","query_location":7,"query_location_length":36,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["id"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":18,"column_names":["__mark_join_marker"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":135,"query_location_length":66,"left":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":60,"query_location_length":66,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":22,"catalog":"","schema":"","type_name":"TUPLE","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":91,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["TUPLE"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":104,"query_location_length":20,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":114,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":116,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["row"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","k"]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":154,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":162,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":191,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":191,"query_location_length":3,"column_names":["p","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":198,"query_location_length":3,"column_names":["b","k"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 = ANY(SELECT 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":17,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT o.g,o.k,o.x,o.x\u003c\u003eANY(SELECT r.y FROM r WHERE r.g=o.g AND r.k=o.k) m FROM l o;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["o","g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["o","k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["o","x"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"m","query_location":19,"query_location_length":53,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":3,"column_names":["r","y"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":52,"query_location_length":19,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":3,"column_names":["r","g"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["o","g"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":3,"column_names":["r","k"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":3,"column_names":["o","k"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":3,"column_names":["o","x"]},"comparison_type":"COMPARE_NOTEQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":80,"query_location_length":3,"schema_name":"","table_name":"l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["l"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT __mark_join_marker FROM (VALUES (1,3),(NULL::INTEGER,2)) l(a,c) JOIN BY (TYPE MARK) (VALUES (2,1),(NULL::INTEGER,2)) r(b,d) ON a\u003cb ORDER BY a NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":147,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["__mark_join_marker"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":71,"query_location_length":66,"left":{"type":"SUBQUERY","alias":"l","sample":null,"query_location":31,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","c"]},"right":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":91,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":110,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b","d"]},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":134,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":1,"column_names":["b"]}},"join_type":"MARK","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_contains([needle], 'BANANA'), list_position([needle], 'BANANA') FROM nested_input WHERE id=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"list_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":6,"column_names":["needle"]}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":8,"literal":{"kind":"STRING","text":"BANANA"}}}],"qualified_name":{"path":["list_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":33,"function_name":"list_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":6,"column_names":["needle"]}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":8,"literal":{"kind":"STRING","text":"BANANA"}}}],"qualified_name":{"path":["list_position"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":12,"schema_name":"","table_name":"nested_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_input"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":100,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i,CASE WHEN i=4 THEN NULL ELSE [s COLLATE NOCASE] END v FROM (VALUES (0,'A'),(1,'a'),(2,'B'),(3,NULL),(4,'A')) t(i,s) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"CASE","type":"CASE_EXPR","alias":"v","query_location":9,"query_location_length":51,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":19,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":39,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["s"]},"collation":"NOCASE"}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":68,"query_location_length":49,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i","s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast_to_type(['A'], array_value('x' COLLATE nocase))[1]='a', (array_value('A' COLLATE nocase)::VARCHAR[])[1]='a';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":59,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":59,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":52,"function_name":"cast_to_type","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":31,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":39,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}},"collation":"nocase"}}],"qualified_name":{"path":["array_value"]}}}],"qualified_name":{"path":["cast_to_type"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":51,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":112,"query_location_length":3,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":100,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":31,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":81,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"literal":{"kind":"STRING","text":"A"}},"collation":"nocase"}}],"qualified_name":{"path":["array_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":102,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT i,rowid,row_number() OVER () n FROM numbered_scan) WHERE i\u003e=299990 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":58,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":5,"column_names":["rowid"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"n","query_location":30,"query_location_length":20,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":13,"schema_name":"","table_name":"numbered_scan","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numbered_scan"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":79,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":6,"literal":{"kind":"INTEGER","text":"299990"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a_ok FROM (VALUES ('a',1),('b',2)) t(k,v) PIVOT (sum(v) AS ok,sum(CASE WHEN v=2 THEN error('pivot export error')::INTEGER ELSE v END) AS effect FOR k IN ('a','b','z'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["a_ok"]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":56,"query_location_length":117,"source":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":17,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k","v"]},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"ok","query_location":56,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"effect","query_location":69,"query_location_length":71,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":73,"query_location_length":66,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"then_expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":119,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":27,"function_name":"error","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":20,"literal":{"kind":"STRING","text":"pivot export error"}}}],"qualified_name":{"path":["error"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":121,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["v"]}}}],"qualified_name":{"path":["sum"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":1,"column_names":["k"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM (VALUES ('a',1),('a',2),('b',NULL)) t(k,v)\nPIVOT (list(v) FOR k IN ('a','b','z'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"PIVOT","alias":"","sample":null,"query_location":55,"query_location_length":30,"source":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":5,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k","v"]},"aggregates":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["list"]}}],"unpivot_names":[],"pivots":[{"pivot_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["k"]}],"unpivot_names":[],"entries":[{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}},"alias":""},{"values":[],"star_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"literal":{"kind":"STRING","text":"z"}},"alias":""}],"pivot_enum":""}],"groups":[],"column_name_alias":[],"include_nulls":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id,row_number() OVER(ORDER BY i NULLS LAST,id),sum(i) OVER(PARTITION BY label),count(*) OVER() FROM scope_rows WHERE id\u003c\u003e3 ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":10,"query_location_length":43,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":54,"query_location_length":31,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":5,"column_names":["label"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":86,"query_location_length":15,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":107,"query_location_length":10,"schema_name":"","table_name":"scope_rows","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["scope_rows"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":124,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(v) OVER() FROM (SELECT nextval('scope_sequence') v FROM range(2)) q;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":13,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":26,"query_location_length":50,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":34,"query_location_length":25,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":16,"literal":{"kind":"STRING","text":"scope_sequence"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":67,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list(x ORDER BY x NULLS LAST) FROM pure_values_input, LATERAL (VALUES (i),(-1)) v(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":37,"query_location_length":54,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":17,"schema_name":"","table_name":"pure_values_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pure_values_input"]}},"right":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":69,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["i"]}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id,sum(v) OVER (ORDER BY k RANGE BETWEEN 0 PRECEDING AND 0 FOLLOWING)\nFROM frame_values ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":10,"query_location_length":66,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]}}],"start":"EXPR_PRECEDING_RANGE","end":"EXPR_FOLLOWING_RANGE","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":12,"schema_name":"","table_name":"frame_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["frame_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x, sum(x) OVER (ORDER BY x DESC NULLS LAST RANGE BETWEEN 1 FOLLOWING AND 2 FOLLOWING) FROM (VALUES (1,1),(2,2),(2,1),(4,NULL),(NULL,1)) t(x,d) ORDER BY x NULLS FIRST, 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":159,"query_location_length":1,"column_names":["x"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":10,"query_location_length":82,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["x"]}}],"start":"EXPR_FOLLOWING_RANGE","end":"EXPR_FOLLOWING_RANGE","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":98,"query_location_length":44,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","d"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x, sum(x) OVER (ORDER BY x RANGE BETWEEN (SELECT nextval('range_origin_calls')) PRECEDING AND CURRENT ROW)\nFROM (VALUES (1::BIGINT),(2),(3)) t(x) ORDER BY x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":10,"query_location_length":103,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["x"]}}],"start":"EXPR_PRECEDING_RANGE","end":"CURRENT_ROW_RANGE","start_expr":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":48,"query_location_length":38,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":29,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":20,"literal":{"kind":"STRING","text":"range_origin_calls"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":119,"query_location_length":28,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":129,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":131,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE r(k,v) USING KEY(k,last(nextval('seq')) AS v) AS (VALUES(1,1) UNION ALL SELECT k+1,v FROM r WHERE k\u003c4) SELECT k,v FROM r;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"r","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":34,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"literal":{"kind":"STRING","text":"seq"}}}],"qualified_name":{"path":["nextval"]}}}],"qualified_name":{"path":["last"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"r","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["k"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":105,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":113,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["k"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":34,"query_location_length":20,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"literal":{"kind":"STRING","text":"seq"}}}],"qualified_name":{"path":["nextval"]}}}],"qualified_name":{"path":["last"]}}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":134,"query_location_length":1,"schema_name":"","table_name":"r","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["r"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE c(x) AS (SELECT 1 UNION ALL SELECT count(*)::INTEGER FROM c WHERE false) SELECT x FROM c LIMIT 4;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[{"key":"c","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"c","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":73,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["x"],"key_targets":[]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE c(x) USING KEY(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM c WHERE x\u003c3) SELECT x FROM c ORDER BY x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"c","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"c","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":80,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"aliases":["x"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["x"]}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::VARCHAR COLLATE nocase WHERE false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":28,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"collation":"nocase"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH RECURSIVE c(k,v) USING KEY(k,list(v)) AS (SELECT 1,1 UNION ALL SELECT 2,count(*)::INTEGER FROM recurring.c WHERE false HAVING nextval('seq')\u003c3) SELECT * FROM c ORDER BY k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":174,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[{"key":"c","value":{"aliases":["k","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["list"]}}],"payload_aggregates":[],"query_node":{"type":"RECURSIVE_CTE_NODE","modifiers":[],"cte_map":{"map":[]},"cte_name":"c","union_all":true,"left":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"right":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":85,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":87,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":100,"query_location_length":11,"schema_name":"recurring","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["recurring","c"]}},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":131,"query_location_length":16,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":131,"query_location_length":14,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":5,"literal":{"kind":"STRING","text":"seq"}}}],"qualified_name":{"path":["nextval"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"sample":null,"qualify":null},"aliases":["k","v"],"key_targets":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["list"]}}]}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":156,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":163,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t WHERE regexp_full_match(v, 'goo.e') ORDER BY v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":29,"function_name":"regexp_full_match","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":7,"literal":{"kind":"STRING","text":"goo.e"}}}],"qualified_name":{"path":["regexp_full_match"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x,x::INTEGER,grouping(x,x::INTEGER),count(*) FROM (VALUES (1,10),(1,20),(NULL,5),(2,NULL),(2,NULL)) t(x,y) GROUP BY GROUPING SETS ((x),(x::INTEGER),(),(x));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"OPERATOR","type":"GROUPING_FUNCTION","alias":"","query_location":20,"query_location_length":22,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["x"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":57,"query_location_length":49,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":1,"column_names":["x"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":144,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":146,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"group_sets":[[0],[1],[],[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT sum(x) EXPORT_STATE s FROM (VALUES(1))t(x))t WHERE false;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":51,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":22,"query_location_length":19,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":49,"query_location_length":11,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(i) FROM (VALUES (1),(2),(NULL)) v(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":21,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i \u003e 100, i \u003c 100 FROM bounded_values;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":16,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":14,"schema_name":"","table_name":"bounded_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bounded_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT min(v), max(v), min(v, 2), max(v, 2) FROM (VALUES (2::VARIANT), (1::VARIANT), (NULL), (2::VARIANT)) t(v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":9,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":49,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT i,CASE WHEN i%5=0 THEN NULL ELSE i%3 END v FROM range(10000)t(i) WHERE i%2=0) USING SAMPLE 50% (system,42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":85,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]},{"class":"CASE","type":"CASE_EXPR","alias":"v","query_location":24,"query_location_length":38,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["%"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":70,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":93,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":{"sample_size":{"type":{"id":"DOUBLE","type_info":null},"is_null":false,"value":50.0},"is_percentage":true,"method":"System","seed":42,"repeatable":true,"sample_rate":-1.0},"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM sample_source USING SAMPLE 31 (system) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"","table_name":"sample_source","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sample_source"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":{"sample_size":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":31},"is_percentage":false,"method":"System","seed":-1,"repeatable":false,"sample_rate":-1.0},"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM range(1) t(i) LIMIT (SELECT 'bad')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":34,"query_location_length":14,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":5,"literal":{"kind":"STRING","text":"bad"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":14,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i+2 FROM (VALUES (1),(2),(4),(NULL)) t(i) WHERE i+1\u003e2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":16,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":55,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('export_sequence');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":17,"literal":{"kind":"STRING","text":"export_sequence"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT second,first.a,first.b.d::BIGINT,second FROM secret.paths ORDER BY second;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":6,"column_names":["second"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["second"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":7,"column_names":["first","a"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":9,"column_names":["first","b","d"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":6,"column_names":["second"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":12,"schema_name":"secret","table_name":"paths","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["secret","paths"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (first.b::STRUCT(c BIGINT,d BIGINT)).d FROM secret.paths_twice ORDER BY second;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":6,"column_names":["second"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":38,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":27,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":7,"column_names":["first","b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":25,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"c","query_location":26,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"d","query_location":35,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}],"qualified_name":{"path":["STRUCT"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"literal":{"kind":"STRING","text":"d"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":18,"schema_name":"secret","table_name":"paths_twice","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["secret","paths_twice"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1,NULL] x UNION ALL SELECT [2,3] x WHERE false;","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":7,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":35,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"SELECT b[CASE WHEN id=1 THEN error('slice bound')::BIGINT ELSE 1 END:] FROM slice_input ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":62,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":9,"query_location_length":59,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":19,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"then_expr":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":20,"function_name":"error","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":13,"literal":{"kind":"STRING","text":"slice bound"}}}],"qualified_name":{"path":["error"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":1,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":11,"schema_name":"","table_name":"slice_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["slice_input"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM repeat_row(1::SMALLINT,NULL::VARCHAR,{'a''b':[1,NULL]},num_rows=3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":66,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat_row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a'b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a'b","query_location":59,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":8,"column_names":["num_rows"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}}],"qualified_name":{"path":["repeat_row"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_csv('__TEST_DIR__/generic_source.csv', header := true, delim := '|', auto_detect := true) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":94,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":33,"literal":{"kind":"STRING","text":"__TEST_DIR__/generic_source.csv"}}},{"name":"header","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"header","query_location":68,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"delim","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"delim","query_location":83,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}},{"name":"auto_detect","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"auto_detect","query_location":103,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM read_parquet('__TEST_DIR__/retained_predicates_parquet/*/*.parquet',hive_partitioning := true) WHERE array_to_string([p::VARCHAR, 'x'], '/') = '1/x' ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":94,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_parquet","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":54,"literal":{"kind":"STRING","text":"__TEST_DIR__/retained_predicates_parquet/*/*.parquet"}}},{"name":"hive_partitioning","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"hive_partitioning","query_location":103,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["read_parquet"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":115,"query_location_length":47,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":115,"query_location_length":39,"function_name":"array_to_string","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":131,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":133,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":1,"column_names":["p"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":135,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["array_to_string"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":5,"literal":{"kind":"STRING","text":"1/x"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"text value\",i,\"text value\" FROM scan_rows WHERE i\u003e=2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["text value"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":12,"column_names":["text value"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":9,"schema_name":"","table_name":"scan_rows","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["scan_rows"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":56,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s, row_number() OVER (ORDER BY NULL || s, s) FROM t ORDER BY s;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":10,"query_location_length":41,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":9,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["||"]}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["s"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t.s,count(u.v),sum(u.v) FROM t LEFT JOIN u USING(i) GROUP BY t.s ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["t","s"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":10,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":3,"column_names":["u","v"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":3,"column_names":["u","v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":38,"query_location_length":20,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":1,"schema_name":"","table_name":"u","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["u"]}},"condition":null,"join_type":"LEFT","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":3,"column_names":["t","s"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT quantile_disc(x, [0.0] ORDER BY x DESC) FROM (VALUES (1), (2), (2), (NULL)) t(x)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"quantile_disc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["x"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["quantile_disc"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":52,"query_location_length":30,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('type_source_calls');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":19,"literal":{"kind":"STRING","text":"type_source_calls"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(abs(i)) FROM (VALUES (-2),(2)) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":6,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["abs"]}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":24,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(CAST(42 AS INTEGER) AS BIGINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":39,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::INTEGER IS NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":21,"query_location_length":7,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT alias(i % 2) AS p FROM scalar_values;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":7,"query_location_length":12,"function_name":"alias","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}}}],"qualified_name":{"path":["alias"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":13,"schema_name":"","table_name":"scalar_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["scalar_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(NULL::TUPLE(VARCHAR) AS TUPLE(SMALLINT));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":45,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":14,"catalog":"","schema":"","type_name":"TUPLE","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["TUPLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":15,"catalog":"","schema":"","type_name":"TUPLE","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}],"qualified_name":{"path":["TUPLE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT union_tag(u),ST_AsText(union_extract(u,'v')) FROM (SELECT union_value(v := 'POINT(1 2)'::GEOMETRY('OGC:CRS84'))::alias_union u);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["u"]}}],"qualified_name":{"path":["union_tag"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":31,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":20,"function_name":"union_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["u"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"literal":{"kind":"STRING","text":"v"}}}],"qualified_name":{"path":["union_extract"]}}}],"qualified_name":{"path":["st_astext"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":57,"query_location_length":77,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"u","query_location":118,"query_location_length":13,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":53,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":94,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(1 2)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":96,"query_location_length":21,"catalog":"","schema":"","type_name":"GEOMETRY","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":11,"literal":{"kind":"STRING","text":"OGC:CRS84"}}],"qualified_name":{"path":["GEOMETRY"]}}}}],"qualified_name":{"path":["union_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":120,"query_location_length":11,"catalog":"","schema":"","type_name":"alias_union","children":[],"qualified_name":{"path":["alias_union"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('values_input_sequence');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":23,"literal":{"kind":"STRING","text":"values_input_sequence"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x,y,sum(DISTINCT y) FILTER (WHERE y\u003e10) OVER (ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM (VALUES (1,10),(2,20),(2,NULL),(3,30),(NULL,40)) t(x,y);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["y"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":11,"query_location_length":110,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["x"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":41,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"exclude_clause":"NO_OTHER","distinct":true,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["y"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":127,"query_location_length":48,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":145,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":150,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":161,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":171,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM unnest([4, NULL, 4, 7]) WITH ORDINALITY ORDER BY ordinality;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":10,"column_names":["ordinality"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}},"column_name_alias":[],"with_ordinality":"WITH_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT 1 FROM range(2) r, (DESCRIBE SELECT 1 AS a, 2 AS b) d LIMIT 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":31,"query_location_length":51,"left":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":36,"query_location_length":10,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"SUBQUERY","alias":"d","sample":null,"query_location":48,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(i) FROM overflow_test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":13,"schema_name":"","table_name":"overflow_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["overflow_test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE WHEN memory_usage_bytes \u003c 8_000_000\n THEN 'ok'\n ELSE error(concat('expected \u003c 8000000 bytes, got ', memory_usage_bytes))\n END\nFROM duckdb_memory()\nWHERE tag = 'IN_MEMORY_TABLE'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":158,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":17,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":18,"column_names":["memory_usage_bytes"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":9,"literal":{"kind":"INTEGER","text":"8_000_000"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":4,"literal":{"kind":"STRING","text":"ok"}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":67,"function_name":"error","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":60,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":32,"literal":{"kind":"STRING","text":"expected \u003c 8000000 bytes, got "}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":18,"column_names":["memory_usage_bytes"]}}],"qualified_name":{"path":["concat"]}}}],"qualified_name":{"path":["error"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":171,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_memory","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_memory"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":193,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":193,"query_location_length":3,"column_names":["tag"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":199,"query_location_length":17,"literal":{"kind":"STRING","text":"IN_MEMORY_TABLE"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select min(k), max(k) from t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM duckdb_columns();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_columns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_columns"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM old.v_empty_list","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":16,"schema_name":"old","table_name":"v_empty_list","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["old","v_empty_list"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT plus2(4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"plus2","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["plus2"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM persistent","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"persistent","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["persistent"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT total_blocks\nFROM pragma_database_size();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["total_blocks"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":22,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_database_size","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["pragma_database_size"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MEDIAN(count) FROM pragma_storage_info('integers');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"median","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["count"]}}],"qualified_name":{"path":["median"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":26,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":10,"literal":{"kind":"STRING","text":"integers"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT compression FROM pragma_storage_info('alp') WHERE compression='ALP';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":26,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"literal":{"kind":"STRING","text":"alp"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":5,"literal":{"kind":"STRING","text":"ALP"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM list_doubles WHERE i=5700","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":12,"schema_name":"","table_name":"list_doubles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_doubles"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5700"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT compression FROM pragma_storage_info('alp_v1_4_0.t') WHERE segment_type = 'DOUBLE' ORDER BY compression LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":11,"column_names":["compression"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":35,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":14,"literal":{"kind":"STRING","text":"alp_v1_4_0.t"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":66,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":8,"literal":{"kind":"STRING","text":"DOUBLE"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT compression FROM pragma_storage_info('all_types') WHERE segment_type == '{type}' AND compression != 'ALPRD';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":11,"literal":{"kind":"STRING","text":"all_types"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":63,"query_location_length":51,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":8,"literal":{"kind":"STRING","text":"{type}"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":92,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":7,"literal":{"kind":"STRING","text":"ALPRD"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT compression FROM pragma_storage_info('t') WHERE column_name='a' AND compression='BitPacking';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"STRING","text":"t"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":44,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":11,"column_names":["column_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":75,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":12,"literal":{"kind":"STRING","text":"BitPacking"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select a from test limit 5 offset 12000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":5,"literal":{"kind":"INTEGER","text":"12000"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT temperature::VARCHAR FROM temperatures_float LIMIT 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["temperature"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":18,"schema_name":"","table_name":"temperatures_float","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["temperatures_float"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM pragma_storage_info('t')\nWHERE segment_type = 'VARCHAR'\n AND compression = 'DICT_FSST'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"STRING","text":"t"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":52,"query_location_length":56,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":52,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":9,"literal":{"kind":"STRING","text":"VARCHAR"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":83,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":11,"literal":{"kind":"STRING","text":"DICT_FSST"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from uncompressed_data order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":17,"schema_name":"","table_name":"uncompressed_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uncompressed_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.min_string_length, s.max_string_length, s.total_string_length\nFROM (SELECT stats(value) s FROM repeated LIMIT 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":19,"column_names":["s","min_string_length"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":19,"column_names":["s","max_string_length"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":21,"column_names":["s","total_string_length"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":76,"query_location_length":45,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":84,"query_location_length":12,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":5,"column_names":["value"]}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":104,"query_location_length":8,"schema_name":"","table_name":"repeated","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["repeated"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(s), sum(length(s)) FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["count"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":14,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["length"]}}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT BOOL_OR(compression ILIKE 'fsst%') FROM pragma_storage_info('test')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"bool_or","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":13,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":11,"column_names":["compression"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":7,"literal":{"kind":"STRING","text":"fsst%"}}}],"qualified_name":{"path":["~~*"]}}}],"qualified_name":{"path":["bool_or"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":47,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":6,"literal":{"kind":"STRING","text":"test"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM test WHERE a=false","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":32,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(a), MIN(a), MAX(a), COUNT(*) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT message.split(': ')[2]::INTEGER FROM duckdb_logs\nwhere\n\tmessage.starts_with('ColumnDataCheckpointer FinalAnalyze') and\n\tmessage.contains('test_roaring') and\n\tmessage.contains('VALIDITY') and\n\tmessage.contains('ROARING');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":26,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"split","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"STRING","text":": "}}}],"qualified_name":{"path":["message","split"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":11,"schema_name":"","table_name":"duckdb_logs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_logs"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":63,"query_location_length":163,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":58,"function_name":"starts_with","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":37,"literal":{"kind":"STRING","text":"ColumnDataCheckpointer FinalAnalyze"}}}],"qualified_name":{"path":["message","starts_with"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":127,"query_location_length":32,"function_name":"contains","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":14,"literal":{"kind":"STRING","text":"test_roaring"}}}],"qualified_name":{"path":["message","contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":165,"query_location_length":28,"function_name":"contains","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":182,"query_location_length":10,"literal":{"kind":"STRING","text":"VALIDITY"}}}],"qualified_name":{"path":["message","contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":199,"query_location_length":27,"function_name":"contains","schema":"message","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":9,"literal":{"kind":"STRING","text":"ROARING"}}}],"qualified_name":{"path":["message","contains"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT compression FROM pragma_storage_info('test') WHERE segment_type ILIKE 'BOOL' AND compression != 'Roaring';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":6,"literal":{"kind":"STRING","text":"test"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":58,"query_location_length":54,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":12,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":12,"column_names":["segment_type"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":6,"literal":{"kind":"STRING","text":"BOOL"}}}],"qualified_name":{"path":["~~*"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":88,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":9,"literal":{"kind":"STRING","text":"Roaring"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), bool_and(value IS NOT DISTINCT FROM CASE WHEN id%13=0 THEN NULL ELSE (id//2)%1000 END) FROM db.numbers WHERE id%2048\u003c70 OR id%2048\u003e=2046;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":86,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":26,"query_location_length":76,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":5,"column_names":["value"]},"right":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":53,"query_location_length":49,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":7,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":12,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":5,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["%"]}}}}}],"qualified_name":{"path":["bool_and"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":109,"query_location_length":10,"schema_name":"db","table_name":"numbers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","numbers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":126,"query_location_length":27,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":126,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":126,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":126,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":2,"literal":{"kind":"INTEGER","text":"70"}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":140,"query_location_length":13,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":140,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2046"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lower(compression)!='fsst' FROM pragma_storage_info('blob_empty') WHERE segment_type ILIKE 'BLOB' LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":26,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"lower","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":11,"column_names":["compression"]}}],"qualified_name":{"path":["lower"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"fsst"}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":39,"query_location_length":33,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":12,"literal":{"kind":"STRING","text":"blob_empty"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":12,"function_name":"~~*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":12,"column_names":["segment_type"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":6,"literal":{"kind":"STRING","text":"BLOB"}}}],"qualified_name":{"path":["~~*"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select a[3] from test limit 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*)\nFROM (\n\tSELECT * FROM target\n\tEXCEPT\n\tSELECT * FROM source WHERE id % 3 \u003c\u003e 0\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":73,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":6,"schema_name":"","table_name":"target","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["target"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":61,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":6,"schema_name":"","table_name":"source","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["source"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":81,"query_location_length":11,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":6,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM test WHERE i%7=0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":32,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} {"sql":"SELECT * FROM enc.blobs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"enc","table_name":"blobs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["enc","blobs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select current_setting('validate_external_file_cache');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"validate_external_file_cache"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT column_name FROM pragma_storage_info('wide_tbl', include_segment_info=true, loaded_segments_only=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":11,"column_names":["column_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":33,"query_location_length":85,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"wide_tbl"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":20,"column_names":["include_segment_info"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":92,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":20,"column_names":["loaded_segments_only"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test WHERE a IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":27,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT wal_size != '0 bytes' FROM pragma_database_size();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["wal_size"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0 bytes"}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":34,"query_location_length":22,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_database_size","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT segment_info FROM pragma_storage_info('bp_tbl', include_segment_info=true) WHERE segment_type NOT IN ('VALIDITY')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["segment_info"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bp_tbl"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":20,"column_names":["include_segment_info"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":88,"query_location_length":32,"children":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":108,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":12,"column_names":["segment_type"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"VALIDITY"}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM read_duckdb('{TEST_DIR}/read_duckdb_test.db', table_name='my_tbl2')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":67,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_duckdb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":32,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{TEST_DIR}/read_duckdb_test.db"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"my_tbl2"}}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM '{TEST_DIR}/read_duckdb_top_n*.db' ORDER BY val DESC LIMIT 5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":3,"column_names":["val"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":34,"schema_name":"","table_name":"{TEST_DIR}/read_duckdb_top_n*.db","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/read_duckdb_top_n*.db"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT k, v FROM big WHERE k IN (10, 150000, 280000, 410000) ORDER BY k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":3,"schema_name":"","table_name":"big","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["big"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":32,"query_location_length":28,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["k"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":150000}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":280000}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":410000}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT k, v FROM del WHERE k IN (50, 99, 100, 200099, 200100, 200101) ORDER BY k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":3,"schema_name":"","table_name":"del","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["del"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":32,"query_location_length":37,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["k"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":99}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":200099}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":200100}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":200101}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT min(rowid), max(rowid), count(*) FROM rowid_gap_vacuum_idx.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["rowid"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["rowid"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":22,"schema_name":"rowid_gap_vacuum_idx","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_vacuum_idx","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT rowid, i FROM remap_geom.t WHERE geom = 'POINT (1500 1500)'::GEOMETRY;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"remap_geom","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["remap_geom","t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":40,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":4,"column_names":["geom"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":66,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"POINT (1500 1500)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(DISTINCT row_group_id) FROM pragma_storage_info('rowid_gap_old_storage_idx.t');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":12,"column_names":["row_group_id"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":50,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":29,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"rowid_gap_old_storage_idx.t"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(DISTINCT row_group_id) FROM pragma_storage_info('remap_tasks.t');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":12,"column_names":["row_group_id"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":41,"query_location_length":36,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"remap_tasks.t"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT rowid, i FROM remap_collision.t WHERE i IN (2, 5, 2045, 2048, 4094, 4096, 6143) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":17,"schema_name":"remap_collision","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["remap_collision","t"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":50,"query_location_length":36,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2045}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2048}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4094}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4096}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6143}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT min(rowid), count(*) FROM rowid_gap_lookup_db.leading;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["rowid"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":27,"schema_name":"rowid_gap_lookup_db","table_name":"leading","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_lookup_db","leading"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT rowid, i FROM rowid_gap_lookup_db.middle WHERE rowid IN (245759, 245760) ORDER BY rowid;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":5,"column_names":["rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":26,"schema_name":"rowid_gap_lookup_db","table_name":"middle","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_lookup_db","middle"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":63,"query_location_length":16,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":5,"column_names":["rowid"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":245759}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":245760}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM test WHERE a=12","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT tags FROM duckdb_databases() WHERE database_name = 'storage_versions66';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["tags"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"storage_versions66"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) = 0\nFROM duckdb_eviction_queues()\nWHERE dead_nodes \u003c 0\n OR dead_nodes \u003e total_insertions;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":24,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_eviction_queues","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":56,"query_location_length":50,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":56,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":10,"column_names":["dead_nodes"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":77,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":10,"column_names":["dead_nodes"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":16,"column_names":["total_insertions"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*), SUM(a), MIN(a), MAX(a), MIN(b), MAX(b), COUNT(a), COUNT(b) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["b"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM a WHERE id=2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT s.id FROM structs ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":4,"column_names":["s","id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":7,"schema_name":"","table_name":"structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM timestamp WHERE micro=TIMESTAMP '2020-01-01 00:00:01.88926' ORDER BY micro","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":5,"column_names":["micro"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":43,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["micro"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":37,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01 00:00:01.88926"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT d FROM unsigned WHERE d \u003c 10 ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"unsigned","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unsigned"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":29,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["d"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"from query($$select col.\"$$ || getvariable('col_name') || $$\"::$$ || getvariable('col_type') || ' from tbl');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":103,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"query","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":96,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"select col.\""}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":23,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"col_name"}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\"::"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":23,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"col_type"}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" from tbl"}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM ints WHERE col \u003e 50::INTEGER::VARIANT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"ints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":32,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":3,"column_names":["col"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT v.x FROM variant_extract_pushdown WHERE v.x=5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["v","x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":24,"schema_name":"","table_name":"variant_extract_pushdown","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["variant_extract_pushdown"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["v","x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select s.fully_shredded from (select stats(col) s from tbl limit 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":16,"column_names":["s","fully_shredded"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":29,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":37,"query_location_length":10,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["col"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM shredded_values","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":15,"schema_name":"","table_name":"shredded_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["shredded_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT col FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["col"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT storage.wal_replay_entry_count FROM replay_metrics;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":30,"column_names":["storage","wal_replay_entry_count"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":14,"schema_name":"","table_name":"replay_metrics","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["replay_metrics"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl WHERE a = 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM test WHERE a IS NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":34,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM t WHERE a=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM t WHERE upper(b)='Y'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":8,"function_name":"upper","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["b"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Y"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM test WHERE a IS NULL OR b IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":32,"query_location_length":22,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":34,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":47,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["b"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM db_v120.tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"db_v120","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db_v120","tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i\u003eALL(SELECT (i+i1.i-1)/2 FROM integers WHERE i IS NOT NULL) FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":60,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":12,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":4,"column_names":["i1","i"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":55,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_LESSTHANOREQUALTO"}]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":73,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i\u003eALL(SELECT (i+i1.i-1)/2 FROM integers) FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":40,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":12,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":4,"column_names":["i1","i"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_LESSTHANOREQUALTO"}]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":53,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT row(1, 2) IN (SELECT * FROM (VALUES (NULL::INT, NULL::INT)) rhs(x, y)),\n row(1, 2) NOT IN (SELECT * FROM (VALUES (NULL::INT, NULL::INT)) rhs(x, y))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":20,"query_location_length":57,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":28,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":35,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"comparison_type":"COMPARE_EQUAL"},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":86,"query_location_length":74,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":103,"query_location_length":57,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":111,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":118,"query_location_length":31,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":131,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":133,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":142,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":144,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"comparison_type":"COMPARE_EQUAL"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT row([9, NULL::INT], 0) IN (\n\tSELECT * FROM (VALUES ([1, 2], 0)) rhs(a, b)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":33,"query_location_length":49,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":43,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":50,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (0, NULL) \u003c ANY(SELECT 1, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":31,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]},"comparison_type":"COMPARE_LESSTHAN"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (2, 0) \u003e ALL(SELECT 1, 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":25,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]},"comparison_type":"COMPARE_LESSTHANOREQUALTO"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (1, 2) = ALL(SELECT 1, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":25,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"comparison_type":"COMPARE_NOTEQUAL"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (1, 1) \u003e= ANY(SELECT 1, 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":26,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"comparison_type":"COMPARE_GREATERTHANOREQUALTO"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (1, NULL::INT) \u003c\u003e ANY (SELECT * FROM (VALUES (1, 2), (2, 2)) t(x, y))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":69,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":37,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":44,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]},"comparison_type":"COMPARE_NOTEQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 = ALL(SELECT NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":20,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"comparison_type":"COMPARE_NOTEQUAL"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 AS one WHERE 1 IN (SELECT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"one","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":27,"query_location_length":10,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i FROM integers WHERE i \u003c\u003e ALL(SELECT i FROM integers WHERE i=1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":29,"query_location_length":42,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_EQUAL"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT EXISTS(SELECT * FROM integers WHERE i\u003e2)) FROM integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":49,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":15,"query_location_length":40,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":29,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":51,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":62,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, i \u003e ANY(SELECT i FROM integers WHERE i IS NOT NULL) FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":51,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":49,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_GREATERTHAN"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":67,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t2, t1, ( SELECT t2.c0 AS col_1, t1.c0 AS col_2) as subQuery0 INNER JOIN t0 ON ((subQuery0.col_2)) CROSS JOIN (SELECT t0.c0 AS col_1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":138,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"JOIN","alias":"","sample":null,"query_location":113,"query_location_length":34,"left":{"type":"JOIN","alias":"","sample":null,"query_location":76,"query_location_length":36,"left":{"type":"SUBQUERY","alias":"subQuery0","sample":null,"query_location":22,"query_location_length":40,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"col_1","query_location":31,"query_location_length":5,"column_names":["t2","c0"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"col_2","query_location":47,"query_location_length":5,"column_names":["t1","c0"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"condition":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":15,"column_names":["subQuery0","col_2"]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":124,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"col_1","query_location":132,"query_location_length":5,"column_names":["t0","c0"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l IN (SELECT i1.l FROM (SELECT * FROM lists i1 WHERE i1.l IS NOT DISTINCT FROM lists.l) i1 RIGHT JOIN generate_series(1, 2, 1) tbl(s) ON i1.l=ARRAY[tbl.s] OR (i1.l IS NULL AND tbl.s IS NULL)) FROM lists ORDER BY l NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":219,"query_location_length":1,"column_names":["l"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":12,"query_location_length":186,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["i1","l"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":98,"query_location_length":99,"left":{"type":"SUBQUERY","alias":"i1","sample":null,"query_location":30,"query_location_length":64,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":38,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":60,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["i1","l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":7,"column_names":["lists","l"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":109,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":["s"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":144,"query_location_length":53,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":144,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":4,"column_names":["i1","l"]},"right":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":149,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":5,"column_names":["tbl","s"]}]}},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":166,"query_location_length":30,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":171,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":4,"column_names":["i1","l"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":189,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":183,"query_location_length":5,"column_names":["tbl","s"]}]}]}]},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":204,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXISTS(SELECT i FROM integers WHERE i\u003eMIN(i1.i)) FROM integers i1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":48,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":43,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":4,"column_names":["i1","i"]}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":61,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t0.c2 FROM t0\nWHERE NOT EXISTS (\n SELECT 1 FROM (\n SELECT t0.c2 AS col0 FROM t0\n ) AS subQuery\n WHERE ((t0.c2) IS DISTINCT FROM (subQuery.col0))\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["t0","c2"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":27,"query_location_length":132,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":31,"query_location_length":128,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"SUBQUERY","alias":"subQuery","sample":null,"query_location":56,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"col0","query_location":69,"query_location_length":5,"column_names":["t0","c2"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":88,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":116,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":5,"column_names":["t0","c2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":13,"column_names":["subQuery","col0"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXISTS(SELECT * FROM integers WHERE i IS NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":46,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":21,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":45,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1 IN (SELECT NULL::INTEGER) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":12,"query_location_length":22,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT *\nFROM\n (SELECT 42 AS c1) AS ref,\n (SELECT a + b + 1\n FROM\n (SELECT 1) t1(a),\n (SELECT (SELECT (SELECT ref.c1 + 1)) + 1) t2(b)\n )\n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":141,"left":{"type":"SUBQUERY","alias":"ref","sample":null,"query_location":16,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c1","query_location":24,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":44,"query_location_length":106,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["b"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":65,"query_location_length":80,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":75,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":98,"query_location_length":41,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":135,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":106,"query_location_length":28,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":114,"query_location_length":19,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":6,"column_names":["ref","c1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers, LATERAL (SELECT [i + 1]) t(k), LATERAL (SELECT UNNEST(k)) t2(l) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":78,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":32,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":63,"query_location_length":18,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["k"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["l"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers LEFT JOIN LATERAL (SELECT integers.i WHERE integers.i IN (1, 3)) t(b) ON (i=b) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":78,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":41,"query_location_length":46,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":10,"column_names":["integers","i"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":80,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":10,"column_names":["integers","i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["b"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select ss1.d1 from\n tenk1 as t1\n inner join tenk1 as t2\n on t1.tenthous = t2.ten\n inner join\n int8_tbl as i8\n left join int4_tbl as i4\n inner join (select 64 as d1\n from tenk1 t3,\n lateral (select abs(t3.unique1) + random()) ss0(x)\n where t3.fivethous \u003c 0) as ss1\n on i4.f1 = ss1.d1\n on i8.q1 = i4.f1\n on t1.tenthous = ss1.d1\nwhere t1.unique1 \u003c i4.f1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["ss1","d1"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":86,"query_location_length":319,"left":{"type":"JOIN","alias":"","sample":null,"query_location":35,"query_location_length":48,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"tenk1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tenk1"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":46,"query_location_length":11,"schema_name":"","table_name":"tenk1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tenk1"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":11,"column_names":["t1","tenthous"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":6,"column_names":["t2","ten"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"JOIN","alias":"","sample":null,"query_location":120,"query_location_length":259,"left":{"type":"BASE_TABLE","alias":"i8","sample":null,"query_location":101,"query_location_length":14,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"right":{"type":"JOIN","alias":"","sample":null,"query_location":151,"query_location_length":207,"left":{"type":"BASE_TABLE","alias":"i4","sample":null,"query_location":130,"query_location_length":14,"schema_name":"","table_name":"int4_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int4_tbl"]}},"right":{"type":"SUBQUERY","alias":"ss1","sample":null,"query_location":162,"query_location_length":165,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"d1","query_location":170,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":64}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":197,"query_location_length":88,"left":{"type":"BASE_TABLE","alias":"t3","sample":null,"query_location":202,"query_location_length":8,"schema_name":"","table_name":"tenk1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tenk1"]}},"right":{"type":"SUBQUERY","alias":"ss0","sample":null,"query_location":243,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":267,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":251,"query_location_length":15,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":255,"query_location_length":10,"column_names":["t3","unique1"]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":269,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":310,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":310,"query_location_length":12,"column_names":["t3","fivethous"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":325,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":344,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":344,"query_location_length":5,"column_names":["i4","f1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":352,"query_location_length":6,"column_names":["ss1","d1"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":366,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":366,"query_location_length":5,"column_names":["i8","q1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":374,"query_location_length":5,"column_names":["i4","f1"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":385,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":385,"query_location_length":11,"column_names":["t1","tenthous"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":399,"query_location_length":6,"column_names":["ss1","d1"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":412,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":412,"query_location_length":10,"column_names":["t1","unique1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":425,"query_location_length":5,"column_names":["i4","f1"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select *, (select r from (select q1 as q2) x, lateral (select q2 as r) y) from int8_tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":63,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["r"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":20,"query_location_length":52,"left":{"type":"SUBQUERY","alias":"x","sample":null,"query_location":25,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"q2","query_location":33,"query_location_length":2,"column_names":["q1"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"y","sample":null,"query_location":54,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"r","query_location":62,"query_location_length":2,"column_names":["q2"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":79,"query_location_length":8,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select x.* from\n int8_tbl x left join (select q1,coalesce(q2,0) q2 from int8_tbl) y on x.q2 = y.q1,\n lateral (select x.q1,y.q1,y.q2) v(xq1,yq1,yq2) order by 1, 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":159,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":3,"relation_name":"x","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":11,"query_location_length":138,"left":{"type":"JOIN","alias":"","sample":null,"query_location":29,"query_location_length":70,"left":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":18,"query_location_length":10,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"right":{"type":"SUBQUERY","alias":"y","sample":null,"query_location":39,"query_location_length":43,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":2,"column_names":["q1"]},{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"q2","query_location":50,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":2,"column_names":["q2"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":73,"query_location_length":8,"schema_name":"","table_name":"int8_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int8_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":88,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":4,"column_names":["x","q2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":4,"column_names":["y","q1"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":111,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":4,"column_names":["x","q1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":4,"column_names":["y","q1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":4,"column_names":["y","q2"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["xq1","yq1","yq2"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from (select [42, 43, 44] union all select [45, NULL, 46]) t(a), (select unnest(t.a)) t2(b) order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":91,"left":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":53,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":43}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":44}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":45}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":46}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":74,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":11,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":3,"column_names":["t","a"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT name, total FROM students JOIN LATERAL (SELECT SUM(grade) AS total FROM exams WHERE exams.sid=students.id) grades ON true ORDER BY total DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":5,"column_names":["total"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":5,"column_names":["total"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":95,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"right":{"type":"SUBQUERY","alias":"grades","sample":null,"query_location":46,"query_location_length":67,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"total","query_location":54,"query_location_length":10,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":5,"column_names":["grade"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":79,"query_location_length":5,"schema_name":"","table_name":"exams","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["exams"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":91,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":9,"column_names":["exams","sid"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":11,"column_names":["students","id"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select array(select * from unnest(['a', 'b']) as _t(u) order by if(u='a',100, 1)) as out;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"out","query_location":7,"query_location_length":74,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":18446744073709551615,"query_location_length":0,"case_checks":[{"when_expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__array_internal_idx_1"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":18446744073709551615,"query_location_length":0,"index":1}}]}]},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__array_internal_idx_1"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":18446744073709551615,"query_location_length":0,"index":1}}]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":64,"query_location_length":16,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["u"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":20,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]},{"class":"CASE","type":"CASE_EXPR","alias":"__array_internal_idx_1","query_location":64,"query_location_length":16,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["u"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"_t","sample":null,"query_location":27,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}}]},"column_name_alias":["u"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT l_linestat FROM orders) FROM lineitem","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":31,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":10,"column_names":["l_linestat"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":6,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (x, y) IN (SELECT i, i + 1 FROM table2) from table1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":17,"query_location_length":29,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":6,"schema_name":"","table_name":"table2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["y"]}}]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":6,"schema_name":"","table_name":"table1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ROW(1, 2) IN (SELECT i, i + 2 FROM integers)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":20,"query_location_length":31,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers s1 INNER JOIN integers s2 ON (SELECT s1.i=i FROM integers WHERE s2.i=i) ORDER BY s1.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":4,"column_names":["s1","i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":26,"query_location_length":68,"left":{"type":"BASE_TABLE","alias":"s1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"s2","sample":null,"query_location":37,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":52,"query_location_length":42,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["s1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["i"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":87,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":4,"column_names":["s2","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT i FROM integers WHERE i IS NOT NULL EXCEPT SELECT i FROM integers WHERE i\u003c\u003ei1.i) AS j FROM integers i1 WHERE i IS NOT NULL ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":88,"subquery_type":"SCALAR","subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"EXCEPT","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":42,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":75,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":90,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":109,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":129,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT COUNT(*) FROM (SELECT i1.i FROM integers GROUP BY GROUPING SETS((i1.i), (), (i1.i), (i1.i, i1.i))) tbl) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":153,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":111,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":32,"query_location_length":84,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":4,"column_names":["i1","i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":4,"column_names":["i1","i"]}],"group_sets":[[0],[],[0],[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":132,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT 42+i1.i FROM integers LIMIT 1) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":38,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":4,"column_names":["i1","i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":59,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT i+i1.i FROM integers WHERE i=1) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["i1","i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":60,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (WITH i2 AS (SELECT 42+i1.i AS j FROM integers) SELECT j FROM i2) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":65,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"i2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":32,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":4,"column_names":["i1","i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":2,"schema_name":"","table_name":"i2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["i2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":86,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (WITH i2 AS (SELECT i+1 FROM integers WHERE i=i1.i) SELECT * FROM i2) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":69,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"i2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":69,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":2,"schema_name":"","table_name":"i2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["i2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":90,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT COUNT(i) FROM integers i2 WHERE i2.i\u003ei1.i OR i2.i IS NULL) FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":66,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":32,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":50,"query_location_length":25,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":50,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":4,"column_names":["i2","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":4,"column_names":["i1","i"]}},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":68,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":4,"column_names":["i2","i"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":82,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (col1 + 1) AS k, k IN (SELECT ColID + k FROM tbl_ProductSales) FROM another_T GROUP BY k ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"k","query_location":13,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":4,"column_names":["col1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":29,"query_location_length":40,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":5,"column_names":["ColID"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["k"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":16,"schema_name":"","table_name":"tbl_ProductSales","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_ProductSales"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["k"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":75,"query_location_length":9,"schema_name":"","table_name":"another_T","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["another_T"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH outer_t(x) AS (SELECT 1)\nSELECT q.cnt\nFROM outer_t\nCROSS JOIN LATERAL (\n\tSELECT count(*) AS cnt\n\tFROM (SELECT 1 AS r) e\n\tCROSS JOIN (SELECT 1 AS v) d\n\tLEFT JOIN (SELECT 1 AS r, 1 AS v) e2 ON e2.r = outer_t.x AND e2.v = d.v\n) q;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"outer_t","value":{"aliases":["x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":5,"column_names":["q","cnt"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":56,"query_location_length":175,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":7,"schema_name":"","table_name":"outer_t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["outer_t"]}},"right":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":75,"query_location_length":154,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"cnt","query_location":85,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":156,"query_location_length":71,"left":{"type":"JOIN","alias":"","sample":null,"query_location":126,"query_location_length":28,"left":{"type":"SUBQUERY","alias":"e","sample":null,"query_location":107,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":115,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"d","sample":null,"query_location":137,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v","query_location":145,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"e2","sample":null,"query_location":166,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":174,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v","query_location":182,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":196,"query_location_length":31,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":196,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":196,"query_location_length":4,"column_names":["e2","r"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":203,"query_location_length":9,"column_names":["outer_t","x"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":217,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":217,"query_location_length":4,"column_names":["e2","v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":3,"column_names":["d","v"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT array_rv(arr) FROM t ORDER BY arr;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":3,"column_names":["arr"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"array_rv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["arr"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1=(SELECT NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":15,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":9,"query_location_length":13,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, (SELECT SUM(b) FROM test tsub WHERE test.a=tsub.a) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":50,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"tsub","sample":null,"query_location":30,"query_location_length":9,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":46,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":6,"column_names":["test","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":6,"column_names":["tsub","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":66,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (WITH cte1 AS (WITH cte2 AS (SELECT 42) SELECT * FROM cte2) SELECT * FROM cte1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":79,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":54,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":4,"schema_name":"","table_name":"cte2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":74,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":4,"schema_name":"","table_name":"cte1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a, (WITH cte AS (SELECT CASE WHEN test.a=11 THEN b ELSE NULL END FROM test tsub LIMIT 1) SELECT * FROM cte) FROM test ORDER BY a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":104,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":31,"query_location_length":40,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":41,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":6,"column_names":["test","a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["b"]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"BASE_TABLE","alias":"tsub","sample":null,"query_location":77,"query_location_length":9,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":103,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":110,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":120,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM item i1 WHERE (SELECT count(*) AS item_cnt FROM item WHERE (i_manufact = i1.i_manufact AND i_manufact=3) OR (i_manufact = i1.i_manufact AND i_manufact=3)) \u003e 0 ORDER BY 1 LIMIT 100;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":182,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"item","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["item"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":28,"query_location_length":144,"left":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":28,"query_location_length":140,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"item_cnt","query_location":36,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":62,"query_location_length":4,"schema_name":"","table_name":"item","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["item"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":73,"query_location_length":94,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":74,"query_location_length":43,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":74,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":10,"column_names":["i_manufact"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":13,"column_names":["i1","i_manufact"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":10,"column_names":["i_manufact"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":123,"query_location_length":43,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":123,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":10,"column_names":["i_manufact"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":136,"query_location_length":13,"column_names":["i1","i_manufact"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":154,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":10,"column_names":["i_manufact"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":171,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers WHERE i=(SELECT i, i + 2 FROM integers)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":31,"query_location_length":31,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM strings WHERE EXISTS(SELECT v FROM strings WHERE v='bla')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":28,"query_location_length":43,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bla"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 4=ANY(SELECT UNNEST(i)) FROM (VALUES ([1, 2, 3])) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":23,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":36,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'bla' IN (SELECT * FROM strings WHERE v=s1.v) FROM strings s1 ORDER BY v","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":16,"query_location_length":36,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":4,"column_names":["s1","v"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"bla"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"s1","sample":null,"query_location":58,"query_location_length":10,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, (SELECT SUM(s1.i) OVER (ORDER BY s1.i) FROM integers s1, integers s2 WHERE i1.i=s1.i LIMIT 1) FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":130,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":93,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":18,"query_location_length":30,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":4,"column_names":["s1","i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":4,"column_names":["s1","i"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":49,"query_location_length":29,"left":{"type":"BASE_TABLE","alias":"s1","sample":null,"query_location":54,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"s2","sample":null,"query_location":67,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":85,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":4,"column_names":["s1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":109,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (VALUES (42, 43))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":43}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM create_external_resource('badattach@local');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"create_external_resource","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"badattach@local"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT result FROM create_external_resource('compute@local');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["result"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":19,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"create_external_resource","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"compute@local"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT metric_name, metric_type, description, unit\nFROM duckdb_available_metrics()\nWHERE metric_name = 'query.cpu_time';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["metric_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["metric_type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":11,"column_names":["description"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["unit"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":56,"query_location_length":26,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_available_metrics","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":89,"query_location_length":30,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":11,"column_names":["metric_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"query.cpu_time"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * EXCLUDE (database_name, schema_oid, table_oid, database_oid, constraint_name) FROM duckdb_constraints();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":79,"relation_name":"","exclude_list":["database_name","schema_oid","constraint_name","table_oid","database_oid"],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":92,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_constraints","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM duckdb_dependencies();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":21,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_dependencies","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select memory_usage_bytes from duckdb_memory() where tag = 'IN_MEMORY_TABLE'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["memory_usage_bytes"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":31,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_memory","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":3,"column_names":["tag"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"IN_MEMORY_TABLE"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n typeof(value),\n typeof(typed_value),\n variant_typeof(typed_value)\nFROM duckdb_settings()\nWHERE name = 'standard_vector_size';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":13,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":5,"column_names":["value"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":19,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":11,"column_names":["typed_value"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":27,"function_name":"variant_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":11,"column_names":["typed_value"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":88,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_settings","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":112,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"standard_vector_size"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT database_name = current_database() OR database_name = 'temp'\nFROM duckdb_views ORDER BY view_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":9,"column_names":["view_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":7,"query_location_length":60,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":18,"function_name":"current_database","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"temp"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":73,"query_location_length":12,"schema_name":"","table_name":"duckdb_views","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["duckdb_views"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT extra_info['state']\nFROM duckdb_logs_parsed('ExternalResource') WHERE resource_type = 'mock@local' AND operation = 'status';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":17,"query_location_length":9,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["extra_info"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"state"}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":32,"query_location_length":38,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ExternalResource"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":77,"query_location_length":53,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":77,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":13,"column_names":["resource_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"mock@local"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":110,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":9,"column_names":["operation"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"status"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT name, kind, create_function, status_function, destroy_function, resolve_function, origin FROM duckdb_external_resource_types();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["kind"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":15,"column_names":["create_function"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":15,"column_names":["status_function"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":16,"column_names":["destroy_function"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":16,"column_names":["resolve_function"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":6,"column_names":["origin"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":101,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_external_resource_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM range(TIMESTAMPTZ '1992-01-01 00:00:00-08', TIMESTAMPTZ '2020-01-01 00:00:00-08', INTERVAL '1 DAY') tbl(d)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":21,"query_location_length":106,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01 00:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01 00:00:00-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":103,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 DAY"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]},"column_name_alias":["d"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM information_schema.schemata WHERE schema_name='scheme'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":27,"schema_name":"information_schema","table_name":"schemata","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["information_schema","schemata"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":11,"column_names":["schema_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"scheme"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT(table_catalog) = current_database()\nFROM information_schema.constraint_column_usage\nWHERE table_schema = 'scheme' AND table_name = 'emp'\nORDER BY column_name ASC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":11,"column_names":["column_name"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":15,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":13,"column_names":["table_catalog"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":18,"function_name":"current_database","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":42,"schema_name":"information_schema","table_name":"constraint_column_usage","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["information_schema","constraint_column_usage"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":106,"query_location_length":46,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":12,"column_names":["table_schema"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"scheme"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":134,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"emp"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT constraint_name, constraint_type FROM information_schema.table_constraints ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":15,"column_names":["constraint_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":15,"column_names":["constraint_type"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":36,"schema_name":"information_schema","table_name":"table_constraints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["information_schema","table_constraints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i from unnest([1, 2]) i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"i","sample":null,"query_location":14,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select lst.id, x.unnest from lists lst, unnest(lst.l) as x order by 1, 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["lst","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":8,"column_names":["x","unnest"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":24,"query_location_length":34,"left":{"type":"BASE_TABLE","alias":"lst","sample":null,"query_location":29,"query_location_length":9,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"right":{"type":"TABLE_FUNCTION","alias":"x","sample":null,"query_location":40,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":5,"column_names":["lst","l"]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM (SELECT NULL a), range(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":30,"left":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":31,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from (values (1), (10), (100), (1000), (10000)) t(a), range(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":62,"left":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":21,"query_location_length":42,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":70,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["a"]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM range(timestamp '1992-01-01 00:00:00', timestamp '1992-01-01 00:00:01', interval '1' month);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":91,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01 00:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-01-01 00:00:01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM generate_series('294247-01-10'::TIMESTAMP, 'infinity'::TIMESTAMP, INTERVAL '1 DAY');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":83,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-10"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 DAY"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM read_text('test/sql/table_function/files/*.txt');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":37,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test/sql/table_function/files/*.txt"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select filename from read_blob('s3://does-not-exist1144/date=2025-10-11/file.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["filename"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_blob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":54,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"s3://does-not-exist1144/date=2025-10-11/file.parquet"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \"type\", \"name\", \"tbl_name\", rootpage FROM sqlite_master WHERE name='v1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":10,"column_names":["tbl_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":8,"column_names":["rootpage"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":13,"schema_name":"","table_name":"sqlite_master","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sqlite_master"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"v1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM range(10)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":9,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from generate_series(0, -9223372036854775807, -9223372036854775807);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":62,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775807}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775807}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM repeat(INTERVAL '30 days', 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":29,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"30 days"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select age('2020-01-01'::timestamptz);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT make_timestamptz(1, 1, 1, 0, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"UTC"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*), sum(hash(ts::VARCHAR)) FROM generate_series('1900-01-01 12:00:00+00'::TIMESTAMPTZ, '2100-01-01 12:00:00+00'::TIMESTAMPTZ, INTERVAL 5 DAY) t(ts)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":22,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":17,"function_name":"hash","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":45,"query_location_length":115,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":85,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1900-01-01 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":87,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":124,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2100-01-01 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":139,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]},"column_name_alias":["ts"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '2024-06-15 12:00:00+00'::TIMESTAMPTZ + INTERVAL 1 YEAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-06-15 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT y, count(*) FROM (SELECT year(ts) y FROM generate_series('2015-01-01 12:00:00+00'::TIMESTAMPTZ, '2035-01-01 12:00:00+00'::TIMESTAMPTZ, INTERVAL 1 DAY) t(ts) GROUP BY ALL) GROUP BY ALL ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["y"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":24,"query_location_length":153,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":32,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":48,"query_location_length":115,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2015-01-01 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":127,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2035-01-01 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":129,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":142,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]},"column_name_alias":["ts"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, year(ts), month(ts), day(ts), era(ts), dayofyear(ts) FROM (VALUES\n ('2024-06-15 12:00:00+00'::TIMESTAMPTZ), ('0622-07-19 12:00:00+00'), ('0622-07-18 12:00:00+00'),\n ('1970-01-01 00:00:00+00'), ('2024-07-07 12:00:00+00'), ('2024-07-08 12:00:00+00'),\n ('1882-11-12 12:00:00+00'), ('2100-01-01 12:00:00+00'), ('1000-01-01 12:00:00+00')) t(ts)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"month","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":7,"function_name":"day","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":7,"function_name":"era","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":13,"function_name":"dayofyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":69,"query_location_length":278,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":104,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-06-15 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":106,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0622-07-19 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":149,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0622-07-18 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":179,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1970-01-01 00:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":207,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-07-07 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":235,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-07-08 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":265,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1882-11-12 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":293,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2100-01-01 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":321,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1000-01-01 12:00:00+00"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["ts"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT make_timestamptz(1299, 1, 1, 0, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1299}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"UTC"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_trunc('era', '2024-06-15 12:00:00+00'::TIMESTAMPTZ)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"era"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-06-15 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '2024-03-20 12:00:00+00'::TIMESTAMPTZ - INTERVAL 1 DAY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-03-20 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '2024-01-15 12:00:00-05'::TIMESTAMPTZ + INTERVAL 1 YEAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-01-15 12:00:00-05"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, year(ts), week(ts), isoyear(ts), dayofweek(ts) FROM (VALUES\n ('2024-01-01 12:00:00-05'::TIMESTAMPTZ), ('2023-01-01 12:00:00-05'), ('2021-01-01 12:00:00-05'),\n ('2020-12-31 12:00:00-05'), ('2019-12-30 12:00:00-05'), ('2016-01-03 12:00:00-05'),\n ('2016-01-04 12:00:00-05'), ('1000-06-15 12:00:00-04:56')) t(ts)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":8,"function_name":"week","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":11,"function_name":"isoyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":13,"function_name":"dayofweek","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":2,"column_names":["ts"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":63,"query_location_length":253,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":98,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-01-01 12:00:00-05"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":100,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2023-01-01 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2021-01-01 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-12-31 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":201,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019-12-30 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":229,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2016-01-03 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":259,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2016-01-04 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":287,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1000-06-15 12:00:00-04:56"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["ts"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select t::TIMESTAMPTZ_NS from tsns;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":14,"catalog":"","schema":"","type_name":"TIMESTAMPTZ_NS","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":4,"schema_name":"","table_name":"tsns","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tsns"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT date_add('2000-01-01 00:00:00+00'::TIMESTAMPTZ, INTERVAL (-2147483648) MONTH);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":77,"function_name":"date_add","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2000-01-01 00:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":28,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2147483648}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*), sum(hash(ts::VARCHAR)) FROM generate_series('1900-01-01 12:00:00+00'::TIMESTAMPTZ, '2100-01-01 12:00:00+00'::TIMESTAMPTZ, INTERVAL 11 DAY) t(ts)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":22,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":17,"function_name":"hash","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":2,"column_names":["ts"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":45,"query_location_length":116,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":85,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1900-01-01 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":87,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":124,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2100-01-01 12:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":139,"query_location_length":15,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":148,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]},"column_name_alias":["ts"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select timezone('America/Phoenix', '12:15:37.123456-08'::TIMETZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"timezone","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"America/Phoenix"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:15:37.123456-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select localtime;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":9,"column_names":["localtime"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '1981-09-27 01:00:00+00'::TIMESTAMPTZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1981-09-27 01:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '2011-12-29 23:59:59+13'::TIMESTAMPTZ + INTERVAL 1 DAY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2011-12-29 23:59:59+13"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":14,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ts, ts + INTERVAL 1 MONTH, ts + INTERVAL 1 YEAR FROM (VALUES\n ('2024-01-31 12:00:00-05'::TIMESTAMPTZ), ('2024-02-29 12:00:00-05'),\n ('2023-03-31 12:00:00-04'), ('2024-05-31 12:00:00-04')) t(ts)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":16,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["ts"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":60,"query_location_length":136,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-01-31 12:00:00-05"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-02-29 12:00:00-05"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2023-03-31 12:00:00-04"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":170,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-05-31 12:00:00-04"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["ts"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT make_timestamptz(-4713, 11, 24, 12, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-4713}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":24}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"UTC"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '2024-03-10 03:30:00-04'::TIMESTAMPTZ::TIMETZ","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-03-10 03:30:00-04"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*),\n count(*) FILTER (WHERE dayname(day) \u003c\u003e 'Sunday'),\n count(DISTINCT month(day))\nFROM transitions('Australia/Sydney');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":48,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":47,"query_location_length":24,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":12,"function_name":"dayname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":3,"column_names":["day"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Sunday"}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":26,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":10,"function_name":"month","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":102,"query_location_length":3,"column_names":["day"]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":113,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"transitions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Australia/Sydney"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*), min(step), max(step), count(*) FILTER (WHERE step \u003c\u003e 3600)\nFROM (SELECT epoch(local - lag(local) OVER (PARTITION BY name, id ORDER BY ts)) AS step FROM converted)\nWHERE step IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":4,"column_names":["step"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":9,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":4,"column_names":["step"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":36,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":62,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["step"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3600}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":81,"query_location_length":98,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"step","query_location":89,"query_location_length":66,"function_name":"epoch","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":5,"column_names":["local"]}},{"name":"","expression":{"class":"WINDOW","type":"WINDOW_LAG","alias":"","query_location":103,"query_location_length":51,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":2,"column_names":["id"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":2,"column_names":["ts"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":5,"column_names":["local"]}}]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":169,"query_location_length":9,"schema_name":"","table_name":"converted","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["converted"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":191,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":186,"query_location_length":4,"column_names":["step"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l FROM tbl ORDER BY l DESC NULLS FIRST LIMIT 5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["l"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM integers ORDER BY i DESC NULLS LAST LIMIT 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s FROM db.strings ORDER BY s NULLS FIRST LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["s"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"db","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT v FROM db.scattered_nulls_VARCHAR ORDER BY v NULLS FIRST LIMIT 1 OFFSET 4096","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["v"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4096}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":26,"schema_name":"db","table_name":"scattered_nulls_VARCHAR","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","scattered_nulls_VARCHAR"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT j, i FROM integers ORDER BY j, i NULLS FIRST LIMIT 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["j"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM final\nORDER BY channel NULLS FIRST,\n i_brand_id NULLS FIRST,\n i_class_id NULLS FIRST,\n i_category_id NULLS FIRST\nLIMIT 100;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":7,"column_names":["channel"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":10,"column_names":["i_brand_id"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":10,"column_names":["i_class_id"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":13,"column_names":["i_category_id"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"final","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["final"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT used_blocks \u003e 1 FROM pragma_database_size()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["used_blocks"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":22,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_database_size","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM original_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"original_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["original_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM t_drop","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"t_drop","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_drop"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i FROM integers WHERE i = 5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM nonexistanttable","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":16,"schema_name":"","table_name":"nonexistanttable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nonexistanttable"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT trigger_name, columns FROM duckdb_triggers() WHERE trigger_name = 'upd_col_trigger';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["trigger_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":7,"column_names":["columns"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":34,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":12,"column_names":["trigger_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"upd_col_trigger"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT trigger_name, table_name FROM duckdb_triggers() WHERE table_name = 't1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["trigger_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["table_name"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":37,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":61,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"t1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT n FROM t_counter;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"t_counter","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_counter"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM other_schema.cross_log;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":22,"schema_name":"other_schema","table_name":"cross_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["other_schema","cross_log"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM t_naming_log;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":12,"schema_name":"","table_name":"t_naming_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_naming_log"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, old_val, new_val FROM t_noop_log;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["old_val"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["new_val"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":10,"schema_name":"","table_name":"t_noop_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_noop_log"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT __duckdb_old_col_0, id FROM t_name;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":18,"column_names":["__duckdb_old_col_0"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":6,"schema_name":"","table_name":"t_name","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_name"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM fail_target;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"fail_target","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fail_target"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM audit_dup_all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":13,"schema_name":"","table_name":"audit_dup_all","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["audit_dup_all"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT row_id, row_val FROM del_audit ORDER BY row_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":6,"column_names":["row_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["row_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["row_val"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":9,"schema_name":"","table_name":"del_audit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["del_audit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM audit2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"audit2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["audit2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM t_chain2_child;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":14,"schema_name":"","table_name":"t_chain2_child","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_chain2_child"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM glog;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"glog","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["glog"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT c FROM leak_cap;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"leak_cap","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["leak_cap"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH d AS (DELETE FROM rowid_expr2 RETURNING rowid + 1 AS rid_plus_one)\nSELECT rid_plus_one FROM d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"d","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":null,"table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"rowid_expr2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_expr2"]}},"using_clauses":[],"returning_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"rid_plus_one","query_location":51,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":5,"column_names":["rowid"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":12,"column_names":["rid_plus_one"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":97,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from pets;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"pets","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pets"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368'::bignum::double = '-1.7976931348623157E+308'::double","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":365,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":327,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":319,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":312,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":321,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":329,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":364,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":338,"query_location_length":26,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1.7976931348623157E+308"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":366,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select a, a \u003e '2147483647'::bignum from bignum_comparisons","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":10,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["a"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2147483647"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[]}}},"try_cast":false}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":18,"schema_name":"","table_name":"bignum_comparisons","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bignum_comparisons"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('1.4' AS BIGNUM);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1.4"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -(1::BIGNUM)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 9223372036854775808::BIGNUM + 1::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":0,"lower":9223372036854775808}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 10000000000000000000::BIGNUM + (-5)::BIGNUM;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":0,"lower":10000000000000000000}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-5}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '-21474836460000000000958214748364600000000009582147483646000000000095821474836459999999999958'::bignum + '-1000'::bignum;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":102,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":95,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-21474836460000000000958214748364600000000009582147483646000000000095821474836459999999999958"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":104,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":120,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":122,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST('.5' AS BIGNUM)::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":".5"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 1::double::bignum","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from integers where a = 1::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '256'::bignum;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"256"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '-0010'::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-0010"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '.'::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"."}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '1000.0.0'::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1000.0.0"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT v::VARCHAR FROM bit_zonemap_values WHERE v \u003e '10101010'::BIT ORDER BY v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":18,"schema_name":"","table_name":"bit_zonemap_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bit_zonemap_values"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":48,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["v"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10101010"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_cast(bitstring('1', 65) as DOUBLE);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":38,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":18,"function_name":"bitstring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":65}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_cast('00001111'::BIT as UHUGEINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"00001111"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST('101' AS BIT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"101"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1011'::BIT | '0001'::BIT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"|","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1011"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0001"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '010101'::BIT \u003c\u003c 50","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"010101"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":50}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT octet_length('10101111111010100111010'::BIT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"octet_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":25,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10101111111010100111010"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT set_bit(b, 3, 0) FROM bits","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"set_bit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["b"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"bits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bits"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT v::BIT FROM valid;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":5,"schema_name":"","table_name":"valid","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["valid"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'a'::BYTEA::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":5,"catalog":"","schema":"","type_name":"BYTEA","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::bigint::BYTEA","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":7,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":5,"catalog":"","schema":"","type_name":"BYTEA","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT R.b, SUM(R.g) FROM blobs as L, blobs2 AS R WHERE L.b=R.b GROUP BY R.b ORDER BY R.b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":3,"column_names":["R","b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["R","b"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":3,"column_names":["R","g"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":21,"query_location_length":28,"left":{"type":"BASE_TABLE","alias":"L","sample":null,"query_location":26,"query_location_length":10,"schema_name":"","table_name":"blobs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["blobs"]}},"right":{"type":"BASE_TABLE","alias":"R","sample":null,"query_location":38,"query_location_length":11,"schema_name":"","table_name":"blobs2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["blobs2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":56,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["L","b"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":3,"column_names":["R","b"]}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":3,"column_names":["R","b"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '\\\\xx2'::BLOB","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\\\xx2"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '290309-01-01 (BC)'::date::timestamp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"290309-01-01 (BC)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '290309-12-22 (BC)'::date - interval '1147483647 days 9223372036854775807 microseconds'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"290309-12-22 (BC)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":59,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":50,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1147483647 days 9223372036854775807 microseconds"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '5881580-07-10'::date - 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5881580-07-10"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '294247-01-10'::date + interval '2147483647 days 9223372036854775807 microseconds'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-10"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":59,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":50,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2147483647 days 9223372036854775807 microseconds"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1970-01-01'::DATE::VARCHAR == '1970-01-01'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":43,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1970-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1970-01-01"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('2020-01-01 12:34:56' AS DATE)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":44,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-01-01 12:34:56"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1993-05-32'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1993-05-32"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1993-11-31'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1993-11-31"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1992-05-32'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-05-32"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1992-11-31'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-11-31"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 'hello'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '10000000000-01-01'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10000000000-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('1111-11' as date)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1111-11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('-infinity' as date);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":29,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-infinity"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT year(i) FROM dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i % 3 FROM dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 127::DECIMAL(3,0)::TINYINT, -127::DECIMAL(3,0)::TINYINT, -7::DECIMAL(9,1)::TINYINT, 27::DECIMAL(18,1)::TINYINT, 33::DECIMAL(38,1)::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":127}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":27,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":127}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":25,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":80,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":66,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":82,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":93,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":27}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":110,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":136,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":121,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":33}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":123,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":138,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 127::DECIMAL(3,0)::BIGINT, -9223372036854775807::DECIMAL(19,0)::BIGINT, -7::DECIMAL(9,1)::BIGINT, 27::DECIMAL(18,1)::BIGINT, 33::DECIMAL(38,1)::BIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":127}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":43,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":9223372036854775807}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":19}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":24,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":81,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":122,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":107,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":27}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":109,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":124,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":149,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":134,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":33}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":136,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":151,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100::SMALLINT::DECIMAL(18,3), 100::SMALLINT::DECIMAL(3,0), (-100)::SMALLINT::DECIMAL(3,0), 0::SMALLINT::DECIMAL(3,3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":15,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":109,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":99,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":101,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":111,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":121,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1::INTEGER::DECIMAL(3,3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100::BIGINT::DECIMAL(9,7)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 17014118346046923173168730371588410572::HUGEINT::DECIMAL(37,0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":15,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":38,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":922337203685477580,"lower":14757395258967641292}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":37}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100::FLOAT::DECIMAL(18,17)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":16,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":17}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 10000000::DOUBLE::DECIMAL(3,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FIRST(NULL::DECIMAL),\n FIRST('0.1'::DECIMAL(4,1))::VARCHAR,\n FIRST('4938245.1'::DECIMAL(9,1))::VARCHAR,\n FIRST('45672564564938245.1'::DECIMAL(18,1))::VARCHAR,\n FIRST('4567645908450368043562342564564938245.1'::DECIMAL(38,1))::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":26,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":112,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":32,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4938245.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":114,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":173,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":130,"query_location_length":43,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":157,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"45672564564938245.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":159,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":170,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":175,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":254,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":191,"query_location_length":63,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":238,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":197,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4567645908450368043562342564564938245.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":240,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":248,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":251,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":256,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ('0.54321543215432154321543215432154321'::DECIMAL(35,35) + 10000)::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":39,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.54321543215432154321543215432154321"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":35}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":35}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '-5.0'::DECIMAL(4,3) * '5.0'::DECIMAL(4,3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-5.0"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5.0"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT decimal_average(v) FROM prices_with_null;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"decimal_average","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":16,"schema_name":"","table_name":"prices_with_null","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["prices_with_null"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(decimal_average(v)) FROM high_scale_int128;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":18,"function_name":"decimal_average","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["v"]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":17,"schema_name":"","table_name":"high_scale_int128","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["high_scale_int128"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 10.00::DECIMAL(4,2)::DECIMAL(2,1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":2}},"is_null":false,"value":1000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1.0::DECIMAL(38,1)::DECIMAL(1,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT decimal_division(100000.00000::DECIMAL(15,5), 8.000::DECIMAL(12,3));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"decimal_division","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":12,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":11,"scale":5}},"is_null":false,"value":10000000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":15}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":3}},"is_null":false,"value":8000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT decimal_division(1.0::DECIMAL(4,1), 3.0::DECIMAL(4,1), -1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"decimal_division","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":30}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select cast(9.9999999999999999999999999999999 as decimal(1,0));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":55,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":33,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":32,"scale":31}},"is_null":false,"value":{"upper":5421010862427,"lower":9632337040368467967}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1e9'::DECIMAL(9,0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1e9"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '5.5e-11'::DECIMAL(18,4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5.5e-11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '5e-5'::DECIMAL(18,4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5e-5"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select (-50000000000000000.0::DECIMAL(18,1)-50000000000000000.0::DECIMAL(18,1));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":35,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":19,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":18,"scale":1}},"is_null":false,"value":500000000000000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":19,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":18,"scale":1}},"is_null":false,"value":500000000000000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -1000000000000000.0-d FROM decimals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":17,"scale":1}},"is_null":false,"value":-10000000000000000}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":8,"schema_name":"","table_name":"decimals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["decimals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('100' AS DECIMAL(2,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"100"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(1000000000::DECIMAL(10,0) AS DECIMAL(2,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":51,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1000000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST(10000000000 AS DECIMAL(10,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":34,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":11,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":10000000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT CAST('100000000000000000000'::DOUBLE AS DECIMAL(20,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":54,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"100000000000000000000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ' 7 '::DECIMAL::VARCHAR, '9.'::DECIMAL::VARCHAR, '.1'::DECIMAL::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" 7 "}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"9."}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":".1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '123456789'::DECIMAL(9,0)::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"123456789"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '0.1'::DECIMAL(1, 2, 3);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":16,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '+1234.56789e-1'::DECIMAL(38,0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":16,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"+1234.56789e-1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM decimals WHERE d \u003e '0.1'::DECIMAL(9,1) ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"decimals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["decimals"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["d"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT FLOOR('-999.9'::DECIMAL(4,1)), FLOOR('-99999999.9'::DECIMAL(9,1)), FLOOR('-99999999999999999.9'::DECIMAL(18,1)), FLOOR('-9999999999999999999999999999999999999.9'::DECIMAL(38,1))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-999.9"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":34,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-99999999.9"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":44,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":102,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-99999999999999999.9"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":104,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":120,"query_location_length":64,"function_name":"floor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":168,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-9999999999999999999999999999999999999.9"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":170,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":38}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(ROUND(999.9::DECIMAL(4,1), -3)),\n ROUND(999.9::DECIMAL(4,1), -3),\n ROUND(499.9::DECIMAL(4,1), -3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":30,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":1}},"is_null":false,"value":9999}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-3}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":30,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":1}},"is_null":false,"value":9999}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-3}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":30,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":104,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":5,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":4,"scale":1}},"is_null":false,"value":4999}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":106,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-3}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT '1.0'::DECIMAL(2,1));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":28,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1.0"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 1.25::FLOAT::DECIMAL, 1.25::FLOAT::DECIMAL()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":125}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":125}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":9,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from a where b in ('sad','woof', NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":27,"query_location_length":20,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"sad"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"woof"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select {'a': 'happy'::mood};","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"happy"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"mood","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select name from albums where year_release::INT \u003e 2010","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":6,"schema_name":"","table_name":"albums","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["albums"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":30,"query_location_length":24,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":12,"column_names":["year_release"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2010}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT person.current_mood\nFROM person\nUNION ALL\nSELECT pet.current_mood\nFROM pet","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":19,"column_names":["person","current_mood"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":6,"schema_name":"","table_name":"person","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["person"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":16,"column_names":["pet","current_mood"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":78,"query_location_length":3,"schema_name":"","table_name":"pet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} -{"sql":"SELECT regexp_matches(person_mood, '.*a.*') FROM person_pet_den","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":11,"column_names":["person_mood"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":".*a.*"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":14,"schema_name":"","table_name":"person_pet_den","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["person_pet_den"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from person where current_mood = last_year_mood","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"person","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["person"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":27,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":12,"column_names":["current_mood"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":14,"column_names":["last_year_mood"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from tbl_temp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"tbl_temp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_temp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select count(*) from t1, t2 where t1.date = t2.b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":11,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":34,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":7,"column_names":["t1","date"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":4,"column_names":["t2","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM floats","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"floats","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["floats"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select sum(d) from floats_doubles where d \u003e 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["d"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":14,"schema_name":"","table_name":"floats_doubles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["floats_doubles"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":40,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["d"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT f FROM floats ORDER BY f NULLS LAST LIMIT 4","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["f"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["f"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"floats","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["floats"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(['nan'::double])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"nan"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ' POINT(1 2)'::GEOMETRY::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" POINT(1 2)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select id, g from t_all_types where id = 29;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["g"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":11,"schema_name":"","table_name":"t_all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_all_types"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":36,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":29}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT stats(vertex_extract(ST_GeomFromWKB(wkb), 'x')) FROM lines_wkb LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":40,"function_name":"vertex_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":19,"function_name":"st_geomfromwkb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["wkb"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":9,"schema_name":"","table_name":"lines_wkb","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lines_wkb"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT vertex_extract(ST_GeomFromWKB(wkb), 'z') FROM ewkb_point_z;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"vertex_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":19,"function_name":"st_geomfromwkb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":3,"column_names":["wkb"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"z"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":12,"schema_name":"","table_name":"ewkb_point_z","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ewkb_point_z"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 'ä POINT(0 1)'::GEOMETRY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":15,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"ä POINT(0 1)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select g, id from t1 where id \u003c 10 order by id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":27,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM t WHERE g::VARCHAR = 'POINT (0 1)';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":26,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["g"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"POINT (0 1)"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ('POINT(1 2)'::GEOMETRY).z, ('POINT(1 2)'::GEOMETRY).m","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":26,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"POINT(1 2)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"z"}}]},{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":35,"query_location_length":26,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"POINT(1 2)"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"m"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT stats(geom.y) FROM pts LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":6,"column_names":["geom","y"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":3,"schema_name":"","table_name":"pts","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pts"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select id, st_geomfromwkb(('\\x' || regexp_replace(g, '(.{2})', '\\1\\\\x', 'g')[:-3])::BLOB) FROM values\n(1, '0101000000000000000000f03f0000000000000040'),\n(2, '01e9030000000000000000f03f00000000000000400000000000000840'),\n(3, '01d1070000000000000000f03f00000000000000400000000000001040'),\n(4, '01b90b0000000000000000f03f000000000000004000000000000008400000000000001040'),\n(5, '010200000002000000000000000000f03f000000000000004000000000000008400000000000001040'),\n(6, '01ea03000002000000000000000000f03f00000000000000400000000000000840000000000000104000000000000014400000000000001840'),\n(7, '01d207000002000000000000000000f03f00000000000000400000000000001040000000000000104000000000000014400000000000001c40'),\n(8, '01ba0b000002000000000000000000f03f0000000000000040000000000000084000000000000010400000000000001040000000000000144000000000000018400000000000001c40'),\n(9, '01030000000100000004000000000000000000f03f00000000000000400000000000000840000000000000104000000000000014400000000000001840000000000000f03f0000000000000040'),\n(10,'01eb0300000100000004000000000000000000f03f00000000000000400000000000000840000000000000084000000000000010400000000000001440000000000000144000000000000018400000000000001c40000000000000f03f00000000000000400000000000000840'),\n(11,'01d30700000100000004000000000000000000f03f00000000000000400000000000001040000000000000084000000000000010400000000000001840000000000000144000000000000018400000000000002040000000000000f03f00000000000000400000000000001040'),\n(12,'01bb0b00000100000004000000000000000000f03f0000000000000040000000000000084000000000000010400000000000000840000000000000104000000000000014400000000000001840000000000000144000000000000018400000000000001c400000000000002040000000000000f03f000000000000004000000000000008400000000000001040'),\n(13,'0104000000030000000101000000000000000000f03f0000000000000040010100000000000000000008400000000000001040010100000000000000000014400000000000001840'),\n(14,'01ec0300000300000001e9030000000000000000f03f0000000000000040000000000000084001e903000000000000000008400000000000001040000000000000144001e9030000000000000000144000000000000018400000000000001c40'),\n(15,'01d40700000300000001d1070000000000000000f03f0000000000000040000000000000104001d107000000000000000008400000000000001040000000000000184001d1070000000000000000144000000000000018400000000000002040'),\n(16,'01bc0b00000300000001b90b0000000000000000f03f00000000000000400000000000000840000000000000104001b90b0000000000000000084000000000000010400000000000001440000000000000184001b90b0000000000000000144000000000000018400000000000001c400000000000002040'),\n(17,'010500000002000000010200000002000000000000000000f03f000000000000004000000000000008400000000000001040010200000002000000000000000000144000000000000018400000000000001c400000000000002040'),\n(18,'01ed0300000200000001ea03000002000000000000000000f03f0000000000000040000000000000084000000000000008400000000000001040000000000000144001ea03000002000000000000000000144000000000000018400000000000001c400000000000001c4000000000000020400000000000002240'),\n(19,'01d50700000200000001d207000002000000000000000000f03f0000000000000040000000000000104000000000000008400000000000001040000000000000184001d2070000020000000000000000001440000000000000184000000000000020400000000000001c4000000000000020400000000000002440'),\n(20,'01bd0b00000200000001ba0b000002000000000000000000f03f000000000000004000000000000008400000000000001040000000000000084000000000000010400000000000001440000000000000184001ba0b000002000000000000000000144000000000000018400000000000001c4000000000000020400000000000001c40000000000000204000000000000022400000000000002440'),\n(21,'01060000000200000001030000000100000004000000000000000000f03f00000000000000400000000000000840000000000000104000000000000014400000000000001840000000000000f03f0000000000000040010300000001000000040000000000000000001c40000000000000204000000000000022400000000000002440000000000000264000000000000028400000000000001c400000000000002040'),\n(22,'01ee0300000200000001eb0300000100000004000000000000000000f03f00000000000000400000000000000840000000000000084000000000000010400000000000001440000000000000144000000000000018400000000000001c40000000000000f03f0000000000000040000000000000084001eb03000001000000040000000000000000001c4000000000000020400000000000002240000000000000224000000000000024400000000000002640000000000000264000000000000028400000000000002a400000000000001c4000000000000020400000000000002240'),\n(23,'01d60700000200000001d30700000100000004000000000000000000f03f00000000000000400000000000001040000000000000084000000000000010400000000000001840000000000000144000000000000018400000000000002040000000000000f03f0000000000000040000000000000104001d307000001000000040000000000000000001c4000000000000020400000000000002440000000000000224000000000000024400000000000002840000000000000264000000000000028400000000000002c400000000000001c4000000000000020400000000000002440'),\n(24,'01be0b00000200000001bb0b00000100000004000000000000000000f03f0000000000000040000000000000084000000000000010400000000000000840000000000000104000000000000014400000000000001840000000000000144000000000000018400000000000001c400000000000002040000000000000f03f00000000000000400000000000000840000000000000104001bb0b000001000000040000000000000000001c400000000000002040000000000000224000000000000024400000000000002240000000000000244000000000000026400000000000002840000000000000264000000000000028400000000000002a400000000000002c400000000000001c40000000000000204000000000000022400000000000002440'),\n(25,'0107000000020000000101000000000000000000f03f00000000000000400102000000020000000000000000000840000000000000104000000000000014400000000000001840'),\n(26,'01ef0300000200000001e9030000000000000000f03f0000000000000040000000000000084001ea03000002000000000000000000084000000000000010400000000000001440000000000000144000000000000018400000000000001c40'),\n(27,'01d70700000200000001d1070000000000000000f03f0000000000000040000000000000104001d207000002000000000000000000084000000000000010400000000000001840000000000000144000000000000018400000000000002040'),\n(28,'01bf0b00000200000001b90b0000000000000000f03f00000000000000400000000000000840000000000000104001ba0b0000020000000000000000000840000000000000104000000000000014400000000000001840000000000000144000000000000018400000000000001c400000000000002040')\n\tas t(id, g) order by id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":6263,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":78,"function_name":"st_geomfromwkb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":82,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":54,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\x"}}},{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":76,"query_location_length":5,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":41,"function_name":"regexp_replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["g"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"(.{2})"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\\1\\\\x"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"g"}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-3}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":84,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":95,"query_location_length":6158,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":44,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0101000000000000000000f03f0000000000000040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":60,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01e9030000000000000000f03f00000000000000400000000000000840"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":224,"query_location_length":60,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d1070000000000000000f03f00000000000000400000000000001040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":288,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":291,"query_location_length":76,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01b90b0000000000000000f03f000000000000004000000000000008400000000000001040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":371,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":374,"query_location_length":84,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"010200000002000000000000000000f03f000000000000004000000000000008400000000000001040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":462,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":465,"query_location_length":116,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01ea03000002000000000000000000f03f00000000000000400000000000000840000000000000104000000000000014400000000000001840"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":585,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":588,"query_location_length":116,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d207000002000000000000000000f03f00000000000000400000000000001040000000000000104000000000000014400000000000001c40"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":708,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":711,"query_location_length":148,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01ba0b000002000000000000000000f03f0000000000000040000000000000084000000000000010400000000000001040000000000000144000000000000018400000000000001c40"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":863,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":866,"query_location_length":156,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01030000000100000004000000000000000000f03f00000000000000400000000000000840000000000000104000000000000014400000000000001840000000000000f03f0000000000000040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1026,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1029,"query_location_length":220,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01eb0300000100000004000000000000000000f03f00000000000000400000000000000840000000000000084000000000000010400000000000001440000000000000144000000000000018400000000000001c40000000000000f03f00000000000000400000000000000840"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1253,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1256,"query_location_length":220,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d30700000100000004000000000000000000f03f00000000000000400000000000001040000000000000084000000000000010400000000000001840000000000000144000000000000018400000000000002040000000000000f03f00000000000000400000000000001040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1480,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1483,"query_location_length":284,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01bb0b00000100000004000000000000000000f03f0000000000000040000000000000084000000000000010400000000000000840000000000000104000000000000014400000000000001840000000000000144000000000000018400000000000001c400000000000002040000000000000f03f000000000000004000000000000008400000000000001040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1771,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":13}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1774,"query_location_length":146,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0104000000030000000101000000000000000000f03f0000000000000040010100000000000000000008400000000000001040010100000000000000000014400000000000001840"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1924,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":14}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1927,"query_location_length":194,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01ec0300000300000001e9030000000000000000f03f0000000000000040000000000000084001e903000000000000000008400000000000001040000000000000144001e9030000000000000000144000000000000018400000000000001c40"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2125,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":15}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2128,"query_location_length":194,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d40700000300000001d1070000000000000000f03f0000000000000040000000000000104001d107000000000000000008400000000000001040000000000000184001d1070000000000000000144000000000000018400000000000002040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2326,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":16}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2329,"query_location_length":242,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01bc0b00000300000001b90b0000000000000000f03f00000000000000400000000000000840000000000000104001b90b0000000000000000084000000000000010400000000000001440000000000000184001b90b0000000000000000144000000000000018400000000000001c400000000000002040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2575,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":17}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2578,"query_location_length":184,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"010500000002000000010200000002000000000000000000f03f000000000000004000000000000008400000000000001040010200000002000000000000000000144000000000000018400000000000001c400000000000002040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2766,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":2769,"query_location_length":248,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01ed0300000200000001ea03000002000000000000000000f03f0000000000000040000000000000084000000000000008400000000000001040000000000000144001ea03000002000000000000000000144000000000000018400000000000001c400000000000001c4000000000000020400000000000002240"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3021,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":19}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3024,"query_location_length":248,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d50700000200000001d207000002000000000000000000f03f0000000000000040000000000000104000000000000008400000000000001040000000000000184001d2070000020000000000000000001440000000000000184000000000000020400000000000001c4000000000000020400000000000002440"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3276,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3279,"query_location_length":312,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01bd0b00000200000001ba0b000002000000000000000000f03f000000000000004000000000000008400000000000001040000000000000084000000000000010400000000000001440000000000000184001ba0b000002000000000000000000144000000000000018400000000000001c4000000000000020400000000000001c40000000000000204000000000000022400000000000002440"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3595,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":21}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3598,"query_location_length":328,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01060000000200000001030000000100000004000000000000000000f03f00000000000000400000000000000840000000000000104000000000000014400000000000001840000000000000f03f0000000000000040010300000001000000040000000000000000001c40000000000000204000000000000022400000000000002440000000000000264000000000000028400000000000001c400000000000002040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3930,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":22}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":3933,"query_location_length":456,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01ee0300000200000001eb0300000100000004000000000000000000f03f00000000000000400000000000000840000000000000084000000000000010400000000000001440000000000000144000000000000018400000000000001c40000000000000f03f0000000000000040000000000000084001eb03000001000000040000000000000000001c4000000000000020400000000000002240000000000000224000000000000024400000000000002640000000000000264000000000000028400000000000002a400000000000001c4000000000000020400000000000002240"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":4393,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":23}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":4396,"query_location_length":456,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d60700000200000001d30700000100000004000000000000000000f03f00000000000000400000000000001040000000000000084000000000000010400000000000001840000000000000144000000000000018400000000000002040000000000000f03f0000000000000040000000000000104001d307000001000000040000000000000000001c4000000000000020400000000000002440000000000000224000000000000024400000000000002840000000000000264000000000000028400000000000002c400000000000001c4000000000000020400000000000002440"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":4856,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":24}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":4859,"query_location_length":584,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01be0b00000200000001bb0b00000100000004000000000000000000f03f0000000000000040000000000000084000000000000010400000000000000840000000000000104000000000000014400000000000001840000000000000144000000000000018400000000000001c400000000000002040000000000000f03f00000000000000400000000000000840000000000000104001bb0b000001000000040000000000000000001c400000000000002040000000000000224000000000000024400000000000002240000000000000244000000000000026400000000000002840000000000000264000000000000028400000000000002a400000000000002c400000000000001c40000000000000204000000000000022400000000000002440"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5447,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":25}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5450,"query_location_length":144,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0107000000020000000101000000000000000000f03f00000000000000400102000000020000000000000000000840000000000000104000000000000014400000000000001840"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5598,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":26}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5601,"query_location_length":192,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01ef0300000200000001e9030000000000000000f03f0000000000000040000000000000084001ea03000002000000000000000000084000000000000010400000000000001440000000000000144000000000000018400000000000001c40"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5797,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":27}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5800,"query_location_length":192,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01d70700000200000001d1070000000000000000f03f0000000000000040000000000000104001d207000002000000000000000000084000000000000010400000000000001840000000000000144000000000000018400000000000002040"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5996,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":28}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":5999,"query_location_length":240,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"01bf0b00000200000001b90b0000000000000000f03f00000000000000400000000000000840000000000000104001ba0b0000020000000000000000000840000000000000104000000000000014400000000000001840000000000000144000000000000018400000000000001c400000000000002040"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","g"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 4642275147320176030871715840::HUGEINT * 251658240::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":251658240,"lower":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":9,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":251658240}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 19807040628566084398385987584::HUGEINT*8589934592::HUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":29,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":1073741824,"lower":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":10,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":8589934592}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(170141183460469231731687303715884105727) FROM range(10);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":39,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":9223372036854775807,"lower":18446744073709551615}}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":9,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST('170141183460469231731687303715884105728'::DOUBLE AS HUGEINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":70,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"170141183460469231731687303715884105728"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '100000000000000000000'::HUGEINT + '100000000000000000000'::HUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"100000000000000000000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"100000000000000000000"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '-170141183460469231731687303715884105728'::HUGEINT - '170141183460469231731687303715884105727'::HUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-170141183460469231731687303715884105728"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":102,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"170141183460469231731687303715884105727"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":104,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100::HUGEINT % 20::HUGEINT, 90::HUGEINT % 20::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":25,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":90}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":20}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -1 + '-170141183460469231731687303715884105727'::HUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":42,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-170141183460469231731687303715884105727"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 170141183460469231731687303715884105727 - 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":39,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":9223372036854775807,"lower":18446744073709551615}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -170141183460469231731687303715884105728 * 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":40,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":-9223372036854775808,"lower":0}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 170141183460469231731687303715884105727 // 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":39,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":9223372036854775807,"lower":18446744073709551615}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -170141183460469231731687303715884105728 % 170141183460469231731687303715884105727;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":40,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":-9223372036854775808,"lower":0}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":39,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":9223372036854775807,"lower":18446744073709551615}}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 27::HUGEINT \u003c\u003c 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":27}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 27::HUGEINT \u003e\u003e -1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"\u003e\u003e","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":27}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 1::HUGEINT | 2::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"|","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '-7'::HUGEINT, '-130'::HUGEINT, '-924829852'::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-7"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-130"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-924829852"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (-42)::HUGEINT::TINYINT, (-42)::HUGEINT::SMALLINT, (-42)::HUGEINT::INTEGER, (-42)::HUGEINT::BIGINT, (-42)::HUGEINT::FLOAT, (-42)::HUGEINT::DOUBLE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":121,"query_location_length":7,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":112,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":114,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":123,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":144,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":135,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":137,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":146,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 2147483647::HUGEINT::INTEGER, -2147483647::HUGEINT::INTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2147483647}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":29,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":10,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2147483647}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '1.1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e5'::hugeint;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":302,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":295,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1.1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e5"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":304,"query_location_length":7,"catalog":"","schema":"","type_name":"hugeint","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT h1.h) FROM hugeints h1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":13,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":4,"column_names":["h1","h"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"h1","sample":null,"query_location":26,"query_location_length":11,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select interval '0.00005 MILLENNIUM';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":29,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.00005 MILLENNIUM"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select interval '0.0000000005 DAY';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0.0000000005 DAY"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT alias('5 days'::INTERVAL DAY TO SECOND);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"alias","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5 days"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":22,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT interval 2 minutes, interval 2 minute;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"to_minutes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":17,"function_name":"to_minutes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT interval 3 century, interval 3 centuries;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"to_centuries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":20,"function_name":"to_centuries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '1.5' SECOND;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1.5"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '-1.5' SECOND;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1.5"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '1.5 SECOND'::INTERVAL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1.5 SECOND"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '-1.5 MILLISECOND'::INTERVAL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":18,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1.5 MILLISECOND"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT cast(' ' as interval)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" "}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_cast(NULL as interval)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":26,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '2 yr 1 mon 1 min 3 sec 20 msec 16 usec';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":49,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":40,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2 yr 1 mon 1 min 3 sec 20 msec 16 usec"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ('35:10:00'::interval);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"35:10:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '90' MINUTE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"to_minutes","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"90"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL 'years';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"years"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '100000000000000000000msecs';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":28,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"100000000000000000000msecs"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '2147483647 months 2147483647 days 9223372036854775msecs';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":66,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":57,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2147483647 months 2147483647 days 9223372036854775msecs"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DATE '1992-03-01' + INTERVAL '0' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-03-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"0"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DATE '1992-03-01' + INTERVAL '6' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-03-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"6"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DATE '1992-03-01' + INTERVAL '12' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1992-03-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":19,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TIME '10:00:00' - INTERVAL '5' SECOND","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"10:00:00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":19,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"5"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '12:15:37.123456-08'::TIMETZ - INTERVAL '22 HOUR';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:15:37.123456-08"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"22 HOUR"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT INTERVAL '30' DAY = INTERVAL '1' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":38,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"30"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select interval '-1 month' + interval '4 days' = interval '-26 days';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":61,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-1 month"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4 days"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"-26 days"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT case when i%2=0 then [i] else [-i] end from range(5) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":38,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":17,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}]}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]}}]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":51,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL = [1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":10,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL \u003e [1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":10,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [1] \u003e= [1, 2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":13,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [] \u003c= [1, 2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [] \u003e= [1, 2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l \u003e= r FROM list_int_empty","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":14,"schema_name":"","table_name":"list_int_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int_empty"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL = ['duck']","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":15,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL \u003e ['duck']","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":15,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [{'x': 'duck', 'y': 1}] \u003c= [{'x': 'duck', 'y': 1}, {'x': 'goose', 'y': 2}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":74,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":47,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":64,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [{'x': 'duck', 'y': 1}] \u003e= [{'x': 'duck', 'y': 1}, {'x': 'goose', 'y': 2}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":74,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":47,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":64,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":78,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l \u003e= r FROM list_of_struct","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":14,"schema_name":"","table_name":"list_of_struct","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_of_struct"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select concat([42]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '' = concat(NULL, NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":23,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":""}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":18,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM v3 v, v3 w WHERE v.a \u003c\u003e w.a ORDER BY v.a, w.a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":3,"column_names":["v","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["w","a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"v","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"v3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v3"]}},"right":{"type":"BASE_TABLE","alias":"w","sample":null,"query_location":20,"query_location_length":4,"schema_name":"","table_name":"v3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v3"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":31,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["v","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":3,"column_names":["w","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [1] IS NOT DISTINCT FROM [1, 2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":31,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l IS NOT DISTINCT FROM r FROM list_int_empty","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":14,"schema_name":"","table_name":"list_int_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int_empty"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [{'x': 'duck', 'y': 1}] IS NOT DISTINCT FROM [{'x': 'duck', 'y': 1}, {'x': 'goose', 'y': 2}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":92,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":47,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":59,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":82,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":96,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select string_split(string_agg(NULL, ','), ',')[100] from range(10);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":47,"query_location_length":5,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":21,"function_name":"string_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":","}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":58,"query_location_length":9,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_extract(l, 1) FROM test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(l) FROM a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["l"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT STATS([interval 1 year, interval 2 year])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":34,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":15,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select [100::USMALLINT, 10000.5];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":7,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":6,"scale":1}},"is_null":false,"value":100005}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM a WHERE b[1][1]=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":9,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":26,"query_location_length":3,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":23,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, b[0:0] FROM a ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":12,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST([[1, 2, 3], [4, 5]], recursive := true) AS a, UNNEST([1, 2, 3]) AS b ORDER BY a NULLS LAST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":7,"query_location_length":46,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}}]}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":48,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":60,"query_location_length":17,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT unnest([[1, 2], [3, 4]]::int[][], recursive:=true)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}]}}},"try_cast":false}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":52,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, UNNEST(i), UNNEST(j) FROM (VALUES (1, [{'a': [1, 2], 'b': NULL}, {'a': NULL, 'b': 'hello'}], [[1, 2, 3], [4, 5]]), (2, NULL, [[11, 12], NULL]), (3, [{'a': [NULL, 4, 5], 'b': 'test the best unnest fest'}, NULL, {'a': [6, 7, NULL, 9], 'b': 'abcd'}], [NULL])) tbl(id, i, j)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":37,"query_location_length":230,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":53,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":56,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":69,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":82,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":93,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":104,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":105,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":116,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}}]}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":136,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":156,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":159,"query_location_length":98,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":160,"query_location_length":53,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":166,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":176,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":185,"query_location_length":27,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test the best unnest fest"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":215,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":221,"query_location_length":35,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":227,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":228,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":231,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":234,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":240,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}}]}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":249,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abcd"}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":259,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":260,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","i","j"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT unnest(string_split(tags, '\u003e')) AS tag, count(*)\nFROM grouped_unnest_strings\nGROUP BY unnest(string_split(tags, '\u003e'))\nORDER BY tag","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["tag"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"tag","query_location":7,"query_location_length":31,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":23,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":4,"column_names":["tags"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\u003e"}}}]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":22,"schema_name":"","table_name":"grouped_unnest_strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["grouped_unnest_strings"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":93,"query_location_length":31,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":23,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":4,"column_names":["tags"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"\u003e"}}}]}}]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT coalesce(unnest([1, 2]), 0) AS tag, count(*)\nFROM range(1)\nGROUP BY tag\nORDER BY tag","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":3,"column_names":["tag"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"tag","query_location":7,"query_location_length":27,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":14,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":57,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":3,"column_names":["tag"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH t AS (\n\tSELECT 1 AS r, ARRAY[1, 2, 3] AS a\n\tUNION SELECT 2 AS r, ARRAY[4] AS a\n\tUNION SELECT 3 AS r, NULL AS a)\nSELECT r, a, UNNEST(a) AS n\nFROM t\nORDER BY r, n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":1,"column_names":["r"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":1,"column_names":["n"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":false,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"a","query_location":28,"query_location_length":14,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"a","query_location":70,"query_location_length":8,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"r","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":106,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"n","query_location":130,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":150,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i FROM UNNEST(NULL::INT[]) AS tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":14,"query_location_length":29,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT b FROM (SELECT ARRAY[1,2,3] AS x), UNNEST(x) t(b);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":47,"left":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"x","query_location":22,"query_location_length":12,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":42,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["x"]}}]},"column_name_alias":["b"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(MAP(['a'], ['x']) AS MAP(VARCHAR, INTEGER))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":52,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":17,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAP(keys, values) FROM MAP_input;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":4,"column_names":["keys"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":6,"column_names":["values"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":9,"schema_name":"","table_name":"MAP_input","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["MAP_input"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map(NULL, [1,2,3]) IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":26,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM UNNEST(array_value(1, 2, 3))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":28,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":20,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [[1, 2, 3], [4, 5, 6, 7]]::INT[3][2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":3}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":2}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(l AS INT[3]) FROM unreferenced_bad_child WHERE i = 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":21,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["l"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":22,"schema_name":"","table_name":"unreferenced_bad_child","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unreferenced_bad_child"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t1 JOIN t2 USING (i) ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":17,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["i"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM tbl1 OFFSET 1 LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT a::VARCHAR FROM arrays ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":6,"schema_name":"","table_name":"arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arrays"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t1 ORDER BY c DESC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["c"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT min(a) FROM arrays","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":6,"schema_name":"","table_name":"arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arrays"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST('[NULL, [1], [abc]]' as INTEGER[1][3])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":47,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":20,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"[NULL, [1], [abc]]"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":1}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":3}}]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT DISTINCT * FROM t6;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":16,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":2,"schema_name":"","table_name":"t6","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t6"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 4\u003eALL([1, 2, 3, NULL]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":22,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},"comparison_type":"COMPARE_LESSTHANOREQUALTO"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ARRAY[1,2], ARRAY[NULL], ARRAY['hello', 'world'], ARRAY[]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":7,"query_location_length":10,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":19,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":32,"query_location_length":23,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"world"}}]},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":57,"query_location_length":7,"children":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(UNNEST(ARRAY[[1, 2], [3, 4]]::VARCHAR[][]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":42,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":13,"child":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":21,"query_location_length":21,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_aggr(list(i)::varchar[], 'string_agg', '|') FROM range(1, 4) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"string_agg"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"|"}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":61,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select min(i), max(i) from list_int;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"list_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST((SELECT [1, 2]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":14,"query_location_length":15,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LIST_ELEMENT(LIST_VALUE(42), 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"list_element","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LIST_EXTRACT(LIST_VALUE(42), 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LIST_EXTRACT(LIST_VALUE(42::UHUGEINT), 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_extract(a, 2) FROM list_array_table;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":16,"schema_name":"","table_name":"list_array_table","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_array_table"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT list_reduce(str1, lambda a, b: a) FROM many_structs_data;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"list_reduce","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":4,"column_names":["str1"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":25,"query_location_length":14,"lhs":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["b"]}}]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["a"]},"syntax_type":"LAMBDA_KEYWORD"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":17,"schema_name":"","table_name":"many_structs_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["many_structs_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT LIST_VALUE(42)[1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":21,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s[1:2] FROM lists","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT n[off:NULL+off] FROM lists, nulltable","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":3,"column_names":["off"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["off"]}}]}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":21,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":9,"schema_name":"","table_name":"nulltable","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nulltable"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s[(-2147483646-1):-2147483647] FROM lists","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":29,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2147483646}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":11,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-2147483647}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select a[start:-:step] from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":5,"column_names":["start"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"LIST","type_info":{"type":"LIST_TYPE_INFO","alias":"","extension_info":null,"child_type":{"id":"INTEGER","type_info":null}}},"is_null":false,"value":{"children":[]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["step"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ([1,2,3,4,5])[-9223372036854775808 + 1:9223372036854775807 - 1:-1];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":53,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":20,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":-9223372036854775808}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":9223372036854775807}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ([1,2,3,4,5])[-1:3];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":6,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ([1,2,3,4,5])[-4:-1:2];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":9,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ([1,2,3,4,5])[1:[NULL]:2];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":12,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(l1), l2 FROM (SELECT LIST(a) l1 FROM (VALUES (1), (2), (3)) AS t1 (a)) t1, \t(SELECT LIST(b) l2 FROM (VALUES (4), (5), (6), (7)) AS t2 (b)) t2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":2,"column_names":["l1"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":2,"column_names":["l2"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":22,"query_location_length":133,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":27,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l1","query_location":35,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":51,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":90,"query_location_length":62,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l2","query_location":98,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":114,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":133,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(LIST(42))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":8,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT SUM(UNNEST(le)) FROM ( SELECT g, LIST(e) le from list_data GROUP BY g ORDER BY g) xx","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":10,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":2,"column_names":["le"]}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"xx","sample":null,"query_location":28,"query_location_length":61,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"le","query_location":40,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["e"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":9,"schema_name":"","table_name":"list_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_data"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT g FROM (SELECT g, LIST(e) l FROM list_data GROUP BY g) u1 where UNNEST(l) \u003e 42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]}],"from_table":{"type":"SUBQUERY","alias":"u1","sample":null,"query_location":14,"query_location_length":47,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":25,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["e"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":9,"schema_name":"","table_name":"list_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_data"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":71,"query_location_length":14,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["l"]}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(a) ua FROM (VALUES (LIST_VALUE()), (LIST_VALUE(1, 2, 3, 4)), (LIST_VALUE(NULL)), (LIST_VALUE(42))) lv(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"ua","query_location":7,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}]}],"from_table":{"type":"SUBQUERY","alias":"lv","sample":null,"query_location":25,"query_location_length":87,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":22,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":96,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAP(list_value(1, 2, 3, 4, 1), list_value(10, 9, 8, 7, 6))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":58,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAP_FROM_ENTRIES(list) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"map_from_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":4,"column_names":["list"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select col[123] from hugeint_key;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":10,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["col"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":123}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"hugeint_key","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeint_key"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select col['12.3'::DECIMAL] from decimal_key;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":10,"query_location_length":17,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["col"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12.3"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":11,"schema_name":"","table_name":"decimal_key","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["decimal_key"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT map_from_entries(5);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"map_from_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAP_FROM_ENTRIES(ARRAY[([{'a':5, 'b':7}, {'a':5, 'b':8}], 2), ([{'a':5, 'b':7}, {'a':5, 'b':8}], 4)]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":101,"function_name":"map_from_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":24,"query_location_length":83,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":37,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":32,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":69,"query_location_length":37,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":32,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":99,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT MAP()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_concat(map([3,4,5], ['a', 'b', 'c']), map([], []));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":54,"function_name":"map_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":29,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":11,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_concat(x, y, z) from tbl where rowid == 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"map_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["y"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["z"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT map_contains_entry(map([1,2,3],[4,5,6]), 2, 5) AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":46,"function_name":"map_contains_entry","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":20,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_entries(MAP())","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"map_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":5,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_keys(MAP(['a', 'b', 'c', 'd'], [5,1,8,3]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"map_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":36,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"d"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select MAP_KEYS(NULL::MAP(INT, BIGINT))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"map_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":16,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select m[0] from (select MAP(LIST_VALUE(1, 2, 3, 4,5),LIST_VALUE(10, 9, 8, 7,11)) as m) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":17,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":25,"query_location_length":56,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_extract(m,1) from (select MAP(LIST_VALUE(1, 2, 3, 4),LIST_VALUE(10, 9, 8, 7)) as m) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"map_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["m"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":29,"query_location_length":65,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":37,"query_location_length":51,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":22,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":8}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select m from (select MAP(lsta,lstb) as m from (SELECT list(a) as lsta, list(b) as lstb FROM ints where a \u003c 4 and b \u003e 1) as lst_tbl) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":14,"query_location_length":118,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":22,"query_location_length":14,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":4,"column_names":["lsta"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":4,"column_names":["lstb"]}}]}],"from_table":{"type":"SUBQUERY","alias":"lst_tbl","sample":null,"query_location":47,"query_location_length":73,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"lsta","query_location":55,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["a"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"lstb","query_location":72,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["b"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":93,"query_location_length":4,"schema_name":"","table_name":"ints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ints"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":104,"query_location_length":15,"children":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":104,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":114,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":118,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select MAP_EXTRACT(NULL::MAP(INT, BIGINT), NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":41,"function_name":"map_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":16,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select m[[10,11]] from (select MAP(lst,lst) as m from (SELECT LIST([i,i+1]) as lst FROM range(10000) tbl(i)) as lst_tbl) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":9,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}}]}]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":23,"query_location_length":97,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":31,"query_location_length":12,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":3,"column_names":["lst"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":3,"column_names":["lst"]}}]}],"from_table":{"type":"SUBQUERY","alias":"lst_tbl","sample":null,"query_location":54,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"lst","query_location":62,"query_location_length":13,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":88,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":5,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10000}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map([3, 2, 1],\n[\n\t[\n\t\t[4],\n\t\t[4]\n\t],\n\t[\n\t\t[4,3]\n\t],\n\t[\n\t\t[3,3,3],\n\t\t[2],\n\t\t[NULL, 3, 2]\n\t]\n])[1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":100,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":93,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":77,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_values(MAP(['a', 'b', 'c', 'd', 'e'], [NULL, 0, 1, NULL, 3]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":65,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":53,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"c"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"d"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"e"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select map_keys(m) = input, map_values(m) = input from (\n\tselect\n\t\tmap(input, input) m,\n\t\tinput\n\tfrom input() t(input)\n) m;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"map_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["m"]}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":5,"column_names":["input"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":28,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":13,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["m"]}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":5,"column_names":["input"]}}],"from_table":{"type":"SUBQUERY","alias":"m","sample":null,"query_location":55,"query_location_length":65,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":67,"query_location_length":17,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":5,"column_names":["input"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":5,"column_names":["input"]}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":5,"column_names":["input"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":102,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"input","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"column_name_alias":["input"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TYPEOF(MAP_EXTRACT(NULL::MAP(TEXT, BIGINT), 'a'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":41,"function_name":"map_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":17,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":4,"catalog":"","schema":"","type_name":"TEXT","children":[]},{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select min(i), max(i), first(i) from struct_int;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":8,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":10,"schema_name":"","table_name":"struct_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM t2 where id\u003e=4 order by id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":23,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT e, STRUCT_EXTRACT(STRUCT_PACK(xx := e, yy := g), 'xx') as s FROM struct_data WHERE e IS NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["e"]},{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":10,"query_location_length":51,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"xx","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"xx","query_location":43,"query_location_length":1,"column_names":["e"]}},{"name":"yy","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"yy","query_location":52,"query_location_length":1,"column_names":["g"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"xx"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":11,"schema_name":"","table_name":"struct_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_data"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":92,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["e"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT STRUCT_EXTRACT(e, 'e') FROM struct_data","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["e"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"e"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"struct_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select struct_keys(NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"struct_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_values(col) FROM filtered_struct_values WHERE idx % 2 != 0 ORDER BY idx;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":3,"column_names":["idx"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"struct_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":3,"column_names":["col"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":22,"schema_name":"","table_name":"filtered_struct_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["filtered_struct_values"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":60,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":7,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":3,"column_names":["idx"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL IS NULL, NULL IS NOT NULL, 42 IS NULL, 42 IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":12,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":26,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":42,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":54,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 4 / 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::UBIGINT FROM bigints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS SMALLINT) FROM bigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::DECIMAL(18,0)::BIGINT FROM bigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select typeof([100::USMALLINT, 10.5::DECIMAL]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":31,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":1}},"is_null":false,"value":105}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::UINTEGER FROM hugeints WHERE i\u003e=0 ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":39,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::BIGINT FROM hugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS DECIMAL(3,0))::HUGEINT FROM hugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS UTINYINT)::INTEGER FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::BOOL FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"BOOL","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS DECIMAL(18,9))::INTEGER FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}}]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS UINTEGER)::SMALLINT FROM smallints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(s AS SMALLINT) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM numerics","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"numerics","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["numerics"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS UINTEGER) FROM tinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::DECIMAL(3,0)::TINYINT FROM tinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":14,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(1::UBIGINT + 1::TINYINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS SMALLINT) FROM ubigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":8,"schema_name":"","table_name":"ubigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ubigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::DECIMAL(3,0)::UBIGINT FROM ubigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":14,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"ubigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ubigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::BIGINT FROM uhugeints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS UBIGINT) FROM uhugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS DECIMAL(9,0))::UHUGEINT FROM uhugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::INTEGER FROM uintegers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":9,"schema_name":"","table_name":"uintegers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uintegers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::DECIMAL(18,0)::UINTEGER FROM uintegers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":18}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":9,"schema_name":"","table_name":"uintegers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uintegers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::TINYINT FROM usmallints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":10,"schema_name":"","table_name":"usmallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["usmallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(s AS USMALLINT) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":24,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":true}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::USMALLINT FROM utinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":9,"schema_name":"","table_name":"utinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["utinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i::VARCHAR FROM utinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":9,"schema_name":"","table_name":"utinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["utinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TRY_CAST(i AS DECIMAL(9,7))::UTINYINT FROM utinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":7}}]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":9,"schema_name":"","table_name":"utinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["utinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select cast (null as what.u array);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"what","type_name":"u","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT row(), struct_pack()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t1.i, t2.i, t1.s FROM t t1 JOIN t t2 USING (s) WHERE t1.s IS NOT NULL AND t1.i \u003c t2.i ORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["t1","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["t2","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":4,"column_names":["t1","s"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":34,"query_location_length":19,"left":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"right":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":39,"query_location_length":4,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["s"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":60,"query_location_length":32,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":65,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["t1","s"]}]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":81,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":4,"column_names":["t1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":4,"column_names":["t2","i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ((c).i).a FROM a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":9,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":8,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["c"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT remap_struct({'i': 1, 'j': 2}, NULL::ROW(v1 INT, v2 INT), {'v1': 'j', 'v2': 'i'}, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":87,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":19,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"v1","query_location":51,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"v2","query_location":59,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v1","query_location":72,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"j"}}},{"name":"v2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v2","query_location":83,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT remap_struct(\n\t[\n\t\t{\n\t\t\t'i': 1,\n\t\t\t'j': {\n\t\t\t\t'x': 42,\n\t\t\t\t'z': 100\n\t\t\t}\n\t\t}\n\t], -- data\n\tNULL::STRUCT(\n\t\tv1 INT,\n\t\tv2 STRUCT(\n\t\t\tx INT,\n\t\t\ty INT,\n\t\t\tz INT\n\t\t),\n\t\tv3 VARCHAR\n\t)[], -- target type\n\t{\n\t\t'list': ROW(\n\t\t\t'list', {\n\t\t\t\t'v1': 'i',\n\t\t\t\t'v2': ROW(\n\t\t\t\t\t'j', {\n\t\t\t\t\t\t'x': 'x',\n\t\t\t\t\t\t'z': 'z'\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t)\n\t}, -- remapping data -\u003e target_type\n\t{\n\t\t'list': {\n\t\t\t'v2': {\n\t\t\t\t'y': NULL::INT\n\t\t\t},\n\t\t\t'v3': NULL::VARCHAR\n\t\t}\n\t}\n); -- defaults","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":440,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":64,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":57,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"j","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":47,"query_location_length":32,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":58,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"z","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"z","query_location":71,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}}]}}]}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":84,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":80,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"v1","query_location":116,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"v2","query_location":126,"query_location_length":40,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"x","query_location":139,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"y","query_location":149,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"z","query_location":159,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]},{"class":"TYPE","type":"TYPE","alias":"v3","query_location":173,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":203,"query_location_length":127,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"list","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"list","query_location":215,"query_location_length":112,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":223,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"list"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":231,"query_location_length":92,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v1","query_location":243,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}},{"name":"v2","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"v2","query_location":258,"query_location_length":60,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":268,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"j"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":273,"query_location_length":39,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":286,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}},{"name":"z","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"z","query_location":302,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"z"}}}]}}]}}]}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":366,"query_location_length":79,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"list","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"list","query_location":378,"query_location_length":64,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v2","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"v2","query_location":389,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"y","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"y","query_location":404,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":400,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":406,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}}]}},{"name":"v3","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"v3","query_location":429,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":425,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":431,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT remap_struct(\n\t{'people': [ {'first_name': 'Alice', 'age': 43}, {'first_name': 'Bob', 'age': 35} ]},\n\tNULL::STRUCT(people STRUCT(age INTEGER, given_name VARCHAR)[]),\n\t{ 'people': ROW('people', { 'list': ROW('array', { 'age': 'age', 'given_name': 'first_name' }) }) },\n\tNULL\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":275,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":84,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"people","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"people","query_location":33,"query_location_length":72,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":34,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"first_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"first_name","query_location":50,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Alice"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":66,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":43}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":32,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"first_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"first_name","query_location":86,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"Bob"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":100,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":35}}}]}}]}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":113,"query_location_length":58,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":115,"query_location_length":56,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"people","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":129,"query_location_length":39,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"age","query_location":140,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"given_name","query_location":160,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":174,"query_location_length":99,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"people","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"people","query_location":186,"query_location_length":85,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"people"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":200,"query_location_length":70,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"list","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"list","query_location":210,"query_location_length":58,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":214,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"array"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":223,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":232,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"age"}}},{"name":"given_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"given_name","query_location":253,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"first_name"}}}]}}]}}]}}]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":276,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, CASE WHEN i%2=0 THEN {'i': [1,2,3]} ELSE NULL END FROM range(6) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":10,"query_location_length":49,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":20,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":37,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}}]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":65,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'i': 1, 'j': 2}::ROW(i BIGINT, j VARCHAR);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":26,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":24,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"i","query_location":31,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]},{"class":"TYPE","type":"TYPE","alias":"j","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL::ROW(i BIGINT, j ROW(a BIGINT, b VARCHAR));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":43,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":41,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"i","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]},{"class":"TYPE","type":"TYPE","alias":"j","query_location":29,"query_location_length":24,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":35,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 1} \u003c NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":15,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL \u003c\u003e{'x': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":15,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l \u003c\u003e r FROM struct_int","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":10,"schema_name":"","table_name":"struct_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 'duck'} = {'x': 'duck'}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":29,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":29,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 'duck'} \u003e {'x': 'duck'}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":29,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":29,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL \u003c {'x': 'duck', 'y': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":28,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":20,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 'duck', 'y': 1} \u003c\u003e {'x': 'duck', 'y': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":46,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":38,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":51,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l \u003c r FROM struct_str_int","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":14,"schema_name":"","table_name":"struct_str_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_str_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL \u003c= {'x': 1, 'y': {'a': 'duck', 'b': 1.5}}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":46,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":29,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":35,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":48,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":15}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL \u003e= {'x': 1, 'y': {'a': 'duck', 'b': 1.5}}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":46,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":29,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":35,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":48,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":15}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 1, 'y': ['duck', 'somateria']} \u003c {'x': 2, 'y': ['goose']}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":63,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"somateria"}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":60,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 1, 'y': ['duck', 'somateria']} \u003c\u003e {'x': 2, 'y': ['goose']}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":64,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"somateria"}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":61,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l \u003c r FROM list_in_struct","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":14,"schema_name":"","table_name":"list_in_struct","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_in_struct"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_concat({'a': 1}, {'b': NULL}, NULL::STRUCT(k INT), struct_pack( x := 'foobar'));;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":86,"function_name":"struct_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":37,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":13,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"k","query_location":59,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":83,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foobar"}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_contains(ROW(1, 2), NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_contains(ROW(c0, c1, c2), NULL) FROM t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":15,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["c0"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["c1"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":2,"column_names":["c2"]}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_contains(ROW(MAP([1], [2])), MAP([1], [2]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":18,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":52,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT x, y, ARRAY_CONCAT(x, y) FROM T;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["y"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":18,"function_name":"array_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["x"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["y"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":1,"schema_name":"","table_name":"T","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["T"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 'duck'} IS DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":35,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT l IS NOT DISTINCT FROM r FROM struct_str_int","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":14,"schema_name":"","table_name":"struct_str_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_str_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 1, 'y': ['duck', 'somateria']} IS NOT DISTINCT FROM {'x': 2, 'y': ['goose']}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":82,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"somateria"}}}]}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":79,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"goose"}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select unnest(map_entries(histogram(i))) FROM integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":33,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":25,"function_name":"map_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":12,"function_name":"histogram","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]}}]}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, value \u003c value FROM nested_values ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":11,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["value"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":5,"column_names":["value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":13,"schema_name":"","table_name":"nested_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_values"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT * FROM a LEFT JOIN b ON a.id\u003eb.id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":24,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":31,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":4,"column_names":["a","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["b","id"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_position(ROW(1.0, 2.0, 3.0, 4.0), 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":43,"function_name":"struct_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":23,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":20}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":30}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":40}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_position(ROW(NULL, 1), NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"struct_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT struct_position(ROW(ROW(1, 2), ROW(3, 4)), ROW(5, 6))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":53,"function_name":"struct_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":25,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i.a FROM test_structs;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["i","a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":12,"schema_name":"","table_name":"test_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (SELECT tbl2.a['i'] + tbl.b['j'] FROM (VALUES ({'i': 1, 'j': 2})) tbl(b)) FROM (VALUES ({'i': 1, 'j': 2})) tbl2(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":73,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":21,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["tbl2","a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"i"}}]}},{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":34,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":5,"column_names":["tbl","b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"j"}}]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":45,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"tbl2","sample":null,"query_location":86,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":95,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":109,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(row()), typeof(struct_pack());","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":21,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof([row(1, 'a'), row(2, 'b')]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 1 from VALUES ([NULL, 6], [5, 6]) t(a, b) where a IS DISTINCT FROM b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":35,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}}}]}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":56,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT column_name, column_type FROM (DESCRIBE SELECT unnest([{'a': 12, 'b': {'bb': {'bbb': 12}}}], recursive := true, keep_parent_names := true));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":37,"query_location_length":109,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":91,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":35,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":68,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":77,"query_location_length":19,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"bb","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"bb","query_location":84,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"bbb","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"bbb","query_location":92,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":12}}}]}}]}}]}}]}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":113,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}},{"name":"keep_parent_names","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"keep_parent_names","query_location":140,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":""},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST({'a': 42, 'b': 88})","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":29,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":88}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST([[{'a': 42, 'b': {'x': 99}}, {'a': NULL, 'b': {'x': NULL}}]], max_depth:=4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":60,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":58,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":31,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":37,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":99}}}]}}]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":49,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":60,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":66,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}}]}}]}}]}},{"name":"max_depth","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"max_depth","query_location":87,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT UNNEST(s) FROM tbl_structs ORDER BY 1 COLLATE NOCASE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":43,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"collation":"NOCASE"}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":11,"schema_name":"","table_name":"tbl_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl_structs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select 'abc'::pg_catalog.text;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"abc"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":15,"catalog":"","schema":"pg_catalog","type_name":"text","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ' \t'::TIME","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":" \t"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT tns, DATE_PART('{part}', tns) p\nFROM times\nWHERE p \u003c\u003e 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["tns"]},{"class":"FUNCTION","type":"FUNCTION","alias":"p","query_location":12,"query_location_length":24,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{part}"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":3,"column_names":["tns"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":56,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["p"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (TIMESTAMP_NS '1969-12-31 23:59:59.999999999'::TIME_NS)::VARCHAR t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"t","query_location":62,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":44,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1969-12-31 23:59:59.999999999"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":8,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"TIME_NS","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '16:15:03.123456'::TIME::TIMETZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"16:15:03.123456"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \n\tc0, \n\tc0::TIME AS t,\n\tc0::TIME::TIMETZ AS tz,\nFROM single;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":2,"column_names":["c0"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"t","query_location":17,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":2,"column_names":["c0"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"tz","query_location":39,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["c0"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":6,"schema_name":"","table_name":"single","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["single"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select time '23:59:59.999999' + interval (1) hour","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"23:59:59.999999"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":17,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '14:70:04.500'::TIME::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"14:70:04.500"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('11:' as time)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"11:"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('23:59:59.999999' as time)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":17,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"23:59:59.999999"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '1900-01-01 03:08:47'::TIMESTAMP::TIMESTAMP_MS;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":21,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1900-01-01 03:08:47"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT APPROX_COUNT_DISTINCT(ts), APPROX_COUNT_DISTINCT(tstz), APPROX_COUNT_DISTINCT(dt)\nFROM specials;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":2,"column_names":["ts"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":27,"function_name":"approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":4,"column_names":["tstz"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":25,"function_name":"approx_count_distinct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":2,"column_names":["dt"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":8,"schema_name":"","table_name":"specials","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["specials"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT dt + '12:34:56'::TIME FROM specials","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["dt"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":10,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12:34:56"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":8,"schema_name":"","table_name":"specials","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["specials"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT timestamp '2017-07-23 13:10:11';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2017-07-23 13:10:11"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT t+t FROM timestamp","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["t"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT TIMESTAMP '2008-01-01 00:00:01.5'::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2008-01-01 00:00:01.5"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT nano::TIMESTAMP, milli::TIMESTAMP,sec::TIMESTAMP from timestamp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["nano"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":5,"column_names":["milli"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":3,"column_names":["sec"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select nano from timestamp order by nano;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["nano"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["nano"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '2008-01-01 00:00:11.1'::TIMESTAMP_US = '2008-01-01 00:00:11.1'::TIMESTAMP_S","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":76,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2008-01-01 00:00:11.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_US","children":[]}}},"try_cast":false},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":23,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2008-01-01 00:00:11.1"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMP_S","children":[]}}},"try_cast":false}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select timestamp '1970-01-01';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1970-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select timestamp '294247-01-10 04:00:54.775806' + interval (1) microsecond","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-10 04:00:54.775806"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":24,"function_name":"to_microseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"BIGINT","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT EXTRACT(microseconds FROM sec), EXTRACT(microseconds FROM msec), EXTRACT(microseconds FROM micros), EXTRACT(microseconds FROM nanos) FROM ts_precision","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":3,"column_names":["sec"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":31,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":4,"column_names":["msec"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":33,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":6,"column_names":["micros"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":107,"query_location_length":32,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"MICROSECONDS"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":5,"column_names":["nanos"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":145,"query_location_length":12,"schema_name":"","table_name":"ts_precision","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ts_precision"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('1111-' as timestamp)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":30,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1111-"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('294247-01-10 04:00:54.775807' as timestamp)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":53,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":30,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"294247-01-10 04:00:54.775807"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select timestamptz '2020-12-31 21:25:58.745232+0215';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":45,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2020-12-31 21:25:58.745232+0215"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT typeof(TIMESTAMP WITH TIME ZONE '2023-01-01 00:00:00+00');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":49,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2023-01-01 00:00:00+00"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":24,"catalog":"","schema":"","type_name":"TIMESTAMP WITH TIME ZONE","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '340282366920938463463374607431768211455'::UHUGEINT + '340282366920938463463374607431768211455'::UHUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"340282366920938463463374607431768211455"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":102,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"340282366920938463463374607431768211455"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":104,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100::UHUGEINT // 0::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '340282366920938463463374607431768211455'::UHUGEINT // 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"340282366920938463463374607431768211455"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '340282366920938463463374607431768211456'::UHUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":41,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"340282366920938463463374607431768211456"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100000000000::UHUGEINT::INTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":100000000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '3.4e38'::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"3.4e38"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) FROM uhugeints WHERE h \u003c\u003e '1267650600228229401496703205376'::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":37,"query_location_length":48,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["h"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":33,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1267650600228229401496703205376"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 251658240::UHUGEINT * 4642275147320176030871715840::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":60,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":251658240}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":28,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":251658240,"lower":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 19938419936773738093557105904205168640::UHUGEINT * 4642275147320176030871715840::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":89,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":38,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":1080863910568919040,"lower":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":28,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":251658240,"lower":0}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":88,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 4611686018427387904::UHUGEINT * 36893488147419103231::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":62,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"value":{"type":{"id":"BIGINT","type_info":null},"is_null":false,"value":4611686018427387904}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":20,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":1,"lower":18446744073709551615}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT union_tag(u), max(u) FROM tbl1 GROUP BY union_tag(u);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["u"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["u"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":12,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["u"]}}]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT u::int FROM tbl1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["u"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT union_tag(u), union_tag(u::UNION(i SMALLINT, b INT)), u::UNION(i SMALLINT, b INT) FROM tbl4 ORDER BY ALL;;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["u"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":38,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":26,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["u"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":24,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"i","query_location":42,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":54,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":26,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["u"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":24,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"i","query_location":72,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":84,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":4,"schema_name":"","table_name":"tbl4","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl4"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT union_extract(1, 'b');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"union_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT union_extract(u, 'b') FROM tbl1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"union_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["u"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"b"}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id FROM tbl1 WHERE a = union_value(str :='foo')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":26,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["a"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":24,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"str","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"str","query_location":48,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"foo"}}}]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH t(id, l, r) AS (\n\tVALUES\n\t\t(0,\n\t\t\t[union_value(num := 1)::UNION(num INT, str VARCHAR), union_value(num := 2)::UNION(num INT, str VARCHAR)]::UNION(num INT, str VARCHAR)[],\n\t\t\t[union_value(num := 1)::UNION(num INT, str VARCHAR), union_value(num := 2)::UNION(num INT, str VARCHAR)]::UNION(num INT, str VARCHAR)[]),\n\t\t(1,\n\t\t\t[union_value(str := 'x')::UNION(num INT, str VARCHAR)]::UNION(num INT, str VARCHAR)[],\n\t\t\t[union_value(str := 'x')::UNION(num INT, str VARCHAR)]::UNION(num INT, str VARCHAR)[])\n)\nSELECT id, l = r, l IS NOT DISTINCT FROM r FROM t ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":564,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["id","l","r"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":143,"query_location_length":31,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":104,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":21,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"num","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"num","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":73,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":82,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":113,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":21,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"num","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"num","query_location":111,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":115,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":125,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":134,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":145,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":155,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":164,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":283,"query_location_length":31,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":179,"query_location_length":104,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":201,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":180,"query_location_length":21,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"num","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"num","query_location":199,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":203,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":213,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":222,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":253,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":232,"query_location_length":21,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"num","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"num","query_location":251,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":255,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":265,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":274,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":285,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":295,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":304,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":320,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":380,"query_location_length":31,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":326,"query_location_length":54,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":350,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":327,"query_location_length":23,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"str","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"str","query_location":346,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":352,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":362,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":371,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":382,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":392,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":401,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":470,"query_location_length":31,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":416,"query_location_length":54,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":440,"query_location_length":29,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":417,"query_location_length":23,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"str","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"str","query_location":436,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"x"}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":442,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":452,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":461,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":472,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"num","query_location":482,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"str","query_location":491,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":512,"query_location_length":2,"column_names":["id"]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":516,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":516,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":520,"query_location_length":1,"column_names":["r"]}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":523,"query_location_length":24,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":523,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":546,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":553,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT u FROM tbl1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["u"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT u from tbl3 where u = NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["u"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl3"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["u"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (18446744073709551615)::UBIGINT * (3)::UBIGINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":20,"value":{"type":{"id":"HUGEINT","type_info":null},"is_null":false,"value":{"upper":0,"lower":18446744073709551615}}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 100000000::INTEGER + 100::USMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100000000}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '255'::UTINYINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"255"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (100::USMALLINT)::DECIMAL(3,0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT '7'::UBIGINT, '130'::UBIGINT, '18446744073709551615'::UBIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"7"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":5,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"130"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":22,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"18446744073709551615"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT 42::TINYINT::UINTEGER, 42::SMALLINT::UINTEGER, 42::INTEGER::UINTEGER, 42::BIGINT::UINTEGER, 42::FLOAT::UINTEGER, 42::DOUBLE::UINTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":79,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":81,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":89,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":110,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":130,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":122,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":124,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT -42::TINYINT::UTINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (-42)::BIGINT::UBIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (10)::UTINYINT::INTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (10)::UINTEGER::SMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (260.32)::DECIMAL::UTINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":6,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":5,"scale":2}},"is_null":false,"value":26032}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (65536.32)::REAL::USMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":8,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":7,"scale":2}},"is_null":false,"value":6553632}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"FLOAT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_cast(NULL::BLOB as uuid) as test;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"test","query_location":7,"query_location_length":28,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":4,"catalog":"","schema":"","type_name":"uuid","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT try_cast(try_cast('12345678-1234-5678-1234-567812345678'::UUID AS UHUGEINT) as uuid);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":84,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":66,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"12345678-1234-5678-1234-567812345678"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":4,"catalog":"","schema":"","type_name":"UUID","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":73,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[]}}},"try_cast":true},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":86,"query_location_length":4,"catalog":"","schema":"","type_name":"uuid","children":[]}}},"try_cast":true}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select '2019/03/21'::TIMESTAMP::VARIANT::TIMESTAMP;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2019/03/21"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select [\n\t42::UNION(a INTEGER, b BOOLEAN, c VARCHAR)::VARIANT,\n\ttrue::UNION(a INTEGER, b BOOLEAN, c VARCHAR)::VARIANT,\n\t'test'::UNION(a INTEGER, b BOOLEAN, c VARCHAR)::VARIANT,\n]::VARIANT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":178,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":171,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":42}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":38,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]},{"class":"TYPE","type":"TYPE","alias":"c","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":4,"value":{"type":{"id":"BOOLEAN","type_info":null},"is_null":false,"value":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":38,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":89,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]},{"class":"TYPE","type":"TYPE","alias":"c","query_location":100,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":110,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":166,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":126,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"test"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":128,"query_location_length":38,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":136,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]},{"class":"TYPE","type":"TYPE","alias":"b","query_location":147,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[]},{"class":"TYPE","type":"TYPE","alias":"c","query_location":158,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":168,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":180,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT (v.outer).a, variant_keys(v, 'outer'), v::JSON\nFROM (SELECT '{\"outer\":{\"a\":1,\"b\":2,\"a\":3}}'::JSON::VARIANT AS v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":7,"column_names":["v","outer"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":24,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"outer"}}}]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["v"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":59,"query_location_length":60,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":104,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":98,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":31,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{\"outer\":{\"a\":1,\"b\":2,\"a\":3}}"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":100,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":106,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select var::VARIANT from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["var"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select try_cast('hello world'::variant as int) + 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":39,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello world"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":true}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s.shredding_state, s.fully_shredded.type, s.fully_shredded.stats.min, s.fully_shredded.stats.max,\n s.fully_shredded.stats.has_null\nFROM (SELECT stats(n::VARIANT) s FROM t LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":17,"column_names":["s","shredding_state"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":21,"column_names":["s","fully_shredded","type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":26,"column_names":["s","fully_shredded","stats","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":26,"column_names":["s","fully_shredded","stats","max"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":31,"column_names":["s","fully_shredded","stats","has_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":149,"query_location_length":43,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":190,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":157,"query_location_length":17,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":164,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":163,"query_location_length":1,"column_names":["n"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":166,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":182,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM obj WHERE (o::VARIANT).a::BIGINT = 9999;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"","table_name":"obj","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["obj"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":31,"query_location_length":29,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":8,"child":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["o"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"a"}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":9999}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [1]::VARIANT IS DISTINCT FROM [1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":33,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT []::VARIANT IS DISTINCT FROM []","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":31,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT [{'x': 'duck', 'y': 1}]::VARIANT IS NOT DISTINCT FROM [{'x': 'duck', 'y': 1}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":77,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":68,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT NULL::VARIANT IS NOT DISTINCT FROM {'x': 'duck'}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":48,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":48,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 'duck', 'y': 1}::VARIANT IS DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":52,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT {'x': 1, 'y': ['duck', 'somateria']}::VARIANT IS NOT DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":71,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":11,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"somateria"}}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM single_update WHERE v = 'hello'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":13,"schema_name":"","table_name":"single_update","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["single_update"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":41,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["v"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":7,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"hello"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM scatter_test WHERE c = 'UPDATED'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"scatter_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["scatter_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":40,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"UPDATED"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM t1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT name FROM student WHERE id = 245780","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":7,"schema_name":"","table_name":"student","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["student"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":31,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":6,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":245780}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM t_self;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"t_self","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_self"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select * from t_offset;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"t_offset","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_offset"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, j, k FROM tbl WHERE i = 4;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":30,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"FROM foo;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":5,"query_location_length":3,"schema_name":"","table_name":"foo","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["foo"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT $x, $greeting","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"PARAMETER","type":"VALUE_PARAMETER","alias":"","query_location":7,"query_location_length":2,"identifier":"x"},{"class":"PARAMETER","type":"VALUE_PARAMETER","alias":"","query_location":11,"query_location_length":9,"identifier":"greeting"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[{"key":"greeting","value":2},{"key":"x","value":1}]}]}} -{"sql":"SELECT v::INT FROM (VALUES (-123), (5), (-1), (100), (0)) t(v)\nORDER BY v::INT::VARIANT DESC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":78,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["v"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":19,"query_location_length":38,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-123}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":100}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT variant_comparator(1::INTEGER::VARIANT) = variant_comparator(1.0::DOUBLE::VARIANT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":82,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"variant_comparator","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":40,"function_name":"variant_comparator","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":79,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":71,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":10}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":73,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":81,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}}]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH variants(v) AS (VALUES\n (1::INTEGER::VARIANT),\n (255::INTEGER::VARIANT),\n (256::INTEGER::VARIANT)\n)\nSELECT\n finalize(min(v) EXPORT_STATE)::VARCHAR,\n finalize(max(v) EXPORT_STATE)::VARCHAR\nFROM variants","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"variants","value":{"aliases":["v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":72,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":255}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":74,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":92,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":256}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":94,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":154,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":125,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":134,"query_location_length":19,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":1,"column_names":["v"]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":156,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":198,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":169,"query_location_length":29,"function_name":"finalize","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":178,"query_location_length":19,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":true,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":1,"column_names":["v"]}}]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":200,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":213,"query_location_length":8,"schema_name":"","table_name":"variants","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["variants"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT depname, COVAR_POP(salary, empno) OVER (PARTITION BY depname ORDER BY salary, empno) c FROM empsalary ORDER BY depname, empno","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":7,"column_names":["depname"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":5,"column_names":["empno"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["depname"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"c","query_location":16,"query_location_length":75,"function_name":"covar_pop","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":7,"column_names":["depname"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":6,"column_names":["salary"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":5,"column_names":["empno"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":6,"column_names":["salary"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":5,"column_names":["empno"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":99,"query_location_length":9,"schema_name":"","table_name":"empsalary","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empsalary"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT COUNT(*) OVER (\n ORDER BY id ROWS BETWEEN off PRECEDING AND CURRENT ROW\n)\nFROM (VALUES (1, NULL::INTEGER)) AS src(id, off);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":74,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]}}],"start":"EXPR_PRECEDING_ROWS","end":"CURRENT_ROW_ROWS","start_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":3,"column_names":["off"]},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"src","sample":null,"query_location":87,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":103,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":105,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","off"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\tSUM(v) OVER (PARTITION BY a, a) AS w_aa,\n\tSUM(v) OVER (PARTITION BY a, b) AS w_ab\nFROM src\nORDER BY b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"w_aa","query_location":8,"query_location_length":31,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["v"]}}]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"w_ab","query_location":50,"query_location_length":31,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["b"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":95,"query_location_length":3,"schema_name":"","table_name":"src","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["src"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT id, bitstring_agg(id, 1, 3) OVER (PARTITION BY ch ORDER BY id ROWS BETWEEN 1 FOLLOWING AND 2 FOLLOWING) \nFROM t1\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":129,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":11,"query_location_length":99,"function_name":"bitstring_agg","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":2,"column_names":["ch"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":2,"column_names":["id"]}}],"start":"EXPR_FOLLOWING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":117,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with null_chunk as (\n\tselect \n\t\t1 as p, \n\t\ts,\n\t\tNULL::DOUBLE as v,\n\tfrom range(2050) tbl(s)\n\tunion all\n\tselect\n\t\t2 as p, \n\t\ts,\n\t\ts::DOUBLE as v,\n\tfrom range(16) tbl(s)\n)\nselect \n\tp, \n\ts, \n\tfill(v order by -s) over(partition by p order by s) as f,\nfrom null_chunk","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"null_chunk","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"p","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["s"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":52,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":73,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2050}}}]},"column_name_alias":["s"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"p","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":1,"column_names":["s"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":130,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":1,"column_names":["s"]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":132,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[]}}},"try_cast":false}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":151,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":16}}}]},"column_name_alias":["s"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["p"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":1,"column_names":["s"]},{"class":"WINDOW","type":"WINDOW_FILL","alias":"f","query_location":189,"query_location_length":51,"function_name":"fill","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":227,"query_location_length":1,"column_names":["p"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":238,"query_location_length":1,"column_names":["s"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":205,"query_location_length":2,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":206,"query_location_length":1,"column_names":["s"]}}]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":194,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":252,"query_location_length":10,"schema_name":"","table_name":"null_chunk","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["null_chunk"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n id,\n user_id,\n order_id,\n LAG(order_id, 1, -1 IGNORE NULLS) over (\n PARTITION BY user_id\n ORDER BY id\n ) AS last_order_id\nFROM issue2549\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["user_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":8,"column_names":["order_id"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"last_order_id","query_location":38,"query_location_length":85,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":7,"column_names":["user_id"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":true,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":true,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":8,"column_names":["order_id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":146,"query_location_length":9,"schema_name":"","table_name":"issue2549","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue2549"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select LIST(salary ORDER BY enroll_date, salary) OVER (PARTITION BY depname) FROM empsalary\nORDER BY ALL DESC","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":69,"function_name":"list","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":7,"column_names":["depname"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":11,"column_names":["enroll_date"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":6,"column_names":["salary"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":6,"column_names":["salary"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":9,"schema_name":"","table_name":"empsalary","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empsalary"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\tc1,\n c3,\n c2,\n LAG(c3, c2 ORDER BY c1, BITSTRING'010101010') OVER (PARTITION BY c1 ORDER BY c3)\nFROM issue17266\nORDER BY c1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":2,"column_names":["c1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":2,"column_names":["c1"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["c3"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":2,"column_names":["c2"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"","query_location":44,"query_location_length":80,"function_name":"lag","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":2,"column_names":["c1"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":2,"column_names":["c3"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":2,"column_names":["c1"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":20,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"010101010"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":9,"catalog":"","schema":"","type_name":"BITSTRING","children":[]}}},"try_cast":false}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":2,"column_names":["c3"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":2,"column_names":["c2"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":130,"query_location_length":10,"schema_name":"","table_name":"issue17266","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue17266"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT r, n, mad(n) over (order by r rows between 1 preceding and 3 following)\nFROM (SELECT r, CASE r % 2 WHEN 0 THEN r ELSE NULL END AS n FROM mads) nulls\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["n"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":65,"function_name":"mad","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["r"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["n"]}}]}],"from_table":{"type":"SUBQUERY","alias":"nulls","sample":null,"query_location":84,"query_location_length":65,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":1,"column_names":["r"]},{"class":"CASE","type":"CASE_EXPR","alias":"n","query_location":95,"query_location_length":38,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["r"]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":144,"query_location_length":4,"schema_name":"","table_name":"mads","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mads"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n\t x\n\t,y\n\t,z\n\t,avg(x) OVER (PARTITION BY y) AS plain_window\n\t,avg(x) FILTER (WHERE x = 1) OVER (PARTITION BY y) AS x_filtered_window\n\t,avg(x) FILTER (WHERE z = 0) OVER (PARTITION BY y) AS z_filtered_window\nFROM filtering\nORDER BY y, x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":236,"query_location_length":1,"column_names":["y"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":239,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["y"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["z"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"plain_window","query_location":21,"query_location_length":28,"function_name":"avg","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["y"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["x"]}}]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"x_filtered_window","query_location":68,"query_location_length":49,"function_name":"avg","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":115,"query_location_length":1,"column_names":["y"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":89,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":72,"query_location_length":1,"column_names":["x"]}}]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"z_filtered_window","query_location":141,"query_location_length":49,"function_name":"avg","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":188,"query_location_length":1,"column_names":["y"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":162,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":1,"column_names":["z"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":166,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":217,"query_location_length":9,"schema_name":"","table_name":"filtering","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["filtering"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, v, sum(v) OVER (ORDER BY i RANGE BETWEEN -1 PRECEDING AND 1 FOLLOWING) \nFROM issue10855","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":67,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_RANGE","end":"EXPR_FOLLOWING_RANGE","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":-1}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":10,"schema_name":"","table_name":"issue10855","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue10855"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT depname, empno,\n\tnth_value(empno, NULL) OVER (\n\t\tPARTITION BY depname ORDER BY empno ASC\n\t\tROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING\n\t\t) fv\nFROM empsalary\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":178,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":181,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["depname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":5,"column_names":["empno"]},{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"fv","query_location":24,"query_location_length":126,"function_name":"nth_value","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["depname"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["empno"]}}],"start":"CURRENT_ROW_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":5,"column_names":["empno"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":159,"query_location_length":9,"schema_name":"","table_name":"empsalary","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empsalary"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT\n TeamName,\n Player,\n Score,\n NTILE(1) OVER (PARTITION BY TeamName ORDER BY Score ASC) AS NTILE\nFROM ScoreBoard s\nORDER BY TeamName, Score;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":133,"query_location_length":8,"column_names":["TeamName"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":5,"column_names":["Score"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":8,"column_names":["TeamName"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":6,"column_names":["Player"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":5,"column_names":["Score"]},{"class":"WINDOW","type":"WINDOW_NTILE","alias":"NTILE","query_location":40,"query_location_length":56,"function_name":"ntile","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":8,"column_names":["TeamName"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["Score"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":111,"query_location_length":12,"schema_name":"","table_name":"ScoreBoard","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ScoreBoard"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT r, quantile(r, 0.5) over (order by r rows between 1 preceding and 3 following) FROM quantiles ORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":10,"query_location_length":75,"function_name":"quantile","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["r"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":91,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH t(r, i, p, f) AS (VALUES\n\t(0, NULL, 1, 2),\n\t(1, 1, 1, 2),\n\t(2, 2, 1, 2),\n\t(3, 3, 1, 2),\n\t(4, 4, 1, 2),\n\t(5, 5, 1, 2)\n)\nSELECT r, QUANTILE_DISC(i, [0.25, 0.5, 0.75]) OVER (ORDER BY r ROWS BETWEEN p PRECEDING and f FOLLOWING)\nFROM t\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":245,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["r","i","p","f"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":1,"column_names":["r"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":134,"query_location_length":94,"function_name":"quantile_disc","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":185,"query_location_length":1,"column_names":["r"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":1,"column_names":["p"]},"end_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":216,"query_location_length":1,"column_names":["f"]},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":151,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":152,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":25}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":158,"query_location_length":3,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":2,"scale":1}},"is_null":false,"value":5}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":4,"value":{"type":{"id":"DECIMAL","type_info":{"type":"DECIMAL_TYPE_INFO","alias":"","extension_info":null,"width":3,"scale":2}},"is_null":false,"value":75}}}]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":234,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT \n\ti,\n\t(i * 29) % 11 AS outside,\n\trank(ORDER BY (i // 2) DESC) OVER w,\n\tpercent_rank(ORDER BY (i // 2) DESC) OVER w,\nFROM range(10) tbl(i)\nWINDOW w AS (\n\tORDER BY (i * 29) % 11\n)\nORDER BY 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":194,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"outside","query_location":13,"query_location_length":13,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":29}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}}]},{"class":"WINDOW","type":"WINDOW_RANK","alias":"","query_location":40,"query_location_length":35,"function_name":"rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":169,"query_location_length":13,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":29}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}}]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}],"has_ignore_nulls":false,"arguments":[]},{"class":"WINDOW","type":"WINDOW_PERCENT_RANK","alias":"","query_location":78,"query_location_length":43,"function_name":"percent_rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":169,"query_location_length":13,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":29}}}]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":180,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":11}}}]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}}],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":128,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, LAG(i, 1) OVER() AS i1\nFROM range(10) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"i1","query_location":10,"query_location_length":16,"function_name":"lag","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":38,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select nth_value(i, 2) over (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) \nfrom range(5) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"","query_location":7,"query_location_length":71,"function_name":"nth_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":85,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i, SUM(i) OVER(ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM integers;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":10,"query_location_length":61,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT s,\n\tlast(s IGNORE NULLS) over(ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)\nFROM (VALUES ('A'), (NULL), ('B'), (NULL)) t(s)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"","query_location":11,"query_location_length":75,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":true,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":true,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":92,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"A"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"B"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":4,"value":{"type":{"id":"NULL","type_info":null},"is_null":true}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select row_number() over ()\n, count(distinct upper_ch1_ch2) over()::int as num_bigrams\n, sum(count_ch1_ch2) over () as bigram_count_all\n, count_ch1_ch2 / bigram_count_all as actual_bigram_frequency\n, ch1.actual_frequency * ch2.actual_frequency as expected_bigram_frequency\nfrom read_csv('{DATA_DIR}/csv/issue_13525/stat_bigrams.csv') as stat_bigrams\ninner join read_csv('{DATA_DIR}/csv/issue_13525/stat_stat_chars.csv') as ch1\non stat_bigrams.ascii_upper_ch1 = ch1.ascii_upper_ch\ninner join read_csv('{DATA_DIR}/csv/issue_13525/stat_stat_chars.csv') as ch2\non stat_bigrams.ascii_upper_ch2 = ch2.ascii_upper_ch;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":12,"query_location_length":20,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},{"class":"CAST","type":"OPERATOR_CAST","alias":"num_bigrams","query_location":81,"query_location_length":5,"child":{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":45,"query_location_length":36,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":true,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":13,"column_names":["upper_ch1_ch2"]}}]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":83,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[]}}},"try_cast":false},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"bigram_count_all","query_location":115,"query_location_length":26,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":13,"column_names":["count_ch1_ch2"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"actual_bigram_frequency","query_location":185,"query_location_length":32,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":185,"query_location_length":13,"column_names":["count_ch1_ch2"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":201,"query_location_length":16,"column_names":["bigram_count_all"]}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"expected_bigram_frequency","query_location":265,"query_location_length":43,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":265,"query_location_length":20,"column_names":["ch1","actual_frequency"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":288,"query_location_length":20,"column_names":["ch2","actual_frequency"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":566,"query_location_length":139,"left":{"type":"JOIN","alias":"","sample":null,"query_location":425,"query_location_length":140,"left":{"type":"TABLE_FUNCTION","alias":"stat_bigrams","sample":null,"query_location":350,"query_location_length":74,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":359,"query_location_length":45,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/issue_13525/stat_bigrams.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"ch1","sample":null,"query_location":437,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":446,"query_location_length":48,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/issue_13525/stat_stat_chars.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":515,"query_location_length":50,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":515,"query_location_length":28,"column_names":["stat_bigrams","ascii_upper_ch1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":547,"query_location_length":18,"column_names":["ch1","ascii_upper_ch"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"TABLE_FUNCTION","alias":"ch2","sample":null,"query_location":578,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":587,"query_location_length":48,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"{DATA_DIR}/csv/issue_13525/stat_stat_chars.csv"}}}]},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":656,"query_location_length":49,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":656,"query_location_length":28,"column_names":["stat_bigrams","ascii_upper_ch2"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":687,"query_location_length":18,"column_names":["ch2","ascii_upper_ch"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT count(*) FROM (\n\tSELECT\n\t\tany_value(uuid()::varchar) OVER (PARTITION BY g) AS id_a,\n\t\tany_value(uuid()::varchar) OVER (PARTITION BY g) AS id_b\n\tFROM (VALUES (1),(1),(2),(2)) t(g)\n) WHERE id_a = id_b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":166,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"id_a","query_location":33,"query_location_length":48,"function_name":"any_value","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["g"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":6,"function_name":"uuid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"id_b","query_location":93,"query_location_length":48,"function_name":"any_value","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":1,"column_names":["g"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":109,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":6,"function_name":"uuid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[]},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":111,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[]}}},"try_cast":false}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":156,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":169,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":173,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":177,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["g"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":194,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":194,"query_location_length":4,"column_names":["id_a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":201,"query_location_length":4,"column_names":["id_b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select i, lag(i) over named_window from (values (1), (2), (3)) as t (i) window named_window as (order by i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_LAG","alias":"","query_location":10,"query_location_length":24,"function_name":"lag","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}}]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":40,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"select \n x, y, \n count(*) over (partition by y order by x), \n count(*) over (w order by x)\nfrom (values (1, 1), (2, 1), (3, 2), (4, 2)) as t (x, y)\nwindow w as (partition by y)\norder by x","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":189,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["y"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":19,"query_location_length":41,"function_name":"count","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":1,"column_names":["y"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["x"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":65,"query_location_length":28,"function_name":"count","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":177,"query_location_length":1,"column_names":["y"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":91,"query_location_length":1,"column_names":["x"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":99,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":119,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":132,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with table_1 AS (\n SELECT\n 'fb30cf47-6f6b-42ef-dec2-3f984479a2aa'::uuid AS id,\n unnest(generate_series(\n '2024-04-01'::date,\n '2025-03-01'::date,\n interval '1 month'\n )) AS date\n UNION ALL BY NAME\n SELECT\n '7d1cc557-2d45-6900-a1ed-b2c64f5d9200'::uuid AS id,\n unnest(generate_series(\n '2024-02-01'::date,\n '2025-01-01'::date,\n interval '1 month'\n )) AS date\n), table_2 AS (\n SELECT\n 'fb30cf47-6f6b-42ef-dec2-3f984479a2aa'::uuid AS id,\n unnest(generate_series(\n '2024-04-01'::date,\n '2025-03-01'::date,\n interval '1 month'\n )) AS date,\n 1 AS value\n UNION ALL BY NAME\n SELECT\n '7d1cc557-2d45-6900-a1ed-b2c64f5d9200'::uuid AS id,\n unnest(generate_series(\n '2022-12-01'::date,\n '2023-12-01'::date,\n interval '1 month'\n )) AS date,\n 1 AS value\n), output AS (\n SELECT\n table_1.id,\n table_1.date,\n sum(table_2.value) over (\n PARTITION BY table_1.id\n ORDER BY table_1.date ASC\n ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING\n ) AS test_sum,\n FROM table_1\n LEFT JOIN table_2\n ON table_1.id = table_2.id\n AND table_1.date = table_2.date\n)\nSELECT * FROM output\nORDER BY id DESC, date DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1684,"query_location_length":2,"column_names":["id"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1693,"query_location_length":4,"column_names":["date"]}}]}],"cte_map":{"map":[{"key":"table_1","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"id","query_location":75,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"fb30cf47-6f6b-42ef-dec2-3f984479a2aa"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":4,"catalog":"","schema":"","type_name":"uuid","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"date","query_location":100,"query_location_length":129,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":107,"query_location_length":121,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":148,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-04-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":150,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":180,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":168,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2025-03-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":182,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":200,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":209,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 month"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"id","query_location":362,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":324,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"7d1cc557-2d45-6900-a1ed-b2c64f5d9200"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":364,"query_location_length":4,"catalog":"","schema":"","type_name":"uuid","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"date","query_location":387,"query_location_length":129,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":394,"query_location_length":121,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":435,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":423,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-02-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":437,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":467,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":455,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2025-01-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":469,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":487,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":496,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 month"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}},{"key":"table_2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION_BY_NAME","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"id","query_location":643,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":605,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"fb30cf47-6f6b-42ef-dec2-3f984479a2aa"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":645,"query_location_length":4,"catalog":"","schema":"","type_name":"uuid","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"date","query_location":668,"query_location_length":129,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":675,"query_location_length":121,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":716,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":704,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2024-04-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":718,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":748,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":736,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2025-03-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":750,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":768,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":777,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 month"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"value","query_location":860,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"id","query_location":996,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":958,"query_location_length":38,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"7d1cc557-2d45-6900-a1ed-b2c64f5d9200"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":998,"query_location_length":4,"catalog":"","schema":"","type_name":"uuid","children":[]}}},"try_cast":false},{"class":"FUNCTION","type":"FUNCTION","alias":"date","query_location":1021,"query_location_length":129,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":1028,"query_location_length":121,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":1069,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1057,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2022-12-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":1071,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":1101,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1089,"query_location_length":12,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"2023-12-01"}},"cast_type":{"id":"UNBOUND","type_info":{"type":"UNBOUND_TYPE_INFO","alias":"","extension_info":null,"expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":1103,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[]}}},"try_cast":false}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":1121,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":1130,"query_location_length":9,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"1 month"}},"cast_type":{"id":"INTERVAL","type_info":null},"try_cast":false}}]}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"value","query_location":1213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}},{"key":"output","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1304,"query_location_length":10,"column_names":["table_1","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1324,"query_location_length":12,"column_names":["table_1","date"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"test_sum","query_location":1346,"query_location_length":178,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1397,"query_location_length":10,"column_names":["table_1","id"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1429,"query_location_length":12,"column_names":["table_1","date"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1350,"query_location_length":13,"column_names":["table_2","value"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":1559,"query_location_length":92,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":1547,"query_location_length":7,"schema_name":"","table_name":"table_1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table_1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":1569,"query_location_length":7,"schema_name":"","table_name":"table_2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["table_2"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":1588,"query_location_length":63,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":1588,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1588,"query_location_length":10,"column_names":["table_1","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1601,"query_location_length":10,"column_names":["table_2","id"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":1624,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1624,"query_location_length":12,"column_names":["table_1","date"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":1639,"query_location_length":12,"column_names":["table_2","date"]}}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":1661,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":1668,"query_location_length":6,"schema_name":"","table_name":"output","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["output"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT i\n\t, s\n\t, COUNT(DISTINCT s) OVER( ORDER BY i, s NULLS LAST ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING) AS c\nFROM figure1\nORDER BY i, s NULLS LAST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["s"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"c","query_location":17,"query_location_length":90,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["s"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":true,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["s"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":118,"query_location_length":7,"schema_name":"","table_name":"figure1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["figure1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"WITH t AS (SELECT 0 AS x),\nu AS (\n SELECT * FROM t WHERE x \u003e= 5000\n UNION ALL\n SELECT * FROM t\n)\nSELECT x, count() OVER () FROM u ORDER BY x DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":18,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}},{"key":"u","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":45,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":60,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":4,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5000}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":95,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":102,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":1,"column_names":["x"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":116,"query_location_length":15,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":137,"query_location_length":1,"schema_name":"","table_name":"u","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["u"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"with src(id, k, x) as (values (1, interval '26' day, 10), (2, interval '30' day, 1))\nselect id, k, sum(x) over (order by k range between interval '4' day preceding and current row)\nfrom src order by id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":199,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[{"key":"src","value":{"aliases":["id","k","x"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":17,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"26"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":10}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":17,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"30"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["k"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":99,"query_location_length":81,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":1,"column_names":["k"]}}],"start":"EXPR_PRECEDING_RANGE","end":"CURRENT_ROW_RANGE","start_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":137,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":3,"value":{"type":{"id":"VARCHAR","type_info":null},"is_null":false,"value":"4"}},"cast_type":{"id":"DOUBLE","type_info":null},"try_cast":false}}]},"cast_type":{"id":"INTEGER","type_info":null},"try_cast":false}}]},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["x"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":186,"query_location_length":3,"schema_name":"","table_name":"src","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["src"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT nth_value(c, 14) OVER win \nFROM t3\n WINDOW win AS (\n ORDER BY c, b, a\n ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP \n )","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"","query_location":7,"query_location_length":25,"function_name":"nth_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["a"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"GROUP","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":14}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,\n rank() OVER win,\n dense_rank() OVER win\nFROM t3\n WINDOW win AS ( ORDER BY c NULLS LAST, b NULLS LAST, a NULLS LAST\n ROWS BETWEEN 6 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS )\n ORDER BY 1 NULLS FIRST, 2 NULLS FIRST, 3 NULLS FIRST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":287,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":302,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":317,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":39,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":28,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["c"]}}]},{"class":"WINDOW","type":"WINDOW_RANK","alias":"","query_location":61,"query_location_length":15,"function_name":"rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},{"class":"WINDOW","type":"WINDOW_RANK_DENSE","alias":"","query_location":91,"query_location_length":21,"function_name":"dense_rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":118,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,\n rank() OVER win,\n dense_rank() OVER win\nFROM t3\n WINDOW win AS ( ORDER BY c NULLS LAST, b NULLS LAST, a NULLS LAST\n ROWS BETWEEN 6 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES )\n ORDER BY 1 NULLS FIRST, 2 NULLS FIRST, 3 NULLS FIRST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":282,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":297,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":312,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":3}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":39,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":28,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}},"exclude_clause":"TIES","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["c"]}}]},{"class":"WINDOW","type":"WINDOW_RANK","alias":"","query_location":61,"query_location_length":15,"function_name":"rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"TIES","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]},{"class":"WINDOW","type":"WINDOW_RANK_DENSE","alias":"","query_location":91,"query_location_length":21,"function_name":"dense_rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":179,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":213,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":6}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"TIES","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":118,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT lead(c0, (SELECT UNNEST([0])), (SELECT UNNEST([1]))) OVER (ROWS BETWEEN 2 PRECEDING AND 4 PRECEDING)\nFROM (VALUES (1, 2)) a(c0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_LEAD","alias":"","query_location":7,"query_location_length":100,"function_name":"lead","schema":"","catalog":"","partitions":[],"orders":[],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_PRECEDING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":4}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":2,"column_names":["c0"]}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":16,"query_location_length":20,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":11,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":0}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":38,"query_location_length":20,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":11,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}}}]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}]}],"from_table":{"type":"SUBQUERY","alias":"a","sample":null,"query_location":113,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":1}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":2}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["c0"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} -{"sql":"SELECT ntile(5) OVER (ORDER BY ten, four) nn FROM tenk1 ORDER BY ten, four, nn","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":3,"column_names":["ten"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":4,"column_names":["four"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":2,"column_names":["nn"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTILE","alias":"nn","query_location":7,"query_location_length":34,"function_name":"ntile","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["ten"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["four"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"value":{"type":{"id":"INTEGER","type_info":null},"is_null":false,"value":5}}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":5,"schema_name":"","table_name":"tenk1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tenk1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*), sum(i) from '{TEST_DIR}/test_block_size.parquet';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":36,"schema_name":"","table_name":"{TEST_DIR}/test_block_size.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/test_block_size.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), SUM(c0) FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":2,"column_names":["c0"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), SUM(c0) FROM wide_tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":2,"column_names":["c0"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":8,"schema_name":"","table_name":"wide_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["wide_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(a), COUNT(a) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*), sum(c) FROM t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT compression FROM pragma_storage_info('db.t') WHERE segment_type = 'BLOB' AND compression != 'Uncompressed';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["compression"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":24,"query_location_length":27,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":6,"literal":{"kind":"STRING","text":"db.t"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":58,"query_location_length":55,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":12,"column_names":["segment_type"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":6,"literal":{"kind":"STRING","text":"BLOB"}}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":84,"query_location_length":29,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":11,"column_names":["compression"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":14,"literal":{"kind":"STRING","text":"Uncompressed"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT val = ('row1023' || repeat('Y', 5000))::BLOB FROM db.t2 WHERE id = 1023;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":44,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["val"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":30,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":9,"literal":{"kind":"STRING","text":"row1023"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":17,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"Y"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5000"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":5,"schema_name":"db","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","t2"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1023"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT total_blocks FROM pragma_database_size()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["total_blocks"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":22,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_database_size","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["pragma_database_size"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT segment_info FROM pragma_storage_info('bp_tbl', loaded_segments_only=true) LIMIT 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["segment_info"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":25,"query_location_length":56,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":8,"literal":{"kind":"STRING","text":"bp_tbl"}}},{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":20,"column_names":["loaded_segments_only"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(task_count) FROM duckdb_logs_parsed('AsyncTaskSchedule')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":10,"column_names":["task_count"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_logs_parsed","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":19,"literal":{"kind":"STRING","text":"AsyncTaskSchedule"}}}],"qualified_name":{"path":["duckdb_logs_parsed"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM read_duckdb('{TEST_DIR}/read_duckdb_index.db') WHERE i=42873","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":46,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_duckdb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":33,"literal":{"kind":"STRING","text":"{TEST_DIR}/read_duckdb_index.db"}}}],"qualified_name":{"path":["read_duckdb"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":5,"literal":{"kind":"INTEGER","text":"42873"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(val) FROM '{TEST_DIR}/read_duckdb_top_n*.db' WHERE grp::VARCHAR = '2'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":34,"schema_name":"","table_name":"{TEST_DIR}/read_duckdb_top_n*.db","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{TEST_DIR}/read_duckdb_top_n*.db"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":18,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":3,"column_names":["grp"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT k, v FROM big WHERE k IN (10, 200000, 11, 200001, 12, 200002) ORDER BY k;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["k"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":3,"schema_name":"","table_name":"big","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["big"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":32,"query_location_length":36,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["k"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":6,"literal":{"kind":"INTEGER","text":"200000"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":6,"literal":{"kind":"INTEGER","text":"200001"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":6,"literal":{"kind":"INTEGER","text":"200002"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT rowid, i, v, added FROM rowid_gap_alter.t WHERE i IN (2047, 4096) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":5,"column_names":["added"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":17,"schema_name":"rowid_gap_alter","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_alter","t"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":60,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2047"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":4,"literal":{"kind":"INTEGER","text":"4096"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT min(rowid), max(rowid), count(*) FROM rowid_gap_vacuum_idx.t WHERE i \u003e= 4096;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":22,"schema_name":"rowid_gap_vacuum_idx","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_vacuum_idx","t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":74,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"literal":{"kind":"INTEGER","text":"4096"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT rowid, i FROM remap_geom.t WHERE i = 2048;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"remap_geom","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["remap_geom","t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":40,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT min(rowid), max(rowid), count(*) FROM rowid_gap_old_storage_idx.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":27,"schema_name":"rowid_gap_old_storage_idx","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_old_storage_idx","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT min(rowid), max(rowid), count(*) FROM remap_tasks.t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":13,"schema_name":"remap_tasks","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["remap_tasks","t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT rowid, i FROM remap_collision.t WHERE g = 9 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":17,"schema_name":"remap_collision","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["remap_collision","t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["g"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM rowid_gap_lookup_db.leading WHERE rowid = 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":27,"schema_name":"rowid_gap_lookup_db","table_name":"leading","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_lookup_db","leading"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":5,"column_names":["rowid"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT rowid, i FROM rowid_gap_lookup_db.middle WHERE rowid IN (42, 122880, 245760, 368640) ORDER BY rowid;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":5,"column_names":["rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["rowid"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":26,"schema_name":"rowid_gap_lookup_db","table_name":"middle","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_gap_lookup_db","middle"]}},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":63,"query_location_length":28,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":5,"column_names":["rowid"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":6,"literal":{"kind":"INTEGER","text":"122880"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":6,"literal":{"kind":"INTEGER","text":"245760"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":6,"literal":{"kind":"INTEGER","text":"368640"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LENGTH(a) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tags FROM duckdb_databases() WHERE database_name = 'storage_versions66';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["tags"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":17,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":36,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":20,"literal":{"kind":"STRING","text":"storage_versions66"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT current_setting('max_temp_directory_size') a WHERE a == '0 bytes';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":7,"query_location_length":42,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":25,"literal":{"kind":"STRING","text":"max_temp_directory_size"}}}],"qualified_name":{"path":["current_setting"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":9,"literal":{"kind":"STRING","text":"0 bytes"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM TBL WHERE id=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"TBL","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["TBL"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COALESCE(s.child_stats.s.total_string_length, 20000) FROM (SELECT stats(b) s FROM test LIMIT 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_COALESCE","alias":"","query_location":7,"query_location_length":52,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":35,"column_names":["s","child_stats","s","total_string_length"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":5,"literal":{"kind":"INTEGER","text":"20000"}}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":65,"query_location_length":37,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":73,"query_location_length":8,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":89,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM a WHERE id=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":22,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM f","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"f","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["f"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t FROM interval WHERE t \u003e INTERVAL '10' YEAR ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"interval","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["interval"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["t"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":18,"function_name":"to_years","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":4,"literal":{"kind":"STRING","text":"10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_years"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM unsigned WHERE c = 42","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"unsigned","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["unsigned"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["c"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select v from tbl WHERE i \u003c 10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":24,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM (VALUES\n\t(1, '{\"a\": 1, \"b\": \"x\", \"c\": 100}'::VARIANT),\n\t(2, '{\"a\": 2, \"b\": \"y\"}'::VARIANT),\n\t(3, '{\"a\": 3, \"b\": \"z\", \"d\": [1, 2, 3]}'::VARIANT),\n\t(4, NULL::VARIANT),\n\t(5, '{\"a\": 40, \"b\": \"m\"}'::VARIANT),\n\t(6, '{\"a\": 6, \"b\": \"hello\", \"g\": \"extra\"}'::VARIANT),\n\t(7, '{\"a\": 7, \"b\": \"aaa\"}'::VARIANT),\n\t(8, '{\"a\": 5, \"b\": \"q\", \"e\": {\"nested\": true}}'::VARIANT),\n\t(9, '{\"a\": 5, \"b\": \"q\"}'::VARIANT),\n\t(10, '{\"a\": 100, \"b\": \"z\"}'::VARIANT)\n) tbl(id, v) WHERE v \u003e '{\"a\": 5, \"b\": \"q\"}'::VARIANT ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":511,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":15,"query_location_length":435,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":30,"literal":{"kind":"STRING","text":"{\"a\": 1, \"b\": \"x\", \"c\": 100}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":20,"literal":{"kind":"STRING","text":"{\"a\": 2, \"b\": \"y\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":148,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":36,"literal":{"kind":"STRING","text":"{\"a\": 3, \"b\": \"z\", \"d\": [1, 2, 3]}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":150,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":162,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":169,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":165,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":171,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":183,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":207,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":186,"query_location_length":21,"literal":{"kind":"STRING","text":"{\"a\": 40, \"b\": \"m\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":209,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":221,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":262,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":224,"query_location_length":38,"literal":{"kind":"STRING","text":"{\"a\": 6, \"b\": \"hello\", \"g\": \"extra\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":264,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":276,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":301,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":279,"query_location_length":22,"literal":{"kind":"STRING","text":"{\"a\": 7, \"b\": \"aaa\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":303,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":315,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":361,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":318,"query_location_length":43,"literal":{"kind":"STRING","text":"{\"a\": 5, \"b\": \"q\", \"e\": {\"nested\": true}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":363,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":375,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":398,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":378,"query_location_length":20,"literal":{"kind":"STRING","text":"{\"a\": 5, \"b\": \"q\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":400,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":412,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":438,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":416,"query_location_length":22,"literal":{"kind":"STRING","text":"{\"a\": 100, \"b\": \"z\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":440,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","v"]},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":468,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":468,"query_location_length":1,"column_names":["v"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":492,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":472,"query_location_length":20,"literal":{"kind":"STRING","text":"{\"a\": 5, \"b\": \"q\"}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":494,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.min IS NULL\nFROM (SELECT stats(variant_comparator(col)) s FROM objs LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":13,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["s","min"]}]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":26,"query_location_length":59,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":34,"query_location_length":30,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":23,"function_name":"variant_comparator","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":3,"column_names":["col"]}}],"qualified_name":{"path":["variant_comparator"]}}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":4,"schema_name":"","table_name":"objs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["objs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v.x FROM variant_extract_pushdown WHERE v.x = 5 OR v.y = 400 ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["v","x"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":24,"schema_name":"","table_name":"variant_extract_pushdown","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["variant_extract_pushdown"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":47,"query_location_length":20,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["v","x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":3,"column_names":["v","y"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":3,"literal":{"kind":"INTEGER","text":"400"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select s.fully_shredded.stats.min, s.fully_shredded.stats.max from (select stats(col.a.c) s from tbl limit 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":26,"column_names":["s","fully_shredded","stats","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":26,"column_names":["s","fully_shredded","stats","max"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":67,"query_location_length":42,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":75,"query_location_length":14,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":7,"column_names":["col","a","c"]}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":97,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(v AS STRUCT(zz INTEGER)) FROM t WHERE id = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":29,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":18,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"zz","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(obj.a.missing) FROM wrong_type;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":13,"column_names":["obj","a","missing"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":10,"schema_name":"","table_name":"wrong_type","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["wrong_type"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM pragma_storage_info('shredded_integer') WHERE column_path = '[0, 2, 2]'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_storage_info","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":18,"literal":{"kind":"STRING","text":"shredded_integer"}}}],"qualified_name":{"path":["pragma_storage_info"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":11,"column_names":["column_path"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":11,"literal":{"kind":"STRING","text":"[0, 2, 2]"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, n.payload.obj.a::BIGINT, n.payload.obj.b::VARCHAR\nFROM nested_variant_view WHERE id \u003e= 19 ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":15,"column_names":["n","payload","obj","a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":15,"column_names":["n","payload","obj","b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":66,"query_location_length":19,"schema_name":"","table_name":"nested_variant_view","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_variant_view"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":92,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":2,"literal":{"kind":"INTEGER","text":"19"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT wal_size FROM pragma_database_size() WHERE database_name = 'autocheckpoint_db';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["wal_size"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":22,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"pragma_database_size","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["pragma_database_size"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":50,"query_location_length":35,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":19,"literal":{"kind":"STRING","text":"autocheckpoint_db"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM tbl where (a) = 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":31,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM tbl WHERE a = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select r from original;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"original","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["original"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t WHERE a='w'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":3,"literal":{"kind":"STRING","text":"w"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), SUM(a), SUM(b), MIN(a), MAX(a), MIN(b), MAX(b) FROM test WHERE a\u003e0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":80,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM timestamp ORDER BY t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["t"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (FALSE) IN (TRUE, (SELECT TIME '13:35:07' FROM t1) BETWEEN t0.c0 AND t0.c0) FROM t0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":18,"query_location_length":64,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},{"class":"BETWEEN","type":"COMPARE_BETWEEN","alias":"","query_location":58,"query_location_length":23,"input":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":25,"query_location_length":32,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"13:35:07"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"lower":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":5,"column_names":["t0","c0"]},"upper":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":5,"column_names":["t0","c0"]}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":88,"query_location_length":2,"schema_name":"","table_name":"t0","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t0"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM integers i1 WHERE i=ANY(SELECT i FROM integers WHERE i=i1.i) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":32,"query_location_length":42,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i=ALL(SELECT i FROM integers WHERE i=i1.i OR i IS NULL) FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":55,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":42,"query_location_length":19,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":42,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":4,"column_names":["i1","i"]}},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":54,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["i"]}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_NOTEQUAL"}]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":68,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT row(NULL::INT, 8) IN (SELECT * FROM (VALUES (2, 6), (3, 7)) rhs(x, y)),\n row(NULL::INT, 8) NOT IN (SELECT * FROM (VALUES (2, 6), (3, 7)) rhs(x, y))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":28,"query_location_length":49,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":36,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":43,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_EQUAL"},{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":86,"query_location_length":74,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":111,"query_location_length":49,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":119,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":126,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":17,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":94,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":96,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_EQUAL"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT row(map([1, 2], [1, NULL::INT]), 0) IN (\n\tSELECT * FROM (VALUES (map([1, 2], [1, 2]), 0)) rhs(a, b)\n)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":46,"query_location_length":62,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":56,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"rhs","sample":null,"query_location":63,"query_location_length":33,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":19,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":76,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a","b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":27,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (0, 0) \u003c ANY(SELECT 1, 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":25,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_LESSTHAN"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (0, 0) \u003c ALL(SELECT 1, 0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":25,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_GREATERTHANOREQUALTO"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (1, 2) = ANY(SELECT 1, 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":25,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (1, 1) \u003c ANY(SELECT 1, 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":25,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_LESSTHAN"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (1, NULL::INT) \u003c\u003e ANY (SELECT * FROM (VALUES (1, 2)) t(x, y))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":61,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":37,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":44,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_NOTEQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 = ANY(SELECT 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":17,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 IN (SELECT * FROM integers) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":12,"query_location_length":24,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":20,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 2 \u003e SOME(SELECT 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":18,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"comparison_type":"COMPARE_GREATERTHAN"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM integers WHERE i \u003c= ALL(SELECT i FROM integers WHERE i IS NOT NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":29,"query_location_length":52,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":69,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_GREATERTHAN"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, i \u003c\u003e ANY(SELECT i FROM integers WHERE i\u003e10) FROM integers ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":43,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":48,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_NOTEQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM integers WHERE i \u003e ANY(SELECT i FROM integers) ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":29,"query_location_length":31,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":51,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_GREATERTHAN"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, i \u003e= ANY(SELECT i1.i FROM integers i1, integers i2, integers i3, integers i4, integers i5, integers i6 WHERE i1.i IS NOT NULL) FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":126,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":4,"column_names":["i1","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":31,"query_location_length":81,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":36,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":49,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"i3","sample":null,"query_location":62,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"i4","sample":null,"query_location":75,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"i5","sample":null,"query_location":88,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"i6","sample":null,"query_location":101,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":124,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":4,"column_names":["i1","i"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_GREATERTHANOREQUALTO"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":142,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'B' COLLATE NOCASE \u003e= ALL (SELECT x COLLATE NOCASE FROM (VALUES ('a'),('c')) s(x));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":82,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLLATE","type":"COLLATE","alias":"","query_location":41,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["x"]},"collation":"NOCASE"}],"from_table":{"type":"SUBQUERY","alias":"s","sample":null,"query_location":63,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLLATE","type":"COLLATE","alias":"","query_location":7,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"B"}},"collation":"NOCASE"},"comparison_type":"COMPARE_LESSTHAN"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l IN (SELECT i1.l FROM (SELECT * FROM lists i1 WHERE i1.l=lists.l) i1 RIGHT JOIN generate_series(1, 2, 1) tbl(s) ON i1.l=ARRAY[tbl.s]) FROM lists ORDER BY l NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":1,"column_names":["l"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":12,"query_location_length":129,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["i1","l"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":77,"query_location_length":63,"left":{"type":"SUBQUERY","alias":"i1","sample":null,"query_location":30,"query_location_length":43,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":38,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":45,"query_location_length":8,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":60,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":4,"column_names":["i1","l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":7,"column_names":["lists","l"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":88,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["s"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":123,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":123,"query_location_length":4,"column_names":["i1","l"]},"right":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":128,"query_location_length":12,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":5,"column_names":["tbl","s"]}]}},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":147,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM integers i1 WHERE EXISTS(SELECT i FROM integers WHERE i=i1.i) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":32,"query_location_length":43,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT COVAR_POP(i2.i, i1.i) FROM integers i2) FROM integers i1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":47,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":21,"function_name":"covar_pop","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":4,"column_names":["i2","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":4,"column_names":["i1","i"]}}],"qualified_name":{"path":["covar_pop"]}}],"from_table":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":42,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":60,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM t WHERE NOT EXISTS (SELECT 1 FROM t WHERE NOT EXISTS (SELECT 1 FROM e));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":22,"query_location_length":63,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":26,"query_location_length":59,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":56,"query_location_length":28,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":60,"query_location_length":24,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":82,"query_location_length":1,"schema_name":"","table_name":"e","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["e"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE EXISTS(SELECT * FROM integers) ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":29,"query_location_length":30,"subquery_type":"EXISTS","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":43,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(i) FROM integers WHERE 1 IN (SELECT * FROM integers)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":39,"query_location_length":24,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":47,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"comparison_type":"COMPARE_EQUAL"},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT depth, id AS selected FROM joined_walk) q,\n (VALUES (1), (2)) v(x) WHERE selected = 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":82,"left":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":21,"query_location_length":47,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":5,"column_names":["depth"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"selected","query_location":36,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":11,"schema_name":"","table_name":"joined_walk","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["joined_walk"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"v","sample":null,"query_location":76,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":105,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":8,"column_names":["selected"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM owner_walk a JOIN owner_walk b ON a.person = b.person WHERE a.person = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":34,"query_location_length":40,"left":{"type":"BASE_TABLE","alias":"a","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"owner_walk","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["owner_walk"]}},"right":{"type":"BASE_TABLE","alias":"b","sample":null,"query_location":39,"query_location_length":12,"schema_name":"","table_name":"owner_walk","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["owner_walk"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":8,"column_names":["a","person"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":8,"column_names":["b","person"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":8,"column_names":["a","person"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH o AS MATERIALIZED (SELECT * FROM person WHERE selected) SELECT count(*),sum(q.x) FROM o JOIN (SELECT * FROM expanded) q ON o.id = q.id AND o.tag = q.tag;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"o","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":6,"schema_name":"","table_name":"person","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["person"]}},"where_clause":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":8,"column_names":["selected"]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":8,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":3,"column_names":["q","x"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":93,"query_location_length":64,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":91,"query_location_length":1,"schema_name":"","table_name":"o","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["o"]}},"right":{"type":"SUBQUERY","alias":"q","sample":null,"query_location":98,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":106,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":113,"query_location_length":8,"schema_name":"","table_name":"expanded","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["expanded"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":128,"query_location_length":29,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":128,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":4,"column_names":["o","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":4,"column_names":["q","id"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":144,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":5,"column_names":["o","tag"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":5,"column_names":["q","tag"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT *\nFROM\n (SELECT 42 AS c1) AS ref,\n (SELECT a + b + 1\n FROM\n (SELECT 1) t1(a),\n (SELECT (SELECT (SELECT ref.c1 + 1)) + 1) t2(b)\n )\n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":141,"left":{"type":"SUBQUERY","alias":"ref","sample":null,"query_location":16,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c1","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"","sample":null,"query_location":44,"query_location_length":106,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":65,"query_location_length":80,"left":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":75,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":98,"query_location_length":41,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":135,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":106,"query_location_length":28,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":114,"query_location_length":19,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":129,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":6,"column_names":["ref","c1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers, LATERAL (SELECT [i + 1]) t(k), LATERAL (SELECT UNNEST(k)) t2(l) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":78,"left":{"type":"JOIN","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":32,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["k"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":63,"query_location_length":18,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["l"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers LEFT JOIN LATERAL (SELECT integers.i WHERE integers.i IN (1, 3)) t(b) ON (i=b) ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":23,"query_location_length":78,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":41,"query_location_length":46,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":10,"column_names":["integers","i"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"OPERATOR","type":"COMPARE_IN","alias":"","query_location":80,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":10,"column_names":["integers","i"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":97,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["b"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT currval('source_calls');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"currval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":14,"literal":{"kind":"STRING","text":"source_calls"}}}],"qualified_name":{"path":["currval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM walk_rows WHERE id = 1000;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"walk_rows","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["walk_rows"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":37,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 1 from\n text_tbl as tt1\n inner join text_tbl as tt2 on (tt1.f1 = 'foo')\n left join text_tbl as tt3 on (tt3.f1 = 'foo')\n left join text_tbl as tt4 on (tt3.f1 = tt4.f1),\n lateral (select tt4.f1 as c0 from text_tbl as tt5 limit 1) as ss1\nwhere tt1.f1 = ss1.c0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":237,"left":{"type":"JOIN","alias":"","sample":null,"query_location":131,"query_location_length":46,"left":{"type":"JOIN","alias":"","sample":null,"query_location":83,"query_location_length":45,"left":{"type":"JOIN","alias":"","sample":null,"query_location":34,"query_location_length":46,"left":{"type":"BASE_TABLE","alias":"tt1","sample":null,"query_location":16,"query_location_length":15,"schema_name":"","table_name":"text_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["text_tbl"]}},"right":{"type":"BASE_TABLE","alias":"tt2","sample":null,"query_location":45,"query_location_length":15,"schema_name":"","table_name":"text_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["text_tbl"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":6,"column_names":["tt1","f1"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":5,"literal":{"kind":"STRING","text":"foo"}}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"tt3","sample":null,"query_location":93,"query_location_length":15,"schema_name":"","table_name":"text_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["text_tbl"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":113,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":113,"query_location_length":6,"column_names":["tt3","f1"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":5,"literal":{"kind":"STRING","text":"foo"}}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"tt4","sample":null,"query_location":141,"query_location_length":15,"schema_name":"","table_name":"text_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["text_tbl"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":161,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":161,"query_location_length":6,"column_names":["tt3","f1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":6,"column_names":["tt4","f1"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"ss1","sample":null,"query_location":189,"query_location_length":50,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":237,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c0","query_location":197,"query_location_length":6,"column_names":["tt4","f1"]}],"from_table":{"type":"BASE_TABLE","alias":"tt5","sample":null,"query_location":215,"query_location_length":15,"schema_name":"","table_name":"text_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["text_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":253,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":253,"query_location_length":6,"column_names":["tt1","f1"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":262,"query_location_length":6,"column_names":["ss1","c0"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from (select f1/2 as x from int4_tbl) ss1 join int4_tbl i4 on x = f1,\n lateral (select x) ss2(y);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":97,"left":{"type":"JOIN","alias":"","sample":null,"query_location":51,"query_location_length":26,"left":{"type":"SUBQUERY","alias":"ss1","sample":null,"query_location":14,"query_location_length":32,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":22,"query_location_length":4,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["f1"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["/"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"int4_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int4_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"BASE_TABLE","alias":"i4","sample":null,"query_location":56,"query_location_length":11,"schema_name":"","table_name":"int4_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int4_tbl"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":71,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":2,"column_names":["f1"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"SUBQUERY","alias":"ss2","sample":null,"query_location":89,"query_location_length":10,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["x"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["y"]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x.* FROM outer_rows o,\nLATERAL (SELECT y.* FROM range(1) r, LATERAL (SELECT o.*) y) x ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":3,"relation_name":"x","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":11,"query_location_length":81,"left":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":16,"query_location_length":12,"schema_name":"","table_name":"outer_rows","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["outer_rows"]}},"right":{"type":"SUBQUERY","alias":"x","sample":null,"query_location":38,"query_location_length":52,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":46,"query_location_length":3,"relation_name":"y","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":50,"query_location_length":39,"left":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":55,"query_location_length":10,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"SUBQUERY","alias":"y","sample":null,"query_location":75,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":83,"query_location_length":3,"relation_name":"o","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT x.* FROM generated_outer o, LATERAL (SELECT o.*) x ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":3,"relation_name":"x","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":11,"query_location_length":46,"left":{"type":"BASE_TABLE","alias":"o","sample":null,"query_location":16,"query_location_length":17,"schema_name":"","table_name":"generated_outer","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["generated_outer"]}},"right":{"type":"SUBQUERY","alias":"x","sample":null,"query_location":43,"query_location_length":12,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":51,"query_location_length":3,"relation_name":"o","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select (select MIN(val) from unnest(a) t(val)) from (select ARRAY[1, 2, 3, NULL]) t(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":29,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["unnest"]}},"column_name_alias":["val"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":52,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":60,"query_location_length":20,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from (select array[42, 43, 44]) t(a) join lateral (select unnest(t.a)) t2(b) on (a[1]\u003cb) order by all;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":46,"query_location_length":51,"left":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":22,"query_location_length":17,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"literal":{"kind":"INTEGER","text":"44"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"SUBQUERY","alias":"t2","sample":null,"query_location":59,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":11,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":74,"query_location_length":3,"column_names":["t","a"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"condition":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":90,"query_location_length":6,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":91,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["b"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ARRAY(SELECT i FROM t ORDER BY t.rowid)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":39,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":18446744073709551615,"query_location_length":0,"case_checks":[{"when_expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__array_internal_idx_1"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":18446744073709551615,"query_location_length":0,"index":1}}],"qualified_name":{"path":["array_agg"]}}]},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["__array_internal_idx_1"]}}]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":18446744073709551615,"query_location_length":0,"index":1}}],"qualified_name":{"path":["array_agg"]}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":7,"column_names":["t","rowid"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"__array_internal_idx_1","query_location":38,"query_location_length":7,"column_names":["t","rowid"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, ARRAY(\n\tSELECT i FROM integers WHERE i1.i=i\n) top\nFROM integers i1\nORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"top","query_location":10,"query_location_length":45,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":18446744073709551615,"query_location_length":0,"case_checks":[{"when_expr":{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":18446744073709551615,"query_location_length":0,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":18446744073709551615,"query_location_length":0,"index":1}}],"qualified_name":{"path":["array_agg"]}}]},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"array_agg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"POSITIONAL_REFERENCE","type":"POSITIONAL_REFERENCE","alias":"","query_location":18446744073709551615,"query_location_length":0,"index":1}}],"qualified_name":{"path":["array_agg"]}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":47,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":65,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM lineitem GROUP BY (SELECT SUM(o_orderke) OVER () FROM orders)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":null,"group_expressions":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":32,"query_location_length":43,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":40,"query_location_length":22,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":9,"column_names":["o_orderke"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":68,"query_location_length":6,"schema_name":"","table_name":"orders","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["orders"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM((SELECT SUM(i))) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":11,"query_location_length":15,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT COUNT(*) FROM (SELECT UNNEST(l1.l, max_depth := 2) u)) FROM lists l1 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":62,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":29,"query_location_length":39,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"u","query_location":37,"query_location_length":28,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":4,"column_names":["l1","l"]}},{"name":"max_depth","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"max_depth","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"l1","sample":null,"query_location":75,"query_location_length":8,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT max((SELECT subq_0.c0 AS c1)) OVER () AS c6) FROM (SELECT NULL AS c0) AS subq_0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":52,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"c6","query_location":15,"query_location_length":37,"function_name":"max","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":19,"query_location_length":24,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"c1","query_location":27,"query_location_length":9,"column_names":["subq_0","c0"]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"subq_0","sample":null,"query_location":65,"query_location_length":19,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"c0","query_location":73,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 1 where (1,2) not in (select 1,2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":15,"query_location_length":25,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":28,"query_location_length":12,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}},"comparison_type":"COMPARE_EQUAL"}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers s1 LEFT OUTER JOIN integers s2 ON s1.i=s2.i AND (SELECT CASE WHEN s2.i\u003e2 THEN TRUE ELSE FALSE END) ORDER BY s1.i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":131,"query_location_length":4,"column_names":["s1","i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":26,"query_location_length":95,"left":{"type":"BASE_TABLE","alias":"s1","sample":null,"query_location":14,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"right":{"type":"BASE_TABLE","alias":"s2","sample":null,"query_location":42,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":57,"query_location_length":64,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":4,"column_names":["s1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["s2","i"]}},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":71,"query_location_length":50,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":79,"query_location_length":41,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":89,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":4,"column_names":["s2","i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":5,"literal":{"kind":"BOOLEAN","text":"false"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (SELECT (SELECT SUM(i) FROM integers)+42+i1.i) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":88,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":46,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18,"query_location_length":29,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":4,"column_names":["i1","i"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":67,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (SELECT MIN(i) FROM integers GROUP BY GROUPING SETS(i1.i, i) HAVING i1.i=i) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":75,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":4,"column_names":["i1","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0],[1]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["i"]}},"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":96,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(DISTINCT\n\t(SELECT concat(gen_random_uuid()::VARCHAR, r::VARCHAR))\n ) as total_seats\nFROM (SELECT 1 FROM generate_series(1, 100, 1)) AS t(r)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"total_seats","query_location":7,"query_location_length":75,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":true,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":23,"query_location_length":55,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":46,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":17,"function_name":"gen_random_uuid","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["gen_random_uuid"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":1,"column_names":["r"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["concat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":103,"query_location_length":42,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":118,"query_location_length":26,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":134,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["r"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select i, (select i1.i + i + i from generate_series(1, 100, 1) t(i) ORDER BY i DESC OFFSET 99) from integers i1 order by i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":84,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":null,"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":2,"literal":{"kind":"INTEGER","text":"99"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":4,"column_names":["i1","i"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":36,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":100,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (WITH i2 AS (SELECT 42+i1.i AS j) SELECT j FROM i2) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":51,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"i2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":32,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":4,"column_names":["i1","i"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":2,"schema_name":"","table_name":"i2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["i2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":72,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, i=ANY(WITH i2 AS (SELECT i FROM integers WHERE 1=0 AND i1.i=i) SELECT i FROM i2) AS j FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"j","query_location":10,"query_location_length":80,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"i2","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":57,"query_location_length":14,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":3,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["i"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":2,"schema_name":"","table_name":"i2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["i2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":101,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (SELECT SUM((SELECT SUM(i))) OVER ()) FROM integers GROUP BY i ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":37,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":18,"query_location_length":28,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":22,"query_location_length":15,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":71,"query_location_length":1,"column_names":["i"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, (SELECT COUNT(i2.*) FROM integers i2 WHERE i2.i\u003ei1.i) FROM integers i1 ORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":53,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":11,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"STAR","type":"STAR","alias":"","query_location":24,"query_location_length":4,"relation_name":"i2","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"i2","sample":null,"query_location":35,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":53,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":4,"column_names":["i2","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":4,"column_names":["i1","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":69,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE WHEN 1 IN (SELECT (SELECT MAX(col7))) THEN 2 ELSE NULL END FROM another_T t1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":63,"case_checks":[{"when_expr":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":22,"query_location_length":27,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":30,"query_location_length":18,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":9,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":4,"column_names":["col7"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"comparison_type":"COMPARE_EQUAL"},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":76,"query_location_length":12,"schema_name":"","table_name":"another_T","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["another_T"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT y FROM test t2 WHERE t1.x = 5) IS NOT NULL FROM test t1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":46,"query_location_length":11,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":38,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["y"]}],"from_table":{"type":"BASE_TABLE","alias":"t2","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":36,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["t1","x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}]}],"from_table":{"type":"BASE_TABLE","alias":"t1","sample":null,"query_location":63,"query_location_length":7,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, a\u003e=ANY(SELECT test2.a+c-b FROM test2 WHERE c\u003e=b AND str=str2) FROM test ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":10,"query_location_length":61,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":7,"column_names":["test2","a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":41,"query_location_length":5,"schema_name":"","table_name":"test2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test2"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":53,"query_location_length":17,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":53,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":62,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":3,"column_names":["str"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":4,"column_names":["str2"]}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["a"]},"comparison_type":"COMPARE_GREATERTHANOREQUALTO"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT 42, 41 AS x) v1(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"v1","sample":null,"query_location":14,"query_location_length":20,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"41"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT 42 AS a, 44 AS a) tbl1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl1","sample":null,"query_location":14,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":31,"query_location_length":2,"literal":{"kind":"INTEGER","text":"44"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a*(WITH cte AS (SELECT 42) SELECT * FROM cte) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":9,"query_location_length":43,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"cte","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":41,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":3,"schema_name":"","table_name":"cte","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cte"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":58,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i IN (SELECT i1.i FROM (SELECT * FROM integers i1 WHERE i1.i=integers.i) i1 RIGHT JOIN generate_series(1, 2, 1) tbl(i) ON i1.i=tbl.i) FROM integers ORDER BY i NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":164,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":12,"query_location_length":128,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["i1","i"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":83,"query_location_length":56,"left":{"type":"SUBQUERY","alias":"i1","sample":null,"query_location":30,"query_location_length":49,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":38,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"i1","sample":null,"query_location":45,"query_location_length":11,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":10,"column_names":["integers","i"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":94,"query_location_length":31,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":110,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":113,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":129,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":129,"query_location_length":4,"column_names":["i1","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":5,"column_names":["tbl","i"]}},"join_type":"RIGHT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":146,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT 42) AS k, MAX(i) FROM integers GROUP BY k","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"k","query_location":7,"query_location_length":11,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["k"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM integers WHERE i \u003e (SELECT i FROM integers WHERE i=1) ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":29,"query_location_length":38,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":33,"query_location_length":34,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":48,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT UNNEST(i)) FROM (VALUES ([1])) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":18,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":31,"query_location_length":14,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT 4=ANY(SELECT UNNEST(i))) FROM (VALUES ([1, 2, 3, NULL])) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":32,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":15,"query_location_length":23,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"comparison_type":"COMPARE_EQUAL"}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":45,"query_location_length":26,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT v FROM strings WHERE v=s1.v) FROM strings s1 ORDER BY v","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":36,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":36,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["v"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":4,"column_names":["s1","v"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"BASE_TABLE","alias":"s1","sample":null,"query_location":49,"query_location_length":10,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a.i,a.j,b.r,b.j FROM (SELECT i, j FROM test) AS a INNER JOIN (SELECT i+1 AS r,j FROM test) AS b ON a.i=b.r ORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["a","i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":3,"column_names":["a","j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["b","r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":3,"column_names":["b","j"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":57,"query_location_length":56,"left":{"type":"SUBQUERY","alias":"a","sample":null,"query_location":28,"query_location_length":23,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":46,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"SUBQUERY","alias":"b","sample":null,"query_location":68,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"r","query_location":77,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":106,"query_location_length":7,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":3,"column_names":["a","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":3,"column_names":["b","r"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.name, e.course, e.grade FROM students s, exams e WHERE s.id=e.sid AND (s.major = 'CS' OR s.major = 'Games Eng') AND e.grade \u003c= (SELECT AVG(e2.grade) - 1 FROM exams e2 WHERE s.id=e2.sid OR (e2.curriculum=s.major AND s.year\u003e=e2.year)) ORDER BY name, course;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":251,"query_location_length":4,"column_names":["name"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":257,"query_location_length":6,"column_names":["course"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["s","name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":8,"column_names":["e","course"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":7,"column_names":["e","grade"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":24,"left":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":38,"query_location_length":10,"schema_name":"","table_name":"students","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["students"]}},"right":{"type":"BASE_TABLE","alias":"e","sample":null,"query_location":50,"query_location_length":7,"schema_name":"","table_name":"exams","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["exams"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":64,"query_location_length":177,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":4,"column_names":["s","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":5,"column_names":["e","sid"]}},{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":80,"query_location_length":39,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":7,"column_names":["s","major"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"STRING","text":"CS"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":98,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":7,"column_names":["s","major"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":11,"literal":{"kind":"STRING","text":"Games Eng"}}}]},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":125,"query_location_length":116,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":125,"query_location_length":7,"column_names":["e","grade"]},"right":{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":136,"query_location_length":105,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":158,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":144,"query_location_length":13,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":148,"query_location_length":8,"column_names":["e2","grade"]}}],"qualified_name":{"path":["avg"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":160,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"e2","sample":null,"query_location":167,"query_location_length":8,"schema_name":"","table_name":"exams","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["exams"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":182,"query_location_length":58,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":182,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":4,"column_names":["s","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":187,"query_location_length":6,"column_names":["e2","sid"]}},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":198,"query_location_length":41,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":198,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":198,"query_location_length":13,"column_names":["e2","curriculum"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":212,"query_location_length":7,"column_names":["s","major"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":224,"query_location_length":15,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":224,"query_location_length":6,"column_names":["s","year"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":7,"column_names":["e2","year"]}}]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM create_external_resource('nonmap_handle@local');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":47,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"create_external_resource","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":21,"literal":{"kind":"STRING","text":"nonmap_handle@local"}}}],"qualified_name":{"path":["create_external_resource"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT nextval('teardown_calls_kept');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"nextval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":21,"literal":{"kind":"STRING","text":"teardown_calls_kept"}}}],"qualified_name":{"path":["nextval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM duckdb_constraints();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":20,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_constraints","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_constraints"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT database_name, internal, split(replace(path, '\\', '/'), '/')[-1], type FROM duckdb_databases() WHERE path IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":8,"column_names":["internal"]},{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":67,"query_location_length":4,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":35,"function_name":"split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":23,"function_name":"replace","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":4,"column_names":["path"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":3,"literal":{"kind":"STRING","text":"\\"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["replace"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":3,"literal":{"kind":"STRING","text":"/"}}}],"qualified_name":{"path":["split"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":4,"column_names":["type"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":83,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":113,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":4,"column_names":["path"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT signature_key_fingerprint FROM duckdb_extensions() WHERE install_mode='STATICALLY_LINKED';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":25,"column_names":["signature_key_fingerprint"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":47,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_extensions","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_extensions"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":73,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":12,"column_names":["install_mode"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":19,"literal":{"kind":"STRING","text":"STATICALLY_LINKED"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM duckdb_schemas() WHERE schema_name='scheme';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_schemas","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_schemas"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":44,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":11,"column_names":["schema_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":8,"literal":{"kind":"STRING","text":"scheme"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM temp.duckdb_tables","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":18,"schema_name":"temp","table_name":"duckdb_tables","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["temp","duckdb_tables"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name, type, managed, state, reference FROM duckdb_external_resources(discover := true) ORDER BY managed DESC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":7,"column_names":["managed"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":4,"column_names":["type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":7,"column_names":["managed"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":5,"column_names":["state"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":9,"column_names":["reference"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":50,"query_location_length":43,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_external_resources","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"discover","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"discover","query_location":88,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["duckdb_external_resources"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM create_external_resource('failed@local');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":40,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"create_external_resource","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":14,"literal":{"kind":"STRING","text":"failed@local"}}}],"qualified_name":{"path":["create_external_resource"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT create_function FROM duckdb_external_resource_types() WHERE name = 'q@x';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":15,"column_names":["create_function"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":28,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_external_resource_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_external_resource_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":67,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":5,"literal":{"kind":"STRING","text":"q@x"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT d FROM range(TIMESTAMPTZ '1992-01-01 00:00:00-08', TIMESTAMPTZ '1992-12-31 12:00:00-08', INTERVAL '1 MONTH' - INTERVAL '1 HOUR') tbl(d)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["d"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":14,"query_location_length":128,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01 00:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-12-31 12:00:00-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":115,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":96,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":9,"literal":{"kind":"STRING","text":"1 MONTH"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":117,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":8,"literal":{"kind":"STRING","text":"1 HOUR"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["d"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT table_type FROM information_schema.tables WHERE table_schema='scheme' AND table_name='vintegers'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":10,"column_names":["table_type"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":25,"schema_name":"information_schema","table_name":"tables","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["information_schema","tables"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":55,"query_location_length":48,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":12,"column_names":["table_schema"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":8,"literal":{"kind":"STRING","text":"scheme"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":81,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":11,"literal":{"kind":"STRING","text":"vintegers"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT table_schema, table_name, SUBSTR (view_definition, 1, 32) AS view_definition_substr, check_option, is_updatable, is_insertable_into, is_trigger_updatable, is_trigger_deletable, is_trigger_insertable_into\nFROM information_schema.views\nWHERE table_schema = 'scheme' AND table_name = 'emp_dept_view';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["table_schema"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["table_name"]},{"class":"FUNCTION","type":"FUNCTION","alias":"view_definition_substr","query_location":33,"query_location_length":31,"function_name":"substr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":15,"column_names":["view_definition"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"literal":{"kind":"INTEGER","text":"32"}}}],"qualified_name":{"path":["substr"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":92,"query_location_length":12,"column_names":["check_option"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":106,"query_location_length":12,"column_names":["is_updatable"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":120,"query_location_length":18,"column_names":["is_insertable_into"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":140,"query_location_length":20,"column_names":["is_trigger_updatable"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":20,"column_names":["is_trigger_deletable"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":184,"query_location_length":26,"column_names":["is_trigger_insertable_into"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":216,"query_location_length":24,"schema_name":"information_schema","table_name":"views","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["information_schema","views"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":247,"query_location_length":56,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":247,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":247,"query_location_length":12,"column_names":["table_schema"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":262,"query_location_length":8,"literal":{"kind":"STRING","text":"scheme"}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":275,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":275,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":288,"query_location_length":15,"literal":{"kind":"STRING","text":"emp_dept_view"}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT 'myfile.csv' AS thisishopefullyanonexistentfile), read_csv(thisishopefullyanonexistentfile)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":104,"left":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":56,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"thisishopefullyanonexistentfile","query_location":22,"query_location_length":12,"literal":{"kind":"STRING","text":"myfile.csv"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":72,"query_location_length":41,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_csv","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":31,"column_names":["thisishopefullyanonexistentfile"]}}],"qualified_name":{"path":["read_csv"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select i.unnest from unnest([1, 2]) i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["i","unnest"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"i","sample":null,"query_location":21,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM range(TIMESTAMP '1992-12-31', TIMESTAMP '1992-01-01', INTERVAL '1 MONTH') t1, range(3) t2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":94,"left":{"type":"TABLE_FUNCTION","alias":"t1","sample":null,"query_location":21,"query_location_length":76,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-12-31"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":9,"literal":{"kind":"STRING","text":"1 MONTH"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"right":{"type":"TABLE_FUNCTION","alias":"t2","sample":null,"query_location":99,"query_location_length":11,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (SELECT NULL a), range(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":30,"left":{"type":"SUBQUERY","alias":"","sample":null,"query_location":14,"query_location_length":15,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":31,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from (values (1), (10), (100), (1000), (10000)) t(a), range(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":62,"left":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":21,"query_location_length":42,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"right":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":70,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM range(timestamp '1992-01-01 00:00:00', timestamp '1992-01-01 00:00:01', interval '1' month);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":91,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":31,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-01-01 00:00:01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM generate_series('294247-01-10'::TIMESTAMP, 'infinity'::TIMESTAMP, INTERVAL '1 DAY');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":83,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":14,"literal":{"kind":"STRING","text":"294247-01-10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":10,"literal":{"kind":"STRING","text":"infinity"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":87,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":7,"literal":{"kind":"STRING","text":"1 DAY"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM read_text('test/sql/table_function/files/*.txt');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":48,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_text","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":37,"literal":{"kind":"STRING","text":"test/sql/table_function/files/*.txt"}}}],"qualified_name":{"path":["read_text"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select filename from read_blob('s3://does-not-exist1144/date=2025-10-11/file.parquet');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["filename"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":65,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"read_blob","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":54,"literal":{"kind":"STRING","text":"s3://does-not-exist1144/date=2025-10-11/file.parquet"}}}],"qualified_name":{"path":["read_blob"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"type\", \"name\", \"tbl_name\", rootpage FROM sqlite_master WHERE name='v1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":6,"column_names":["name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":10,"column_names":["tbl_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":8,"column_names":["rootpage"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":13,"schema_name":"","table_name":"sqlite_master","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["sqlite_master"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":69,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":4,"column_names":["name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":4,"literal":{"kind":"STRING","text":"v1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM generate_series(5, 1, -1) LIMIT 4;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":25,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"generate_series","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["generate_series"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM range(10, 10, 'hello')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":22,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM repeat('hello', 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["repeat"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM repeat_row(1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":14,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"repeat_row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["repeat_row"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select cast('2020-01-01T15:00:00+0000'::timestamptz as timestamp)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":58,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":26,"literal":{"kind":"STRING","text":"2020-01-01T15:00:00+0000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(78, 41, 5, 12, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"78"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"41"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"literal":{"kind":"STRING","text":"UTC"}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT age('2024-06-15 12:00:00+00'::TIMESTAMPTZ, '1900-06-15 12:00:00+00'::TIMESTAMPTZ)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":24,"literal":{"kind":"STRING","text":"2024-06-15 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":24,"literal":{"kind":"STRING","text":"1900-06-15 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["age"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '2024-06-15 12:00:00+00'::TIMESTAMPTZ + INTERVAL 1 MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"2024-06-15 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":16,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(7516, 1, 1, 0, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"INTEGER","text":"7516"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"literal":{"kind":"STRING","text":"UTC"}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT age('2024-03-01 12:00:00+00'::TIMESTAMPTZ, '2022-03-01 12:00:00+00'::TIMESTAMPTZ)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":81,"function_name":"age","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":24,"literal":{"kind":"STRING","text":"2024-03-01 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":24,"literal":{"kind":"STRING","text":"2022-03-01 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["age"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(1600, 12, 29, 0, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1600"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"29"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"literal":{"kind":"STRING","text":"UTC"}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(64, 1, 7, 12, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"64"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":5,"literal":{"kind":"STRING","text":"UTC"}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(1403, 12, 30, 0, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1403"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":2,"literal":{"kind":"INTEGER","text":"30"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":5,"literal":{"kind":"STRING","text":"UTC"}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT era(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"era","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":45,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775806+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["era"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT dayofweek(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"dayofweek","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":45,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775806+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["dayofweek"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT monthname(TIMESTAMPTZ '294247-01-10 04:00:54.775806+00');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":56,"function_name":"monthname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":45,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775806+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["monthname"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_part(['year','month','day','era','dayofyear','week','isoyear'], '2024-06-15 12:00:00-04'::TIMESTAMPTZ)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":107,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":57,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":7,"literal":{"kind":"STRING","text":"month"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":5,"literal":{"kind":"STRING","text":"day"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":5,"literal":{"kind":"STRING","text":"era"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":11,"literal":{"kind":"STRING","text":"dayofyear"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":6,"literal":{"kind":"STRING","text":"week"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":9,"literal":{"kind":"STRING","text":"isoyear"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":100,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":24,"literal":{"kind":"STRING","text":"2024-06-15 12:00:00-04"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":102,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["date_part"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ts, year(ts), month(ts), day(ts), dayofyear(ts) FROM (VALUES\n ('1582-10-01 12:00:00+00'::TIMESTAMPTZ), ('1582-10-04 12:00:00+00'), ('1582-10-05 12:00:00+00'),\n ('1582-10-14 12:00:00+00'), ('1582-10-15 12:00:00+00'), ('1582-12-31 12:00:00+00'),\n ('1500-02-28 12:00:00+00'), ('1700-02-28 12:00:00+00')) t(ts)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["ts"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":8,"function_name":"year","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["year"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":9,"function_name":"month","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["month"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":7,"function_name":"day","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["day"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":13,"function_name":"dayofyear","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["dayofyear"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":60,"query_location_length":250,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-10-01 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-10-04 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-10-05 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":170,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-10-14 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":198,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-10-15 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":226,"query_location_length":24,"literal":{"kind":"STRING","text":"1582-12-31 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":256,"query_location_length":24,"literal":{"kind":"STRING","text":"1500-02-28 12:00:00+00"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":284,"query_location_length":24,"literal":{"kind":"STRING","text":"1700-02-28 12:00:00+00"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["ts"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(TIMESTAMPTZ '9999-01-01 00:00:00+00' AS TIMESTAMP_NS);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":62,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":36,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"9999-01-01 00:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '2000-01-01 00:00:00+00'::TIMESTAMPTZ - INTERVAL 1 MONTH;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"2000-01-01 00:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":16,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s::TIMESTAMPTZ FROM (VALUES (1, '2024-01-01 00:00:00 Asia/Tokyo'), (2, '2024-01-01 00:00:00')) t(i, s) ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":13,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":27,"query_location_length":74,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":32,"literal":{"kind":"STRING","text":"2024-01-01 00:00:00 Asia/Tokyo"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":21,"literal":{"kind":"STRING","text":"2024-01-01 00:00:00"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i","s"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '12:15:37.123456-08'::TIMETZ AT TIME ZONE 'America/Phoenix';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":59,"function_name":"timezone","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":17,"literal":{"kind":"STRING","text":"America/Phoenix"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"literal":{"kind":"STRING","text":"12:15:37.123456-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}}],"qualified_name":{"path":["timezone"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '2026-04-23 19:26:40 {utc}'::TIMESTAMPTZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":27,"literal":{"kind":"STRING","text":"2026-04-23 19:26:40 {utc}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '2022-10-30 03:00:00-07'::TIMESTAMPTZ, '2023-10-30 02:00:00-07'::TIMESTAMPTZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"2022-10-30 03:00:00-07"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":24,"literal":{"kind":"STRING","text":"2023-10-30 02:00:00-07"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2026-11-02'::TIMESTAMPTZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"2026-11-02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT part, date_trunc(part, '2024-11-03 01:30:00-05'::TIMESTAMPTZ)\nFROM (VALUES ('year'),('quarter'),('month'),('week'),('day'),('hour'),('minute')) t(part)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["part"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":55,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":4,"column_names":["part"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":24,"literal":{"kind":"STRING","text":"2024-11-03 01:30:00-05"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":74,"query_location_length":76,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":9,"literal":{"kind":"STRING","text":"quarter"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":7,"literal":{"kind":"STRING","text":"month"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":6,"literal":{"kind":"STRING","text":"week"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":5,"literal":{"kind":"STRING","text":"day"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":6,"literal":{"kind":"STRING","text":"hour"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":140,"query_location_length":8,"literal":{"kind":"STRING","text":"minute"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["part"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_timestamptz(2024, 0, 1, 0, 0, 0.0, 'UTC')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"make_timestamptz","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2024"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":5,"literal":{"kind":"STRING","text":"UTC"}}}],"qualified_name":{"path":["make_timestamptz"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT strftime('2024-03-10 03:30:00-04'::TIMESTAMPTZ, '%Y-%m-%d %H:%M:%S %Z')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":71,"function_name":"strftime","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":24,"literal":{"kind":"STRING","text":"2024-03-10 03:30:00-04"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":22,"literal":{"kind":"STRING","text":"%Y-%m-%d %H:%M:%S %Z"}}}],"qualified_name":{"path":["strftime"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '2500-07-15 12:00:00+00'::TIMESTAMPTZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"2500-07-15 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT date_trunc('year', '2045-07-04 12:00:00+00'::TIMESTAMPTZ);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"date_trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":6,"literal":{"kind":"STRING","text":"year"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":24,"literal":{"kind":"STRING","text":"2045-07-04 12:00:00+00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMPTZ","children":[],"qualified_name":{"path":["TIMESTAMPTZ"]}}}}],"qualified_name":{"path":["date_trunc"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT b FROM test ORDER BY b DESC LIMIT 2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["b"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT range(i) l FROM range(10) tbl(i) ORDER BY l DESC LIMIT 3","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["l"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":7,"query_location_length":8,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["range"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":23,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM db.mixed_ints ORDER BY i NULLS FIRST LIMIT 1 OFFSET 1023","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1023"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":13,"schema_name":"db","table_name":"mixed_ints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","mixed_ints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM db.offset_boundary ORDER BY i NULLS LAST LIMIT 1 OFFSET 6144","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"literal":{"kind":"INTEGER","text":"6144"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":18,"schema_name":"db","table_name":"offset_boundary","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","offset_boundary"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i\nFROM db.all_null_offset_BIGINT\nORDER BY i NULLS FIRST\nLIMIT 1 OFFSET 4095;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":4,"literal":{"kind":"INTEGER","text":"4095"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":25,"schema_name":"db","table_name":"all_null_offset_BIGINT","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["db","all_null_offset_BIGINT"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT j, i FROM integers ORDER BY j DESC, i DESC NULLS FIRST LIMIT 5;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["j"]}},{"type":"DESCENDING","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT k FROM (SELECT CAST(k AS BIGINT) AS k FROM ta UNION ALL SELECT CAST(k AS BIGINT) AS k FROM tb) st ORDER BY k LIMIT 3;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":1,"column_names":["k"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["k"]}],"from_table":{"type":"SUBQUERY","alias":"st","sample":null,"query_location":14,"query_location_length":87,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"k","query_location":22,"query_location_length":17,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["k"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":2,"schema_name":"","table_name":"ta","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ta"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"k","query_location":70,"query_location_length":17,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["k"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":80,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":98,"query_location_length":2,"schema_name":"","table_name":"tb","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tb"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM final\nORDER BY channel NULLS LAST,\n i_brand_id NULLS LAST,\n i_class_id NULLS LAST,\n i_category_id NULLS LAST\nLIMIT 100;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":7,"column_names":["channel"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":10,"column_names":["i_brand_id"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":10,"column_names":["i_class_id"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":13,"column_names":["i_category_id"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":153,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"final","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["final"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id FROM t1 WHERE id = 5","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":24,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MIN(i), MAX(i) FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM t WHERE s = repeat('b', 100);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":29,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["s"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":16,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["repeat"]}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM t_replace","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"t_replace","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_replace"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT msg FROM audit","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["msg"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":5,"schema_name":"","table_name":"audit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["audit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT txid_current() = getvariable('current_txid'), txid_current() = current_transaction_id();","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":44,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"txid_current","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["txid_current"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":27,"function_name":"getvariable","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":14,"literal":{"kind":"STRING","text":"current_txid"}}}],"qualified_name":{"path":["getvariable"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":53,"query_location_length":41,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":14,"function_name":"txid_current","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["txid_current"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":24,"function_name":"current_transaction_id","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["current_transaction_id"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM duckdb_triggers() WHERE table_name = 't1';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_triggers"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":10,"column_names":["table_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":4,"literal":{"kind":"STRING","text":"t1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT trigger_name, columns FROM duckdb_triggers() WHERE trigger_name = 'multi_col_trigger';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["trigger_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":7,"column_names":["columns"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":34,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_triggers"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":34,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":12,"column_names":["trigger_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":19,"literal":{"kind":"STRING","text":"multi_col_trigger"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT database_name, trigger_name, temporary FROM duckdb_triggers()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":13,"column_names":["database_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":12,"column_names":["trigger_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":9,"column_names":["temporary"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":51,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_triggers"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n FROM t_rows_log;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["n"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"t_rows_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_rows_log"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM t_upsert_log;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"t_upsert_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_upsert_log"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s FROM log_alias_shadow;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":16,"schema_name":"","table_name":"log_alias_shadow","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["log_alias_shadow"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM t_vol_log l JOIN t_vol t ON l.id = t.id AND l.new_val = t.val;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":33,"query_location_length":49,"left":{"type":"BASE_TABLE","alias":"l","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"t_vol_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_vol_log"]}},"right":{"type":"BASE_TABLE","alias":"t","sample":null,"query_location":38,"query_location_length":7,"schema_name":"","table_name":"t_vol","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_vol"]}},"condition":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":49,"query_location_length":33,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":49,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":4,"column_names":["l","id"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":4,"column_names":["t","id"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":65,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":9,"column_names":["l","new_val"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":5,"column_names":["t","val"]}}]},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT trigger_name, table_name, action_timing, event_manipulation FROM duckdb_triggers() WHERE database_name = 'triggerdb';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":12,"column_names":["trigger_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":10,"column_names":["table_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":13,"column_names":["action_timing"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":18,"column_names":["event_manipulation"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":72,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_triggers"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":96,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":11,"literal":{"kind":"STRING","text":"triggerdb"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM fail_target;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"fail_target","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["fail_target"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM duckdb_triggers() WHERE trigger_name = 'tr2';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":21,"query_location_length":17,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_triggers","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_triggers"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":12,"column_names":["trigger_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":5,"literal":{"kind":"STRING","text":"tr2"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT old_id, old_v FROM t_del_ev_audit ORDER BY old_id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":6,"column_names":["old_id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["old_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":5,"column_names":["old_v"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":14,"schema_name":"","table_name":"t_del_ev_audit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_del_ev_audit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT SUM(n) FROM del_multi_audit;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":15,"schema_name":"","table_name":"del_multi_audit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["del_multi_audit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM same_alias_audit;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":16,"schema_name":"","table_name":"same_alias_audit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["same_alias_audit"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM replace_audit WHERE msg = 'original_a';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":13,"schema_name":"","table_name":"replace_audit","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["replace_audit"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":41,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":3,"column_names":["msg"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":12,"literal":{"kind":"STRING","text":"original_a"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM of_log;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":6,"schema_name":"","table_name":"of_log","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["of_log"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH d AS (DELETE FROM rowid_alias AS x RETURNING x.rowid)\nSELECT typeof(rowid) FROM d;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"d","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"DELETE_QUERY_NODE","modifiers":[],"cte_map":{"map":[]},"condition":null,"table":{"type":"BASE_TABLE","alias":"x","sample":null,"query_location":18446744073709551615,"query_location_length":0,"schema_name":"","table_name":"rowid_alias","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rowid_alias"]}},"using_clauses":[],"returning_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":7,"column_names":["x","rowid"]}]}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":13,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":5,"column_names":["rowid"]}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":85,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT top_nest FROM failing;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["top_nest"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":7,"schema_name":"","table_name":"failing","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["failing"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select sum(a) from t where a \u003c 10000000","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":27,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["a"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":8,"literal":{"kind":"INTEGER","text":"10000000"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select a, a \u003e '9223372036854775807'::bignum from bignum_comparisons","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":10,"query_location_length":33,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["a"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":21,"literal":{"kind":"STRING","text":"9223372036854775807"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[],"qualified_name":{"path":["bignum"]}}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":18,"schema_name":"","table_name":"bignum_comparisons","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bignum_comparisons"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '-100'::bignum::double","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"-100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[],"qualified_name":{"path":["bignum"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('-1.5' AS BIGNUM);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":6,"literal":{"kind":"STRING","text":"-1.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select sum(a) from t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a-b,a,b FROM T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["-"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["b"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":1,"schema_name":"","table_name":"T","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["T"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 9223372036854775808::BIGNUM + (-1)::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775808"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 18446744073709551615::BIGNUM + 1::BIGNUM;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"literal":{"kind":"INTEGER","text":"18446744073709551615"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select bignum + '-1'::bignum from test_all_types(use_large_bignum = true) limit 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["bignum"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"-1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[],"qualified_name":{"path":["bignum"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":34,"query_location_length":39,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_all_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":49,"query_location_length":23,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":16,"column_names":["use_large_bignum"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}}],"qualified_name":{"path":["test_all_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST('0.5' AS BIGNUM)::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":25,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"literal":{"kind":"STRING","text":"0.5"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (repeat('9', 20000)::BIGNUM + 1::BIGNUM)::VARCHAR = '1' || repeat('0', 20000);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":77,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":18,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"literal":{"kind":"STRING","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":5,"literal":{"kind":"INTEGER","text":"20000"}}}],"qualified_name":{"path":["repeat"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}}],"qualified_name":{"path":["+"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":25,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":18,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":5,"literal":{"kind":"INTEGER","text":"20000"}}}],"qualified_name":{"path":["repeat"]}}}],"qualified_name":{"path":["||"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 100000.595::double::bignum","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"NUMERIC","text":"100000.595"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":6,"catalog":"","schema":"","type_name":"double","children":[],"qualified_name":{"path":["double"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[],"qualified_name":{"path":["bignum"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from integers where a \u003c 0::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":36,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2147483646'::bignum;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"2147483646"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"bignum","children":[],"qualified_name":{"path":["bignum"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '-0010.'::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"literal":{"kind":"STRING","text":"-0010."}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '00-0010'::BIGNUM","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"STRING","text":"00-0010"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGNUM","children":[],"qualified_name":{"path":["BIGNUM"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select ( 2::bit \u0026 2::bit ) = 2::bit as b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"b","query_location":7,"query_location_length":28,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":15,"function_name":"\u0026","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}}],"qualified_name":{"path":["\u0026"]}},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT length(v::VARCHAR), substr(v::VARCHAR, 1, 1)\nFROM bit_long_zonemap_values\nWHERE v \u003c repeat('1', 100)::BIT\nORDER BY v;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["length"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":24,"function_name":"substr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["substr"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":57,"query_location_length":23,"schema_name":"","table_name":"bit_long_zonemap_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bit_long_zonemap_values"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":87,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["v"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":107,"query_location_length":5,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":16,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}}}],"qualified_name":{"path":["repeat"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":109,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_cast(1::BIT as SMALLINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_cast('00001111'::BIT as SMALLINT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":37,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"literal":{"kind":"STRING","text":"00001111"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ('0101011'::BITSTRING)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":9,"literal":{"kind":"STRING","text":"0101011"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":9,"catalog":"","schema":"","type_name":"BITSTRING","children":[],"qualified_name":{"path":["BITSTRING"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bit_length(big) FROM huge_bits","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"bit_length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":3,"column_names":["big"]}}],"qualified_name":{"path":["bit_length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":9,"schema_name":"","table_name":"huge_bits","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["huge_bits"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT xor('101'::BIT, '001'::BIT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"xor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":5,"literal":{"kind":"STRING","text":"101"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"literal":{"kind":"STRING","text":"001"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}}],"qualified_name":{"path":["xor"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1001010101111111000111'::BIT \u003e\u003e 10","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"\u003e\u003e","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":24,"literal":{"kind":"STRING","text":"1001010101111111000111"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["\u003e\u003e"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT get_bit('110'::BIT, 2)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"get_bit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":5,"literal":{"kind":"STRING","text":"110"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["get_bit"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bit_count('10101'::BIT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"bit_count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":7,"literal":{"kind":"STRING","text":"10101"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}}],"qualified_name":{"path":["bit_count"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bitstring('x1'::BIT, 3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"bitstring","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"STRING","text":"x1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":3,"catalog":"","schema":"","type_name":"BIT","children":[],"qualified_name":{"path":["BIT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["bitstring"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '\\x20\\x00\\xFF'::BLOB::VARCHAR::BLOB","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"literal":{"kind":"STRING","text":"\\x20\\x00\\xFF"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM blobs","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":5,"schema_name":"","table_name":"blobs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["blobs"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST('\\\\b12' AS BLOB)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":25,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":7,"literal":{"kind":"STRING","text":"\\\\b12"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tags.storage_version FROM duckdb_databases() WHERE database_name = 'oldb';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":20,"column_names":["tags","storage_version"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":33,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"duckdb_databases","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["duckdb_databases"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":58,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":13,"column_names":["database_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":6,"literal":{"kind":"STRING","text":"oldb"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '5877680-06-23 (BC)'::date","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"literal":{"kind":"STRING","text":"5877680-06-23 (BC)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '290309-12-22 (BC)'::date - interval (2147483647) day","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"literal":{"kind":"STRING","text":"290309-12-22 (BC)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":25,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":10,"literal":{"kind":"INTEGER","text":"2147483647"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '99999999-01-01'::date","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":16,"literal":{"kind":"STRING","text":"99999999-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '294247-01-10'::date + interval (9999999999999) second","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":14,"literal":{"kind":"STRING","text":"294247-01-10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":31,"function_name":"to_seconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":13,"literal":{"kind":"INTEGER","text":"9999999999999"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["to_seconds"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0030-01-01'::DATE::VARCHAR == '0030-01-01'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":43,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"0030-01-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":12,"literal":{"kind":"STRING","text":"0030-01-01"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('2020-01-01 garbage' AS DATE)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":43,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":29,"literal":{"kind":"STRING","text":"2020-01-01 garbage"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1993-04-30'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"1993-04-30"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1993-10-31'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"1993-10-31"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1992-04-30'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"1992-04-30"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1992-10-31'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"1992-10-31"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1992-10/10'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"1992-10/10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1992-'::DATE::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"1992-"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('1111' as date)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":24,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":6,"literal":{"kind":"STRING","text":"1111"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('2004/02-29' as date)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":30,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":12,"literal":{"kind":"STRING","text":"2004/02-29"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('99999999-01-01' as date)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":34,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":16,"literal":{"kind":"STRING","text":"99999999-01-01"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":4,"catalog":"","schema":"","type_name":"date","children":[],"qualified_name":{"path":["date"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i - 5 FROM dates","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":5,"schema_name":"","table_name":"dates","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["dates"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '30000307-01-01 (BC)'::DATE","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":21,"literal":{"kind":"STRING","text":"30000307-01-01 (BC)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 127::DECIMAL(3,0)::INTEGER, -2147483647::DECIMAL(10,0)::INTEGER, -7::DECIMAL(9,1)::INTEGER, 27::DECIMAL(18,1)::INTEGER, 33::DECIMAL(38,1)::INTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"INTEGER","text":"127"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":35,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":10,"literal":{"kind":"INTEGER","text":"2147483647"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["-"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":25,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["-"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":116,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":101,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":2,"literal":{"kind":"INTEGER","text":"27"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":103,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":118,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":144,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":129,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":2,"literal":{"kind":"INTEGER","text":"33"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":131,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":139,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":142,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":146,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 100::TINYINT::DECIMAL(18,17)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":16,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"17"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 100::INTEGER::DECIMAL(3,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -10000000::BIGINT::DECIMAL(3,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":8,"literal":{"kind":"INTEGER","text":"10000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 100::HUGEINT::DECIMAL(9,7)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 10000000::FLOAT::DECIMAL(3,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":8,"literal":{"kind":"INTEGER","text":"10000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 100::DOUBLE::DECIMAL(38,35)::DOUBLE, 100::DOUBLE::DECIMAL(9,6)::DOUBLE, 17014118346046923173168730371588410572::DOUBLE::DECIMAL(38,0)::DOUBLE, (-17014118346046923173168730371588410572)::DOUBLE::DECIMAL(38,0)::DOUBLE","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":16,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"INTEGER","text":"35"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":140,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":125,"query_location_length":15,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":117,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":38,"literal":{"kind":"INTEGER","text":"17014118346046923173168730371588410572"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":119,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":127,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":142,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":214,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":199,"query_location_length":15,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":191,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":39,"literal":{"kind":"INTEGER","text":"-17014118346046923173168730371588410572"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":193,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":201,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":209,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":212,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":216,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 17014118346046923173168730371588410572::DOUBLE::DECIMAL(9,0)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":38,"literal":{"kind":"INTEGER","text":"17014118346046923173168730371588410572"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0.5'::DECIMAL(4,4) + '0.5'::DECIMAL(4,4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"0.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":5,"literal":{"kind":"STRING","text":"0.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0.1'::DECIMAL * '0.1'::DECIMAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":31,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"0.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":5,"literal":{"kind":"STRING","text":"0.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [99999999999999999999999999999999999.9, 9.99999999999999999999999999999999999]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":78,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":37,"literal":{"kind":"NUMERIC","text":"99999999999999999999999999999999999.9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":37,"literal":{"kind":"NUMERIC","text":"9.99999999999999999999999999999999999"}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(decimal_average(v)) FROM int128_dec;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":18,"function_name":"decimal_average","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["decimal_average"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":10,"schema_name":"","table_name":"int128_dec","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["int128_dec"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 10.00::DECIMAL(4,2)::DECIMAL(9,8);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"10.00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1.0::DECIMAL(3,1)::DECIMAL(1,1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(decimal_division(1000.000::DECIMAL(9,3), 4.00::DECIMAL(6,2)));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":68,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":60,"function_name":"decimal_division","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":8,"literal":{"kind":"NUMERIC","text":"1000.000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"4.00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["decimal_division"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT decimal_division(12.34::DECIMAL(4,2), 3.5::DECIMAL(4,1), 10);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":60,"function_name":"decimal_division","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":5,"literal":{"kind":"NUMERIC","text":"12.34"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["decimal_division"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select cast(9.99::float as decimal(1,0));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":33,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"9.99"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '-1e3'::DECIMAL, '-0.1e3'::DECIMAL, '-.1e-1'::DECIMAL, '-0.1e-1'::DECIMAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":6,"literal":{"kind":"STRING","text":"-1e3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":32,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":8,"literal":{"kind":"STRING","text":"-0.1e3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":8,"literal":{"kind":"STRING","text":"-.1e-1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":71,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":9,"literal":{"kind":"STRING","text":"-0.1e-1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":73,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1e100'::DECIMAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"1e100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '5e-11'::DECIMAL(18,4)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"5e-11"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '5.5e-10'::DECIMAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"STRING","text":"5.5e-10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '10000000000000000000000000000000000000.0'::DECIMAL(38,1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":49,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":42,"literal":{"kind":"STRING","text":"10000000000000000000000000000000000000.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":51,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(d+1000000000000000.0), typeof(-1000000000000000.0-d) FROM decimals","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["d"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":18,"literal":{"kind":"NUMERIC","text":"1000000000000000.0"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":29,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":19,"literal":{"kind":"NUMERIC","text":"-1000000000000000.0"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["d"]}}],"qualified_name":{"path":["-"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":72,"query_location_length":8,"schema_name":"","table_name":"decimals","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["decimals"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(10000::DECIMAL(5,0) AS DECIMAL(2,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":41,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":5,"literal":{"kind":"INTEGER","text":"10000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST('100000' AS DECIMAL(5,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":30,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":8,"literal":{"kind":"STRING","text":"100000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(10000000000::DECIMAL(11,0) AS DECIMAL(10,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":49,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":11,"literal":{"kind":"INTEGER","text":"10000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST('100000000000000000000' AS DECIMAL(20,0))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":50,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":23,"literal":{"kind":"STRING","text":"100000000000000000000"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(0::DECIMAL(18, 15) AS FLOAT), signbit(CAST(0::DECIMAL(18, 15) AS FLOAT))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":33,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":15,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":42,"function_name":"signbit","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":33,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":15,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}}}],"qualified_name":{"path":["signbit"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0.1'::DECIMAL(3, 0)::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"0.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '0'::DECIMAL(38,10)::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1::DECIMAL('32');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"STRING","text":"32"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select decimal 'a';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"a"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CEIL('0.0'::DECIMAL), CEIL('0.1'::DECIMAL), CEIL('-0.1'::DECIMAL), CEIL(NULL::DECIMAL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":5,"literal":{"kind":"STRING","text":"0.0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["ceil"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":20,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":5,"literal":{"kind":"STRING","text":"0.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["ceil"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":21,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":6,"literal":{"kind":"STRING","text":"-0.1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["ceil"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":19,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":83,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":85,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["ceil"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ROUND('10.5'::DECIMAL), ROUND('-10.5'::DECIMAL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":6,"literal":{"kind":"STRING","text":"10.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["round"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":23,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":44,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":7,"literal":{"kind":"STRING","text":"-10.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":46,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ROUND(99999999999999999999999999999999999999::DECIMAL(38,0), -1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":64,"function_name":"round","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":38,"literal":{"kind":"INTEGER","text":"99999999999999999999999999999999999999"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["round"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '1.234499999'::DECIMAL(4,3)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":13,"literal":{"kind":"STRING","text":"1.234499999"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [['sad', 'ok'], ['ok', 'happy'], ['happy', 'sad']]::enum_nested_arrays","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":20,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":5,"literal":{"kind":"STRING","text":"sad"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"ok"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"STRING","text":"ok"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":7,"literal":{"kind":"STRING","text":"happy"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":7,"literal":{"kind":"STRING","text":"happy"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":5,"literal":{"kind":"STRING","text":"sad"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":18,"catalog":"","schema":"","type_name":"enum_nested_arrays","children":[],"qualified_name":{"path":["enum_nested_arrays"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'sad'::mood::UINTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"sad"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":4,"catalog":"","schema":"","type_name":"mood","children":[],"qualified_name":{"path":["mood"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 'happy'::mood;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"happy"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":4,"catalog":"","schema":"","type_name":"mood","children":[],"qualified_name":{"path":["mood"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select {'a': 'happy'::mood, 'b': 1, 'c': 'ok'::mood};","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":45,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":7,"literal":{"kind":"STRING","text":"happy"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"mood","children":[],"qualified_name":{"path":["mood"]}}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"c","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"c","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":4,"literal":{"kind":"STRING","text":"ok"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"mood","children":[],"qualified_name":{"path":["mood"]}}}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select name, year_release::INT from albums_error where year_release = '2001'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":5,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":12,"column_names":["year_release"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":12,"schema_name":"","table_name":"albums_error","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["albums_error"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":55,"query_location_length":21,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":12,"column_names":["year_release"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":6,"literal":{"kind":"STRING","text":"2001"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CASE WHEN person_name = 'Tim' THEN person_mood ELSE pet_mood END FROM person_pet_den","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":64,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":17,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":11,"column_names":["person_name"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":5,"literal":{"kind":"STRING","text":"Tim"}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":11,"column_names":["person_mood"]}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":8,"column_names":["pet_mood"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":77,"query_location_length":14,"schema_name":"","table_name":"person_pet_den","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["person_pet_den"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test where a = b","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select person.name, pets.name from person inner join pets on (person.current_mood = pets.current_mood)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["person","name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":9,"column_names":["pets","name"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":42,"query_location_length":61,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":6,"schema_name":"","table_name":"person","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["person"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":4,"schema_name":"","table_name":"pets","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pets"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":63,"query_location_length":39,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":19,"column_names":["person","current_mood"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":17,"column_names":["pets","current_mood"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from large_enum_tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":14,"schema_name":"","table_name":"large_enum_tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["large_enum_tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select count(*) from t1, t2 where t1.a::VARCHAR \u003e= t2.b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":16,"query_location_length":11,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":34,"query_location_length":21,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":4,"column_names":["t1","a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":4,"column_names":["t2","b"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 4::INTEGEE","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGEE","children":[],"qualified_name":{"path":["INTEGEE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select sum(f), typeof(sum(f)) from floats_doubles where f \u003e 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["f"]}}],"qualified_name":{"path":["sum"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["f"]}}],"qualified_name":{"path":["sum"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":14,"schema_name":"","table_name":"floats_doubles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["floats_doubles"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":56,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["f"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT f FROM floats ORDER BY f DESC NULLS LAST LIMIT 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"DESCENDING","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":1,"column_names":["f"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["f"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"floats","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["floats"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT f, i, SUM(i) OVER (PARTITION BY f ORDER BY f, i) FROM floats ORDER BY f, i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":1,"column_names":["f"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["f"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":42,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["f"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["f"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":6,"schema_name":"","table_name":"floats","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["floats"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'POINT(5e30 3e-20)'::GEOMETRY::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"literal":{"kind":"STRING","text":"POINT(5e30 3e-20)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select typeof(g::BLOB), hex(g::BLOB) from t1 where id = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":15,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["g"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"qualified_name":{"path":["typeof"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":12,"function_name":"hex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["g"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":4,"catalog":"","schema":"","type_name":"BLOB","children":[],"qualified_name":{"path":["BLOB"]}}}}],"qualified_name":{"path":["hex"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":42,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":51,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select id, b::GEOMETRY from t2 order by id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":10,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id from t_all_types where g = 'MULTIPOINT Z (1 2 3, 3 4 5, 5 6 7)';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":15,"query_location_length":11,"schema_name":"","table_name":"t_all_types","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_all_types"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":33,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["g"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":36,"literal":{"kind":"STRING","text":"MULTIPOINT Z (1 2 3, 3 4 5, 5 6 7)"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof('POINT(0 1)'::GEOMETRY($wkt$GEOGCRS[\"WGS \"\"Quoted\"\"\",ID[\"OGC\",\"Q1\"]]$wkt$));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":62,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(0 1)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":60,"catalog":"","schema":"","type_name":"GEOMETRY","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":50,"literal":{"kind":"STRING","text":"GEOGCRS[\"WGS \"\"Quoted\"\"\",ID[\"OGC\",\"Q1\"]]"}}],"qualified_name":{"path":["GEOMETRY"]}}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT stats(vertex_extract(ST_GeomFromWKB(wkb), 'x')) FROM poly_wkb LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":47,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":40,"function_name":"vertex_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":19,"function_name":"st_geomfromwkb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":3,"column_names":["wkb"]}}],"qualified_name":{"path":["st_geomfromwkb"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}}],"qualified_name":{"path":["vertex_extract"]}}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":60,"query_location_length":8,"schema_name":"","table_name":"poly_wkb","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["poly_wkb"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsText(ST_GeomFromWKB(wkb)) FROM ewkb_point_m;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":19,"function_name":"st_geomfromwkb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":3,"column_names":["wkb"]}}],"qualified_name":{"path":["st_geomfromwkb"]}}}],"qualified_name":{"path":["st_astext"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":43,"query_location_length":12,"schema_name":"","table_name":"ewkb_point_m","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ewkb_point_m"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 'POINT(0 1)'::GEOMETRY::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(0 1)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select g, id from t1 where id = 1500;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":2,"column_names":["id"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":27,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":2,"column_names":["id"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1500"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM pts_noshred WHERE g \u0026\u0026 'POLYGON((10 10, 10 50, 50 50, 50 10, 10 10))'::GEOMETRY;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"pts_noshred","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["pts_noshred"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":61,"function_name":"\u0026\u0026","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["g"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":90,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":46,"literal":{"kind":"STRING","text":"POLYGON((10 10, 10 50, 50 50, 50 10, 10 10))"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":92,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}}],"qualified_name":{"path":["\u0026\u0026"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM p WHERE g \u0026\u0026 'POINT(100 5)'::GEOMETRY;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"p","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["p"]}},"where_clause":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":29,"function_name":"\u0026\u0026","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["g"]}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":14,"literal":{"kind":"STRING","text":"POINT(100 5)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}}],"qualified_name":{"path":["\u0026\u0026"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(g AS GEOMETRY) FROM (VALUES ('POINT(1 2)'), ('LINESTRING(0 0'), (NULL), ('POINT EMPTY')) t(g);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["g"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":36,"query_location_length":68,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(1 2)"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":16,"literal":{"kind":"STRING","text":"LINESTRING(0 0"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":13,"literal":{"kind":"STRING","text":"POINT EMPTY"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["g"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ('POINT(1 2)'::GEOMETRY).x, ('POINT(1 2)'::GEOMETRY).y","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":26,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(1 2)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"STRING","text":"x"}}]},{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":35,"query_location_length":26,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":12,"literal":{"kind":"STRING","text":"POINT(1 2)"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"GEOMETRY","children":[],"qualified_name":{"path":["GEOMETRY"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":2,"literal":{"kind":"STRING","text":"y"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, geom.x, geom.y, geom.z, geom.m FROM geometries ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":6,"column_names":["geom","x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":6,"column_names":["geom","y"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":6,"column_names":["geom","z"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":6,"column_names":["geom","m"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":47,"query_location_length":10,"schema_name":"","table_name":"geometries","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["geometries"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT stats(geom.x) FROM lines_only LIMIT 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":6,"column_names":["geom","x"]}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":26,"query_location_length":10,"schema_name":"","table_name":"lines_only","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lines_only"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ST_AsText(ST_GeomFromWKB(from_hex(repeat('010700000001000000', 15) || '010700000000000000')))[1:40];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":100,"query_location_length":6,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":93,"function_name":"st_astext","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":82,"function_name":"st_geomfromwkb","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":66,"function_name":"from_hex","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":56,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":41,"query_location_length":32,"function_name":"repeat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":20,"literal":{"kind":"STRING","text":"010700000001000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"INTEGER","text":"15"}}}],"qualified_name":{"path":["repeat"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":20,"literal":{"kind":"STRING","text":"010700000000000000"}}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["from_hex"]}}}],"qualified_name":{"path":["st_geomfromwkb"]}}}],"qualified_name":{"path":["st_astext"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":2,"literal":{"kind":"INTEGER","text":"40"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 251658240::HUGEINT * 1080863910568919040::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"INTEGER","text":"251658240"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":19,"literal":{"kind":"INTEGER","text":"1080863910568919040"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 19938419936773738093557105904205168640::HUGEINT * 1080863910568919040::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":78,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":38,"literal":{"kind":"INTEGER","text":"19938419936773738093557105904205168640"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":76,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":19,"literal":{"kind":"INTEGER","text":"1080863910568919040"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 2::HUGEINT * 85070591730234615865843651857942052865::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":60,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":38,"literal":{"kind":"INTEGER","text":"85070591730234615865843651857942052865"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT AVG(x) FROM (\n\tSELECT 100000000000000000000000000000000000000::HUGEINT AS x\n\tUNION ALL\n\tSELECT 100000000000000000000000000000000000000::HUGEINT\n) t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"avg","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":19,"query_location_length":133,"subquery":{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"x","query_location":68,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":39,"literal":{"kind":"INTEGER","text":"100000000000000000000000000000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":141,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":39,"literal":{"kind":"INTEGER","text":"100000000000000000000000000000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":143,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT FIRST(h), LAST(h) FROM hugeints;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"first","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["h"]}}],"qualified_name":{"path":["first"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"last","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["h"]}}],"qualified_name":{"path":["last"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":30,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '170141183460469231731687303715884105727'::HUGEINT - 10::HUGEINT + 10::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":41,"literal":{"kind":"STRING","text":"170141183460469231731687303715884105727"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":62,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["-"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":76,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '170141183460469231731687303715884105727'::HUGEINT * 1::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":41,"literal":{"kind":"STRING","text":"170141183460469231731687303715884105727"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":61,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":63,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY(100::HUGEINT % 0::HUGEINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_TRY","alias":"","query_location":7,"query_location_length":30,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":25,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["%"]}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 + 170141183460469231731687303715884105727;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":39,"literal":{"kind":"INTEGER","text":"170141183460469231731687303715884105727"}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -2 - 170141183460469231731687303715884105727;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":39,"literal":{"kind":"INTEGER","text":"170141183460469231731687303715884105727"}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -170141183460469231731687303715884105728 * 0;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":44,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":40,"literal":{"kind":"INTEGER","text":"-170141183460469231731687303715884105728"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -170141183460469231731687303715884105727 // -1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":40,"literal":{"kind":"INTEGER","text":"-170141183460469231731687303715884105727"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["//"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 170141183460469231731687303715884105727 % -170141183460469231731687303715884105727;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":39,"literal":{"kind":"INTEGER","text":"170141183460469231731687303715884105727"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":40,"literal":{"kind":"INTEGER","text":"-170141183460469231731687303715884105727"}}}],"qualified_name":{"path":["%"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select (((((1::HUGEINT \u003c\u003c 50) \u003c\u003c 50) \u003c\u003c 2) \u003c\u003c 3) \u003c\u003c 8), (1::HUGEINT)\u003c\u003c50\u003c\u003c20\u003c\u003c7\u003c\u003c18\u003c\u003c3\u003c\u003c6\u003c\u003c9","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":45,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":38,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":31,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":24,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":16,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["\u003c\u003c"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":36,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"\u003c\u003c","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":58,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"INTEGER","text":"50"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["\u003c\u003c"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["\u003c\u003c"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select -11367237885269962203896920952509169001 \u003e\u003e 200;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"\u003e\u003e","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":39,"literal":{"kind":"INTEGER","text":"-11367237885269962203896920952509169001"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}}}],"qualified_name":{"path":["\u003e\u003e"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select xor(51290852742897895128414::HUGEINT, 4923847238975289723895239078235::HUGEINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":79,"function_name":"xor","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":23,"literal":{"kind":"INTEGER","text":"51290852742897895128414"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":76,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":31,"literal":{"kind":"INTEGER","text":"4923847238975289723895239078235"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["xor"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '-1267650600228229401496703205376'::HUGEINT, '-17014118346046923173168730371588410572'::HUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":41,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":34,"literal":{"kind":"STRING","text":"-1267650600228229401496703205376"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":43,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":93,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":41,"literal":{"kind":"STRING","text":"-17014118346046923173168730371588410572"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":95,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 42::HUGEINT::TINYINT, 42::HUGEINT::SMALLINT, 42::HUGEINT::INTEGER, 42::HUGEINT::BIGINT, 42::HUGEINT::FLOAT, 42::HUGEINT::DOUBLE;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":40,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":63,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":65,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":85,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":76,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":87,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":106,"query_location_length":7,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":97,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":99,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":108,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":126,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":117,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":119,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":128,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT -2147483648::HUGEINT::INTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":10,"literal":{"kind":"INTEGER","text":"2147483648"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '170141183460469231731687303715884105700e0'::hugeint","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":43,"literal":{"kind":"STRING","text":"170141183460469231731687303715884105700e0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"hugeint","children":[],"qualified_name":{"path":["hugeint"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select ceil(1::HUGEINT), ceil('-1329227995784915872903807060280344576'::HUGEINT), ceil(0::HUGEINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":13,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":15,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["ceil"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":55,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":40,"literal":{"kind":"STRING","text":"-1329227995784915872903807060280344576"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":72,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["ceil"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":16,"function_name":"ceil","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}}],"qualified_name":{"path":["ceil"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM hugeints WHERE h \u003c '1267650600228229401496703205376'::HUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":36,"query_location_length":46,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["h"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":73,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":33,"literal":{"kind":"STRING","text":"1267650600228229401496703205376"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":75,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select interval '0.004 DECADE';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":14,"literal":{"kind":"STRING","text":"0.004 DECADE"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select interval '0.00000004 MINUTE';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":19,"literal":{"kind":"STRING","text":"0.00000004 MINUTE"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '1 hour -00:30:00';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":27,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":18,"literal":{"kind":"STRING","text":"1 hour -00:30:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT interval 2 months, interval 2 month;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":16,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT interval 3 microsecond, interval 3 microseconds;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":22,"function_name":"to_microseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_microseconds"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":23,"function_name":"to_microseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_microseconds"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '47.210 5'::interval;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":10,"literal":{"kind":"STRING","text":"47.210 5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '1.5' MILLENNIA;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"to_millennia","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":5,"literal":{"kind":"STRING","text":"1.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_millennia"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '-1.5' MILLENNIA;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"to_millennia","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":6,"literal":{"kind":"STRING","text":"-1.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_millennia"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '1.5 CENTURY'::INTERVAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":13,"literal":{"kind":"STRING","text":"1.5 CENTURY"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '-1.5 DECADE'::INTERVAL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":13,"literal":{"kind":"STRING","text":"-1.5 DECADE"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::VARCHAR, i::VARCHAR::INTERVAL = i FROM (SELECT to_microseconds(3600000000 * 1000000000) AS i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":19,"query_location_length":24,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":49,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":57,"query_location_length":40,"function_name":"to_microseconds","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":23,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":10,"literal":{"kind":"INTEGER","text":"3600000000"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":10,"literal":{"kind":"INTEGER","text":"1000000000"}}}],"qualified_name":{"path":["*"]}}}],"qualified_name":{"path":["to_microseconds"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast('3 years 2 doy' as interval)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":15,"literal":{"kind":"STRING","text":"3 years 2 doy"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tTRY_CAST('2147483648 days' AS INTERVAL),\n\tTRY_CAST('-2147483649 days' AS INTERVAL),\n\tTRY_CAST('2147483648 months' AS INTERVAL),\n\tTRY_CAST('9223372036854775808 microseconds' AS INTERVAL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":39,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":17,"literal":{"kind":"STRING","text":"2147483648 days"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":50,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":18,"literal":{"kind":"STRING","text":"-2147483649 days"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":81,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":93,"query_location_length":41,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":19,"literal":{"kind":"STRING","text":"2147483648 months"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":125,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":137,"query_location_length":56,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":146,"query_location_length":34,"literal":{"kind":"STRING","text":"9223372036854775808 microseconds"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":184,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '-2Y 4 days 5 Hours 1 MinUteS 3S 20mS 16uS'::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":52,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":43,"literal":{"kind":"STRING","text":"-2Y 4 days 5 Hours 1 MinUteS 3S 20mS 16uS"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '876:54:32.101234'::INTERVAL, '-876:54:32.101234'::INTERVAL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":18,"literal":{"kind":"STRING","text":"876:54:32.101234"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":56,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":19,"literal":{"kind":"STRING","text":"-876:54:32.101234"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":58,"query_location_length":8,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '90' HOUR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"to_hours","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"90"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}}],"qualified_name":{"path":["to_hours"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '-years';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":8,"literal":{"kind":"STRING","text":"-years"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '100000000000000000hours';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":34,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":25,"literal":{"kind":"STRING","text":"100000000000000000hours"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '9223372036854775810msecs';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":26,"literal":{"kind":"STRING","text":"9223372036854775810msecs"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE '1992-03-01' - INTERVAL '0' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-03-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE '1992-03-01' - INTERVAL '6' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-03-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":3,"literal":{"kind":"STRING","text":"6"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DATE '1992-03-01' - INTERVAL '12' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":17,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1992-03-01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":19,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"STRING","text":"12"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TIME '10:00:00' + INTERVAL '1' DAY","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"10:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":16,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '12:15:37.123456-08'::TIMETZ - INTERVAL '2 DAY';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"literal":{"kind":"STRING","text":"12:15:37.123456-08"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":7,"literal":{"kind":"STRING","text":"2 DAY"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["-"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT INTERVAL '30' DAY \u003e= INTERVAL '1' MONTH","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":39,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":4,"literal":{"kind":"STRING","text":"30"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":18,"function_name":"to_months","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_months"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select normalized_interval(interval '-2147483648 months -2147483648 days -9223372036854775807 microseconds');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":101,"function_name":"normalized_interval","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":80,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":71,"literal":{"kind":"STRING","text":"-2147483648 months -2147483648 days -9223372036854775807 microseconds"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTERVAL","children":[],"qualified_name":{"path":["INTERVAL"]}}}}],"qualified_name":{"path":["normalized_interval"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select case when i=[1] then [3] else [4] end from a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":7,"query_location_length":37,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":17,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1] = NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1] \u003e NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1] \u003e [1, 2]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [] \u003c= []","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [] \u003e= []","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l \u003e r FROM list_int_empty","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":14,"schema_name":"","table_name":"list_int_empty","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int_empty"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ['duck'] = NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":15,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ['duck'] \u003e NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":15,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [{'x': 'duck', 'y': 1}] \u003c= [{'x': 'duck', 'y': 1}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":50,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [{'x': 'duck', 'y': 1}] \u003e= [{'x': 'duck', 'y': 1}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":50,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":41,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l \u003e r FROM list_of_struct","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":14,"schema_name":"","table_name":"list_of_struct","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_of_struct"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select concat([42], [43], [], [44], [], [45]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"INTEGER","text":"44"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"45"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["concat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ''~concat(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":13,"function_name":"regexp_matches","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"STRING","text":""}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":12,"function_name":"concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["concat"]}}}],"qualified_name":{"path":["regexp_matches"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM v2 v, v2 w WHERE v.a \u003e= w.a ORDER BY v.a, w.a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":3,"column_names":["v","a"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":3,"column_names":["w","a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":9,"query_location_length":15,"left":{"type":"BASE_TABLE","alias":"v","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"v2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v2"]}},"right":{"type":"BASE_TABLE","alias":"w","sample":null,"query_location":20,"query_location_length":4,"schema_name":"","table_name":"v2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["v2"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":31,"query_location_length":10,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["v","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":3,"column_names":["w","a"]}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [1] IS DISTINCT FROM [1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":24,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [] IS NOT DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":28,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ['duck'] IS DISTINCT FROM ['duck']","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":34,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [{'x': 'duck', 'y': 1}] IS DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":45,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l[3] FROM nested","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":6,"schema_name":"","table_name":"nested","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tbl.a, tbl.b,\n\ttbl.a \u003c tbl.b, tbl.a \u003c= tbl.b,\n\ttbl.a = tbl.b, tbl.a \u003c\u003e tbl.b,\n\ttbl.a \u003e tbl.b, tbl.a \u003e= tbl.b,\n\ttbl.a IS NOT DISTINCT FROM tbl.b, tbl.a IS DISTINCT FROM tbl.b\nFROM list_int tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["tbl","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":5,"column_names":["tbl","b"]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":22,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":37,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":54,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":69,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":86,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":101,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":110,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":118,"query_location_length":32,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":5,"column_names":["tbl","b"]}},{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":152,"query_location_length":28,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":152,"query_location_length":5,"column_names":["tbl","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":5,"column_names":["tbl","b"]}}],"from_table":{"type":"BASE_TABLE","alias":"tbl","sample":null,"query_location":186,"query_location_length":12,"schema_name":"","table_name":"list_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.child_stats.min, s.child_stats.max FROM (SELECT STATS([3, 4]) s)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":17,"column_names":["s","child_stats","min"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":17,"column_names":["s","child_stats","max"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":49,"query_location_length":24,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":57,"query_location_length":13,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT concat_ws('.', list_reverse(string_split('1.2..3', '.')));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":57,"function_name":"concat_ws","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":3,"literal":{"kind":"STRING","text":"."}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":41,"function_name":"list_reverse","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":27,"function_name":"string_split","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":8,"literal":{"kind":"STRING","text":"1.2..3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":3,"literal":{"kind":"STRING","text":"."}}}],"qualified_name":{"path":["string_split"]}}}],"qualified_name":{"path":["list_reverse"]}}}],"qualified_name":{"path":["concat_ws"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id,x=y,x\u003c\u003ey FROM (VALUES (1,[1,NULL]::INTEGER[2],[0,NULL]::INTEGER[2]),(2,[2,NULL]::INTEGER[2],[2,NULL]::INTEGER[2])) t(id,x,y) ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":144,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":10,"query_location_length":3,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["y"]}},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":14,"query_location_length":4,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["x"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["y"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":24,"query_location_length":100,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":89,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":91,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":110,"query_location_length":12,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","x","y"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, b[1] FROM a ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":12,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, b[1][3][1] FROM nested ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":18,"query_location_length":3,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":15,"query_location_length":3,"children":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":12,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":6,"schema_name":"","table_name":"nested","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST([[[[[1, 2], [3, 4]], [[5]]], [[[]]]]], max_depth := 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":61,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":37,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":35,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":45,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"max_depth","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"max_depth","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST([1, 2, 3], rec := true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":30,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"rec","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"rec","query_location":32,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, UNNEST(i), UNNEST(j) FROM (VALUES (1, [1, 2], [10]), (2, NULL, [11, 12]), (3, [3, NULL, 4], [NULL])) tbl(id, i, j)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["unnest"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":37,"query_location_length":74,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":74,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":103,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","i","j"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT * FROM (SELECT id, UNNEST(b, recursive := true) FROM test);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":16,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":23,"query_location_length":51,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":28,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["b"]}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":58,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT unnest([1, 2]) AS g, unnest([10, 20]) AS s, count(*)\nFROM range(1)\nGROUP BY g\nORDER BY g, s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":94,"query_location_length":1,"column_names":["g"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":97,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"g","query_location":7,"query_location_length":14,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":28,"query_location_length":16,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":65,"query_location_length":8,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 42 having unnest([1,2,3]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":15,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT name, UNNEST(address) FROM people;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["name"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":15,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":7,"column_names":["address"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":34,"query_location_length":6,"schema_name":"","table_name":"people","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["people"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM UNNEST([{'a': [1, 2, 3], 'b': [4, 5, 6]}, {'a': [4, 5], 'b': [7, 8, 9, 10]}]) AS tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":14,"query_location_length":87,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":69,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":32,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":28,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":44,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":33,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":62,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":75,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":79,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a FROM UNNEST(ARRAY[1,2,3]) t(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":14,"query_location_length":25,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":21,"query_location_length":12,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]}}],"qualified_name":{"path":["unnest"]}},"column_name_alias":["a"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAP(['1', '01'], [10, 20])::MAP(INTEGER, INTEGER)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":23,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"STRING","text":"01"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAP([10, i, i+1, 9], [i, 3.14, 0.12, 8.0]) FROM ints;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":42,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"3.14"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.12"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"8.0"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":55,"query_location_length":4,"schema_name":"","table_name":"ints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (\n\tSELECT a.i, map_values(c.m) AS vals, map_entries(c.m) AS entries\n\tFROM a LEFT JOIN b ON a.i = b.i\n\t LEFT JOIN c ON b.i = c.i\n\t FULL JOIN d ON c.i8 = d.i8\n\tORDER BY ALL\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":184,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["a","i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"vals","query_location":36,"query_location_length":15,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":47,"query_location_length":3,"column_names":["c","m"]}}],"qualified_name":{"path":["map_values"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"entries","query_location":61,"query_location_length":16,"function_name":"map_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":3,"column_names":["c","m"]}}],"qualified_name":{"path":["map_entries"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":163,"query_location_length":26,"left":{"type":"JOIN","alias":"","sample":null,"query_location":130,"query_location_length":24,"left":{"type":"JOIN","alias":"","sample":null,"query_location":97,"query_location_length":24,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":95,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":107,"query_location_length":1,"schema_name":"","table_name":"b","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["b"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":112,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":112,"query_location_length":3,"column_names":["a","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":3,"column_names":["b","i"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":140,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":145,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":3,"column_names":["b","i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":3,"column_names":["c","i"]}},"join_type":"LEFT","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":173,"query_location_length":1,"schema_name":"","table_name":"d","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["d"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":178,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":178,"query_location_length":4,"column_names":["c","i8"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":185,"query_location_length":4,"column_names":["d","i8"]}},"join_type":"FULL","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*), max(a) FROM tbl1 GROUP BY list_sum(a::INT[]) % 2 == 0 HAVING list_sum(a::INT[]) % 2 == 0 NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":27,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":22,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":18,"function_name":"list_sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":53,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":55,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}}],"qualified_name":{"path":["list_sum"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":106,"query_location_length":8,"children":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":78,"query_location_length":27,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":22,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":78,"query_location_length":18,"function_name":"list_sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":7,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":1,"column_names":["a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":90,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}}],"qualified_name":{"path":["list_sum"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}]},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT unnest(array_value(1, 2, 3)::INT[])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":34,"query_location_length":7,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":20,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["array_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([1, NULL, 3]::INT[3])::VARCHAR[3]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":12,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":8,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT array_value(array_value(1, 2, 3), array_value(4,5,6));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":53,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":20,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["array_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":18,"function_name":"array_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["array_value"]}}}],"qualified_name":{"path":["array_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM t1 JOIN t2 ON t1.a = t2.a ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":17,"query_location_length":22,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":28,"query_location_length":11,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":4,"column_names":["t1","a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":4,"column_names":["t2","a"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH c AS MATERIALIZED (SELECT * FROM m) SELECT id, v FROM c, UNNEST(c.fixed) AS s(v) ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[{"key":"c","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_ALWAYS","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":31,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":1,"schema_name":"","table_name":"m","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["m"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":48,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":52,"query_location_length":1,"column_names":["v"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":54,"query_location_length":31,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":59,"query_location_length":1,"schema_name":"","table_name":"c","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["c"]}},"right":{"type":"TABLE_FUNCTION","alias":"s","sample":null,"query_location":62,"query_location_length":23,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":69,"query_location_length":7,"column_names":["c","fixed"]}}],"qualified_name":{"path":["unnest"]}},"column_name_alias":["v"],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT a FROM arrays WHERE a[1] \u003e 0 ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]},{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":6,"schema_name":"","table_name":"arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arrays"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":36,"query_location_length":8,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":37,"query_location_length":3,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a::JSON FROM arrays","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":6,"schema_name":"","table_name":"arrays","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arrays"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM tbl1 LIMIT 1 OFFSET 122879","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":6,"literal":{"kind":"INTEGER","text":"122879"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(x as INT[2][2]) FROM (VALUES ([[1,2],[3,4]]), ([[5,6],[7,8],[9,10]])) AS t(x)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":20,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["array"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":33,"query_location_length":48,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":20,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT * FROM t2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":16,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM arr_test WHERE arr \u003e= ARRAY[1,2,3]::INT[3] AND arr = ARRAY[1,2,3]::INT[3]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":8,"schema_name":"","table_name":"arr_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["arr_test"]}},"where_clause":{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":36,"query_location_length":58,"children":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":36,"query_location_length":27,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":3,"column_names":["arr"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":55,"query_location_length":8,"child":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":43,"query_location_length":12,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":57,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":68,"query_location_length":26,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":3,"column_names":["arr"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":8,"child":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":74,"query_location_length":12,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"array","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":88,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"3"}}],"qualified_name":{"path":["array"]}}}}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 4\u003eALL([1, 2, 3, NULL]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_NOT","alias":"","query_location":7,"query_location_length":22,"children":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":18446744073709551615,"query_location_length":0,"subquery_type":"ANY","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},"comparison_type":"COMPARE_LESSTHANOREQUALTO"}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ARRAY[1,2], ARRAY[NULL], ARRAY['hello', 'world'], ARRAY[]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":7,"query_location_length":10,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":19,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":32,"query_location_length":23,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":7,"literal":{"kind":"STRING","text":"world"}}]},{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":57,"query_location_length":7,"children":[]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST(UNNEST(ARRAY[[1, 2], [3, 4]]::VARCHAR[][]))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":42,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":13,"child":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":21,"query_location_length":21,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}}}}],"qualified_name":{"path":["unnest"]}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_aggr(list(i)::varchar[], 'string_agg', '|') FROM range(1, 4) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"list_aggr","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["list"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["list"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":12,"literal":{"kind":"STRING","text":"string_agg"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"literal":{"kind":"STRING","text":"|"}}}],"qualified_name":{"path":["list_aggr"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":61,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select min(i), max(i) from list_int;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":27,"query_location_length":8,"schema_name":"","table_name":"list_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH t(l) AS (VALUES (['bad', '1', '2']), (['bad', '5', '6']))\nSELECT CAST(list_slice(l, 2, 3) AS INTEGER[]) FROM t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"t","value":{"aliases":["l"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":5,"literal":{"kind":"STRING","text":"bad"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":3,"literal":{"kind":"STRING","text":"2"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":5,"literal":{"kind":"STRING","text":"bad"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":3,"literal":{"kind":"STRING","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":3,"literal":{"kind":"STRING","text":"6"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":38,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":19,"function_name":"list_slice","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":86,"query_location_length":1,"column_names":["l"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_slice"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":98,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":114,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l, l \u003c [1, NULL, 3], l \u003e [1, NULL, 3], l \u003c= [1, NULL, 3] FROM t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":10,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["l"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":28,"query_location_length":16,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["l"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":46,"query_location_length":17,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["l"]},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a, b, a \u003c\u003e b FROM l","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["b"]},{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":13,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["a"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["b"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":1,"schema_name":"","table_name":"l","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["l"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LIST_EXTRACT(LIST_VALUE(NULL), -1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}}],"qualified_name":{"path":["list_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [{ parent: { t:'abc', len:5 } }][1]=1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":37,"left":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":39,"query_location_length":3,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":30,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"parent","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"parent","query_location":18,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"t","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"t","query_location":22,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}}},{"name":"len","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"len","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LIST_EXTRACT(LIST_VALUE(42::UBIGINT), 1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":40,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":33,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":35,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_extract('1', 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":20,"function_name":"list_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT list_transform(str, lambda x: x) FROM nested_struct_data;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"list_transform","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":3,"column_names":["str"]}},{"name":"","expression":{"class":"LAMBDA","type":"LAMBDA","alias":"","query_location":27,"query_location_length":11,"lhs":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18446744073709551615,"query_location_length":0,"column_names":["x"]},"expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["x"]},"syntax_type":"LAMBDA_KEYWORD"}}],"qualified_name":{"path":["list_transform"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":18,"schema_name":"","table_name":"nested_struct_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_struct_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a[1+1-1] FROM (VALUES (LIST_VALUE(42))) tbl(a)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}}]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":21,"query_location_length":25,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":14,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s from lists","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT hello[off:NULL+off] FROM lists, hello","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":12,"query_location_length":14,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["hello"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":3,"column_names":["off"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":3,"column_names":["off"]}}],"qualified_name":{"path":["+"]}}]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":27,"query_location_length":17,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":5,"schema_name":"","table_name":"hello","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hello"]}},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":true,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s[(2147483647-1):1] FROM lists","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":8,"query_location_length":18,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"-","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":10,"literal":{"kind":"INTEGER","text":"2147483647"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["-"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":5,"schema_name":"","table_name":"lists","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lists"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([1,2,3,4,5])[:-:-2];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-2"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([1,2,3,4,5,6])[9223372036854775807:-9223372036854775808:-1];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":22,"query_location_length":45,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775807"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":20,"literal":{"kind":"INTEGER","text":"-9223372036854775808"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'abcdefg'[:3];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":16,"query_location_length":4,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"STRING","text":"abcdefg"}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([1,2,3,4,5])[1:3:3];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":7,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ([1,2,3,4,5])[1:NULL:2];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_SLICE","alias":"","query_location":20,"query_location_length":10,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":11,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST(l1) FROM (SELECT LIST(a) l1 FROM (VALUES (1), (2), (3)) AS t1 (a)) t1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":10,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":2,"column_names":["l1"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":23,"query_location_length":57,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l1","query_location":31,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"SUBQUERY","alias":"t1","sample":null,"query_location":47,"query_location_length":22,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LIST(e), LIST(g) from list_data","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["e"]}}],"qualified_name":{"path":["list"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":7,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["g"]}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":9,"schema_name":"","table_name":"list_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT g, LIST(STRUCT_PACK(a := e, b := e+1)) ls from list_data WHERE g \u003e 2 GROUP BY g ORDER BY g","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":1,"column_names":["g"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["g"]},{"class":"FUNCTION","type":"FUNCTION","alias":"ls","query_location":10,"query_location_length":35,"function_name":"list","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"a","query_location":32,"query_location_length":1,"column_names":["e"]}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":41,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["e"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":54,"query_location_length":9,"schema_name":"","table_name":"list_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["list_data"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":70,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":1,"column_names":["g"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"group_expressions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":1,"column_names":["g"]}],"group_sets":[[0]],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LIST_VALUE(1, 2, 3) UNION ALL SELECT LIST_VALUE(NULL::INTEGER) UNION ALL SELECT LIST_VALUE() UNION ALL SELECT NULL","json":{"error":false,"statements":[{"node":{"type":"SET_OPERATION_NODE","modifiers":[],"cte_map":{"map":[]},"setop_type":"UNION","left":null,"right":null,"setop_all":true,"children":[{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":87,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}]},"named_param_map":[]}]}} +{"sql":"select * from (values ([1, NULL, 3]), ([NULL, 2, 3]), ([1, 2, NULL]), (NULL), ([1, 2, 3])) tbl(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":14,"query_location_length":76,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["i"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_extract(m, 'key') FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["m"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":5,"literal":{"kind":"STRING","text":"key"}}}],"qualified_name":{"path":["struct_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from bigint_key;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":10,"schema_name":"","table_name":"bigint_key","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigint_key"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from real_key;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"real_key","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["real_key"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n\tt1.id,\n\tmap_from_entries(entry)\nfrom t1 join t2 using (id);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":5,"column_names":["t1","id"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":23,"function_name":"map_from_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":5,"column_names":["entry"]}}],"qualified_name":{"path":["map_from_entries"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":48,"query_location_length":18,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":53,"query_location_length":2,"schema_name":"","table_name":"t2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t2"]}},"condition":null,"join_type":"INNER","ref_type":"REGULAR","using_columns":["id"],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAP_FROM_ENTRIES(ARRAY[(MAP([5,3,4], ['a', 'b', 'c']), 2), (MAP([4,3,5], ['a', 'b', 'c']), 4)]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":95,"function_name":"map_from_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_CONSTRUCTOR","alias":"","query_location":24,"query_location_length":77,"children":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":34,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":29,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":55,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":66,"query_location_length":34,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":29,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":80,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":3,"literal":{"kind":"STRING","text":"c"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["row"]}}]}}],"qualified_name":{"path":["map_from_entries"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAP(list_value(1, 2, 3), list_value(6, NULL, 4))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":11,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":22,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select cardinality(m) from (select MAP(list_value(1), list_value(2)) from range(5) tbl(i)) tbl(m);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"cardinality","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":19,"query_location_length":1,"column_names":["m"]}}],"qualified_name":{"path":["cardinality"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":27,"query_location_length":63,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":33,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":13,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":74,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["m"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select map_concat(map([], []));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"map_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":11,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["map_concat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAP { i: 'a' || i } FROM range(5) t(i);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":8,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":23,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["||"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":32,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT bool_and(map_contains(m, k) = res_key) = bool_and(map_contains_value(m, v) = res_val)\nFROM test_maps;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":85,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":16,"query_location_length":28,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":18,"function_name":"map_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["m"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["k"]}}],"qualified_name":{"path":["map_contains"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":7,"column_names":["res_key"]}}}],"qualified_name":{"path":["bool_and"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":44,"function_name":"bool_and","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":34,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":24,"function_name":"map_contains_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":1,"column_names":["m"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["map_contains_value"]}},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":7,"column_names":["res_val"]}}}],"qualified_name":{"path":["bool_and"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":98,"query_location_length":9,"schema_name":"","table_name":"test_maps","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_maps"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select MAP_ENTRIES(NULL::MAP(INT, BIGINT))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":35,"function_name":"map_entries","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":18,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":19,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":16,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":34,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}],"qualified_name":{"path":["MAP"]}}}}],"qualified_name":{"path":["map_entries"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select MAP_KEYS(MAP(NULL, NULL))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":25,"function_name":"map_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":15,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["map_keys"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAP(\n\t[\n\t\tMAP([5],[4]), MAP([10],[2]), MAP([2,3],[3,2]), MAP([10],[3]), MAP([3,2], [2,3]), MAP([5],[4])\n\t],\n\t[\n\t\t0,1,2,3,4,5\n\t]\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":129,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":13,"query_location_length":100,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":12,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":16,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":13,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":69,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":73,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":17,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":83,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":84,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":90,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":98,"query_location_length":12,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":102,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":106,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":107,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":116,"query_location_length":18,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":124,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":128,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select m[NULL] from (select MAP(LIST_VALUE('Jon Lajoie', 'Backstreet Boys', 'Tenacious D' ),LIST_VALUE(10,9,10)) as m) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":20,"query_location_length":98,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":28,"query_location_length":84,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":59,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":12,"literal":{"kind":"STRING","text":"Jon Lajoie"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":17,"literal":{"kind":"STRING","text":"Backstreet Boys"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":13,"literal":{"kind":"STRING","text":"Tenacious D"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":19,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":108,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select m[10] from (select MAP(LIST_VALUE(10,9,1,11,13),LIST_VALUE(NULL, NULL, NULL,NULL,NULL)) as m) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":4,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":18,"query_location_length":82,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":26,"query_location_length":68,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":30,"query_location_length":24,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":55,"query_location_length":38,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":66,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select MAP_EXTRACT(MAP(NULL, NULL), NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":34,"function_name":"map_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":15,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["map_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select m[NULL] from (select MAP(LIST_VALUE({a:3}, {a:4}, {a:5}, {a:6},{a:7}),LIST_VALUE(10, 9, 8, 7,11)) as m) as T","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":8,"query_location_length":6,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["m"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]}],"from_table":{"type":"SUBQUERY","alias":"T","sample":null,"query_location":20,"query_location_length":90,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"m","query_location":28,"query_location_length":76,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":44,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":5,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":5,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":5,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":5,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":70,"query_location_length":5,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":98,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":100,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT map_extract(MAP(LIST_VALUE([10],[9],[12],[11],[13]),LIST_VALUE(10,9,10,11,13)),[10])","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":84,"function_name":"map_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":66,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":35,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":39,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":59,"query_location_length":25,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"9"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":2,"literal":{"kind":"INTEGER","text":"11"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":81,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":86,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select map_values(MAP(['a'],[5]));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":14,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}}],"qualified_name":{"path":["map_values"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select MAP_VALUES(NULL::MAP(\"NULL\", \"NULL\"))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":19,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":6,"catalog":"","schema":"","type_name":"NULL","children":[],"qualified_name":{"path":["NULL"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":6,"catalog":"","schema":"","type_name":"NULL","children":[],"qualified_name":{"path":["NULL"]}}],"qualified_name":{"path":["MAP"]}}}}],"qualified_name":{"path":["map_values"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TYPEOF(MAP_VALUES(NULL));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":16,"function_name":"map_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["map_values"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM (VALUES (MAP(LIST_VALUE(1,2),LIST_VALUE(3,4))), (NULL), (MAP(LIST_VALUE(1,2),LIST_VALUE(3,4))), (NULL)) as a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SUBQUERY","alias":"a","sample":null,"query_location":14,"query_location_length":103,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":36,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":71,"query_location_length":36,"function_name":"map","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":91,"query_location_length":15,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":104,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["map"]}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":111,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'i': [1, 2, 3], 'j': 2};","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"i","query_location":13,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select null::row(a integer);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":16,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":14,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT STRUCT_EXTRACT(STRUCT_PACK(a := 42, b := 43), 'a') s","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":7,"query_location_length":50,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["struct_extract"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT STRUCT_EXTRACT(STRUCT_PACK(xx := e, yy := g), g) FROM struct_data","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":48,"function_name":"struct_extract","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"xx","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"xx","query_location":40,"query_location_length":1,"column_names":["e"]}},{"name":"yy","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"yy","query_location":49,"query_location_length":1,"column_names":["g"]}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["g"]}}],"qualified_name":{"path":["struct_extract"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":61,"query_location_length":11,"schema_name":"","table_name":"struct_data","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_data"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select struct_keys(['a', 'b']);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"struct_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_keys"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select struct_values(42);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"struct_values","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_values"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL IS NULL, NULL IS NOT NULL, 42 IS NULL, 42 IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":12,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":26,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":42,"query_location_length":7,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":54,"query_location_length":11,"children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}]}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 4 / 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}],"qualified_name":{"path":["/"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::UBIGINT FROM bigints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS SMALLINT) FROM bigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(18,0)::BIGINT FROM bigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":7,"schema_name":"","table_name":"bigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["bigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select typeof([100::USMALLINT, 10.5::DECIMAL]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":39,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":31,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":15,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"10.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(NULL AS FLOAT(0));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":8,"catalog":"","schema":"","type_name":"FLOAT","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["FLOAT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS USMALLINT) FROM hugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":55,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":24,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DOUBLE FROM hugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS DECIMAL(38,0))::HUGEINT FROM hugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":8,"schema_name":"","table_name":"hugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["hugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS UBIGINT)::INTEGER FROM integers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":44,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(s AS INTEGER) FROM strings","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["s"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":7,"schema_name":"","table_name":"strings","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["strings"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::USMALLINT FROM smallints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS TINYINT)::SMALLINT FROM smallints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":45,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(18,0)::SMALLINT FROM smallints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":58,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":9,"schema_name":"","table_name":"smallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["smallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::USMALLINT FROM tinyints","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":11,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::INTEGER::TINYINT FROM tinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":32,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(38,0)::TINYINT FROM tinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"tinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::UTINYINT FROM ubigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":8,"schema_name":"","table_name":"ubigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ubigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::BIGINT FROM ubigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":8,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":8,"schema_name":"","table_name":"ubigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ubigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(38,0)::UBIGINT FROM ubigints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":8,"schema_name":"","table_name":"ubigints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ubigints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS INTEGER) FROM uhugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":35,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::BOOL FROM uhugeints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"BOOL","children":[],"qualified_name":{"path":["BOOL"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::UTINYINT FROM uintegers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":10,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":24,"query_location_length":9,"schema_name":"","table_name":"uintegers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uintegers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::HUGEINT FROM uintegers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"HUGEINT","children":[],"qualified_name":{"path":["HUGEINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":9,"schema_name":"","table_name":"uintegers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uintegers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(38,29)::UINTEGER FROM uintegers ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":16,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":14,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"38"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"29"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":9,"schema_name":"","table_name":"uintegers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uintegers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TRY_CAST(i AS SMALLINT) FROM usmallints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["i"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":36,"query_location_length":10,"schema_name":"","table_name":"usmallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["usmallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(18,0)::USMALLINT FROM usmallints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":15,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":2,"literal":{"kind":"INTEGER","text":"18"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":10,"schema_name":"","table_name":"usmallints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["usmallints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::TINYINT FROM utinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":9,"schema_name":"","table_name":"utinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["utinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i::DECIMAL(3,0)::UTINYINT FROM utinyints ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":14,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":38,"query_location_length":9,"schema_name":"","table_name":"utinyints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["utinyints"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT LENGTH(a) FROM test ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"length","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["length"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select cast (null as main.u[]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":23,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":6,"catalog":"","schema":"main","type_name":"u","children":[],"qualified_name":{"path":["main","u"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(struct_pack())","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_concat(row(), row()), struct_concat(row(), {'x': 1}), struct_concat({'x': 1}, row())","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"struct_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":28,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["row"]}}}],"qualified_name":{"path":["struct_concat"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":30,"function_name":"struct_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":63,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_concat"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":68,"query_location_length":30,"function_name":"struct_concat","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":82,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":88,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":92,"query_location_length":5,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["row"]}}}],"qualified_name":{"path":["struct_concat"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ((c).i).a FROM a","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":9,"children":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":8,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["c"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"literal":{"kind":"STRING","text":"i"}}]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":2,"literal":{"kind":"STRING","text":"a"}}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":22,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT remap_struct({'i': 1, 'j': 2}, NULL::ROW(v1 INT, v2 INT), {'v1': 'j', 'v2': 'i'}, NULL);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":87,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":21,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":19,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"v1","query_location":51,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"v2","query_location":59,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":65,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"v1","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v1","query_location":72,"query_location_length":3,"literal":{"kind":"STRING","text":"j"}}},{"name":"v2","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"v2","query_location":83,"query_location_length":3,"literal":{"kind":"STRING","text":"i"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["remap_struct"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(mapped) = typeof(NULL::STRUCT(renamed STRUCT(a INTEGER))), mapped\nFROM (SELECT remap_struct(\n {'x': NULL::\"NULL\"},\n NULL::STRUCT(renamed STRUCT(a INTEGER)),\n {'renamed': 'x'},\n NULL\n) AS mapped);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":64,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["mapped"]}}],"qualified_name":{"path":["typeof"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":47,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":33,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"renamed","query_location":52,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":61,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["STRUCT"]}}}}],"qualified_name":{"path":["typeof"]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":6,"column_names":["mapped"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":85,"query_location_length":135,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"mapped","query_location":93,"query_location_length":116,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":19,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"x","query_location":121,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":117,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":123,"query_location_length":6,"catalog":"","schema":"","type_name":"NULL","children":[],"qualified_name":{"path":["NULL"]}}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":140,"query_location_length":35,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":142,"query_location_length":33,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"renamed","query_location":157,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":166,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["STRUCT"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":181,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"renamed","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"renamed","query_location":193,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":203,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["remap_struct"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(mapped) = typeof(NULL::MAP(VARCHAR, INTEGER)[]), mapped\nFROM (SELECT remap_struct(\n [NULL::\"NULL\", NULL::\"NULL\"],\n NULL::MAP(VARCHAR, INTEGER)[],\n {'list': 'list'},\n NULL\n) AS mapped);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":54,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":14,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":14,"query_location_length":6,"column_names":["mapped"]}}],"qualified_name":{"path":["typeof"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":37,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":25,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}],"qualified_name":{"path":["list"]}}}}],"qualified_name":{"path":["typeof"]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":6,"column_names":["mapped"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":75,"query_location_length":134,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"mapped","query_location":83,"query_location_length":115,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":28,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":106,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":102,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":108,"query_location_length":6,"catalog":"","schema":"","type_name":"NULL","children":[],"qualified_name":{"path":["NULL"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":120,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":116,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":122,"query_location_length":6,"catalog":"","schema":"","type_name":"NULL","children":[],"qualified_name":{"path":["NULL"]}}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":139,"query_location_length":25,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":135,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":141,"query_location_length":21,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":145,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":154,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}],"qualified_name":{"path":["list"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":170,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"list","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"list","query_location":179,"query_location_length":6,"literal":{"kind":"STRING","text":"list"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":192,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["remap_struct"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT remap_struct(\n\t[ {'first_name': 'Alice', 'age': 43} ],\n\tNULL::STRUCT(age INTEGER, given_name VARCHAR)[],\n\t{ 'list': ROW('bag', { 'age': 'age', 'given_name': 'first_name' }) },\n\tNULL\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":183,"function_name":"remap_struct","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":38,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":34,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"first_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"first_name","query_location":39,"query_location_length":7,"literal":{"kind":"STRING","text":"Alice"}}},{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":55,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":67,"query_location_length":43,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":63,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":69,"query_location_length":39,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"age","query_location":80,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"given_name","query_location":100,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["list"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":113,"query_location_length":68,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"list","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"list","query_location":123,"query_location_length":56,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":5,"literal":{"kind":"STRING","text":"bag"}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":134,"query_location_length":44,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"age","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"age","query_location":143,"query_location_length":5,"literal":{"kind":"STRING","text":"age"}}},{"name":"given_name","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"given_name","query_location":164,"query_location_length":12,"literal":{"kind":"STRING","text":"first_name"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["row"]}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":184,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["remap_struct"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, CASE WHEN i%2=0 THEN {'i': 'hello', 'j': {'a': 3, 'b': NULL}} ELSE {'i': 'world', 'j': {'a': 7, 'b': 22}} END FROM range(6) tbl(i)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":10,"query_location_length":109,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":20,"query_location_length":5,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":40,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":37,"query_location_length":7,"literal":{"kind":"STRING","text":"hello"}}},{"name":"j","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":51,"query_location_length":19,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":57,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":65,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":77,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":83,"query_location_length":7,"literal":{"kind":"STRING","text":"world"}}},{"name":"j","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"j","query_location":97,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":103,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":111,"query_location_length":2,"literal":{"kind":"INTEGER","text":"22"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":125,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":131,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ({'HELLO': 3, 'hello': 4}) col;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"col","query_location":8,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"HELLO","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"HELLO","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},{"name":"hello","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"hello","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'i': 1, 'j': NULL}::ROW(i BIGINT, j ROW(a BIGINT, b VARCHAR));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":43,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":21,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":41,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"i","query_location":34,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"j","query_location":44,"query_location_length":24,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":50,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":60,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1} \u003c {'x': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":19,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1} \u003c\u003e {'x': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":7,"query_location_length":20,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":25,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l \u003c= r FROM struct_int","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":10,"schema_name":"","table_name":"struct_int","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_int"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 'duck'} \u003c= NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 'duck'} \u003e= NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":21,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 'duck', 'y': 1} \u003c {'x': 'duck', 'y': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":7,"query_location_length":45,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":31,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":37,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 'duck', 'y': 1} = NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":28,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":26,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL \u003e {'x': 'duck', 'y': 1}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":28,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":20,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1, 'y': {'a': 'duck', 'b': 1.5}} \u003c= {'x': 2, 'y': {'a': 'goose', 'b': 2.5}}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":7,"query_location_length":81,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":40,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":39,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":63,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":69,"query_location_length":7,"literal":{"kind":"STRING","text":"goose"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":83,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1, 'y': {'a': 'duck', 'b': 1.5}} \u003e= {'x': 2, 'y': {'a': 'goose', 'b': 2.5}}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":81,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":40,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":49,"query_location_length":39,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":55,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":63,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":69,"query_location_length":7,"literal":{"kind":"STRING","text":"goose"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":83,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l \u003e= r FROM struct_nested","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":6,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":13,"schema_name":"","table_name":"struct_nested","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_nested"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL = {'x': 1, 'y': ['duck', 'somateria']}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":43,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":28,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":11,"literal":{"kind":"STRING","text":"somateria"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL \u003e {'x': 1, 'y': ['duck', 'somateria']}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":7,"query_location_length":43,"left":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":28,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":11,"literal":{"kind":"STRING","text":"somateria"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select {'x': a, 'y': a+1, 'z': a+2}\u003e={'x': 1, 'y': 2, 'z': 3} from range(5) tbl(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":7,"query_location_length":54,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"x","query_location":13,"query_location_length":1,"column_names":["a"]}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":22,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["+"]}}},{"name":"z","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"z","query_location":32,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["a"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["+"]}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":37,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"z","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"z","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":67,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["a"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_contains(ROW(1, 2), 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":29,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_contains(ROW(1.0, 2.0, 3.0), 2);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":18,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"2.0"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.0"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_contains(ROW(ROW(1, 2), [1,2]), [1, 2]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":21,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":9,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_contains(('a'::ENUM('a','b'), 0::UTINYINT), 0::UTINYINT), struct_contains(('a'::ENUM('a','b'), 1::UTINYINT), 0::UTINYINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":33,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":13,"catalog":"","schema":"","type_name":"ENUM","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}],"qualified_name":{"path":["ENUM"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}}],"qualified_name":{"path":["struct_contains"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":72,"query_location_length":63,"function_name":"struct_contains","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":88,"query_location_length":33,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":92,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":94,"query_location_length":13,"catalog":"","schema":"","type_name":"ENUM","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":103,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}],"qualified_name":{"path":["ENUM"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":110,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":112,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":124,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}}],"qualified_name":{"path":["struct_contains"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [(13, 24), {'a': 42, 'b': 84}, (43, 85), {'b': 10, 'a': 123123}] AS res;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"res","query_location":7,"query_location_length":64,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":9,"query_location_length":2,"literal":{"kind":"INTEGER","text":"13"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":2,"literal":{"kind":"INTEGER","text":"24"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":24,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":33,"query_location_length":2,"literal":{"kind":"INTEGER","text":"84"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":8,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":2,"literal":{"kind":"INTEGER","text":"85"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":48,"query_location_length":22,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":54,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":63,"query_location_length":6,"literal":{"kind":"INTEGER","text":"123123"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT l IS DISTINCT FROM r FROM struct_str","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":20,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["l"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["r"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":10,"schema_name":"","table_name":"struct_str","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["struct_str"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1, 'y': {'a': 'duck', 'b': 1.5}} IS NOT DISTINCT FROM {'x': 1, 'y': {'a': 'duck', 'b': 1.5}}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":98,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":40,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":81,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":87,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":100,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1, 'y': ['duck', 'somateria']} IS NOT DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":62,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":11,"literal":{"kind":"STRING","text":"somateria"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":65,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'a': 42, 'b': 84}::STRUCT(b INT, a INT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":22,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":13,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"84"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":20,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"b","query_location":36,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"a","query_location":43,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT lhs.id * 10 + rhs.id\nFROM nested_values lhs\nJOIN nested_values rhs ON lhs.value \u003e= rhs.value\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":19,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":11,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":6,"column_names":["lhs","id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":6,"column_names":["rhs","id"]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":51,"query_location_length":48,"left":{"type":"BASE_TABLE","alias":"lhs","sample":null,"query_location":33,"query_location_length":17,"schema_name":"","table_name":"nested_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_values"]}},"right":{"type":"BASE_TABLE","alias":"rhs","sample":null,"query_location":56,"query_location_length":17,"schema_name":"","table_name":"nested_values","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_values"]}},"condition":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":77,"query_location_length":22,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":77,"query_location_length":9,"column_names":["lhs","value"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":9,"column_names":["rhs","value"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a from (SELECT STRUCT_PACK(a := 42, b := 43) as a) as t","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":14,"query_location_length":43,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":22,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":39,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":48,"query_location_length":2,"literal":{"kind":"INTEGER","text":"43"}}}],"qualified_name":{"path":["struct_pack"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_position(ROW(7), 5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":26,"function_name":"struct_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":6,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["struct_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_position(ROW(NULL, 7), 7)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":32,"function_name":"struct_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":12,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":27,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":33,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":37,"query_location_length":1,"literal":{"kind":"INTEGER","text":"7"}}}],"qualified_name":{"path":["struct_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT struct_position(ROW([NULL], [1], [1, 2, 3]), NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":50,"function_name":"struct_position","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":23,"query_location_length":27,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":35,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":40,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["row"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":52,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_position"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i.a, i.c FROM test_structs where col == 'test'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["i","a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["i","c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":12,"schema_name":"","table_name":"test_structs","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test_structs"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":40,"query_location_length":13,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":3,"column_names":["col"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":6,"literal":{"kind":"STRING","text":"test"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT tbl.a['i'] + tbl.b['j'] FROM (VALUES ({'i': 1, 'j': 2})) tbl(b)) FROM (VALUES ({'i': 1, 'j': 2})) tbl(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":72,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":20,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":5,"column_names":["tbl","a"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"i"}}]}},{"name":"","expression":{"class":"OPERATOR","type":"ARRAY_EXTRACT","alias":"","query_location":33,"query_location_length":5,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":5,"column_names":["tbl","b"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"j"}}]}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":44,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":53,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":59,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["b"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"tbl","sample":null,"query_location":85,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":94,"query_location_length":16,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"i","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"i","query_location":100,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"j","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"j","query_location":108,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(struct_pack(a := 1, b := 'a'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":37,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":39,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(row(1, 'a')) = typeof(struct_pack(a := 1, b := 'a'));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":59,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":19,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":11,"function_name":"row","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["row"]}}}],"qualified_name":{"path":["typeof"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":37,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":53,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":61,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["typeof"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [NULL, 6] IS DISTINCT FROM [6, 5];","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":33,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":9,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}}],"qualified_name":{"path":["list_value"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":34,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s::JSON, m::JSON FROM 'data/parquet-testing/empty_field_names.parquet' ORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["s"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["m"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":48,"schema_name":"","table_name":"data/parquet-testing/empty_field_names.parquet","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["data/parquet-testing/empty_field_names.parquet"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT unnest([{'a':{ 'aa': 42}, 'b':{'bb': 84}}], recursive := true, keep_parent_names := true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":89,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":35,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":33,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"a","query_location":20,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"aa","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"aa","query_location":28,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":37,"query_location_length":10,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"bb","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"bb","query_location":44,"query_location_length":2,"literal":{"kind":"INTEGER","text":"84"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":64,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"keep_parent_names","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"keep_parent_names","query_location":91,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT column_name, column_type FROM (DESCRIBE SELECT unnest([{'': {'': 12}}], recursive := true, keep_parent_names := true));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":11,"column_names":["column_name"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":11,"column_names":["column_type"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":37,"query_location_length":88,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"SHOW_REF","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0,"table_name":"","query":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":54,"query_location_length":70,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":61,"query_location_length":16,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":62,"query_location_length":14,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":8,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":92,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"keep_parent_names","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"keep_parent_names","query_location":119,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"show_type":"DESCRIBE","catalog_name":"","schema_name":"","qualified_name":{"path":[]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT UNNEST([[{'a': 42, 'b': {'x': 99}}, {'a': NULL, 'b': {'x': NULL}}]], max_depth:=1)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":82,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":14,"query_location_length":60,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":15,"query_location_length":58,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":25,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":31,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":37,"query_location_length":2,"literal":{"kind":"INTEGER","text":"99"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":43,"query_location_length":29,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":49,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"b","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"b","query_location":60,"query_location_length":11,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":66,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}}},{"name":"max_depth","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"max_depth","query_location":87,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT unnest(NULL::STRUCT(a INT, b STRUCT(c INT)), recursive := true, keep_parent_names := true);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":90,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18,"query_location_length":32,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":30,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":29,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":36,"query_location_length":13,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"c","query_location":45,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}],"qualified_name":{"path":["STRUCT"]}}}},{"name":"recursive","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"recursive","query_location":65,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}},{"name":"keep_parent_names","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"keep_parent_names","query_location":92,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (SELECT t.x FROM (SELECT UNNEST(a)) t(x)) FROM (VALUES ({'a': 42, 'b': 88})) t(a);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"SUBQUERY","type":"SUBQUERY","alias":"","query_location":7,"query_location_length":41,"subquery_type":"SCALAR","subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":3,"column_names":["t","x"]}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":24,"query_location_length":18,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":32,"query_location_length":9,"function_name":"unnest","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["unnest"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"child":null,"comparison_type":"INVALID"}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":54,"query_location_length":29,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":63,"query_location_length":18,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":69,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":78,"query_location_length":2,"literal":{"kind":"INTEGER","text":"88"}}}],"qualified_name":{"path":["struct_pack"]}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select 'abc'::text;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":5,"literal":{"kind":"STRING","text":"abc"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":4,"catalog":"","schema":"","type_name":"text","children":[],"qualified_name":{"path":["text"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast(i AS VARCHAR) FROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["i"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":31,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '15:30:00.123456789'::TIME_NS;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":20,"literal":{"kind":"STRING","text":"15:30:00.123456789"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"TIME_NS","children":[],"qualified_name":{"path":["TIME_NS"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tns, tns::TIME t\nFROM times","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["tns"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"t","query_location":15,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":3,"column_names":["tns"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":5,"schema_name":"","table_name":"times","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["times"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '2023-08-20 16:15:03.123456'::TIMETZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"literal":{"kind":"STRING","text":"2023-08-20 16:15:03.123456"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '02:30:00+2000'::TIMETZ;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":15,"literal":{"kind":"STRING","text":"02:30:00+2000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":6,"catalog":"","schema":"","type_name":"TIMETZ","children":[],"qualified_name":{"path":["TIMETZ"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT make_time(23, 59, 60.5)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"make_time","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":17,"query_location_length":2,"literal":{"kind":"INTEGER","text":"23"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":2,"literal":{"kind":"INTEGER","text":"59"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"60.5"}}}],"qualified_name":{"path":["make_time"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '14:42:04.35'::TIME::VARCHAR","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":20,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":13,"literal":{"kind":"STRING","text":"14:42:04.35"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":22,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '123:4'::VARIANT::TIME","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"123:4"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('11/11/11' as time)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"literal":{"kind":"STRING","text":"11/11/11"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT max(x) OVER (), min(x) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) FROM z ORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":14,"function_name":"max","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["max"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":23,"query_location_length":65,"function_name":"min","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"CURRENT_ROW_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":1,"schema_name":"","table_name":"z","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["z"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2024-05-10 11:06:33.123446'::TIMESTAMP_MS;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":35,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":28,"literal":{"kind":"STRING","text":"2024-05-10 11:06:33.123446"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":37,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[],"qualified_name":{"path":["TIMESTAMP_MS"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MIN(ts), MAX(ts), MIN(tstz), MAX(tstz), MIN(dt), MAX(dt)\nFROM specials;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":9,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":4,"column_names":["tstz"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":9,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":40,"query_location_length":4,"column_names":["tstz"]}}],"qualified_name":{"path":["max"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":47,"query_location_length":7,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":7,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":69,"query_location_length":8,"schema_name":"","table_name":"specials","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["specials"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAD(ts), MAD(tstz), MAD(dt)\nFROM specials;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":7,"function_name":"mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":2,"column_names":["ts"]}}],"qualified_name":{"path":["mad"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":9,"function_name":"mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":4,"column_names":["tstz"]}}],"qualified_name":{"path":["mad"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":27,"query_location_length":7,"function_name":"mad","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":2,"column_names":["dt"]}}],"qualified_name":{"path":["mad"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":40,"query_location_length":8,"schema_name":"","table_name":"specials","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["specials"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 'e'::DATE","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"e"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MAX(t) FROM timestamp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT t::DATE FROM timestamp WHERE EXTRACT(YEAR from t)=2007 ORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["t"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":20,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":36,"query_location_length":25,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":36,"query_location_length":20,"function_name":"date_part","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":4,"literal":{"kind":"STRING","text":"YEAR"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":54,"query_location_length":1,"column_names":["t"]}}],"qualified_name":{"path":["date_part"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2007"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TIMESTAMP '2001-04-20 14:42:11.12300000000000000000';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":52,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2001-04-20 14:42:11.12300000000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select nano::TIME from timestamp;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["nano"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":4,"catalog":"","schema":"","type_name":"TIME","children":[],"qualified_name":{"path":["TIME"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":9,"schema_name":"","table_name":"timestamp","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["timestamp"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2008-01-01 00:00:11'::TIMESTAMP_US = '2008-01-01 00:00:11'::TIMESTAMP_S","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":72,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":21,"literal":{"kind":"STRING","text":"2008-01-01 00:00:11"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_US","children":[],"qualified_name":{"path":["TIMESTAMP_US"]}}},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":66,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":21,"literal":{"kind":"STRING","text":"2008-01-01 00:00:11"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":68,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMP_S","children":[],"qualified_name":{"path":["TIMESTAMP_S"]}}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select timestamptz '2021-11-15 02:30:00';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2021-11-15 02:30:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select timestamp '294247-01-10 04:00:54.775806'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775806"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select monthname(timestamp '294247-01-10 04:00:54.775806'), monthname(timestamp '290309-12-22 (BC) 00:00:00')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":51,"function_name":"monthname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775806"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["monthname"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":49,"function_name":"monthname","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":70,"query_location_length":38,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"290309-12-22 (BC) 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}}],"qualified_name":{"path":["monthname"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT epoch_ns(CAST('1677-09-21 00:12:43.145224192' AS TIMESTAMP_NS)),\n epoch_ns(CAST('1677-09-21 00:12:43.145224194' AS TIMESTAMP_NS))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":63,"function_name":"epoch_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":53,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":31,"literal":{"kind":"STRING","text":"1677-09-21 00:12:43.145224192"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}}],"qualified_name":{"path":["epoch_ns"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":79,"query_location_length":63,"function_name":"epoch_ns","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":88,"query_location_length":53,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":31,"literal":{"kind":"STRING","text":"1677-09-21 00:12:43.145224194"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":128,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}}}],"qualified_name":{"path":["epoch_ns"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT TIMESTAMP '2021-05-25 04:55:03.382494 UTC';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":42,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2021-05-25 04:55:03.382494 UTC"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('1111-11-' as timestamp)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":33,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":10,"literal":{"kind":"STRING","text":"1111-11-"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('294247-01-10 04:00:54.775806' as timestamp)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":53,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":30,"literal":{"kind":"STRING","text":"294247-01-10 04:00:54.775806"}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select timestamptz '2020-12-31 21:25:58.745232-02';","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":43,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"2020-12-31 21:25:58.745232-02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":7,"query_location_length":11,"catalog":"","schema":"","type_name":"timestamptz","children":[],"qualified_name":{"path":["timestamptz"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::DECIMAL(NULL)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":15,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":13,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":21,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::MAP;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":5,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":3,"catalog":"","schema":"","type_name":"MAP","children":[],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT typeof(DECIMAL(4,2) '1.23'), DECIMAL(4,2) '1.23', typeof(STRUCT(a INTEGER) '{\"a\": 42}');","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":27,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1.23"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}}}],"qualified_name":{"path":["typeof"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":19,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"1.23"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}],"qualified_name":{"path":["DECIMAL"]}}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":37,"function_name":"typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":29,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"STRING","text":"{\"a\": 42}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":17,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":73,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["STRUCT"]}}}}],"qualified_name":{"path":["typeof"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 42::UHUGEINT + 42::UHUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '34028236692093846346'::UHUGEINT * '33746074317682114556'::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":67,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":22,"literal":{"kind":"STRING","text":"34028236692093846346"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":64,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":22,"literal":{"kind":"STRING","text":"33746074317682114556"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 1 + '340282366920938463463374607431768211454'::UHUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":9,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":41,"literal":{"kind":"STRING","text":"340282366920938463463374607431768211454"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '0'::UHUGEINT, '-0'::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"STRING","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":4,"literal":{"kind":"STRING","text":"-0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (-42)::TINYINT::UHUGEINT, (-42)::SMALLINT::UHUGEINT, (-42)::INTEGER::UHUGEINT, (-42)::BIGINT::UHUGEINT, (-42)::FLOAT::UHUGEINT, (-42)::DOUBLE::UHUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":21,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":74,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":65,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":67,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":76,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":99,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":91,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":87,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":93,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":101,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":123,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":116,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":118,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":125,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":148,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":140,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":136,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":142,"query_location_length":6,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":150,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '9223372036854775808'::UHUGEINT::BIGINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":38,"query_location_length":8,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":21,"literal":{"kind":"STRING","text":"9223372036854775808"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":40,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select abs(1::UHUGEINT), abs('1329227995784915872903807060280344576'::UHUGEINT), abs(0::UHUGEINT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":16,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["abs"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":25,"query_location_length":54,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":39,"literal":{"kind":"STRING","text":"1329227995784915872903807060280344576"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["abs"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":81,"query_location_length":16,"function_name":"abs","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":85,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":88,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["abs"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) FROM uhugeints WHERE h \u003c= '1267650600228229401496703205376'::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":9,"schema_name":"","table_name":"uhugeints","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uhugeints"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_LESSTHANOREQUALTO","alias":"","query_location":37,"query_location_length":48,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["h"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":75,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":33,"literal":{"kind":"STRING","text":"1267650600228229401496703205376"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":77,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 251658240::UHUGEINT * 4642275147320176030871715840::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":60,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"INTEGER","text":"251658240"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":57,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":28,"literal":{"kind":"INTEGER","text":"4642275147320176030871715840"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":59,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 19938419936773738093557105904205168640::UHUGEINT * 4642275147320176030871715840::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":89,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":38,"literal":{"kind":"INTEGER","text":"19938419936773738093557105904205168640"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":86,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":28,"literal":{"kind":"INTEGER","text":"4642275147320176030871715840"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":88,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 4611686018427387904::UHUGEINT * 36893488147419103231::UHUGEINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":62,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":19,"literal":{"kind":"INTEGER","text":"4611686018427387904"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":28,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":59,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":39,"query_location_length":20,"literal":{"kind":"INTEGER","text":"36893488147419103231"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":61,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT cast({'tag': 5::UTINYINT, 'a': 1, 'b': NULL::VARCHAR} AS UNION(a INT, b VARCHAR))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":81,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":12,"query_location_length":48,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"tag","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"tag","query_location":21,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":23,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}},{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"b","query_location":50,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":64,"query_location_length":23,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":72,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":79,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["UNION"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT a.c FROM tbl","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["a","c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT u.f32 FROM tbl2;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":5,"column_names":["u","f32"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":18,"query_location_length":4,"schema_name":"","table_name":"tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl2"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT union_tag((1::INTEGER::UNION(lu UNION(f1 VARCHAR, f2 BOOL), ru UNION(t BIGINT, f3 TINYINT))).ru);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":96,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":17,"query_location_length":85,"children":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":70,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":68,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"lu","query_location":39,"query_location_length":26,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"f1","query_location":48,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"f2","query_location":60,"query_location_length":4,"catalog":"","schema":"","type_name":"BOOL","children":[],"qualified_name":{"path":["BOOL"]}}],"qualified_name":{"path":["UNION"]}},{"class":"TYPE","type":"TYPE","alias":"ru","query_location":70,"query_location_length":27,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"t","query_location":78,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}},{"class":"TYPE","type":"TYPE","alias":"f3","query_location":89,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}],"qualified_name":{"path":["UNION"]}}],"qualified_name":{"path":["UNION"]}}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":3,"literal":{"kind":"STRING","text":"ru"}}]}}],"qualified_name":{"path":["union_tag"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT u.c FROM tbl1 WHERE u.c IS NOT NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["u","c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":16,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":31,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":3,"column_names":["u","c"]}]},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT tbl1.a.c, tbl1.id, tbl2.id FROM tbl2 JOIN tbl1 ON tbl1.a.c = tbl2.d.f ORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":8,"column_names":["tbl1","a","c"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":7,"column_names":["tbl1","id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":7,"column_names":["tbl2","id"]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":44,"query_location_length":32,"left":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":4,"schema_name":"","table_name":"tbl2","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl2"]}},"right":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":49,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"condition":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":57,"query_location_length":19,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":8,"column_names":["tbl1","a","c"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":8,"column_names":["tbl2","d","f"]}},"join_type":"INNER","ref_type":"REGULAR","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT u.a1 FROM tbl1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["u","a1"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":17,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT union_tag(a), a FROM tbl ORDER BY a ASC;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["a"]}}],"qualified_name":{"path":["union_tag"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["a"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":28,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT union_tag(u) FROM tbl1 WHERE u = (1::UNION(a INT, b FLOAT, c VARCHAR));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":12,"function_name":"union_tag","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["u"]}}],"qualified_name":{"path":["union_tag"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":4,"schema_name":"","table_name":"tbl1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl1"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":36,"query_location_length":41,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["u"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":42,"query_location_length":34,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":44,"query_location_length":32,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":52,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":59,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":68,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["UNION"]}}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT try_cast(union_value(a := 'x')::UNION(a VARCHAR, b INT) AS UNION(a INT, b INT, c INT)),\n try_cast(union_value(a := '7')::UNION(a VARCHAR, b INT) AS UNION(a INT, b INT, c INT));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":86,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":37,"query_location_length":25,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":21,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":33,"query_location_length":3,"literal":{"kind":"STRING","text":"x"}}}],"qualified_name":{"path":["union_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":39,"query_location_length":23,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":58,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["UNION"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":66,"query_location_length":26,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":74,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":81,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":88,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["UNION"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":102,"query_location_length":86,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":132,"query_location_length":25,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":111,"query_location_length":21,"function_name":"union_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":128,"query_location_length":3,"literal":{"kind":"STRING","text":"7"}}}],"qualified_name":{"path":["union_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":134,"query_location_length":23,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":142,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":153,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["UNION"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":161,"query_location_length":26,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":169,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":176,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":183,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["UNION"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (20)::UTINYINT + (200)::USMALLINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":22,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"literal":{"kind":"INTEGER","text":"20"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":3,"literal":{"kind":"INTEGER","text":"200"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 100::UTINYINT // 0::UTINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":28,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":25,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":24,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":27,"query_location_length":8,"catalog":"","schema":"","type_name":"UTINYINT","children":[],"qualified_name":{"path":["UTINYINT"]}}}}],"qualified_name":{"path":["//"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 100000000::INTEGER + 100::UINTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":0,"function_name":"+","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":16,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":9,"literal":{"kind":"INTEGER","text":"100000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":31,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":28,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":33,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}}],"qualified_name":{"path":["+"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '65535'::UINTEGER;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":7,"literal":{"kind":"STRING","text":"65535"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (100::UINTEGER)::DECIMAL(2,0);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":14,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":12,"catalog":"","schema":"","type_name":"DECIMAL","children":[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":32,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}],"qualified_name":{"path":["DECIMAL"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '18446744073709551616'::UBIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":22,"literal":{"kind":"STRING","text":"18446744073709551616"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (9223372036854775807)::BIGINT::UINTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":28,"query_location_length":8,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":19,"literal":{"kind":"INTEGER","text":"9223372036854775807"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (-42)::SMALLINT::UBIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":10,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (-42)::FLOAT::UBIGINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":7,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":3,"literal":{"kind":"INTEGER","text":"-42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":5,"catalog":"","schema":"","type_name":"FLOAT","children":[],"qualified_name":{"path":["FLOAT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (10)::USMALLINT::TINYINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":22,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":9,"catalog":"","schema":"","type_name":"USMALLINT","children":[],"qualified_name":{"path":["USMALLINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":24,"query_location_length":7,"catalog":"","schema":"","type_name":"TINYINT","children":[],"qualified_name":{"path":["TINYINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (33000)::UBIGINT::SMALLINT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":23,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":14,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":5,"literal":{"kind":"INTEGER","text":"33000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":16,"query_location_length":7,"catalog":"","schema":"","type_name":"UBIGINT","children":[],"qualified_name":{"path":["UBIGINT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":25,"query_location_length":8,"catalog":"","schema":"","type_name":"SMALLINT","children":[],"qualified_name":{"path":["SMALLINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (200.32)::DECIMAL::UINTEGER","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":24,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":6,"literal":{"kind":"NUMERIC","text":"200.32"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"DECIMAL","children":[],"qualified_name":{"path":["DECIMAL"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":26,"query_location_length":8,"catalog":"","schema":"","type_name":"UINTEGER","children":[],"qualified_name":{"path":["UINTEGER"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select []::uint32[]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":9,"query_location_length":10,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":2,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":11,"query_location_length":6,"catalog":"","schema":"","type_name":"uint32","children":[],"qualified_name":{"path":["uint32"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT '00000000-0000-0000-0000-000000000000'::UUID::UHUGEINT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":51,"query_location_length":10,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":38,"literal":{"kind":"STRING","text":"00000000-0000-0000-0000-000000000000"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"UUID","children":[],"qualified_name":{"path":["UUID"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":53,"query_location_length":8,"catalog":"","schema":"","type_name":"UHUGEINT","children":[],"qualified_name":{"path":["UHUGEINT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v IS NULL, v IS NOT NULL FROM variants;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":9,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]}]},{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":20,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["v"]}]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":37,"query_location_length":8,"schema_name":"","table_name":"variants","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["variants"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select '2019/03/21'::TIMESTAMP::VARIANT::TIMESTAMP;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":11,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":19,"query_location_length":11,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":12,"literal":{"kind":"STRING","text":"2019/03/21"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":9,"catalog":"","schema":"","type_name":"TIMESTAMP","children":[],"qualified_name":{"path":["TIMESTAMP"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select [\n\t42::UNION(a INTEGER, b BOOLEAN, c VARCHAR)::VARIANT,\n\ttrue::UNION(a INTEGER, b BOOLEAN, c VARCHAR)::VARIANT,\n\t'test'::UNION(a INTEGER, b BOOLEAN, c VARCHAR)::VARIANT,\n]::VARIANT","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":178,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":171,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":12,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":10,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":14,"query_location_length":38,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":22,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":33,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":44,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["UNION"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":108,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":68,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":4,"literal":{"kind":"BOOLEAN","text":"true"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":38,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":89,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":100,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["UNION"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":110,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":166,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":126,"query_location_length":40,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":120,"query_location_length":6,"literal":{"kind":"STRING","text":"test"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":128,"query_location_length":38,"catalog":"","schema":"","type_name":"UNION","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":136,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":147,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}},{"class":"TYPE","type":"TYPE","alias":"c","query_location":158,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}],"qualified_name":{"path":["UNION"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":168,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":180,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT (v.outer).a, variant_keys(v, 'outer'), v::JSON\nFROM (SELECT '{\"outer\":{\"a\":1,\"b\":2,\"a\":3}}'::JSON::VARIANT AS v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"OPERATOR","type":"STRUCT_EXTRACT","alias":"","query_location":7,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":8,"query_location_length":7,"column_names":["v","outer"]},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":2,"literal":{"kind":"STRING","text":"a"}}]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":20,"query_location_length":24,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":7,"literal":{"kind":"STRING","text":"outer"}}}],"qualified_name":{"path":["variant_keys"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":47,"query_location_length":6,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":49,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":59,"query_location_length":60,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":104,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":98,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":31,"literal":{"kind":"STRING","text":"{\"outer\":{\"a\":1,\"b\":2,\"a\":3}}"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":100,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":106,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select var::VARIANT from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["var"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":25,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM (SELECT list_intersect(['a', 'b']::VARIANT[], [x::VARIANT, 'b']) l FROM (SELECT 'v' || i AS x FROM range(5000) t(i))) WHERE len(l) = 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":117,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":29,"query_location_length":56,"function_name":"list_intersect","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":11,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":44,"query_location_length":10,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":3,"literal":{"kind":"STRING","text":"a"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}],"qualified_name":{"path":["list"]}}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":67,"query_location_length":17,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":80,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_intersect"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":93,"query_location_length":44,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"x","query_location":101,"query_location_length":8,"function_name":"||","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":101,"query_location_length":3,"literal":{"kind":"STRING","text":"v"}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":108,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["||"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":120,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":4,"literal":{"kind":"INTEGER","text":"5000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":145,"query_location_length":10,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":145,"query_location_length":6,"function_name":"len","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":149,"query_location_length":1,"column_names":["l"]}}],"qualified_name":{"path":["len"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast('hello world'::variant as STRUCT(a varchar, b boolean));","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":64,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":29,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":16,"query_location_length":13,"literal":{"kind":"STRING","text":"hello world"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":31,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":42,"query_location_length":28,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":51,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"b","query_location":62,"query_location_length":7,"catalog":"","schema":"","type_name":"BOOLEAN","children":[],"qualified_name":{"path":["BOOLEAN"]}}],"qualified_name":{"path":["STRUCT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select try_cast([['1'], ['bad'], ['3']]::variant as INTEGER[][]);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":57,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":39,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":16,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":17,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":3,"literal":{"kind":"STRING","text":"1"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":24,"query_location_length":7,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":25,"query_location_length":5,"literal":{"kind":"STRING","text":"bad"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":33,"query_location_length":5,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":3,"literal":{"kind":"STRING","text":"3"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":41,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"list","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":52,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["list"]}}],"qualified_name":{"path":["list"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT s.shredding_state, s.fully_shredded.type, s.has_null, s.fully_shredded.stats.has_null\nFROM (SELECT stats(TRY_CAST(n AS VARIANT)) s FROM t LIMIT 1);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":17,"column_names":["s","shredding_state"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":21,"column_names":["s","fully_shredded","type"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":49,"query_location_length":10,"column_names":["s","has_null"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":61,"query_location_length":31,"column_names":["s","fully_shredded","stats","has_null"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":98,"query_location_length":55,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":151,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":106,"query_location_length":29,"function_name":"stats","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":112,"query_location_length":22,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":1,"column_names":["n"]},"try_cast":true,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":126,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["stats"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":143,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT j::VARIANT::JSON FROM jw;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":17,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":19,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":29,"query_location_length":2,"schema_name":"","table_name":"jw","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["jw"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT 10.5 * 1::VARIANT;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"10.5"}}},{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["*"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::VARIANT IS NOT DISTINCT FROM [1]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":38,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":3,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ['duck']::VARIANT IS NOT DISTINCT FROM ['duck']","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":47,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":15,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":8,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":8,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT [{'x': 'duck', 'y': 1}]::VARIANT IS DISTINCT FROM [{'x': 'duck', 'y': 1}]","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":73,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":30,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":14,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":27,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":32,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":23,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":58,"query_location_length":21,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":64,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"y","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"y","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT NULL::VARIANT IS DISTINCT FROM {'x': 'duck'}","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":44,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":11,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":7,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":13,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":38,"query_location_length":13,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":44,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}}],"qualified_name":{"path":["struct_pack"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1, 'y': {'a': 'duck', 'b': 1.5}}::VARIANT IS NOT DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_NOT_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":73,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":38,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":23,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":27,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":40,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"1.5"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT {'x': 1, 'y': ['duck', 'somateria']}::VARIANT IS DISTINCT FROM NULL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":7,"query_location_length":67,"left":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":36,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"y","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"y","query_location":21,"query_location_length":21,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":22,"query_location_length":6,"literal":{"kind":"STRING","text":"duck"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":30,"query_location_length":11,"literal":{"kind":"STRING","text":"somateria"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":70,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT variant_typeof(v), CAST(v AS VARCHAR), CAST(variant_keys(v) AS VARCHAR), v = {'l': [42], 'o': {'x': 42}}::VARIANT\nFROM (SELECT {'o': {'x': 42}, 'l': [42]}::VARIANT AS v);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":17,"function_name":"variant_typeof","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["variant_typeof"]}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":26,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":36,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":46,"query_location_length":32,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":15,"function_name":"variant_keys","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["variant_keys"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":70,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}},{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":80,"query_location_length":40,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":80,"query_location_length":1,"column_names":["v"]},"right":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":111,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":84,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"l","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":90,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":91,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_value"]}}},{"name":"o","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"o","query_location":101,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":107,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":113,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":126,"query_location_length":50,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"v","query_location":161,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":134,"query_location_length":27,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"o","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"o","query_location":140,"query_location_length":9,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"x","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"x","query_location":146,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["struct_pack"]}}},{"name":"l","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"l","query_location":156,"query_location_length":4,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":157,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":163,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT n.x::STRUCT(a BIGINT), n.x.a FROM (SELECT * FROM cast_parent);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":10,"query_location_length":18,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":3,"column_names":["n","x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":12,"query_location_length":16,"catalog":"","schema":"","type_name":"STRUCT","children":[{"class":"TYPE","type":"TYPE","alias":"a","query_location":21,"query_location_length":6,"catalog":"","schema":"","type_name":"BIGINT","children":[],"qualified_name":{"path":["BIGINT"]}}],"qualified_name":{"path":["STRUCT"]}}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":30,"query_location_length":5,"column_names":["n","x","a"]}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":41,"query_location_length":27,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":49,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":56,"query_location_length":11,"schema_name":"","table_name":"cast_parent","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cast_parent"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, nested.inner_struct.tag, nested.inner_struct.payload.obj.a::INTEGER,\n nested.inner_struct.payload.obj.b::VARCHAR\nFROM (SELECT * FROM nested_variant) ORDER BY id;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":23,"column_names":["nested","inner_struct","tag"]},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":69,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":33,"column_names":["nested","inner_struct","payload","obj","a"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":71,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}},{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":120,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":87,"query_location_length":33,"column_names":["nested","inner_struct","payload","obj","b"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":122,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":135,"query_location_length":30,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":143,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":150,"query_location_length":14,"schema_name":"","table_name":"nested_variant","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["nested_variant"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM cast_parent;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":11,"schema_name":"","table_name":"cast_parent","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["cast_parent"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ({'a': NULL::INTEGER, 'b': 1}::VARIANT::JSON)::VARCHAR;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":52,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":45,"query_location_length":6,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":36,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":8,"query_location_length":28,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"a","query_location":18,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":14,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":20,"query_location_length":7,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":38,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":47,"query_location_length":4,"catalog":"","schema":"","type_name":"JSON","children":[],"qualified_name":{"path":["JSON"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":54,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT CAST(x AS MAP(VARCHAR, INT)) FROM (VALUES ([{'key': 'b', 'value': 2}]::VARIANT), ([NULL]::VARIANT)) t(x);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":7,"query_location_length":28,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["x"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":17,"query_location_length":17,"catalog":"","schema":"","type_name":"MAP","children":[{"class":"TYPE","type":"TYPE","alias":"","query_location":21,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}},{"class":"TYPE","type":"TYPE","alias":"","query_location":30,"query_location_length":3,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}],"qualified_name":{"path":["MAP"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":41,"query_location_length":65,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":76,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":50,"query_location_length":26,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":51,"query_location_length":24,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"key","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"key","query_location":59,"query_location_length":3,"literal":{"kind":"STRING","text":"b"}}},{"name":"value","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"value","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["struct_pack"]}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":78,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":95,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":89,"query_location_length":6,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":90,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["list_value"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":97,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["x"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM checkpoint_test WHERE b = 'original'","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":15,"schema_name":"","table_name":"checkpoint_test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["checkpoint_test"]}},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":43,"query_location_length":14,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["b"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":10,"literal":{"kind":"STRING","text":"original"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT current_setting('force_update_to_del_and_insert')","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":49,"function_name":"current_setting","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":32,"literal":{"kind":"STRING","text":"force_update_to_del_and_insert"}}}],"qualified_name":{"path":["current_setting"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) FROM test","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":21,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT * FROM test ORDER BY id","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":2,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":4,"schema_name":"","table_name":"test","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["test"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT DISTINCT c FROM t;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"DISTINCT_MODIFIER","distinct_on_targets":[]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":1,"column_names":["c"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":23,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT j FROM integers LIMIT 5 OFFSET 4995;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"LIMIT_MODIFIER","limit":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"offset":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":4,"literal":{"kind":"INTEGER","text":"4995"}},"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select * from t_case;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":7,"query_location_length":1,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":6,"schema_name":"","table_name":"t_case","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t_case"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select max(b) from tbl;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":19,"query_location_length":3,"schema_name":"","table_name":"tbl","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tbl"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i FROM t ORDER BY i LIMIT $limit_val","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]}}]},{"type":"LIMIT_MODIFIER","limit":{"class":"PARAMETER","type":"VALUE_PARAMETER","alias":"","query_location":33,"query_location_length":10,"identifier":"limit_val"},"offset":null,"limit_type":"ROW_COUNT"}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":14,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[{"key":"limit_val","value":1}]}]}} +{"sql":"SELECT variant_comparator({'b': 10, 'a': 1}::VARIANT) = variant_comparator({'a': 1, 'b': 10}::VARIANT)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":7,"query_location_length":95,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":46,"function_name":"variant_comparator","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":43,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":26,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":32,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}},{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":41,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":45,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_comparator"]}},"right":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":56,"query_location_length":46,"function_name":"variant_comparator","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":92,"query_location_length":9,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":75,"query_location_length":17,"function_name":"struct_pack","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"a","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"a","query_location":81,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"b","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"b","query_location":89,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["struct_pack"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":94,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["variant_comparator"]}}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT v::VARCHAR FROM (VALUES\n ('2019-12-31'::DATE::VARIANT),\n ('2020-01-01 00:00:01'::TIMESTAMP_MS::VARIANT),\n ('2020-01-01 00:00:00'::TIMESTAMP_S::VARIANT),\n ('2020-01-02'::DATE::VARIANT),\n ('2020-01-01 00:00:00.5'::TIMESTAMP_NS::VARIANT)\n) t(v)\nORDER BY v","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":273,"query_location_length":1,"column_names":["v"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":8,"query_location_length":9,"child":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["v"]},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":10,"query_location_length":7,"catalog":"","schema":"","type_name":"VARCHAR","children":[],"qualified_name":{"path":["VARCHAR"]}}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":23,"query_location_length":235,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":54,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":48,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":12,"literal":{"kind":"STRING","text":"2019-12-31"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":50,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":56,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":106,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":92,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":71,"query_location_length":21,"literal":{"kind":"STRING","text":"2020-01-01 00:00:01"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":94,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_MS","children":[],"qualified_name":{"path":["TIMESTAMP_MS"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":108,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":157,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":144,"query_location_length":13,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":21,"literal":{"kind":"STRING","text":"2020-01-01 00:00:00"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":146,"query_location_length":11,"catalog":"","schema":"","type_name":"TIMESTAMP_S","children":[],"qualified_name":{"path":["TIMESTAMP_S"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":159,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":192,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":186,"query_location_length":6,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":174,"query_location_length":12,"literal":{"kind":"STRING","text":"2020-01-02"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":188,"query_location_length":4,"catalog":"","schema":"","type_name":"DATE","children":[],"qualified_name":{"path":["DATE"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":194,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}],[{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":246,"query_location_length":9,"child":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":232,"query_location_length":14,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":209,"query_location_length":23,"literal":{"kind":"STRING","text":"2020-01-01 00:00:00.5"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":234,"query_location_length":12,"catalog":"","schema":"","type_name":"TIMESTAMP_NS","children":[],"qualified_name":{"path":["TIMESTAMP_NS"]}}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":248,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["v"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"FROM test_vector_types(NULL::VARIANT);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":5,"query_location_length":32,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"test_vector_types","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":27,"query_location_length":9,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":29,"query_location_length":7,"catalog":"","schema":"","type_name":"VARIANT","children":[],"qualified_name":{"path":["VARIANT"]}}}}],"qualified_name":{"path":["test_vector_types"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT depname, salary, dense_rank() OVER (PARTITION BY depname ORDER BY salary) FROM empsalary order by depname, salary","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":105,"query_location_length":7,"column_names":["depname"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":114,"query_location_length":6,"column_names":["salary"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["depname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":6,"column_names":["salary"]},{"class":"WINDOW","type":"WINDOW_RANK_DENSE","alias":"","query_location":24,"query_location_length":56,"function_name":"dense_rank","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":7,"column_names":["depname"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":6,"column_names":["salary"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["dense_rank"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":86,"query_location_length":9,"schema_name":"","table_name":"empsalary","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empsalary"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(unique1) over (order by unique1 rows between 5 following and 10 following) su FROM tenk1 order by unique1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":7,"column_names":["unique1"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"su","query_location":7,"query_location_length":78,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":7,"column_names":["unique1"]}}],"start":"EXPR_FOLLOWING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":7,"column_names":["unique1"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":94,"query_location_length":5,"schema_name":"","table_name":"tenk1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tenk1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT COUNT(*) OVER (\n ORDER BY id ROWS BETWEEN CURRENT ROW AND off FOLLOWING\n)\nFROM (VALUES (1, -1)) AS src(id, off);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":74,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":2,"column_names":["id"]}}],"start":"CURRENT_ROW_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":null,"end_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":66,"query_location_length":3,"column_names":["off"]},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"src","sample":null,"query_location":87,"query_location_length":16,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":96,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["id","off"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\tMAX(v) OVER (PARTITION BY a),\n\tSUM(v) OVER (PARTITION BY a, a)\nFROM src\nORDER BY b;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["b"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":8,"query_location_length":28,"function_name":"max","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["a"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":12,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["max"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":39,"query_location_length":31,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["a"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":68,"query_location_length":1,"column_names":["a"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":76,"query_location_length":3,"schema_name":"","table_name":"src","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["src"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT id, string_agg(id, ' ') OVER (PARTITION BY ch ORDER BY id ROWS BETWEEN 1 FOLLOWING AND 2 FOLLOWING) \nFROM t1\nORDER BY 1;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":125,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":2,"column_names":["id"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":11,"query_location_length":95,"function_name":"string_agg","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":2,"column_names":["ch"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":2,"column_names":["id"]}}],"start":"EXPR_FOLLOWING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":78,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":94,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":22,"query_location_length":2,"column_names":["id"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":26,"query_location_length":3,"literal":{"kind":"STRING","text":" "}}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":113,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"with source as (\n\tselect \n\t\ti, \n\t\ti * 3 % 5 as permuted,\n\t\tif(permuted \u003e 0, NULL, permuted) as missing\n\tfrom range(5) tbl(i)\n)\nselect\n\ti,\n\tpermuted,\n\tfill(missing order by permuted) over (order by i) as filled\nfrom source\nqualify filled \u003c\u003e permuted","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"source","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"permuted","query_location":34,"query_location_length":9,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":38,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["*"]}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["%"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"missing","query_location":59,"query_location_length":32,"function_name":"if","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_GREATERTHAN","alias":"","query_location":62,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":8,"column_names":["permuted"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":73,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":82,"query_location_length":8,"column_names":["permuted"]}}],"qualified_name":{"path":["if"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":109,"query_location_length":15,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":115,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":135,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":8,"column_names":["permuted"]},{"class":"WINDOW","type":"WINDOW_FILL","alias":"filled","query_location":150,"query_location_length":49,"function_name":"fill","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":1,"column_names":["i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":172,"query_location_length":8,"column_names":["permuted"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":155,"query_location_length":7,"column_names":["missing"]}}],"qualified_name":{"path":["fill"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":215,"query_location_length":6,"schema_name":"","table_name":"source","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["source"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":230,"query_location_length":18,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":230,"query_location_length":6,"column_names":["filled"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":240,"query_location_length":8,"column_names":["permuted"]}}},"named_param_map":[]}]}} +{"sql":"SELECT i, fill(CASE WHEN i = 2 THEN NULL ELSE i END) OVER (ORDER BY CASE WHEN i \u003c 4 THEN NULL ELSE i END) AS filled\nFROM range(8) r(i)\nQUALIFY i IS DISTINCT FROM filled\nORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":178,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_FILL","alias":"filled","query_location":10,"query_location_length":95,"function_name":"fill","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":68,"query_location_length":36,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":78,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":1,"literal":{"kind":"INTEGER","text":"4"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":89,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":99,"query_location_length":1,"column_names":["i"]}}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":15,"query_location_length":36,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":25,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":25,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":29,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":1,"column_names":["i"]}}}],"qualified_name":{"path":["fill"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":121,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":127,"query_location_length":1,"literal":{"kind":"INTEGER","text":"8"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":143,"query_location_length":25,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":143,"query_location_length":1,"column_names":["i"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":162,"query_location_length":6,"column_names":["filled"]}}},"named_param_map":[]}]}} +{"sql":"SELECT\n id,\n user_id,\n order_id,\n LAST_VALUE (order_id RESPECT NULLS) over (\n PARTITION BY user_id\n ORDER BY id\n ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING\n ) AS last_order_id\nFROM issue2549\nORDER BY ALL","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":2,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":7,"column_names":["user_id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":8,"column_names":["order_id"]},{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"last_order_id","query_location":38,"query_location_length":140,"function_name":"last_value","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":98,"query_location_length":7,"column_names":["user_id"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":2,"column_names":["id"]}}],"start":"UNBOUNDED_PRECEDING","end":"EXPR_PRECEDING_ROWS","start_expr":null,"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":163,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":true,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":8,"column_names":["order_id"]}}],"qualified_name":{"path":["last_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":201,"query_location_length":9,"schema_name":"","table_name":"issue2549","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue2549"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \n\ti,\n\tlead(i ORDER BY i // 2, i) OVER w AS f,\nFROM range(10) tbl(i)\nWINDOW w AS (\n\t\tORDER BY i // 2\n\t\tROWS BETWEEN 3 PRECEDING AND 3 FOLLOWING \n\t\tEXCLUDE TIES\n\t)\nORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":178,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_LEAD","alias":"f","query_location":13,"query_location_length":33,"function_name":"lead","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":100,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":138,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"TIES","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":34,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["lead"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":58,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \n\ti,\n\ti // 2 AS inside,\n\tlead(i, 1, NULL ORDER BY i // 2, i) OVER w AS next,\n\tlag(i, 1, NULL ORDER BY i // 2, i) OVER w AS prev,\nFROM range(10) tbl(i)\nWINDOW w AS (\n\tORDER BY i // 2\n\tROWS BETWEEN 3 PRECEDING AND 3 FOLLOWING\n)\nORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":242,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"inside","query_location":13,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}},{"class":"WINDOW","type":"WINDOW_LEAD","alias":"next","query_location":32,"query_location_length":42,"function_name":"lead","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":182,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":203,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":57,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":57,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":62,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["i"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":37,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":40,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["lead"]}},{"class":"WINDOW","type":"WINDOW_LAG","alias":"prev","query_location":85,"query_location_length":41,"function_name":"lag","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":182,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":182,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":187,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":203,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":109,"query_location_length":6,"function_name":"//","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":109,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":114,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["//"]}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":1,"column_names":["i"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":89,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":92,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":95,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"qualified_name":{"path":["lag"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":141,"query_location_length":16,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":147,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT r, r/3.0, mad(r/3.0) over (order by r rows between 1 preceding and 1 following)\nFROM mads ORDER BY 1, 2, 3","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":106,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":10,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":12,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.0"}}}],"qualified_name":{"path":["/"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":17,"query_location_length":69,"function_name":"mad","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":43,"query_location_length":1,"column_names":["r"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":58,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":74,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":21,"query_location_length":5,"function_name":"/","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"3.0"}}}],"qualified_name":{"path":["/"]}}}],"qualified_name":{"path":["mad"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":4,"schema_name":"","table_name":"mads","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["mads"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT r, n, mode(n) over (order by r rows between 1 preceding and 3 following)\nFROM (SELECT r, CASE r % 2 WHEN 0 THEN r ELSE NULL END AS n FROM modes) nulls\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":167,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["n"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":66,"function_name":"mode","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":1,"column_names":["r"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":51,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":67,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["mode"]}}],"from_table":{"type":"SUBQUERY","alias":"nulls","sample":null,"query_location":85,"query_location_length":66,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":93,"query_location_length":1,"column_names":["r"]},{"class":"CASE","type":"CASE_EXPR","alias":"n","query_location":96,"query_location_length":38,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":101,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":105,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":112,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["r"]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":145,"query_location_length":5,"schema_name":"","table_name":"modes","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["modes"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n\t x\n\t,y\n\t,z\n\t,median(x) OVER (PARTITION BY y) AS plain_window\n\t,median(x) FILTER (WHERE x = 1) OVER (PARTITION BY y) AS x_filtered_window\n\t,median(x) FILTER (WHERE z = 0) OVER (PARTITION BY y) AS z_filtered_window\nFROM filtering\nORDER BY y, x;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":245,"query_location_length":1,"column_names":["y"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":248,"query_location_length":1,"column_names":["x"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":1,"column_names":["x"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["y"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["z"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"plain_window","query_location":21,"query_location_length":31,"function_name":"median","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":50,"query_location_length":1,"column_names":["y"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["median"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"x_filtered_window","query_location":71,"query_location_length":52,"function_name":"median","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":1,"column_names":["y"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":95,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":95,"query_location_length":1,"column_names":["x"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":99,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["median"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"z_filtered_window","query_location":147,"query_location_length":52,"function_name":"median","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":197,"query_location_length":1,"column_names":["y"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":171,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":171,"query_location_length":1,"column_names":["z"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":175,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":154,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["median"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":226,"query_location_length":9,"schema_name":"","table_name":"filtering","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["filtering"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, v, sum(v) OVER (ORDER BY i DESC RANGE BETWEEN 1 PRECEDING AND -1 FOLLOWING) \nFROM issue10855","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["v"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":72,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_RANGE","end":"EXPR_FOLLOWING_RANGE","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":56,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":72,"query_location_length":2,"literal":{"kind":"INTEGER","text":"-1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":92,"query_location_length":10,"schema_name":"","table_name":"issue10855","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["issue10855"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT depname, empno,\n\tnth_value(empno, case empno % 3 when 1 then 2 else NULL end) OVER (\n\t\tPARTITION BY depname ORDER BY empno ASC\n\t\tROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING\n\t\t) fv\nFROM empsalary\nORDER BY 1, 2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":7,"column_names":["depname"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":16,"query_location_length":5,"column_names":["empno"]},{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"fv","query_location":24,"query_location_length":164,"function_name":"nth_value","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":7,"column_names":["depname"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":124,"query_location_length":5,"column_names":["empno"]}}],"start":"CURRENT_ROW_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":5,"column_names":["empno"]}},{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":41,"query_location_length":42,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":46,"query_location_length":9,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":5,"column_names":["empno"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":54,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":61,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}}],"qualified_name":{"path":["nth_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":197,"query_location_length":9,"schema_name":"","table_name":"empsalary","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["empsalary"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT\n TeamName,\n Player,\n Score,\n NTILE() OVER (PARTITION BY TeamName ORDER BY Score ASC) AS NTILE\nFROM ScoreBoard s\nORDER BY TeamName, Score;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":132,"query_location_length":8,"column_names":["TeamName"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":142,"query_location_length":5,"column_names":["Score"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":8,"column_names":["TeamName"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":21,"query_location_length":6,"column_names":["Player"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":5,"column_names":["Score"]},{"class":"WINDOW","type":"WINDOW_NTILE","alias":"NTILE","query_location":40,"query_location_length":55,"function_name":"ntile","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":8,"column_names":["TeamName"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":85,"query_location_length":5,"column_names":["Score"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["ntile"]}}],"from_table":{"type":"BASE_TABLE","alias":"s","sample":null,"query_location":110,"query_location_length":12,"schema_name":"","table_name":"ScoreBoard","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["ScoreBoard"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH t(i, v) AS (\n\tSELECT i, CASE WHEN i = 3 THEN NULL ELSE i * 10 END\n\tFROM range(12) r(i)\n)\nSELECT i,\n\tquantile_disc(v, 0.5) OVER w,\n\tquantile_cont(v, 0.5) OVER w,\n\tquantile_disc(v, [0.25, 0.75]) OVER w,\n\tmad(v) OVER w\nFROM t\nWINDOW w AS (ORDER BY i ROWS BETWEEN 10 PRECEDING AND 1 PRECEDING)\nORDER BY i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":304,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[{"key":"t","value":{"aliases":["i","v"],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":26,"query_location_length":1,"column_names":["i"]},{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":29,"query_location_length":41,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":39,"query_location_length":5,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":43,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":50,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"else_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":60,"query_location_length":6,"function_name":"*","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":60,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["*"]}}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":77,"query_location_length":14,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":83,"query_location_length":2,"literal":{"kind":"INTEGER","text":"12"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":101,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":105,"query_location_length":28,"function_name":"quantile_disc","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":250,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_PRECEDING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":265,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":282,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":122,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_disc"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":136,"query_location_length":28,"function_name":"quantile_cont","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":250,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_PRECEDING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":265,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":282,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":150,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":153,"query_location_length":3,"literal":{"kind":"NUMERIC","text":"0.5"}}}],"qualified_name":{"path":["quantile_cont"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":167,"query_location_length":37,"function_name":"quantile_disc","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":250,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_PRECEDING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":265,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":282,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":1,"column_names":["v"]}},{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":184,"query_location_length":12,"function_name":"list_value","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":185,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.25"}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":191,"query_location_length":4,"literal":{"kind":"NUMERIC","text":"0.75"}}}],"qualified_name":{"path":["list_value"]}}}],"qualified_name":{"path":["quantile_disc"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":207,"query_location_length":13,"function_name":"mad","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":250,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_PRECEDING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":265,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":282,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":211,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["mad"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":226,"query_location_length":1,"schema_name":"","table_name":"t","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT r, n, median(n) over (order by r rows between unbounded preceding and unbounded following)\nFROM (SELECT r, CASE r % 2 WHEN 0 THEN r ELSE NULL END AS n FROM quantiles) nulls\nORDER BY 1","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["n"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":84,"function_name":"median","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":38,"query_location_length":1,"column_names":["r"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["n"]}}],"qualified_name":{"path":["median"]}}],"from_table":{"type":"SUBQUERY","alias":"nulls","sample":null,"query_location":103,"query_location_length":70,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":111,"query_location_length":1,"column_names":["r"]},{"class":"CASE","type":"CASE_EXPR","alias":"n","query_location":114,"query_location_length":38,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":18446744073709551615,"query_location_length":0,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":119,"query_location_length":5,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":1,"column_names":["r"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":123,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":130,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":137,"query_location_length":1,"column_names":["r"]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":144,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":163,"query_location_length":9,"schema_name":"","table_name":"quantiles","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["quantiles"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT \"id\", \"requested_date\", \"city\", \"wait_time\", min(\"wait_time\") OVER win_3d \nFROM rides \nWINDOW win_3d AS (\n\tPARTITION BY \"city\" \n\tORDER BY requested_date ASC \n\tRANGE BETWEEN INTERVAL 3 DAYS PRECEDING AND INTERVAL 1 DAYS PRECEDING) \nORDER BY \"requested_date\", \"city\", \"id\"","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":247,"query_location_length":16,"column_names":["requested_date"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":265,"query_location_length":6,"column_names":["city"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":273,"query_location_length":4,"column_names":["id"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["id"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":16,"column_names":["requested_date"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":6,"column_names":["city"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":39,"query_location_length":11,"column_names":["wait_time"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":52,"query_location_length":28,"function_name":"min","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":127,"query_location_length":6,"column_names":["city"]}],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":145,"query_location_length":14,"column_names":["requested_date"]}}],"start":"EXPR_PRECEDING_RANGE","end":"EXPR_PRECEDING_RANGE","start_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":180,"query_location_length":15,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":189,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}},"end_expr":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":210,"query_location_length":15,"function_name":"to_days","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"trunc","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CAST","type":"OPERATOR_CAST","alias":"","query_location":18446744073709551615,"query_location_length":0,"child":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":219,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"DOUBLE","children":[],"qualified_name":{"path":["DOUBLE"]}}}}],"qualified_name":{"path":["trunc"]}},"try_cast":false,"type_expr":{"class":"TYPE","type":"TYPE","alias":"","query_location":18446744073709551615,"query_location_length":0,"catalog":"","schema":"","type_name":"INTEGER","children":[],"qualified_name":{"path":["INTEGER"]}}}}],"qualified_name":{"path":["to_days"]}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":11,"column_names":["wait_time"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":87,"query_location_length":5,"schema_name":"","table_name":"rides","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["rides"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT avg(42) OVER ()","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":15,"function_name":"avg","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":11,"query_location_length":2,"literal":{"kind":"INTEGER","text":"42"}}}],"qualified_name":{"path":["avg"]}}],"from_table":{"type":"EMPTY","alias":"","sample":null,"query_location":18446744073709551615,"query_location_length":0},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT i, LEAD(i, 2) OVER() AS i1\nFROM range(3000) tbl(i)\nWHERE i % 2048 = 0","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_LEAD","alias":"i1","query_location":10,"query_location_length":17,"function_name":"lead","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":15,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["lead"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":39,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":45,"query_location_length":4,"literal":{"kind":"INTEGER","text":"3000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":64,"query_location_length":12,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":64,"query_location_length":8,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":64,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":68,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":75,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select i, nth_value(i, 2049) over(ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) n\nfrom range(2049) tbl(i)\nQUALIFY n IS NOT NULL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"n","query_location":10,"query_location_length":73,"function_name":"nth_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2049"}}}],"qualified_name":{"path":["nth_value"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":91,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":97,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2049"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":120,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":118,"query_location_length":1,"column_names":["n"]}]}},"named_param_map":[]}]}} +{"sql":"select row_number() over (), first_value(i) over (), first_value(j) over () from integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_ROW_NUMBER","alias":"","query_location":7,"query_location_length":20,"function_name":"row_number","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["row_number"]}},{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":29,"query_location_length":22,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["first_value"]}},{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"","query_location":53,"query_location_length":22,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":1,"column_names":["j"]}}],"qualified_name":{"path":["first_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":81,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH alternate AS (\n\tSELECT \n\t\trange r,\n\t\tIF(range \u003c 2100, NULL, range) s\n\tFROM range(3000)\n)\nSELECT \n\tr,\n\ts,\n\tfirst(s IGNORE NULLS) over(ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) f\nFROM alternate\nQUALIFY (f IS NOT NULL AND r \u003c 2100)\n OR (f IS NULL AND r \u003e= 2100)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"alternate","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"r","query_location":31,"query_location_length":5,"column_names":["range"]},{"class":"FUNCTION","type":"FUNCTION","alias":"s","query_location":42,"query_location_length":29,"function_name":"if","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":45,"query_location_length":12,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":5,"column_names":["range"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":53,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2100"}}}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":59,"query_location_length":4,"literal":{"kind":"NULL_LITERAL","text":""}}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":5,"column_names":["range"]}}],"qualified_name":{"path":["if"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":80,"query_location_length":11,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":86,"query_location_length":4,"literal":{"kind":"INTEGER","text":"3000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":103,"query_location_length":1,"column_names":["r"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":107,"query_location_length":1,"column_names":["s"]},{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"f","query_location":111,"query_location_length":76,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":true,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":true,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":117,"query_location_length":1,"column_names":["s"]}}],"qualified_name":{"path":["first_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":195,"query_location_length":9,"schema_name":"","table_name":"alternate","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["alternate"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":{"class":"CONJUNCTION","type":"CONJUNCTION_OR","alias":"","query_location":213,"query_location_length":62,"children":[{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":214,"query_location_length":26,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NOT_NULL","alias":"","query_location":216,"query_location_length":11,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":214,"query_location_length":1,"column_names":["f"]}]},{"class":"COMPARISON","type":"COMPARE_LESSTHAN","alias":"","query_location":232,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":1,"column_names":["r"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":236,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2100"}}}]},{"class":"CONJUNCTION","type":"CONJUNCTION_AND","alias":"","query_location":251,"query_location_length":23,"children":[{"class":"OPERATOR","type":"OPERATOR_IS_NULL","alias":"","query_location":253,"query_location_length":7,"children":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":251,"query_location_length":1,"column_names":["f"]}]},{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":265,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":265,"query_location_length":1,"column_names":["r"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":270,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2100"}}}]}]}},"named_param_map":[]}]}} +{"sql":"WITH w AS (\n\tSELECT i, FIRST_VALUE(CASE WHEN i = 2048 THEN i END IGNORE NULLS) OVER (\n\t\tROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS x\n\tFROM range(6144) AS r(i)\n)\nSELECT COUNT(*), COUNT(*) FILTER (WHERE x IS DISTINCT FROM CASE WHEN i \u003e= 2048 THEN 2048 END) FROM w;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[{"key":"w","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":20,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"x","query_location":23,"query_location_length":114,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":true,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":true,"arguments":[{"name":"","expression":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":35,"query_location_length":29,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_EQUAL","alias":"","query_location":45,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":49,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}},"then_expr":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":1,"column_names":["i"]}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}}],"qualified_name":{"path":["first_value"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"r","sample":null,"query_location":149,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":155,"query_location_length":4,"literal":{"kind":"INTEGER","text":"6144"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":178,"query_location_length":8,"function_name":"count_star","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":188,"query_location_length":76,"function_name":"count_star","schema":"","filter":{"class":"COMPARISON","type":"COMPARE_DISTINCT_FROM","alias":"","query_location":211,"query_location_length":52,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":211,"query_location_length":1,"column_names":["x"]},"right":{"class":"CASE","type":"CASE_EXPR","alias":"","query_location":230,"query_location_length":33,"case_checks":[{"when_expr":{"class":"COMPARISON","type":"COMPARE_GREATERTHANOREQUALTO","alias":"","query_location":240,"query_location_length":9,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":240,"query_location_length":1,"column_names":["i"]},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":245,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}},"then_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":255,"query_location_length":4,"literal":{"kind":"INTEGER","text":"2048"}}}],"else_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":18446744073709551615,"query_location_length":0,"literal":{"kind":"NULL_LITERAL","text":""}}}},"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["count_star"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":270,"query_location_length":1,"schema_name":"","table_name":"w","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["w"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select\n submission_date,\n dbsystem,\n tps,\n count(distinct dbsystem) over w AS competing,\n rank(order by tps desc) over w AS new_rank,\n first_value(tps order by tps desc) over w AS best_performance,\n first_value(dbsystem order by tps desc) over w AS best_system,\n lead(tps order by tps desc) over w AS second_performance,\n lead(dbsystem order by tps desc, dbsystem) over w AS second_system,\nfrom '{DATA_DIR}/csv/tpcc_results.csv'\nwindow w as (\n order by submission_date\n range between unbounded preceding and current row\n)\nORDER BY ALL;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":15,"column_names":["submission_date"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":8,"column_names":["dbsystem"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":46,"query_location_length":3,"column_names":["tps"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"competing","query_location":55,"query_location_length":31,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":483,"query_location_length":15,"column_names":["submission_date"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":true,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":8,"column_names":["dbsystem"]}}],"qualified_name":{"path":["count"]}},{"class":"WINDOW","type":"WINDOW_RANK","alias":"new_rank","query_location":105,"query_location_length":30,"function_name":"rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":483,"query_location_length":15,"column_names":["submission_date"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":119,"query_location_length":3,"column_names":["tps"]}}],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["rank"]}},{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"best_performance","query_location":153,"query_location_length":41,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":483,"query_location_length":15,"column_names":["submission_date"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":178,"query_location_length":3,"column_names":["tps"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":165,"query_location_length":3,"column_names":["tps"]}}],"qualified_name":{"path":["first_value"]}},{"class":"WINDOW","type":"WINDOW_FIRST_VALUE","alias":"best_system","query_location":220,"query_location_length":46,"function_name":"first_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":483,"query_location_length":15,"column_names":["submission_date"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":250,"query_location_length":3,"column_names":["tps"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":232,"query_location_length":8,"column_names":["dbsystem"]}}],"qualified_name":{"path":["first_value"]}},{"class":"WINDOW","type":"WINDOW_LEAD","alias":"second_performance","query_location":287,"query_location_length":34,"function_name":"lead","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":483,"query_location_length":15,"column_names":["submission_date"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":305,"query_location_length":3,"column_names":["tps"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":292,"query_location_length":3,"column_names":["tps"]}}],"qualified_name":{"path":["lead"]}},{"class":"WINDOW","type":"WINDOW_LEAD","alias":"second_system","query_location":349,"query_location_length":49,"function_name":"lead","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":483,"query_location_length":15,"column_names":["submission_date"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":372,"query_location_length":3,"column_names":["tps"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":382,"query_location_length":8,"column_names":["dbsystem"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":354,"query_location_length":8,"column_names":["dbsystem"]}}],"qualified_name":{"path":["lead"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":422,"query_location_length":33,"schema_name":"","table_name":"{DATA_DIR}/csv/tpcc_results.csv","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["{DATA_DIR}/csv/tpcc_results.csv"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT last_value(i ORDER BY i DESC) OVER w AS crash\nFROM range(5_000) tbl(i)\nWINDOW w AS (ORDER BY i ASC)","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"crash","query_location":7,"query_location_length":36,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ASCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":100,"query_location_length":1,"column_names":["i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":18,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["last_value"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":58,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":64,"query_location_length":5,"literal":{"kind":"INTEGER","text":"5_000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT MIN(i) OVER (PARTITION BY a ORDER BY i) FROM integers","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":39,"function_name":"min","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":33,"query_location_length":1,"column_names":["a"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["i"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["min"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":52,"query_location_length":8,"schema_name":"","table_name":"integers","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["integers"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select j, i, sum(i) over () from a order by 1,2","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":44,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["i"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":14,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":33,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(*) OVER w AS x\nFROM (VALUES (1), (2)) AS t(a)\nWINDOW base AS (ORDER BY a), w AS (base GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)\nORDER BY a;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":160,"query_location_length":1,"column_names":["a"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"x","query_location":7,"query_location_length":15,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["a"]}}],"start":"CURRENT_ROW_GROUPS","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":33,"query_location_length":17,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"EXPRESSION_LIST","alias":"valueslist","sample":null,"query_location":18446744073709551615,"query_location_length":0,"expected_names":[],"expected_types":[],"values":[[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":42,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}],[{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":47,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}]]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":["a"]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT part, min(const) AS lo, max(const) AS hi\nFROM (\n\tSELECT part, sum(val) OVER(PARTITION BY part) AS const\n\tFROM (\n\t\tSELECT part, val\n\t\tFROM (\n\t\t\t(SELECT range as part, random() AS val FROM range(10)) r\n\t\tCROSS JOIN \n\t\t\trange(3000)\n\t\t) p\n\t) t\n) w\nGROUP BY ALL\nHAVING lo \u003c\u003e hi\nORDER BY ALL\n;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":true,"expr":null,"qualified_exclude_list":[],"rename_list":[]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":4,"column_names":["part"]},{"class":"FUNCTION","type":"FUNCTION","alias":"lo","query_location":13,"query_location_length":10,"function_name":"min","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":5,"column_names":["const"]}}],"qualified_name":{"path":["min"]}},{"class":"FUNCTION","type":"FUNCTION","alias":"hi","query_location":31,"query_location_length":10,"function_name":"max","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":35,"query_location_length":5,"column_names":["const"]}}],"qualified_name":{"path":["max"]}}],"from_table":{"type":"SUBQUERY","alias":"w","sample":null,"query_location":53,"query_location_length":195,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":63,"query_location_length":4,"column_names":["part"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"const","query_location":69,"query_location_length":32,"function_name":"sum","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":96,"query_location_length":4,"column_names":["part"]}],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":73,"query_location_length":3,"column_names":["val"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"t","sample":null,"query_location":117,"query_location_length":127,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":128,"query_location_length":4,"column_names":["part"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":134,"query_location_length":3,"column_names":["val"]}],"from_table":{"type":"SUBQUERY","alias":"p","sample":null,"query_location":145,"query_location_length":96,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"STAR","type":"STAR","alias":"","query_location":18446744073709551615,"query_location_length":0,"relation_name":"","exclude_list":[],"replace_list":[],"columns":false,"expr":null,"qualified_exclude_list":[],"rename_list":[]}],"from_table":{"type":"JOIN","alias":"","sample":null,"query_location":209,"query_location_length":26,"left":{"type":"SUBQUERY","alias":"r","sample":null,"query_location":150,"query_location_length":54,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"part","query_location":158,"query_location_length":5,"column_names":["range"]},{"class":"FUNCTION","type":"FUNCTION","alias":"val","query_location":173,"query_location_length":8,"function_name":"random","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[],"qualified_name":{"path":["random"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":194,"query_location_length":9,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":200,"query_location_length":2,"literal":{"kind":"INTEGER","text":"10"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"right":{"type":"TABLE_FUNCTION","alias":"","sample":null,"query_location":224,"query_location_length":11,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":230,"query_location_length":4,"literal":{"kind":"INTEGER","text":"3000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":[],"with_ordinality":"WITHOUT_ORDINALITY"},"condition":null,"join_type":"INNER","ref_type":"CROSS","using_columns":[],"delim_flipped":false,"duplicate_eliminated_columns":[],"is_implicit":false,"ranking_expression":null,"nearest_count":1,"nearest_order_type":"ASCENDING","nearest_approx":false},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"FORCE_AGGREGATES","having":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":271,"query_location_length":8,"left":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":271,"query_location_length":2,"column_names":["lo"]},"right":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":277,"query_location_length":2,"column_names":["hi"]}},"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"WITH uncascaded AS (\n\tSELECT i, i % 29 AS v \n\tFROM range(1000) tbl(i)\n)\nSELECT i\n\t, v\n\t, COUNT(DISTINCT v) OVER (ORDER BY i ROWS BETWEEN 25 PRECEDING AND 25 FOLLOWING) AS w\nFROM uncascaded\nORDER BY i","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":198,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[{"key":"uncascaded","value":{"aliases":[],"materialized":"CTE_MATERIALIZE_DEFAULT","key_targets":[],"payload_aggregates":[],"query_node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["i"]},{"class":"FUNCTION","type":"FUNCTION","alias":"v","query_location":32,"query_location_length":6,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":32,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":36,"query_location_length":2,"literal":{"kind":"INTEGER","text":"29"}}}],"qualified_name":{"path":["%"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"tbl","sample":null,"query_location":51,"query_location_length":18,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":57,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null}}}]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":79,"query_location_length":1,"column_names":["i"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["v"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"w","query_location":89,"query_location_length":78,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":122,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":137,"query_location_length":2,"literal":{"kind":"INTEGER","text":"25"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":154,"query_location_length":2,"literal":{"kind":"INTEGER","text":"25"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":true,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":104,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":178,"query_location_length":10,"schema_name":"","table_name":"uncascaded","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["uncascaded"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(x) FROM (\n SELECT histogram(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING EXCLUDE CURRENT ROW) x\n FROM range(3) t(i)\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":131,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"x","query_location":34,"query_location_length":91,"function_name":"histogram","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":77,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":93,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"CURRENT_ROW","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":44,"query_location_length":1,"column_names":["i"]}}],"qualified_name":{"path":["histogram"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":137,"query_location_length":13,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":143,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select \n\tl_extendedprice, \n\tl_partkey, \n\tl_orderkey, \n\tsum(l_extendedprice) over(), \n\tsum(l_extendedprice) over(order by l_partkey), \n\tsum(l_extendedprice) over(order by l_partkey, l_orderkey), \n\tsum(l_extendedprice) over(order by l_partkey, l_orderkey desc), \nfrom lineitem \norder by l_partkey, l_orderkey, l_extendedprice desc","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":285,"query_location_length":9,"column_names":["l_partkey"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":296,"query_location_length":10,"column_names":["l_orderkey"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":308,"query_location_length":15,"column_names":["l_extendedprice"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":9,"query_location_length":15,"column_names":["l_extendedprice"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":28,"query_location_length":9,"column_names":["l_partkey"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":41,"query_location_length":10,"column_names":["l_orderkey"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":55,"query_location_length":27,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":59,"query_location_length":15,"column_names":["l_extendedprice"]}}],"qualified_name":{"path":["sum"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":86,"query_location_length":45,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":121,"query_location_length":9,"column_names":["l_partkey"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":90,"query_location_length":15,"column_names":["l_extendedprice"]}}],"qualified_name":{"path":["sum"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":135,"query_location_length":57,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":170,"query_location_length":9,"column_names":["l_partkey"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":10,"column_names":["l_orderkey"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":139,"query_location_length":15,"column_names":["l_extendedprice"]}}],"qualified_name":{"path":["sum"]}},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":196,"query_location_length":62,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":231,"query_location_length":9,"column_names":["l_partkey"]}},{"type":"DESCENDING","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":242,"query_location_length":10,"column_names":["l_orderkey"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":200,"query_location_length":15,"column_names":["l_extendedprice"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":266,"query_location_length":8,"schema_name":"","table_name":"lineitem","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["lineitem"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT nth_value(c, 14) OVER win \nFROM t3\n WINDOW win AS (\n ORDER BY c, b, a\n ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS \n )","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"","query_location":7,"query_location_length":25,"function_name":"nth_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":75,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":78,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["a"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":20,"query_location_length":2,"literal":{"kind":"INTEGER","text":"14"}}}],"qualified_name":{"path":["nth_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":39,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(b) OVER (\n ORDER BY a NULLS LAST ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING\n ) FROM t1 ORDER BY 1 NULLS LAST;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":109,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":84,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS LAST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":34,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"EXPR_FOLLOWING_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":60,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"end_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":76,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}},"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["b"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":97,"query_location_length":2,"schema_name":"","table_name":"t1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(c) FILTER (WHERE (c%2)!=0) OVER win,\n rank() OVER win,\n dense_rank() OVER win\nFROM t3\n WINDOW win AS ( ORDER BY c NULLS FIRST, b NULLS FIRST, a NULLS FIRST\n ROWS BETWEEN 6 PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE GROUP )\n ORDER BY 1 NULLS FIRST, 2 NULLS FIRST, 3 NULLS FIRST","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":286,"query_location_length":1,"literal":{"kind":"INTEGER","text":"1"}}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":301,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":316,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":7,"query_location_length":39,"function_name":"sum","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":{"class":"COMPARISON","type":"COMPARE_NOTEQUAL","alias":"","query_location":28,"query_location_length":8,"left":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":29,"query_location_length":3,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":29,"query_location_length":1,"column_names":["c"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":31,"query_location_length":1,"literal":{"kind":"INTEGER","text":"2"}}}],"qualified_name":{"path":["%"]}},"right":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":35,"query_location_length":1,"literal":{"kind":"INTEGER","text":"0"}}},"exclude_clause":"GROUP","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["sum"]}},{"class":"WINDOW","type":"WINDOW_RANK","alias":"","query_location":61,"query_location_length":15,"function_name":"rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"GROUP","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["rank"]}},{"class":"WINDOW","type":"WINDOW_RANK_DENSE","alias":"","query_location":91,"query_location_length":21,"function_name":"dense_rank","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":151,"query_location_length":1,"column_names":["c"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":166,"query_location_length":1,"column_names":["b"]}},{"type":"ORDER_DEFAULT","null_order":"NULLS FIRST","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":181,"query_location_length":1,"column_names":["a"]}}],"start":"EXPR_PRECEDING_ROWS","end":"UNBOUNDED_FOLLOWING","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":216,"query_location_length":1,"literal":{"kind":"INTEGER","text":"6"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"GROUP","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[],"qualified_name":{"path":["dense_rank"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":118,"query_location_length":2,"schema_name":"","table_name":"t3","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["t3"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"select j, s, string_agg(s, sep) over (partition by j order by s) from a order by j, s;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":81,"query_location_length":1,"column_names":["j"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":84,"query_location_length":1,"column_names":["s"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":7,"query_location_length":1,"column_names":["j"]},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":10,"query_location_length":1,"column_names":["s"]},{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"","query_location":13,"query_location_length":51,"function_name":"string_agg","schema":"","catalog":"","partitions":[{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":51,"query_location_length":1,"column_names":["j"]}],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":62,"query_location_length":1,"column_names":["s"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":24,"query_location_length":1,"column_names":["s"]}},{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":27,"query_location_length":3,"column_names":["sep"]}}],"qualified_name":{"path":["string_agg"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":70,"query_location_length":1,"schema_name":"","table_name":"a","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["a"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT nth_value(peer, 5) OVER (\n ORDER BY peer ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING EXCLUDE TIES\n ), peer\nFROM value_edges ORDER BY peer, i;","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":169,"query_location_length":4,"column_names":["peer"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":175,"query_location_length":1,"column_names":["i"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTH_VALUE","alias":"","query_location":7,"query_location_length":129,"function_name":"nth_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":53,"query_location_length":4,"column_names":["peer"]}}],"start":"UNBOUNDED_PRECEDING","end":"UNBOUNDED_FOLLOWING","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"TIES","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":17,"query_location_length":4,"column_names":["peer"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":23,"query_location_length":1,"literal":{"kind":"INTEGER","text":"5"}}}],"qualified_name":{"path":["nth_value"]}},{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":138,"query_location_length":4,"column_names":["peer"]}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":148,"query_location_length":11,"schema_name":"","table_name":"value_edges","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["value_edges"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT count(x) FROM (\n SELECT last_value(v ORDER BY i) OVER (\n ORDER BY peer ROWS BETWEEN CURRENT ROW AND CURRENT ROW EXCLUDE GROUP\n ) AS x\n FROM value_edges\n);","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":8,"function_name":"count","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":13,"query_location_length":1,"column_names":["x"]}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":21,"query_location_length":155,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_LAST_VALUE","alias":"x","query_location":34,"query_location_length":114,"function_name":"last_value","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":83,"query_location_length":4,"column_names":["peer"]}}],"start":"CURRENT_ROW_ROWS","end":"CURRENT_ROW_ROWS","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"GROUP","distinct":false,"arg_orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":56,"query_location_length":1,"column_names":["i"]}}],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":45,"query_location_length":1,"column_names":["v"]}}],"qualified_name":{"path":["last_value"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":163,"query_location_length":11,"schema_name":"","table_name":"value_edges","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["value_edges"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT ntile(3) OVER (ORDER BY ten, four) nn FROM tenk1 ORDER BY ten, four, nn","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[{"type":"ORDER_MODIFIER","orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":65,"query_location_length":3,"column_names":["ten"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":70,"query_location_length":4,"column_names":["four"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":76,"query_location_length":2,"column_names":["nn"]}}]}],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_NTILE","alias":"nn","query_location":7,"query_location_length":34,"function_name":"ntile","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":31,"query_location_length":3,"column_names":["ten"]}},{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":36,"query_location_length":4,"column_names":["four"]}}],"start":"UNBOUNDED_PRECEDING","end":"CURRENT_ROW_RANGE","start_expr":null,"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":false,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":13,"query_location_length":1,"literal":{"kind":"INTEGER","text":"3"}}}],"qualified_name":{"path":["ntile"]}}],"from_table":{"type":"BASE_TABLE","alias":"","sample":null,"query_location":50,"query_location_length":5,"schema_name":"","table_name":"tenk1","column_name_alias":[],"catalog_name":"","at_clause":null,"qualified_name":{"path":["tenk1"]}},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} +{"sql":"SELECT sum(c) FROM (SELECT count(DISTINCT i % 1000) OVER (ORDER BY i ROWS BETWEEN 100 PRECEDING AND CURRENT ROW) c FROM range(1000000) t(i))","json":{"error":false,"statements":[{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":7,"query_location_length":6,"function_name":"sum","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":11,"query_location_length":1,"column_names":["c"]}}],"qualified_name":{"path":["sum"]}}],"from_table":{"type":"SUBQUERY","alias":"","sample":null,"query_location":19,"query_location_length":121,"subquery":{"node":{"type":"SELECT_NODE","modifiers":[],"cte_map":{"map":[]},"select_list":[{"class":"WINDOW","type":"WINDOW_AGGREGATE","alias":"c","query_location":27,"query_location_length":85,"function_name":"count","schema":"","catalog":"","partitions":[],"orders":[{"type":"ORDER_DEFAULT","null_order":"ORDER_DEFAULT","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":67,"query_location_length":1,"column_names":["i"]}}],"start":"EXPR_PRECEDING_ROWS","end":"CURRENT_ROW_ROWS","start_expr":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":82,"query_location_length":3,"literal":{"kind":"INTEGER","text":"100"}},"end_expr":null,"offset_expr":null,"default_expr":null,"ignore_nulls":false,"filter_expr":null,"exclude_clause":"NO_OTHER","distinct":true,"arg_orders":[],"has_ignore_nulls":false,"arguments":[{"name":"","expression":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":42,"query_location_length":8,"function_name":"%","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":true,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"COLUMN_REF","type":"COLUMN_REF","alias":"","query_location":42,"query_location_length":1,"column_names":["i"]}},{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":46,"query_location_length":4,"literal":{"kind":"INTEGER","text":"1000"}}}],"qualified_name":{"path":["%"]}}}],"qualified_name":{"path":["count"]}}],"from_table":{"type":"TABLE_FUNCTION","alias":"t","sample":null,"query_location":120,"query_location_length":19,"function":{"class":"FUNCTION","type":"FUNCTION","alias":"","query_location":18446744073709551615,"query_location_length":0,"function_name":"range","schema":"","filter":null,"order_bys":{"type":"ORDER_MODIFIER","orders":[]},"distinct":false,"is_operator":false,"export_state":false,"catalog":"","arguments":[{"name":"","expression":{"class":"CONSTANT","type":"VALUE_CONSTANT","alias":"","query_location":126,"query_location_length":7,"literal":{"kind":"INTEGER","text":"1000000"}}}],"qualified_name":{"path":["range"]}},"column_name_alias":["i"],"with_ordinality":"WITHOUT_ORDINALITY"},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]},"column_name_alias":[]},"where_clause":null,"group_expressions":[],"group_sets":[],"aggregate_handling":"STANDARD_HANDLING","having":null,"sample":null,"qualify":null},"named_param_map":[]}]}} diff --git a/parser/transform.go b/parser/transform.go index ea60f5c..f843292 100644 --- a/parser/transform.go +++ b/parser/transform.go @@ -38,6 +38,9 @@ type transformContext struct { // parameters had been seen when such an entry was recorded. pivotEntries int pivotEntryHasParams bool + // pivotFirstColumn renders the first such entry's pivot column + // (pivot_entries[0]->column->ToString()) for pivotEntryCheck. + pivotFirstColumn string } // pivotEntryCheck ports PEGTransformer::PivotEntryCheck: CREATE VIEW and @@ -47,7 +50,7 @@ func (tc *transformContext) pivotEntryCheck(kind string) { if tc.pivotEntries > 0 { raise("PIVOT statements with pivot elements extracted from the data cannot be used in %ss.\n"+ "In order to use PIVOT in a %s the PIVOT values must be manually specified, e.g.:\n"+ - "PIVOT ... ON ... IN (val1, val2, ...)", kind, kind) + "PIVOT ... ON %s IN (val1, val2, ...)", kind, kind, tc.pivotFirstColumn) } } @@ -74,6 +77,7 @@ func register(rule string, fn stmtTransform) { // wrapping a choice of statement rules). func (tc *transformContext) transformStatement(n tnode) ast.Stmt { _, inner := n.sole().choice() + checkExpressionDepth(inner.r) if fn, ok := statementTransforms[inner.name()]; ok { return fn(tc, inner) } @@ -176,16 +180,14 @@ func (tc *transformContext) popWindowScope() { tc.windows = tc.windows[:len(tc.windows)-1] } -// namedWindow resolves a window name in the innermost scope (window -// names are case-insensitive identifiers). +// namedWindow resolves a window name in the innermost scope only +// (PEGTransformer::GetWindowClause; window names are case-insensitive +// identifiers). func (tc *transformContext) namedWindow(name string) *ast.WindowExpression { - key := strings.ToLower(name) - for i := len(tc.windows) - 1; i >= 0; i-- { - if w, ok := tc.windows[i][key]; ok { - return w - } + if len(tc.windows) == 0 { + return nil } - return nil + return tc.windows[len(tc.windows)-1][strings.ToLower(name)] } func (tc *transformContext) defineWindow(name string, w *ast.WindowExpression) { @@ -195,7 +197,7 @@ func (tc *transformContext) defineWindow(name string, w *ast.WindowExpression) { scope := tc.windows[len(tc.windows)-1] key := strings.ToLower(name) if _, dup := scope[key]; dup { - raise("window \"%s\" is already defined", name) + raise("window %s is already defined", quoteIdent(name)) } scope[key] = w } diff --git a/parser/transform_copy.go b/parser/transform_copy.go index de95ece..fde9ba7 100644 --- a/parser/transform_copy.go +++ b/parser/transform_copy.go @@ -61,14 +61,7 @@ func (tc *transformContext) applyGenericOptionValue(opt *ast.GenericOption, n tn case "GenericCopyOptionOrderList": // Parens(OrderByExpressionList): a parenthesized argument list, // parsed as order-by entries so ORDER_BY can carry modifiers. - var orders []ast.OrderByNode - for _, e := range alt.sole().parens().listElems() { - orders = append(orders, ast.OrderByNode{ - Type: orderTypeOf(e.child(1)), - NullOrder: nullOrderOf(e.child(2)), - Expression: tc.transformExpression(e.child(0)), - }) - } + orders := tc.genericOptionOrders(alt) hasModifier := false for _, o := range orders { if o.Type != ast.OrderDefault || o.NullOrder != ast.NullOrderDefault { @@ -97,6 +90,20 @@ func (tc *transformContext) applyGenericOptionValue(opt *ast.GenericOption, n tn } } +// genericOptionOrders maps GenericCopyOptionOrderList +// (GenericCopyOptionParenthesizedExpressionList <- Parens(OrderByExpressionList)). +func (tc *transformContext) genericOptionOrders(n tnode) []ast.OrderByNode { + var orders []ast.OrderByNode + for _, e := range n.sole().sole().parens().listElems() { + orders = append(orders, ast.OrderByNode{ + Type: orderTypeOf(e.child(1)), + NullOrder: nullOrderOf(e.child(2)), + Expression: tc.transformExpression(e.child(0)), + }) + } + return orders +} + func orderExprs(orders []ast.OrderByNode) []ast.Expr { out := make([]ast.Expr, len(orders)) for i := range orders { @@ -111,20 +118,55 @@ func rowFunction(args []ast.Expr) *ast.FunctionExpression { // transformGenericOption maps GenericCopyOption <- CopyOptionName GenericCopyOptionValue? func (tc *transformContext) transformGenericOption(n tnode) ast.GenericOption { - opt := ast.GenericOption{Name: strings.ToLower(identifierText(n.child(0)))} - if value, ok := n.child(1).opt(); ok { - tc.applyGenericOptionValue(&opt, value) + return tc.buildGenericOption(strings.ToLower(identifierText(n.child(0))), n.child(1)) +} + +// buildGenericOption ports BuildGenericCopyOption: PARTITION_PATH keeps +// its single expression as-is (it binds against the partition columns); +// every other option folds its value via applyGenericOptionValue. +func (tc *transformContext) buildGenericOption(name string, valueNode tnode) ast.GenericOption { + opt := ast.GenericOption{Name: name} + value, hasValue := valueNode.opt() + isPartitionPath := strings.EqualFold(name, "partition_path") + if !hasValue { + if isPartitionPath { + raise("PARTITION_PATH expects an expression") + } + return opt + } + if isPartitionPath { + _, alt := value.sole().choice() + if alt.name() == "GenericCopyOptionExpression" { + opt.Expr = tc.transformExpression(alt.sole()) + return opt + } + // an expression wrapped in () parses as an order list + orders := tc.genericOptionOrders(alt) + if len(orders) != 1 || orders[0].Type != ast.OrderDefault || orders[0].NullOrder != ast.NullOrderDefault { + raise("PARTITION_PATH expects a single expression") + } + opt.Expr = orders[0].Expression + return opt } + tc.applyGenericOptionValue(&opt, value) return opt } // transformGenericOptionList unwraps GenericCopyOptionList -// (Parens(List(GenericCopyOption))). +// (Parens(List(GenericCopyOption))); option names may not repeat +// (TransformGenericCopyOptionList; names are already lower-cased). func (tc *transformContext) transformGenericOptionList(n tnode) []ast.GenericOption { var out []ast.GenericOption for _, o := range n.parens().listElems() { out = append(out, tc.transformGenericOption(o)) } + seen := map[string]bool{} + for _, o := range out { + if seen[o.Name] { + raise("Unexpected duplicate option %s", quotedIdent(o.Name)) + } + seen[o.Name] = true + } return out } @@ -160,18 +202,10 @@ func (tc *transformContext) transformCopyGenericOption(n tnode) ast.GenericOptio switch alt.name() { case "OrderByCopyOption": // 'ORDER' 'BY' GenericCopyOptionValue? - opt := ast.GenericOption{Name: "order_by"} - if value, ok := alt.child(2).opt(); ok { - tc.applyGenericOptionValue(&opt, value) - } - return opt + return tc.buildGenericOption("order_by", alt.child(2)) case "PartitionedByCopyOption": // ('PARTITION' / 'PARTITIONED') 'BY' GenericCopyOptionValue? - opt := ast.GenericOption{Name: "partition_by"} - if value, ok := alt.child(2).opt(); ok { - tc.applyGenericOptionValue(&opt, value) - } - return opt + return tc.buildGenericOption("partition_by", alt.child(2)) case "GenericCopyOption": return tc.transformGenericOption(alt) } @@ -283,7 +317,7 @@ func setCopyOptions(info *ast.CopyInfo, opts []ast.GenericOption) { } key := strings.ToLower(opts[i].Name) if seen[key] { - raise("Unexpected duplicate option %s", opts[i].Name) + raise("Unexpected duplicate option %s", quotedIdent(opts[i].Name)) } seen[key] = true } @@ -342,14 +376,22 @@ func (tc *transformContext) transformCopyFileName(n tnode) (string, ast.Expr) { return identifierText(alt.sole()), nil case "CopyFileNameIdentifier": id := identifierText(alt.sole()) - if strings.EqualFold(id, "stdout") { + switch { + case strings.EqualFold(id, "stdin"): + return "/dev/stdin", nil + case strings.EqualFold(id, "stdout"): return "/dev/stdout", nil } return id, nil case "CopyFileNameIdentifierColId": - // IdentifierColId <- Identifier '.' ColId + // IdentifierColId <- Identifier CopyFileNameSuffix+ + // CopyFileNameSuffix <- '.' ColId ic := alt.sole() - return identifierText(ic.child(0)) + "." + identifierText(ic.child(2)), nil + path := identifierText(ic.child(0)) + for _, suffix := range ic.child(1).repeat() { + path += "." + identifierText(suffix.child(1)) + } + return path, nil } shapeError(alt, "unknown copy file name") return "", nil @@ -371,7 +413,10 @@ func (tc *transformContext) transformCopy(n tnode) ast.Stmt { return nil } -// CopyTable <- BaseTableName InsertColumnList? FromOrTo CopyFileName CopyOptions? +// CopyTable <- BaseTableName InsertColumnList? FromOrTo CopyFileName +// CopyLegacyOption? CopyOptions? +// CopyLegacyOption <- 'USING'? 'DELIMITERS' StringLiteral is a leading +// delimiter option. func (tc *transformContext) transformCopyTable(n tnode, sp ast.Span) ast.Stmt { info := &ast.CopyInfo{} info.SetSpan(n.span()) @@ -386,8 +431,15 @@ func (tc *transformContext) transformCopyTable(n tnode, sp ast.Span) ast.Stmt { info.IsFrom = fromTo.name() == "CopyFrom" info.FilePath, info.FilePathExpr = tc.transformCopyFileName(n.child(3)) info.Format = extractFormat(info.FilePath) - if opts, ok := n.child(4).opt(); ok { - setCopyOptions(info, tc.transformCopyOptions(opts)) + var opts []ast.GenericOption + if legacy, ok := n.child(4).opt(); ok { + opts = append(opts, ast.GenericOption{Name: "delimiter", Values: []ast.Value{varcharValue(identifierText(legacy.child(2)))}}) + } + if o, ok := n.child(5).opt(); ok { + opts = append(opts, tc.transformCopyOptions(o)...) + } + if len(opts) > 0 { + setCopyOptions(info, opts) } stmt := &ast.CopyStatement{Info: info} stmt.SetSpan(sp) diff --git a/parser/transform_create_misc.go b/parser/transform_create_misc.go index 3bdca5a..0ea9c47 100644 --- a/parser/transform_create_misc.go +++ b/parser/transform_create_misc.go @@ -42,7 +42,7 @@ func (tc *transformContext) transformMacroDefinition(n tnode) *ast.MacroFunction mp := tc.transformMacroParameter(p) key := strings.ToLower(mp.Name) if seen[key] { - raise("Duplicate parameter '%s' in macro definition", mp.Name) + raise("Duplicate parameter %s in macro definition", quotedIdent(mp.Name)) } seen[key] = true if mp.Default != nil { diff --git a/parser/transform_ddl.go b/parser/transform_ddl.go index fdc3e71..8484435 100644 --- a/parser/transform_ddl.go +++ b/parser/transform_ddl.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/sqlc-dev/darkwing/ast" + "github.com/sqlc-dev/darkwing/token" ) func init() { @@ -34,11 +35,12 @@ func (tc *transformContext) transformCreate(n tnode) ast.Stmt { if _, orReplace := n.child(1).opt(); orReplace { onConflict = ast.CreateReplace } - temporary := false + temporary, persistent := false, false if temp, ok := n.child(2).opt(); ok { // Temporary <- Persistent / TempPersistent / TemporaryPersistent _, kind := temp.sole().choice() temporary = kind.name() != "Persistent" + persistent = !temporary } _, variation := n.child(3).sole().choice() var info ast.CreateInfo @@ -78,6 +80,19 @@ func (tc *transformContext) transformCreate(n tnode) ast.Stmt { } } } + // TransformCreateStatement: PERSISTENT only applies to secrets, and + // TEMPORARY is rejected for entries that derive it from their table + if persistent && variation.name() != "CreateSecretStmt" { + raise("PERSISTENT is only supported for CREATE SECRET") + } + if temporary { + switch variation.name() { + case "CreateIndexStmt": + raise("Temporary indexes are not supported") + case "CreateTriggerStmt": + raise("Temporary triggers are not supported") + } + } stmt.Info = info return stmt } @@ -111,6 +126,9 @@ func (tc *transformContext) transformCreateTable(n tnode) ast.CreateInfo { if ids, ok := def.child(0).opt(); ok { info.QueryAliases = identifierList(ids.sole().parens()) } + if wl, ok := def.child(2).opt(); ok { + info.Options = tc.transformWithList(wl) + } stmt := tc.transformStatement(def.child(4)) sel, ok := stmt.(*ast.SelectStatement) if !ok { @@ -124,12 +142,77 @@ func (tc *transformContext) transformCreateTable(n tnode) ast.CreateInfo { tc.transformCreateTableElement(info, elem) } } + if wl, ok := def.child(2).opt(); ok { + info.Options = tc.transformWithList(wl) + } + if len(info.Columns) == 0 { + raise("Table must have at least one column!") + } default: shapeError(def, "unknown create table definition") } + if info.Name == "" { + raise("Empty table name not supported") + } return info } +// transformWithList maps WithList <- 'WITH' RelOptionOrOids. +// RelOptionOrOids <- RelOptionList / Oids (OIDS raise NotImplemented +// upstream, post-parse; darkwing records no options for them). +func (tc *transformContext) transformWithList(n tnode) []ast.RelOption { + _, alt := n.child(1).sole().choice() + if alt.name() == "RelOptionList" { + return tc.transformRelOptionList(alt) + } + return nil +} + +// transformRelOptionList ports TransformRelOptionList: +// RelOptionList <- Parens(List(RelOption)); option names are +// case-insensitive and may not repeat. +func (tc *transformContext) transformRelOptionList(n tnode) []ast.RelOption { + var out []ast.RelOption + seen := map[string]bool{} + for _, o := range n.sole().parens().listElems() { + // RelOption <- RelOptionName RelOptionArgumentOpt? + opt := ast.RelOption{Name: relOptionName(o.child(0))} + if arg, ok := o.child(1).opt(); ok { + // RelOptionArgumentOpt <- '=' DefArg + opt.Value = tc.transformDefArg(arg.child(1)) + } else { + opt.Value = constExpr(invalidSpan, nullValue()) + } + key := strings.ToLower(opt.Name) + if seen[key] { + raise("Duplicate option \"%s\" in WITH clause", opt.Name) + } + seen[key] = true + out = append(out, opt) + } + return out +} + +// transformDefArg maps DefArg <- DefArgNull / DefArgStringLiteral / +// NumberLiteral / NoneLiteral / Expression / DefArgKeyword. +func (tc *transformContext) transformDefArg(n tnode) ast.Expr { + _, alt := n.sole().choice() + switch alt.name() { + case "DefArgNull", "NoneLiteral": + return constExpr(alt.span(), nullValue()) + case "DefArgStringLiteral": + return constExpr(alt.span(), varcharValue(identifierText(alt))) + case "NumberLiteral": + return numberConstant(alt.span(), alt.number()) + case "Expression": + return tc.transformExpression(alt) + case "DefArgKeyword": + return constExpr(alt.span(), varcharValue(identifierText(alt))) + } + shapeError(alt, "unknown option argument") + return nil +} + // CreateTableColumnElement <- CreateTableColumnDefinition / CreateTableConstraint func (tc *transformContext) transformCreateTableElement(info *ast.CreateTableInfo, n tnode) { _, alt := n.sole().choice() @@ -143,60 +226,153 @@ func (tc *transformContext) transformCreateTableElement(info *ast.CreateTableInf } } -// ColumnDefinition <- DottedIdentifier Type? GeneratedColumn? -// ConstraintNameClause? ColumnConstraint* +// ColumnDefinition <- Identifier Type? GeneratedColumn? ColumnConstraint* +// Port of TransformColumnDefinition. The children transform first +// (GeneratedColumn's checks, each constraint's own checks), then the +// column-level validation runs in upstream's order. func (tc *transformContext) transformColumnDefinition(n tnode) ast.ColumnDef { col := ast.ColumnDef{} col.SetSpan(n.span()) - col.Names = dottedIdentifier(n.child(0)) + col.Names = []string{identifierText(n.child(0))} if typ, ok := n.child(1).opt(); ok { col.Type = tc.transformType(typ) } if gen, ok := n.child(2).opt(); ok { - // GeneratedColumn <- Generated? 'AS' Parens(Expression) GeneratedColumnType? - col.Generated = ast.GeneratedVirtual - col.Default = tc.transformExpression(gen.child(2).parens()) - if kind, ok := gen.child(3).opt(); ok { - _, k := kind.sole().choice() - if k.name() == "StoredGeneratedColumn" { - col.Generated = ast.GeneratedStored - } - } + tc.transformGeneratedColumn(&col, gen) } + entries := tc.transformColumnConstraints(n.child(3)) if col.Type == nil && col.Generated == "" { - raise("Column %s must have a type or be defined as a GENERATED column.", optionallyQuoted(strings.Join(col.Names, "."))) + raise("Column %s must have a type or be defined as a GENERATED column.", sqlIdentifier(col.Names[0])) + } + hasDefault, hasCollation := false, false + for _, e := range entries { + switch { + case e.isDefault: + if hasDefault { + raise("Cannot define a default value twice") + } + hasDefault = true + case e.collation != "": + if hasCollation { + raise("multiple COLLATE clauses not allowed") + } + hasCollation = true + if col.Generated != "" { + raise("Collations are not supported on generated columns") + } + applyColumnCollation(col.Type, e.collation) + col.Collation = e.collation + continue + case e.compression != "": + if strings.EqualFold(e.compression, "auto") { + raise("Unrecognized option for column compression, expected none, uncompressed, " + + "rle, dictionary, pfor, bitpacking, fsst, chimp, patas, zstd, alp, alprd or " + + "roaring") + } + col.Compression = e.compression + continue + } + if e.constraint != nil { + col.Constraints = append(col.Constraints, e.constraint) + } } if col.Generated != "" { - name := col.Names[len(col.Names)-1] if hasSubquery(col.Default) { - raise("Expression of generated column \"%s\" contains a subquery, which isn't allowed", name) + raise("Expression of generated column %s contains a subquery, which isn't allowed", quotedIdent(col.Names[0])) + } + if hasDefault { + raise("Not allowed to set default on a generated column") } - verifyGeneratedColumnRefs(col.Default) - } - constraintName := "" - if named, ok := n.child(3).opt(); ok { - constraintName = identifierText(named.child(1)) } - for _, c := range n.child(4).repeat() { - constraint := tc.transformColumnConstraint(&col, c) - if constraint == nil { - if col.Generated != "" && col.Collation != "" { - raise("Collations are not supported on generated columns") - } - continue + return col +} + +// transformGeneratedColumn ports TransformGeneratedColumn: +// GeneratedColumn <- Generated? 'AS' Parens(Expression) GeneratedColumnType? +// Generated <- GeneratedAlways / GeneratedByDefault +func (tc *transformContext) transformGeneratedColumn(col *ast.ColumnDef, gen tnode) { + if g, ok := gen.child(0).opt(); ok { + if _, kind := g.sole().choice(); kind.name() == "GeneratedByDefault" { + raise("for a generated column, GENERATED ALWAYS must be specified") } - if col.Generated != "" { - if _, isDefault := constraint.(*ast.DefaultConstraint); isDefault { - raise("Not allowed to set default on a generated column") - } + } + col.Generated = ast.GeneratedVirtual + col.Default = tc.transformExpression(gen.child(2).parens()) + verifyGeneratedColumnRefs(col.Default) + if kind, ok := gen.child(3).opt(); ok { + _, k := kind.sole().choice() + if k.name() == "StoredGeneratedColumn" { + col.Generated = ast.GeneratedStored } - if constraintName != "" { - setConstraintName(constraint, constraintName) - constraintName = "" + } +} + +// columnConstraintEntry is upstream's ColumnConstraintEntry: one +// transformed ColumnConstraint, either a constraint or a column property. +type columnConstraintEntry struct { + constraint ast.Constraint + isDefault bool + collation string + compression string + // notNull / unique / primary mirror constraint_type_info + notNull, unique, primary bool + check, foreignKey bool +} + +// transformColumnConstraints maps ColumnConstraint* in order. +func (tc *transformContext) transformColumnConstraints(n tnode) []columnConstraintEntry { + var out []columnConstraintEntry + for _, c := range n.repeat() { + out = append(out, tc.transformColumnConstraint(c)) + } + return out +} + +// quotedIdent renders an Identifier formatted into an upstream exception +// message (ExceptionFormatValue for Identifier: always double-quoted, +// embedded quotes doubled). +func quotedIdent(s string) string { + return `"` + strings.ReplaceAll(s, `"`, `""`) + `"` +} + +// sqlIdentifier renders an identifier the way upstream's +// SQLIdentifier::ToString does (RequiresQuotesForPrinting with +// allow_caps): double-quoted when empty, a keyword, `_` followed by a +// digit, or containing anything but letters, digits (not leading) and +// underscores. +func sqlIdentifier(s string) string { + needs := s == "" || token.IsKeyword(s) || (len(s) > 1 && s[0] == '_' && s[1] >= '0' && s[1] <= '9') + for i := 0; i < len(s) && !needs; i++ { + c := s[i] + switch { + case c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_': + case c >= '0' && c <= '9': + needs = i == 0 + default: + needs = true } - col.Constraints = append(col.Constraints, constraint) } - return col + if !needs { + return s + } + return quotedIdent(s) +} + +// varcharTypeNames are the builtin type names DefaultTypeGenerator maps +// to VARCHAR. +var varcharTypeNames = map[string]bool{ + "varchar": true, "bpchar": true, "string": true, "char": true, "nvarchar": true, "text": true, +} + +// applyColumnCollation ports PEGTransformerFactory::ApplyColumnCollation's +// parse-time checks: a collation needs a VARCHAR-typed column. +func applyColumnCollation(typ *ast.TypeExpression, collation string) { + if typ == nil { + raise("Specify the VARCHAR type to set a collation") + } + if !varcharTypeNames[strings.ToLower(typ.TypeName)] { + raise("Only VARCHAR columns can have collations!") + } } // dottedIdentifier flattens DottedIdentifier (Identifier DotColLabel*). @@ -223,45 +399,53 @@ func setConstraintName(c ast.Constraint, name string) { } } -// transformColumnConstraint maps one ColumnConstraint; collation and -// compression fold into the column itself and return nil. -func (tc *transformContext) transformColumnConstraint(col *ast.ColumnDef, n tnode) ast.Constraint { +// transformColumnConstraint maps one ColumnConstraint. +// ColumnConstraint <- NameableColumnConstraint / ColumnCollation +// NameableColumnConstraint <- ConstraintNameClause? ColumnConstraintElement +// Column constraint names are parsed but not stored (upstream's +// TransformNameableColumnConstraint). +func (tc *transformContext) transformColumnConstraint(n tnode) columnConstraintEntry { _, alt := n.sole().choice() - switch alt.name() { + if alt.name() == "ColumnCollation" { + // 'COLLATE' DottedIdentifier + return columnConstraintEntry{collation: strings.Join(dottedIdentifier(alt.child(1)), ".")} + } + if alt.name() != "NameableColumnConstraint" { + shapeError(alt, "unknown column constraint") + } + _, elem := alt.child(1).sole().choice() + switch elem.name() { case "NotNullConstraint": // NullConstraint / NotNullColumnConstraint - _, kind := alt.sole().choice() + _, kind := elem.sole().choice() c := &ast.NotNullConstraint{Null: kind.name() == "NullConstraint"} - c.SetSpan(alt.span()) - return c + c.SetSpan(elem.span()) + return columnConstraintEntry{constraint: c, notNull: !c.Null} case "UniqueConstraint": c := &ast.UniqueConstraint{} - c.SetSpan(alt.span()) - return c + c.SetSpan(elem.span()) + return columnConstraintEntry{constraint: c, unique: true} case "PrimaryKeyConstraint": c := &ast.UniqueConstraint{IsPrimaryKey: true} - c.SetSpan(alt.span()) - return c + c.SetSpan(elem.span()) + return columnConstraintEntry{constraint: c, unique: true, primary: true} case "DefaultValue": // 'DEFAULT' ColumnDefaultExpr - c := &ast.DefaultConstraint{Expr: tc.transformColumnDefaultExpr(alt.child(1))} - c.SetSpan(alt.span()) - return c + c := &ast.DefaultConstraint{Expr: tc.transformColumnDefaultExpr(elem.child(1))} + c.SetSpan(elem.span()) + return columnConstraintEntry{constraint: c, isDefault: true} case "CheckConstraint": - c := &ast.CheckConstraint{Expr: checkConstraintExpr(tc.transformExpression(alt.child(1).parens()))} - c.SetSpan(alt.span()) - return c + c := &ast.CheckConstraint{Expr: checkConstraintExpr(tc.transformExpression(elem.child(1).parens()))} + c.SetSpan(elem.span()) + return columnConstraintEntry{constraint: c, check: true} case "ForeignKeyConstraint": - return tc.transformForeignKey(alt, nil) - case "ColumnCollation": - col.Collation = strings.Join(dottedIdentifier(alt.child(1)), ".") - return nil + return columnConstraintEntry{constraint: tc.transformForeignKey(elem, nil), foreignKey: true} case "ColumnCompression": - col.Compression = identifierText(alt.child(2)) - return nil + // 'USING' 'COMPRESSION' ColIdOrString + return columnConstraintEntry{compression: identifierText(elem.child(2))} } - shapeError(alt, "unknown column constraint") - return nil + shapeError(elem, "unknown column constraint") + return columnConstraintEntry{} } // transformColumnDefaultExpr maps ColumnDefaultExpr (the restricted @@ -276,7 +460,7 @@ func (tc *transformContext) transformColumnDefaultExpr(n tnode) ast.Expr { } // transformForeignKey maps ForeignKeyConstraint -// ('REFERENCES' BaseTableName Parens(ColumnList)? KeyActions), with the +// ('REFERENCES' BaseTableName Parens(ColumnList)? KeyActions?), with the // referencing columns of a table-level FOREIGN KEY. func (tc *transformContext) transformForeignKey(n tnode, columns []string) *ast.ForeignKeyConstraint { c := &ast.ForeignKeyConstraint{Columns: columns} @@ -287,13 +471,28 @@ func (tc *transformContext) transformForeignKey(n tnode, columns []string) *ast. if cols, ok := n.child(2).opt(); ok { c.ReferencedColumns = identifierList(cols.parens().sole()) } - // KeyActions <- UpdateAction? DeleteAction? - actions := n.child(3) - if ua, ok := actions.child(0).opt(); ok { - c.OnUpdate = keyAction(ua.child(2)) - } - if da, ok := actions.child(1).opt(); ok { - c.OnDelete = keyAction(da.child(2)) + // KeyActions <- UpdateFirstKeyActions / DeleteFirstKeyActions + // UpdateFirstKeyActions <- UpdateAction DeleteAction? + // DeleteFirstKeyActions <- DeleteAction UpdateAction? + if actions, ok := n.child(3).opt(); ok { + _, order := actions.sole().choice() + first := keyAction(order.child(0).child(2)) + var second ast.KeyAction + hasSecond := false + if a, ok := order.child(1).opt(); ok { + second, hasSecond = keyAction(a.child(2)), true + } + if order.name() == "UpdateFirstKeyActions" { + c.OnUpdate = first + if hasSecond { + c.OnDelete = second + } + } else { + c.OnDelete = first + if hasSecond { + c.OnUpdate = second + } + } } // the table-level form checks the column counts (upstream's // TransformTopForeignKeyConstraint, after the actions transform) @@ -395,7 +594,8 @@ func (tc *transformContext) transformTopLevelConstraint(n tnode) ast.Constraint return out } -// CreateSchemaStmt <- 'SCHEMA' IfNotExists? QualifiedName +// CreateSchemaStmt <- 'SCHEMA' IfNotExists? QualifiedName WithOptionList? +// WithOptionList <- 'WITH' RelOptionList func (tc *transformContext) transformCreateSchema(n tnode) ast.CreateInfo { info := &ast.CreateSchemaInfo{} info.SetSpan(n.span()) @@ -406,30 +606,48 @@ func (tc *transformContext) transformCreateSchema(n tnode) ast.CreateInfo { cat = schema } info.Catalog, info.Name = cat, name + if wl, ok := n.child(3).opt(); ok { + info.Options = tc.transformRelOptionList(wl.child(1)) + } return info } -// CreateViewStmt <- CreateRecursive? 'VIEW' IfNotExists? QualifiedName -// InsertColumnList? WithList? 'AS' SelectStatementInternal +// CreateViewStmt <- CreateSecure? CreateRecursive? 'VIEW' IfNotExists? +// QualifiedName InsertColumnList? WithList? 'AS' SelectStatementInternal func (tc *transformContext) transformCreateView(n tnode) ast.CreateInfo { info := &ast.CreateViewInfo{} info.SetSpan(n.span()) - if _, ok := n.child(0).opt(); ok { - info.Recursive = true - } - applyIfNotExists(&info.CreateInfoBase, n.child(2)) - tc.fillQualifiedName(&info.CreateInfoBase, n.child(3)) - if cols, ok := n.child(4).opt(); ok { + info.Secure = optMatched(n.child(0)) + info.Recursive = optMatched(n.child(1)) + applyIfNotExists(&info.CreateInfoBase, n.child(3)) + tc.fillQualifiedName(&info.CreateInfoBase, n.child(4)) + cols, hasCols := n.child(5).opt() + if wl, ok := n.child(6).opt(); ok { + info.Options = tc.transformWithList(wl) + } + info.Query = tc.transformSelectInternalStatement(n.child(8)) + if info.Recursive && !hasCols { + raise("CREATE RECURSIVE VIEW requires a column list") + } + if hasCols { info.Aliases = identifierList(cols.sole().parens()) } - info.Query = tc.transformSelectInternalStatement(n.child(7)) + // non-constant / non-boolean DEFER_BINDING values raise InvalidInput + // upstream (post-parse) + for _, o := range info.Options { + if !strings.EqualFold(o.Name, "defer_binding") { + raise("Only DEFER_BINDING is currently supported as option for CREATE VIEW") + } + } tc.pivotEntryCheck("view") return info } // CreateIndexStmt <- UniqueIndex? 'INDEX' IfNotExists? IndexName? 'ON' -// BaseTableName InsertColumnList? IndexType? Parens(List(IndexElement))? -// WithList? WhereClause? +// BaseTableName IndexType? Parens(List(IndexElement)) WithList? +// WhereClause? +// Without a USING clause, unqualified column elements are qualified with +// the table name (TransformCreateIndexStmt). func (tc *transformContext) transformCreateIndex(n tnode) ast.CreateInfo { info := &ast.CreateIndexInfo{} info.SetSpan(n.span()) @@ -443,28 +661,28 @@ func (tc *transformContext) transformCreateIndex(n tnode) ast.CreateInfo { ref := &ast.BaseTableRef{} tc.fillBaseTableName(ref, n.child(5)) info.Table = ast.QualifiedName{Catalog: ref.CatalogName, Schema: ref.SchemaName, Name: ref.TableName} - if cols, ok := n.child(6).opt(); ok { - // old-style column list: plain column references - for _, c := range cols.sole().parens().listElems() { - col := &ast.ColumnRefExpression{ColumnNames: []string{identifierText(c)}} - col.SetSpan(c.span()) - info.Elements = append(info.Elements, ast.IndexElement{Expr: col}) - } - } - if idxType, ok := n.child(7).opt(); ok { + idxType, hasIndexType := n.child(6).opt() + if hasIndexType { info.IndexType = identifierText(idxType.child(1)) } - if elems, ok := n.child(8).opt(); ok { - for _, e := range elems.parens().listElems() { - // IndexElement <- Expression DescOrAsc? NullsFirstOrLast? - info.Elements = append(info.Elements, ast.IndexElement{ - Expr: tc.transformExpression(e.child(0)), - OrderType: orderTypeOf(e.child(1)), - NullOrder: nullOrderOf(e.child(2)), - }) + for _, e := range n.child(7).parens().listElems() { + // IndexElement <- Expression DescOrAsc? NullsFirstOrLast? + expr := tc.transformExpression(e.child(0)) + if col, ok := expr.(*ast.ColumnRefExpression); ok && !hasIndexType && len(col.ColumnNames) == 1 { + qualified := &ast.ColumnRefExpression{ColumnNames: []string{ref.TableName, col.ColumnNames[0]}} + qualified.SetSpan(invalidSpan) + expr = qualified } + info.Elements = append(info.Elements, ast.IndexElement{ + Expr: expr, + OrderType: orderTypeOf(e.child(1)), + NullOrder: nullOrderOf(e.child(2)), + }) + } + if wl, ok := n.child(8).opt(); ok { + info.Options = tc.transformWithList(wl) } - if wc, ok := n.child(10).opt(); ok { + if wc, ok := n.child(9).opt(); ok { info.Where = tc.transformExpression(wc.child(1)) } return info @@ -499,16 +717,53 @@ func sequenceOptionKey(alt tnode) string { // seqConstant requires a sequence option value to fold to a constant // (upstream's TransformSeqSet* transforms; negated literals are already -// folded by the expression transformer). -func seqConstant(e ast.Expr) ast.Value { +// folded by the expression transformer), and an integer one when set +// (CheckIntegerSequenceOption). +func (tc *transformContext) seqConstant(option string, e ast.Expr) ast.Value { c, ok := e.(*ast.ConstantExpression) if !ok { raise("Expected constant expression.") } + if !c.Value.IsNull && !literalIsInteger(c.Value) { + raise("Expected an integer argument for %s, got %s", option, tc.literalText(c)) + } return c.Value } -// seqInt extracts an int64 option value. Non-integer constants fail +// literalIsInteger reports whether a constant is an INTEGER literal +// (upstream's LiteralKind::INTEGER: digits only, no '.' or exponent). +func literalIsInteger(v ast.Value) bool { + switch v.Type.ID { + case "INTEGER", "BIGINT", "HUGEINT", "UHUGEINT", "BIGNUM", "VARINT": + return true + } + return false +} + +// literalText renders a constant the way upstream's Literal::ToString +// does: numbers as written, strings single-quoted, booleans as +// true/false. +func (tc *transformContext) literalText(c *ast.ConstantExpression) string { + v := c.Value + switch { + case v.IsNull: + return "NULL" + case v.Kind == ast.ValueBool: + if v.Bool { + return "true" + } + return "false" + case v.Kind == ast.ValueString: + return "'" + strings.ReplaceAll(v.Str, "'", "''") + "'" + } + sp := c.Span + if sp.Start >= 0 && sp.End <= len(tc.src) && sp.Start < sp.End { + return strings.Join(strings.Fields(tc.src[sp.Start:sp.End]), "") + } + return v.Type.ID +} + +// seqInt extracts an int64 option value. Values outside int64 fail // upstream with a conversion error (post-parse), so ok=false skips the // parse-time range checks. func seqInt(v ast.Value) (int64, bool) { @@ -520,7 +775,8 @@ func seqInt(v ast.Value) (int64, bool) { // CreateSequenceStmt <- 'SEQUENCE' IfNotExists? QualifiedName SequenceOption* // Port of TransformCreateSequenceStmt, including its parse-time option -// validation: duplicates, NULL values, zero increments and the +// validation. The option transforms run first (constant and integer +// checks), then duplicates, NULL values, zero increments and the // min/max/start range checks over the evaluated defaults. func (tc *transformContext) transformCreateSequence(n tnode) ast.CreateInfo { info := &ast.CreateSequenceInfo{} @@ -528,25 +784,58 @@ func (tc *transformContext) transformCreateSequence(n tnode) ast.CreateInfo { applyIfNotExists(&info.CreateInfoBase, n.child(1)) tc.fillQualifiedName(&info.CreateInfoBase, n.child(2)) - seen := map[string]bool{} - inc, minV, maxV, start := int64(1), int64(1), int64(math.MaxInt64), int64(0) - minSet, maxSet, startSet := false, false, false - evalOK := true + type seqOpt struct { + key string + alt tnode + expr ast.Expr + } + var opts []seqOpt for _, o := range n.child(3).repeat() { _, alt := o.sole().choice() key := sequenceOptionKey(alt) - if seen[key] { - raise("%s should be passed at most once", strings.ToUpper(key[:1])+key[1:]) + var scratch ast.CreateSequenceInfo + if alt.name() != "SeqOwnedBy" { + tc.applySequenceOption(&scratch, o) } - seen[key] = true - switch alt.name() { - case "SeqSetCycle": - _, kind := alt.sole().choice() + var expr ast.Expr + switch key { + case "increment": + expr = scratch.Increment + case "minvalue": + expr = scratch.MinValue + case "maxvalue": + expr = scratch.MaxValue + case "start": + expr = scratch.StartValue + } + opts = append(opts, seqOpt{key: key, alt: alt, expr: expr}) + } + + seen := map[string]bool{} + for _, o := range opts { + if seen[o.key] { + raise("%s should be passed at most once", strings.ToUpper(o.key[:1])+o.key[1:]) + } + seen[o.key] = true + } + if seen["nominvalue"] && seen["minvalue"] { + raise("Minvalue should be passed at most once") + } + if seen["nomaxvalue"] && seen["maxvalue"] { + raise("Maxvalue should be passed at most once") + } + + inc, minV, maxV, start := int64(1), int64(1), int64(math.MaxInt64), int64(0) + minSet, maxSet, startSet := false, false, false + evalOK := true + for _, o := range opts { + switch o.key { + case "cycle": + _, kind := o.alt.sole().choice() info.Cycle = kind.name() == "SeqCycle" - case "SeqSetIncrement": - // 'INCREMENT' 'BY'? Expression - info.Increment = tc.transformExpression(alt.child(2)) - v := seqConstant(info.Increment) + case "increment": + info.Increment = o.expr + v := o.expr.(*ast.ConstantExpression).Value if v.IsNull { raise("INCREMENT must not be NULL") } @@ -558,12 +847,10 @@ func (tc *transformContext) transformCreateSequence(n tnode) ast.CreateInfo { } else { evalOK = false } - case "SeqSetMinMax": - // SeqMinOrMax Expression - expr := tc.transformExpression(alt.child(1)) - v := seqConstant(expr) - if seqIsMin(alt.child(0)) { - info.MinValue = expr + case "minvalue", "maxvalue": + v := o.expr.(*ast.ConstantExpression).Value + if o.key == "minvalue" { + info.MinValue = o.expr if v.IsNull { raise("MINVALUE must not be NULL") } @@ -573,7 +860,7 @@ func (tc *transformContext) transformCreateSequence(n tnode) ast.CreateInfo { evalOK = false } } else { - info.MaxValue = expr + info.MaxValue = o.expr if v.IsNull { raise("MAXVALUE must not be NULL") } @@ -583,17 +870,13 @@ func (tc *transformContext) transformCreateSequence(n tnode) ast.CreateInfo { evalOK = false } } - case "SeqNoMinMax": - // 'NO' SeqMinOrMax - if seqIsMin(alt.child(1)) { - info.NoMinValue = true - } else { - info.NoMaxValue = true - } - case "SeqStartWith": - // 'START' 'WITH'? Expression - info.StartValue = tc.transformExpression(alt.child(2)) - v := seqConstant(info.StartValue) + case "nominvalue": + info.NoMinValue = true + case "nomaxvalue": + info.NoMaxValue = true + case "start": + info.StartValue = o.expr + v := o.expr.(*ast.ConstantExpression).Value if v.IsNull { raise("START value must not be NULL") } @@ -602,17 +885,11 @@ func (tc *transformContext) transformCreateSequence(n tnode) ast.CreateInfo { } else { evalOK = false } - case "SeqOwnedBy": + case "owned": // OWNED BY is an ALTER SEQUENCE option upstream raise("Unrecognized option \"owned\" for CREATE SEQUENCE") } } - if seen["nominvalue"] && seen["minvalue"] { - raise("Minvalue should be passed at most once") - } - if seen["nomaxvalue"] && seen["maxvalue"] { - raise("Maxvalue should be passed at most once") - } if evalOK { if inc < 0 { if !minSet { @@ -654,11 +931,15 @@ func (tc *transformContext) applySequenceOption(info *ast.CreateSequenceInfo, n case "SeqSetIncrement": // 'INCREMENT' 'BY'? Expression info.Increment = tc.transformExpression(alt.child(2)) - seqConstant(info.Increment) + tc.seqConstant("INCREMENT", info.Increment) case "SeqSetMinMax": // SeqMinOrMax Expression expr := tc.transformExpression(alt.child(1)) - seqConstant(expr) + if seqIsMin(alt.child(0)) { + tc.seqConstant("MINVALUE", expr) + } else { + tc.seqConstant("MAXVALUE", expr) + } if seqIsMin(alt.child(0)) { info.MinValue = expr } else { @@ -674,7 +955,7 @@ func (tc *transformContext) applySequenceOption(info *ast.CreateSequenceInfo, n case "SeqStartWith": // 'START' 'WITH'? Expression info.StartValue = tc.transformExpression(alt.child(2)) - seqConstant(info.StartValue) + tc.seqConstant("START", info.StartValue) case "SeqOwnedBy": cat, schema, name := tc.transformQualifiedNameParts(alt.child(2)) info.OwnedBy = &ast.QualifiedName{Catalog: cat, Schema: schema, Name: name} @@ -702,12 +983,25 @@ func (tc *transformContext) transformCreateType(n tnode) ast.CreateInfo { info.IsEnum = true info.EnumQuery = tc.transformSelectInternalStatement(kind.child(1).parens()) case "EnumStringLiteralList": + // 'ENUM' Parens(List(StringLiteral)?) ArrayBounds*: with bounds + // the created type is a list/array of the enum info.IsEnum = true if list, ok := kind.child(1).parens().opt(); ok { for _, s := range list.listElems() { info.EnumValues = append(info.EnumValues, identifierText(s)) } } + if bounds := kind.child(2).repeat(); len(bounds) > 0 { + var args []ast.Expr + for _, v := range info.EnumValues { + args = append(args, constExpr(invalidSpan, varcharValue(v))) + } + t := typeExpr(invalidSpan, "ENUM", args...) + for _, b := range bounds { + t = tc.applyArrayBound(t, b) + } + info.Type = t + } default: shapeError(kind, "unknown create type") } @@ -777,7 +1071,9 @@ func (tc *transformContext) transformAlter(n tnode) ast.Stmt { info.SetSpan(alt.span()) stmt.Actions = append(stmt.Actions, info) case "AlterSchemaStmt": - // 'SCHEMA' IfExists? QualifiedName RenameAlter + // 'SCHEMA' IfExists? QualifiedName AlterSchemaOptions + // AlterSchemaOptions <- RenameAlter / SetOptions / ResetOptions + // (RENAME raises NotImplemented upstream: post-parse) stmt.Entity = ast.AlterEntitySchema stmt.IfExists = optMatched(alt.child(1)) cat, schema, name := tc.transformQualifiedNameParts(alt.child(2)) @@ -785,7 +1081,17 @@ func (tc *transformContext) transformAlter(n tnode) ast.Stmt { cat = schema } stmt.Name = ast.QualifiedName{Catalog: cat, Name: name} - stmt.Actions = append(stmt.Actions, tc.transformRenameAlter(alt.child(3))) + _, opt := alt.child(3).sole().choice() + switch opt.name() { + case "RenameAlter": + stmt.Actions = append(stmt.Actions, tc.transformRenameAlter(opt)) + case "SetOptions": + stmt.Actions = append(stmt.Actions, tc.transformSetOptions(opt)) + case "ResetOptions": + stmt.Actions = append(stmt.Actions, tc.transformResetOptions(opt)) + default: + shapeError(opt, "unknown alter schema option") + } default: shapeError(alt, "unknown alter statement") } @@ -813,7 +1119,7 @@ func (tc *transformContext) qualifiedSequenceName(n tnode) ast.QualifiedName { return q } -// transformRenameAlter maps RenameAlter ('RENAME' 'TO' Identifier). +// transformRenameAlter maps RenameAlter ('RENAME' 'TO' ColIdOrString). func (tc *transformContext) transformRenameAlter(n tnode) ast.AlterInfo { info := &ast.RenameInfo{NewName: identifierText(n.child(2))} info.SetSpan(n.span()) @@ -837,35 +1143,20 @@ func (tc *transformContext) transformAlterTableOption(n tnode) ast.AlterInfo { // 'ADD' 'COLUMN'? IfNotExists? AddColumnEntry info := &ast.AddColumnInfo{IfNotExists: optMatched(alt.child(2))} info.SetSpan(alt.span()) - entry := alt.child(3) - // AddColumnEntry <- DottedIdentifier Type? GeneratedColumn? ColumnConstraint* - col := ast.ColumnDef{Names: dottedIdentifier(entry.child(0))} - col.SetSpan(entry.span()) - if typ, ok := entry.child(1).opt(); ok { - col.Type = tc.transformType(typ) - } - if gen, ok := entry.child(2).opt(); ok { - col.Generated = ast.GeneratedVirtual - col.Default = tc.transformExpression(gen.child(2).parens()) - if kind, ok := gen.child(3).opt(); ok { - _, k := kind.sole().choice() - if k.name() == "StoredGeneratedColumn" { - col.Generated = ast.GeneratedStored - } - } - } - if col.Type == nil && col.Generated == "" { - raise("Column definition requires a type or generated expression") - } - if col.Generated != "" { - raise("Adding generated columns after table creation is not supported yet") + info.Column = tc.transformAddColumnEntry(alt.child(3)) + return info + case "DropConstraint": + // 'DROP' 'CONSTRAINT' IfExists? ConstraintName DropBehavior? + // (TransformDropConstraint raises NotImplemented: post-parse) + info := &ast.DropConstraintInfo{ + IfExists: optMatched(alt.child(2)), + Name: identifierText(alt.child(3)), } - for _, c := range entry.child(3).repeat() { - if constraint := tc.transformColumnConstraint(&col, c); constraint != nil { - col.Constraints = append(col.Constraints, constraint) - } + if behavior, ok := alt.child(4).opt(); ok { + _, b := behavior.sole().choice() + info.Cascade = b.name() == "CascadeDropBehavior" } - info.Column = col + info.SetSpan(alt.span()) return info case "DropColumn": // 'DROP' 'COLUMN'? IfExists? NestedColumnName DropBehavior? @@ -887,10 +1178,8 @@ func (tc *transformContext) transformAlterTableOption(n tnode) ast.AlterInfo { info := &ast.AddConstraintInfo{Constraint: tc.transformTopLevelConstraint(alt.child(1))} info.SetSpan(alt.span()) return info - case "ChangeNullability": - return tc.transformChangeNullability(nil, alt) case "RenameColumn": - // 'RENAME' 'COLUMN'? NestedColumnName 'TO' Identifier + // 'RENAME' 'COLUMN'? NestedColumnName 'TO' ColIdOrString info := &ast.RenameColumnInfo{ Column: nestedColumnName(alt.child(2)), NewName: identifierText(alt.child(4)), @@ -919,40 +1208,102 @@ func (tc *transformContext) transformAlterTableOption(n tnode) ast.AlterInfo { info.SetSpan(alt.span()) return info case "SetOptions": - info := &ast.GenericAlterInfo{Kind: "SET_OPTIONS"} - info.SetSpan(alt.span()) - return info + return tc.transformSetOptions(alt) case "ResetOptions": - info := &ast.GenericAlterInfo{Kind: "RESET_OPTIONS"} - info.SetSpan(alt.span()) - // RESET (...) options cannot carry values (a bare NULL passes, - // mirroring upstream's null-constant default); upstream checks - // the whole list and names the last offending option - offender := "" - for _, o := range alt.child(1).parens().listElems() { - // RelOption <- RelOptionName RelOptionArgumentOpt? - if arg, ok := o.child(1).opt(); ok { - // RelOptionArgumentOpt <- '=' DefArg - _, def := arg.child(1).sole().choice() - if def.name() != "DefArgNull" { - offender = relOptionName(o.child(0)) - } + return tc.transformResetOptions(alt) + } + shapeError(alt, "unknown alter table option") + return nil +} + +// transformSetOptions maps SetOptions <- 'SET' RelOptionList. +func (tc *transformContext) transformSetOptions(n tnode) ast.AlterInfo { + info := &ast.GenericAlterInfo{Kind: "SET_OPTIONS", Options: tc.transformRelOptionList(n.child(1))} + info.SetSpan(n.span()) + return info +} + +// transformResetOptions maps ResetOptions <- 'RESET' RelOptionList. +// RESET (...) options cannot carry values (a NULL/NONE value passes, +// mirroring upstream's null-constant default); upstream checks the whole +// list and names the last offending option. +func (tc *transformContext) transformResetOptions(n tnode) ast.AlterInfo { + info := &ast.GenericAlterInfo{Kind: "RESET_OPTIONS", Options: tc.transformRelOptionList(n.child(1))} + info.SetSpan(n.span()) + offender := "" + for _, o := range info.Options { + if c, ok := o.Value.(*ast.ConstantExpression); !ok || !c.Value.IsNull { + offender = o.Name + } + } + if offender != "" { + raise("Reset option \"%s\" cannot set any value. Did you mean to use SET?", offender) + } + for i := range info.Options { + info.Options[i].Value = nil + } + return info +} + +// transformAddColumnEntry ports TransformAddColumnEntry + TransformAddColumn: +// AddColumnEntry <- DottedIdentifier Type? GeneratedColumn? ColumnConstraint* +func (tc *transformContext) transformAddColumnEntry(entry tnode) ast.ColumnDef { + col := ast.ColumnDef{Names: dottedIdentifier(entry.child(0))} + col.SetSpan(entry.span()) + if typ, ok := entry.child(1).opt(); ok { + col.Type = tc.transformType(typ) + } + if gen, ok := entry.child(2).opt(); ok { + tc.transformGeneratedColumn(&col, gen) + } + entries := tc.transformColumnConstraints(entry.child(3)) + if col.Type == nil && col.Generated == "" { + raise("Column definition requires a type or generated expression") + } + if col.Generated != "" { + raise("Adding generated columns after table creation is not supported yet") + } + hasDefault := false + for _, e := range entries { + switch { + case e.isDefault: + if hasDefault { + raise("Cannot define a default value twice") } + hasDefault = true + case e.notNull, e.unique && !e.primary: + // NOT NULL / UNIQUE become follow-up ALTERs upstream + case e.primary: + raise("Adding columns with PRIMARY KEY constraints is not supported yet") + case e.check: + raise("Adding columns with CHECK constraints is not supported yet") + case e.foreignKey: + raise("Adding columns with FOREIGN KEY constraints is not supported yet") + case e.compression != "": + if strings.EqualFold(e.compression, "auto") { + raise("Unrecognized option for column compression") + } + col.Compression = e.compression + continue + case e.collation != "": + applyColumnCollation(col.Type, e.collation) + col.Collation = e.collation + continue } - if offender != "" { - raise("Reset option \"%s\" cannot set any value. Did you mean to use SET?", offender) + if e.constraint != nil { + col.Constraints = append(col.Constraints, e.constraint) } - return info } - shapeError(alt, "unknown alter table option") - return nil + return col } -// relOptionName reads a RelOptionName (DottedIdentifierString / StringLiteral). +// relOptionName reads a RelOptionName (DottedColLabel / StringLiteral). +// DottedColLabel <- ColLabel DotColLabel* joins with dots +// (TransformDottedColLabel). func relOptionName(n tnode) string { _, alt := n.sole().choice() - if alt.name() == "DottedIdentifierString" { - return strings.Join(dottedIdentifier(alt.sole()), ".") + if alt.name() == "DottedColLabel" { + return strings.Join(dottedIdentifier(alt), ".") } return identifierText(alt) } @@ -999,18 +1350,26 @@ func (tc *transformContext) transformAlterColumnEntry(column []string, n tnode, case "ChangeNullability": return tc.transformChangeNullability(column, alt) case "AlterType": - // SetData? 'TYPE' Type? UsingExpression? + // SetData? 'TYPE' Type? ColumnCollation? UsingExpression? info := &ast.AlterColumnTypeInfo{Column: column} info.SetSpan(sp) if typ, ok := alt.child(2).opt(); ok { info.Type = tc.transformType(typ) } - if using, ok := alt.child(3).opt(); ok { + collation := "" + if coll, ok := alt.child(3).opt(); ok { + collation = strings.Join(dottedIdentifier(coll.child(1)), ".") + } + if using, ok := alt.child(4).opt(); ok { info.Using = tc.transformExpression(using.child(1)) } if info.Type == nil && info.Using == nil { raise("Omitting the type is only possible in combination with USING") } + if collation != "" { + applyColumnCollation(info.Type, collation) + info.Collation = collation + } return info } shapeError(alt, "unknown alter column entry") @@ -1047,11 +1406,11 @@ func (tc *transformContext) transformDrop(n tnode) ast.Stmt { stmt.Names = append(stmt.Names, ast.QualifiedName{Catalog: ref.CatalogName, Schema: ref.SchemaName, Name: ref.TableName}) } case "DropTableFunction": - // CommentMacroTable IfExists? List(TableFunctionName) + // CommentMacroTable IfExists? List(QualifiedTableFunction) stmt.DropType = ast.DropMacroTable stmt.IfExists = optMatched(alt.child(1)) for _, name := range alt.child(2).listElems() { - stmt.Names = append(stmt.Names, ast.QualifiedName{Name: identifierText(name)}) + stmt.Names = append(stmt.Names, qualifiedTableFunctionName(name)) } case "DropFunction": // FunctionTypeMacro IfExists? List(FunctionIdentifier) @@ -1111,6 +1470,9 @@ func (tc *transformContext) transformDrop(n tnode) ast.Stmt { stmt.IfExists = optMatched(alt.child(2)) stmt.Names = append(stmt.Names, ast.QualifiedName{Name: identifierText(alt.child(3))}) if storage, ok := alt.child(4).opt(); ok { + if stmt.Temporary { + raise("Can not combine TEMPORARY with specifying a storage for drop secret") + } stmt.Storage = identifierText(storage.child(1)) } case "DropTrigger": @@ -1121,9 +1483,34 @@ func (tc *transformContext) transformDrop(n tnode) ast.Stmt { default: shapeError(alt, "unknown drop entry") } + if _, ok := n.child(2).opt(); ok && stmt.DropType == ast.DropSecret { + raise("CASCADE and RESTRICT are not supported for DROP SECRET") + } return stmt } +// qualifiedTableFunctionName maps QualifiedTableFunction +// (CatalogQualification? SchemaQualification* TableFunctionName) to a +// three-part name: like QualifiedName, the schema is the component +// before the name and the catalog leads a path of three or more. +func qualifiedTableFunctionName(n tnode) ast.QualifiedName { + var path []string + if cq, ok := n.child(0).opt(); ok { + path = append(path, identifierText(cq.child(0))) + } + for _, sq := range n.child(1).repeat() { + path = append(path, identifierText(sq.child(0))) + } + q := ast.QualifiedName{Name: identifierText(n.child(2))} + if len(path) >= 1 { + q.Schema = path[len(path)-1] + } + if len(path) >= 2 { + q.Catalog = path[0] + } + return q +} + // qualifiedIndexName maps QualifiedIndexName. func (tc *transformContext) qualifiedIndexName(n tnode) ast.QualifiedName { _, alt := n.sole().choice() @@ -1152,9 +1539,10 @@ func (tc *transformContext) transformFunctionIdentifierRaw(n tnode) (catalog, sc _, alt := n.sole().choice() switch alt.name() { case "CatalogReservedSchemaFunctionName": + // CatalogQualification ReservedSchemaQualification* ReservedFunctionName catalog = identifierText(alt.child(0).child(0)) - if sq, ok := alt.child(1).opt(); ok { - schema = identifierText(sq.child(0)) + if schemas := alt.child(1).repeat(); len(schemas) > 0 { + schema = identifierText(schemas[len(schemas)-1].child(0)) } name = identifierText(alt.child(2)) case "SchemaReservedFunctionName": diff --git a/parser/transform_depth.go b/parser/transform_depth.go new file mode 100644 index 0000000..a7e928a --- /dev/null +++ b/parser/transform_depth.go @@ -0,0 +1,129 @@ +// transform_depth.go: the max_expression_depth limit — the port of +// PEGTransformer::ExpressionDepthWeight / EnterExpression and the +// generated expression-depth rule table in peg_transformer_factory.cpp. +// Upstream charges each transformed rule frame a weight while it is on +// the transform stack: NESTING rules weigh 1, CHAIN rules weigh the +// number of links of their operator chain. darkwing computes the deepest +// stack in a pre-pass over the statement's parse tree. +package parser + +import "github.com/sqlc-dev/darkwing/internal/matcher" + +// maxExpressionDepth is ParserOptions::max_expression_depth's default. +const maxExpressionDepth = 1000 + +type depthKind uint8 + +const ( + depthNesting depthKind = iota + 1 + depthChain +) + +// expressionDepthRules is the START/END GENERATED EXPRESSION DEPTH RULES +// table. +var expressionDepthRules = map[string]depthKind{ + "SingleExpression": depthNesting, + "Type": depthNesting, + "NestedType": depthNesting, + "LambdaArrowExpression": depthChain, + "NotExpression": depthChain, + "IsExpressionContinuation": depthChain, + "IsDistinctFromExpression": depthChain, + "ComparisonExpression": depthChain, + "BetweenInLikeExpression": depthChain, + "InfixOtherOperatorExpression": depthChain, + "BitwiseExpression": depthChain, + "TildeExpression": depthChain, + "AdditiveExpression": depthChain, + "MultiplicativeExpression": depthChain, + "ExponentiationExpression": depthChain, + "CollateExpression": depthChain, + "AtTimeZoneExpression": depthChain, + "PrefixExpression": depthChain, + "IndirectionList": depthChain, +} + +// checkExpressionDepth raises upstream's depth error when the deepest +// chain of weighted rule frames exceeds the limit. +func checkExpressionDepth(r matcher.ParseResult) { + if maxDepthWeight(r, 0) > maxExpressionDepth { + raise("Max expression depth limit of %d exceeded. Use \"SET max_expression_depth TO x\" to "+ + "increase the maximum expression depth.", maxExpressionDepth) + } +} + +// stackCheck ports PEGTransformer::StackCheck(extra) for the folds that +// call it with their operator count (ApplyNotKeywords, +// TransformTildeExpression): unlike the frame weights it uses >=. +func stackCheck(extra int) { + if extra >= maxExpressionDepth { + raise("Max expression depth limit of %d exceeded. Use \"SET max_expression_depth TO x\" to "+ + "increase the maximum expression depth.", maxExpressionDepth) + } +} + +// maxDepthWeight returns the largest accumulated weight on any path from +// r down, starting from the weight acc of r's ancestors. It stops early +// once the limit is exceeded. +func maxDepthWeight(r matcher.ParseResult, acc int) int { + if r == nil || acc > maxExpressionDepth { + return acc + } + // only a rule's own list node is a transform frame (its repetition + // child can carry the rule's name too) + if _, isList := r.(*matcher.ListResult); !isList { + // fall through to the traversal without charging a weight + } else if kind, ok := expressionDepthRules[r.Name()]; ok { + switch kind { + case depthNesting: + acc++ + case depthChain: + acc += chainLinks(r) + } + } + best := acc + visit := func(c matcher.ParseResult) { + if d := maxDepthWeight(c, acc); d > best { + best = d + } + } + switch x := r.(type) { + case *matcher.ListResult: + for _, c := range x.Children { + visit(c) + } + case *matcher.RepeatResult: + for _, c := range x.Children { + visit(c) + } + case *matcher.OptionalResult: + visit(x.Result) + case *matcher.ChoiceResult: + visit(x.Result) + } + return best +} + +// chainLinks ports CountChainLinks: the repeated elements directly in a +// rule's match. +func chainLinks(r matcher.ParseResult) int { + switch x := r.(type) { + case *matcher.RepeatResult: + return len(x.Children) + case *matcher.OptionalResult: + if x.Result == nil { + return 0 + } + return chainLinks(x.Result) + case *matcher.ListResult: + links := 0 + for _, c := range x.Children { + switch c.(type) { + case *matcher.RepeatResult, *matcher.OptionalResult: + links += chainLinks(c) + } + } + return links + } + return 0 +} diff --git a/parser/transform_dml.go b/parser/transform_dml.go index 1685578..59f91ba 100644 --- a/parser/transform_dml.go +++ b/parser/transform_dml.go @@ -5,6 +5,8 @@ package parser import ( + "strings" + "github.com/sqlc-dev/darkwing/ast" ) @@ -36,8 +38,8 @@ func (tc *transformContext) transformReturning(n tnode) []ast.Expr { } // InsertStatement <- WithClause? 'INSERT' OrAction? 'INTO' InsertTarget -// ByNameOrPosition? InsertColumnList? InsertValues OnConflictClause? -// ReturningClause? +// ByNameOrPosition? InsertColumnList? OverridingClause? InsertValues +// OnConflictClause? ReturningClause? func (tc *transformContext) transformInsert(n tnode) ast.Stmt { stmt := &ast.InsertStatement{} stmt.SetSpan(n.span()) @@ -68,27 +70,39 @@ func (tc *transformContext) transformInsert(n tnode) ast.Stmt { if cols, ok := n.child(6).opt(); ok { stmt.Columns = identifierList(cols.sole().parens()) } + if ov, ok := n.child(7).opt(); ok { + // OverridingClause <- 'OVERRIDING' OverridingScope 'VALUE' + stmt.Overriding = strings.ToUpper(identifierText(ov.child(1))) + } // InsertValues <- SelectInsertValues / DefaultValues - _, values := n.child(7).sole().choice() + _, values := n.child(8).sole().choice() + var onConflict *ast.OnConflictInfo switch values.name() { case "SelectInsertValues": stmt.Query = tc.transformSelectInternalStatement(values.sole()) case "DefaultValues": - if len(stmt.Columns) > 0 { - raise("You can not provide both a column list and DEFAULT VALUES, please remove one of the two") - } stmt.DefaultValues = true default: shapeError(values, "unknown insert values") } - if oc, ok := n.child(8).opt(); ok { + if oc, ok := n.child(9).opt(); ok { + onConflict = tc.transformOnConflict(oc) + } + if ret, ok := n.child(10).opt(); ok { + stmt.Returning = tc.transformReturning(ret) + } + // TransformInsertStatement's checks run after its children transform + if stmt.DefaultValues && len(stmt.Columns) > 0 { + raise("You can not provide both a column list and DEFAULT VALUES, please remove one of the two") + } + if stmt.DefaultValues && stmt.Overriding != "" { + raise("OVERRIDING SYSTEM|USER VALUE can not be combined with DEFAULT VALUES, please remove one of the two") + } + if onConflict != nil { if stmt.OnConflict != nil { raise("You can not provide both OR REPLACE|IGNORE and an ON CONFLICT clause, please remove the first if you want to have more granular control") } - stmt.OnConflict = tc.transformOnConflict(oc) - } - if ret, ok := n.child(9).opt(); ok { - stmt.Returning = tc.transformReturning(ret) + stmt.OnConflict = onConflict } return stmt } @@ -126,7 +140,7 @@ func (tc *transformContext) transformOnConflict(n tnode) *ast.OnConflictInfo { _, action := n.child(3).sole().choice() switch action.name() { case "OnConflictUpdate": - // 'DO' 'UPDATE' 'SET' UpdateSetClause WhereClause? + // 'DO' 'UPDATE' 'SET' UpdateSetClauseList WhereClause? info.Action = ast.OnConflictUpdate set := tc.transformUpdateSetClause(action.child(3)) if wc, ok := action.child(4).opt(); ok { @@ -141,48 +155,56 @@ func (tc *transformContext) transformOnConflict(n tnode) *ast.OnConflictInfo { return info } -// UpdateSetClause <- UpdateSetElementList / UpdateSetTuple +// UpdateSetClauseList <- List(UpdateSetClause): the clauses' columns and +// expressions concatenate (TransformUpdateSetClauseList). func (tc *transformContext) transformUpdateSetClause(n tnode) *ast.UpdateSetInfo { set := &ast.UpdateSetInfo{} set.SetSpan(n.span()) + for _, clause := range n.sole().listElems() { + tc.appendUpdateSetClause(set, clause) + } + return set +} + +// UpdateSetClause <- UpdateSetElement / UpdateSetTuple +func (tc *transformContext) appendUpdateSetClause(set *ast.UpdateSetInfo, n tnode) { _, alt := n.sole().choice() switch alt.name() { - case "UpdateSetElementList": - for _, e := range alt.sole().listElems() { - // UpdateSetElement <- UpdateSetColumnTarget '=' Expression - target := updateSetColumnTarget(e.child(0)) - if len(target) > 1 { - raise("Qualified column names in UPDATE .. SET not supported") - } - set.Columns = append(set.Columns, target) - set.Expressions = append(set.Expressions, tc.transformExpression(e.child(2))) + case "UpdateSetElement": + // UpdateSetElement <- UpdateSetColumnTarget '=' Expression + target := updateSetColumnTarget(alt.child(0)) + if len(target) > 1 { + raise("Qualified column names in UPDATE .. SET not supported") } + set.Columns = append(set.Columns, target) + set.Expressions = append(set.Expressions, tc.transformExpression(alt.child(2))) case "UpdateSetTuple": // Parens(List(ColumnName)) '=' Expression: a row-valued // expression is unpacked onto the columns (with a count check); // any other expression assigns to every column, like upstream + var columns [][]string for _, c := range alt.child(0).parens().listElems() { - set.Columns = append(set.Columns, []string{identifierText(c)}) + columns = append(columns, []string{identifierText(c)}) } + set.Columns = append(set.Columns, columns...) expr := tc.transformExpression(alt.child(2)) if fn, isFn := expr.(*ast.FunctionExpression); isFn && fn.FunctionName == "row" && fn.Schema == "" && fn.Catalog == "" { - if len(fn.Arguments) != len(set.Columns) { + if len(fn.Arguments) != len(columns) { raise("Could not perform assignment, expected %d values, got %d", - len(set.Columns), len(fn.Arguments)) + len(columns), len(fn.Arguments)) } for _, a := range fn.Arguments { set.Expressions = append(set.Expressions, a.Expr) } } else { - for range set.Columns { + for range columns { set.Expressions = append(set.Expressions, expr) } } default: shapeError(alt, "unknown update set clause") } - return set } // updateSetColumnTarget flattens ColumnName DotIdentifier* into a dotted @@ -195,7 +217,7 @@ func updateSetColumnTarget(n tnode) []string { return path } -// UpdateStatement <- WithClause? 'UPDATE' UpdateTarget UpdateSetClause +// UpdateStatement <- WithClause? 'UPDATE' UpdateTarget UpdateSetClauseList // FromClause? WhereClause? ReturningClause? func (tc *transformContext) transformUpdate(n tnode) ast.Stmt { stmt := &ast.UpdateStatement{} @@ -230,17 +252,22 @@ func (tc *transformContext) transformUpdate(n tnode) ast.Stmt { return stmt } -// transformTargetOptAlias maps TargetOptAlias (BaseTableName 'AS'? ColId?). +// transformTargetOptAlias maps TargetOptAlias (BaseTableName TargetAlias?). func (tc *transformContext) transformTargetOptAlias(n tnode) *ast.BaseTableRef { ref := &ast.BaseTableRef{} ref.SetSpan(n.span()) tc.fillBaseTableName(ref, n.child(0)) - if alias, ok := n.child(2).opt(); ok { - ref.Alias = identifierText(alias) + if alias, ok := n.child(1).opt(); ok { + ref.Alias = targetAlias(alias) } return ref } +// targetAlias maps TargetAlias <- 'AS'? ColId. +func targetAlias(n tnode) string { + return identifierText(n.child(1)) +} + // DeleteStatement <- WithClause? 'DELETE' 'FROM' TargetOptAlias // DeleteUsingClause? WhereClause? ReturningClause? func (tc *transformContext) transformDelete(n tnode) ast.Stmt { @@ -268,7 +295,11 @@ func (tc *transformContext) transformDelete(n tnode) ast.Stmt { return stmt } -// TruncateStatement <- 'TRUNCATE' 'TABLE'? BaseTableName +// TruncateStatement <- 'TRUNCATE' 'TABLE'? BaseTableName TruncateOptions? +// TruncateOptions <- TruncateDropBehavior / TruncateAliasOptions +// TruncateAliasOptions <- TargetAlias TruncateDropBehavior? +// The alias is ignored; CASCADE raises NotImplemented upstream +// (post-parse), so darkwing records it. func (tc *transformContext) transformTruncate(n tnode) ast.Stmt { stmt := &ast.TruncateStatement{} stmt.SetSpan(n.span()) @@ -277,6 +308,20 @@ func (tc *transformContext) transformTruncate(n tnode) ast.Stmt { ref.SetSpan(invalidSpan) tc.fillBaseTableName(ref, n.child(2)) stmt.Table = ref + if opts, ok := n.child(3).opt(); ok { + _, alt := opts.sole().choice() + var behavior tnode + hasBehavior := false + if alt.name() == "TruncateDropBehavior" { + behavior, hasBehavior = alt, true + } else { + behavior, hasBehavior = alt.child(1).opt() + } + if hasBehavior { + _, b := behavior.sole().sole().choice() + stmt.Cascade = b.name() == "CascadeDropBehavior" + } + } return stmt } @@ -380,7 +425,7 @@ func (tc *transformContext) fillMergeAction(action *ast.MergeIntoAction, n tnode case "UpdateMatchSetAction": // UpdateMatchSetClause <- 'SET' UpdateMatchSetInfo _, setInfo := kind.sole().child(1).sole().choice() - if setInfo.name() == "UpdateSetClause" { + if setInfo.name() == "UpdateSetClauseList" { action.SetInfo = tc.transformUpdateSetClause(setInfo) } // SET * keeps a nil SetInfo (update everything) diff --git a/parser/transform_expr.go b/parser/transform_expr.go index e99e86f..5123c77 100644 --- a/parser/transform_expr.go +++ b/parser/transform_expr.go @@ -41,12 +41,85 @@ func notExpr(sp ast.Span, child ast.Expr) *ast.OperatorExpression { return opExpr(sp, ast.OperatorNot, child) } +// constExpr builds the constant for a value the transformer synthesizes +// (ConstantExpression::FromValue): its literal is the atom that re-binds +// to the value. func constExpr(sp ast.Span, v ast.Value) *ast.ConstantExpression { - c := &ast.ConstantExpression{Value: v} + c := &ast.ConstantExpression{Value: v, Literal: literalFromValue(v)} c.SetSpan(sp) return c } +// literalExpr builds the constant for a literal atom; its Value is +// derived (Literal::ToValue). +func literalExpr(sp ast.Span, l ast.Literal) *ast.ConstantExpression { + c := &ast.ConstantExpression{Literal: l, Value: literalValue(l)} + c.SetSpan(sp) + return c +} + +// nullConst is ConstantExpression::Null(). +func nullConst(sp ast.Span) *ast.ConstantExpression { + return literalExpr(sp, ast.Literal{Kind: ast.LiteralNull}) +} + +// boolConst is ConstantExpression::Boolean(). +func boolConst(sp ast.Span, b bool) *ast.ConstantExpression { + return literalExpr(sp, ast.Literal{Kind: ast.LiteralBoolean, Text: strconv.FormatBool(b)}) +} + +// intConst is ConstantExpression::Integer(). +func intConst(sp ast.Span, v int64) *ast.ConstantExpression { + return literalExpr(sp, ast.Literal{Kind: ast.LiteralInteger, Text: strconv.FormatInt(v, 10)}) +} + +// stringConst is ConstantExpression::String(). +func stringConst(sp ast.Span, s string) *ast.ConstantExpression { + return literalExpr(sp, ast.Literal{Kind: ast.LiteralString, Text: s}) +} + +// literalFromValue picks the literal atom for the scalar values the +// transformers synthesize (the literal branch of +// ConstantExpression::FromValue). +func literalFromValue(v ast.Value) ast.Literal { + if v.IsNull || v.Kind == ast.ValueNull { + return ast.Literal{Kind: ast.LiteralNull} + } + switch v.Kind { + case ast.ValueBool: + return ast.Literal{Kind: ast.LiteralBoolean, Text: strconv.FormatBool(v.Bool)} + case ast.ValueInt64, ast.ValueHugeint: + s := valueString(v) + if v.Type.ID == "DECIMAL" { + return ast.Literal{Kind: ast.LiteralNumeric, Text: s} + } + return ast.Literal{Kind: ast.LiteralInteger, Text: s} + case ast.ValueDouble: + return ast.Literal{Kind: ast.LiteralNumeric, Text: valueString(v)} + } + return ast.Literal{Kind: ast.LiteralString, Text: v.Str} +} + +// literalValue ports Literal::ToValue for the transformers' own use. +func literalValue(l ast.Literal) ast.Value { + switch l.Kind { + case ast.LiteralBoolean: + return ast.Value{Type: ast.LogicalType{ID: "BOOLEAN"}, Kind: ast.ValueBool, Bool: l.Text == "true"} + case ast.LiteralInteger, ast.LiteralNumeric: + if v, ok := numberValue(l.Text); ok { + return v + } + case ast.LiteralString: + return varcharValue(l.Text) + case ast.LiteralHex: + blob, _ := hexToBlob(l.Text) + return ast.Value{Type: ast.LogicalType{ID: "BLOB"}, Kind: ast.ValueString, Str: blob} + case ast.LiteralBit: + return ast.Value{Type: ast.LogicalType{ID: "BIT"}, Kind: ast.ValueString, Str: l.Text} + } + return ast.Value{Type: ast.LogicalType{ID: "NULL"}, IsNull: true, Kind: ast.ValueNull} +} + func varcharValue(s string) ast.Value { return ast.Value{Type: ast.LogicalType{ID: "VARCHAR"}, Kind: ast.ValueString, Str: s} } @@ -132,25 +205,118 @@ func appendConjunction(children []ast.Expr, t ast.ExpressionType, e ast.Expr) [] func (tc *transformContext) transformLogicalNot(n tnode) ast.Expr { expr := tc.transformIs(n.child(1)) if notNode, ok := n.child(0).opt(); ok { - // NotExpression <- NotKeyword+ - end := n.span().End - nots := notNode.sole().repeat() - for i := len(nots) - 1; i >= 0; i-- { - expr = notExpr(ast.Span{Start: nots[i].sole().span().Start, End: end}, expr) + expr = applyNotKeywords(notNode, expr, n.span().End) + } + return expr +} + +// applyNotKeywords ports ApplyNotKeywords: NotExpression <- NotKeyword+ +// wraps the operand in one NOT per keyword; the outermost spans the first +// keyword through end. +func applyNotKeywords(notNode tnode, expr ast.Expr, end int) ast.Expr { + nots := notNode.sole().repeat() + stackCheck(len(nots)) + for i := len(nots) - 1; i >= 0; i-- { + // the NOTs are built in one transform: only the outermost takes + // the rule's location + sp := invalidSpan + if i == 0 { + sp = ast.Span{Start: nots[i].sole().span().Start, End: end} } + expr = notExpr(sp, expr) } return expr } -// IsExpression <- IsDistinctFromExpression IsTest* +// isTail is one IsExpressionTail of upstream's IsExpressionContinuation, +// tagged with its ExpressionTailType. +type isTail struct { + kind string // IsTestTail / IsDistinctTail / IsComparisonTail / IsOtherOperatorTail / IsCastTail + node tnode // the tail's inner node +} + +// IsExpression <- IsDistinctFromExpression IsExpressionContinuation? +// IsExpressionContinuation <- IsTest IsExpressionTail* +// Port of TransformIsExpression: after the first IS test, further IS +// tests, IS DISTINCT FROM, comparisons, other operators and casts fold +// left to right; two consecutive DISTINCT or comparison tails are the +// chained-comparison error. Synthesized nodes carry no location except +// the outermost, which spans the whole expression. func (tc *transformContext) transformIs(n tnode) ast.Expr { expr := tc.transformIsDistinctFrom(n.child(0)) - for _, test := range n.child(1).repeat() { - expr = tc.transformIsTest(expr, test) + cont, ok := n.child(1).opt() + if !ok { + return expr + } + tails := []isTail{{kind: "IsTestTail", node: cont.child(0)}} + for _, t := range cont.child(1).repeat() { + _, alt := t.sole().choice() + tails = append(tails, isTail{kind: alt.name(), node: alt.sole()}) + } + // upstream transforms every tail before folding them, so operand + // errors precede the chained-comparison check + type folded struct { + kind string + fold func(ast.Expr) ast.Expr + } + folds := make([]folded, len(tails)) + for i, t := range tails { + t := t + switch t.kind { + case "IsTestTail": + folds[i] = folded{t.kind, func(e ast.Expr) ast.Expr { return tc.transformIsTest(e, t.node) }} + case "IsDistinctTail": + t2, right := tc.isDistinctFromTail(t.node) + folds[i] = folded{t.kind, func(e ast.Expr) ast.Expr { + cmp := &ast.ComparisonExpression{Type: t2, Left: e, Right: right} + cmp.SetSpan(invalidSpan) + return cmp + }} + case "IsComparisonTail": + t2, right := tc.comparisonTail(t.node) + folds[i] = folded{t.kind, func(e ast.Expr) ast.Expr { + cmp := &ast.ComparisonExpression{Type: t2, Left: e, Right: right} + cmp.SetSpan(invalidSpan) + return cmp + }} + case "IsOtherOperatorTail": + fold := tc.otherOperatorTail(t.node) + folds[i] = folded{t.kind, func(e ast.Expr) ast.Expr { return fold(e, -1, false) }} + case "IsCastTail": + typ := tc.transformType(t.node.child(1)) + sp := t.node.span() + folds[i] = folded{t.kind, func(e ast.Expr) ast.Expr { + cast := &ast.CastExpression{Child: e, CastType: typ} + cast.SetSpan(sp) + return cast + }} + default: + shapeError(t.node, "unknown IsExpressionTail %q", t.kind) + } + } + prev := "IsTestTail" + for _, f := range folds { + if f.kind == prev && (f.kind == "IsDistinctTail" || f.kind == "IsComparisonTail") { + raise("Chained comparisons are not supported, use AND to combine comparisons") + } + expr = f.fold(expr) + prev = f.kind + } + // the rule's own location lands on the result when it has none + if expr.Pos() < 0 { + setSpan(expr, n.span()) } return expr } +// setSpan sets an expression's location (all AST expressions embed +// exprBase). +func setSpan(e ast.Expr, sp ast.Span) { + if s, ok := e.(interface{ SetSpan(ast.Span) }); ok { + s.SetSpan(sp) + } +} + func (tc *transformContext) transformIsTest(input ast.Expr, n tnode) ast.Expr { _, alt := n.sole().choice() sp := ast.Span{Start: n.span().Start, End: n.span().End} @@ -199,14 +365,7 @@ func (tc *transformContext) transformIsTest(input ast.Expr, n tnode) ast.Expr { func (tc *transformContext) transformIsDistinctFrom(n tnode) ast.Expr { expr := tc.transformComparison(n.child(0)) for _, tail := range n.child(1).repeat() { - // IsDistinctFromTail <- IsDistinctFromOp ComparisonExpression - op := tail.child(0) // 'IS' 'NOT'? 'DISTINCT' 'FROM' - _, negated := op.child(1).opt() - t := ast.CompareDistinctFrom - if negated { - t = ast.CompareNotDistinctFrom - } - right := tc.transformComparison(tail.child(1)) + t, right := tc.isDistinctFromTail(tail) cmp := &ast.ComparisonExpression{Type: t, Left: expr, Right: right} cmp.SetSpan(ast.Span{Start: n.span().Start, End: tail.span().End}) expr = cmp @@ -214,6 +373,38 @@ func (tc *transformContext) transformIsDistinctFrom(n tnode) ast.Expr { return expr } +// IsDistinctFromTail <- IsDistinctFromOp ComparisonExpression +func (tc *transformContext) isDistinctFromTail(tail tnode) (ast.ExpressionType, ast.Expr) { + op := tail.child(0) // 'IS' 'NOT'? 'DISTINCT' 'FROM' + _, negated := op.child(1).opt() + t := ast.CompareDistinctFrom + if negated { + t = ast.CompareNotDistinctFrom + } + return t, tc.transformComparison(tail.child(1)) +} + +// ComparisonExpressionTail <- ComparisonOperator ComparisonOperand +func (tc *transformContext) comparisonTail(tail tnode) (ast.ExpressionType, ast.Expr) { + _, opAlt := tail.child(0).sole().choice() + t, ok := comparisonOps[opAlt.name()] + if !ok { + shapeError(opAlt, "unknown comparison operator") + } + return t, tc.transformComparisonOperand(tail.child(1)) +} + +// ComparisonOperand <- NotComparisonOperand / BetweenInLikeExpression +// NotComparisonOperand <- NotExpression IsExpression: NOT after a +// comparison operator binds everything up to the IS level. +func (tc *transformContext) transformComparisonOperand(n tnode) ast.Expr { + _, alt := n.sole().choice() + if alt.name() == "NotComparisonOperand" { + return applyNotKeywords(alt.child(0), tc.transformIs(alt.child(1)), alt.span().End) + } + return tc.transformBetweenInLike(alt) +} + var comparisonOps = map[string]ast.ExpressionType{ "OperatorEqual": ast.CompareEqual, "OperatorNotEqual": ast.CompareNotEqual, @@ -235,59 +426,74 @@ func (tc *transformContext) transformComparison(n tnode) ast.Expr { // after transforming the operands - a deeper operand error (e.g. // an empty subscript) takes precedence over the chain ban for _, tail := range tails { - tc.transformBetweenInLike(tail.child(2)) + tc.comparisonTail(tail) } raise("Chained comparisons are not supported, use AND to combine comparisons") } - tail := tails[0] - _, opAlt := tail.child(0).sole().choice() - t, ok := comparisonOps[opAlt.name()] - if !ok { - shapeError(opAlt, "unknown comparison operator") - } - right := tc.transformBetweenInLike(tail.child(2)) - if notNode, hasNot := tail.child(1).opt(); hasNot { - nots := notNode.sole().repeat() - for i := len(nots) - 1; i >= 0; i-- { - right = notExpr(ast.Span{Start: nots[i].sole().span().Start, End: right.End()}, right) - } - } + t, right := tc.comparisonTail(tails[0]) cmp := &ast.ComparisonExpression{Type: t, Left: expr, Right: right} cmp.SetSpan(n.span()) return cmp } -// BetweenInLikeExpression <- OtherOperatorExpression BetweenInLikeOp? +// BetweenInLikeExpression <- OtherOperatorExpression InPredicate* BetweenLikeOp? +// InPredicate <- 'NOT'? InClause CastOperator* +// BetweenLikeOp <- 'NOT'? BetweenLikeOpExpression +// Port of TransformBetweenInLikeExpression: the IN predicates (each with +// its trailing casts) apply left to right, then the BETWEEN/LIKE. +// Synthesized NOT wrappers carry no location except as the outermost +// result, which takes the whole expression's. func (tc *transformContext) transformBetweenInLike(n tnode) ast.Expr { expr := tc.transformOtherOperator(n.child(0)) - opNode, ok := n.child(1).opt() - if !ok { + preds := n.child(1).repeat() + opNode, hasOp := n.child(2).opt() + if len(preds) == 0 && !hasOp { return expr } - // BetweenInLikeOp <- 'NOT'? BetweenInLikeOpExpression - _, negated := opNode.child(0).opt() - _, alt := opNode.child(1).sole().choice() - // the whole-expression span, used by the NOT wrapper - wholeSp := ast.Span{Start: n.span().Start, End: alt.span().End} - var result ast.Expr - switch alt.name() { - case "BetweenClause": - lower := tc.transformOtherOperator(alt.child(1)) - upper := tc.transformOtherOperator(alt.child(3)) - b := &ast.BetweenExpression{Input: expr, Lower: lower, Upper: upper} - b.SetSpan(alt.span()) - result = b - case "InClause": - result = tc.transformInClause(expr, alt) - case "LikeClause": - result = tc.transformLikeClause(expr, alt, negated, wholeSp) - // like handles its own negation - return result + whole := n.span() + for _, p := range preds { + _, negated := p.child(0).opt() + expr = tc.transformInClause(expr, p.child(1)) + if negated { + expr = notExpr(invalidSpan, expr) + } + for _, c := range p.child(2).repeat() { + cast := &ast.CastExpression{Child: expr, CastType: tc.transformType(c.child(1))} + cast.SetSpan(c.span()) + expr = cast + } } - if negated { - result = notExpr(wholeSp, result) + if hasOp { + _, negated := opNode.child(0).opt() + _, alt := opNode.child(1).sole().choice() + switch alt.name() { + case "BetweenClause": + // 'BETWEEN' Asymmetric? OtherOperatorExpression 'AND' OtherOperatorExpression + lower := tc.transformOtherOperator(alt.child(2)) + upper := tc.transformOtherOperator(alt.child(4)) + b := &ast.BetweenExpression{Input: expr, Lower: lower, Upper: upper} + b.SetSpan(alt.span()) + expr = b + if negated { + expr = notExpr(invalidSpan, expr) + } + case "LikeClause": + _, variation := alt.child(0).sole().choice() + // like handles its own negation + expr = tc.transformLikeClause(expr, alt, negated, invalidSpan) + if negated && strings.HasPrefix(variation.name(), "Not") { + // TransformBetweenLikeOp: the variation's function is + // already negated ("!~~", "!~~*", "!regexp_matches") + raise("NOT cannot precede an operator that is already negated (!~~, !~~*, !~ or !~*)") + } + default: + shapeError(alt, "unknown BetweenLikeOpExpression") + } } - return result + if expr.Pos() < 0 { + setSpan(expr, whole) + } + return expr } // InClause <- 'IN' InExpression: the result's location is the IN target @@ -328,80 +534,79 @@ func (tc *transformContext) transformInClause(input ast.Expr, n tnode) ast.Expr return nil } -// likeFunc maps the like-variation rule (plus negation) to the function -// upstream emits: (name, is_operator, wrapInNot). -func likeFunc(variation string, negated bool) (string, bool, bool) { - switch variation { - case "LikeToken": - if negated { - return "!~~", true, false - } - return "~~", true, false - case "ILikeToken": - if negated { - return "!~~*", true, false - } - return "~~*", true, false - case "GlobToken": - return "~~~", true, negated - case "SimilarToToken": - return "regexp_full_match", false, negated - case "RegexMatchToken": - return "regexp_matches", false, negated - case "RegexInsensitiveMatchToken": - return "regexp_matches", false, negated // + 'i' flag argument - case "NotLikeOp": - return "!~~", true, negated - case "NotILikeOp": - return "!~~*", true, negated - case "NotRegexInsensitiveMatchOp": - return "regexp_matches", false, !negated // + 'i' flag - case "NotSimilarToOp": - // '!~' is the negated regex match operator - return "regexp_matches", false, !negated - } - return "", false, false +// likeVariationNames maps the LikeVariations rules to the function name +// upstream's transformers return for them (TransformLikeToken & co., +// with the default regexp_matches semantics). +var likeVariationNames = map[string]string{ + "LikeToken": "~~", + "ILikeToken": "~~*", + "GlobToken": "~~~", + "SimilarToToken": "regexp_full_match", + "RegexMatchToken": "regexp_matches", + "RegexInsensitiveMatchToken": "regexp_matches__case_insensitive", + "NotLikeOp": "!~~", + "NotILikeOp": "!~~*", + "NotRegexInsensitiveMatchOp": "!regexp_matches__case_insensitive", + "NotSimilarToOp": "!regexp_matches", } // LikeClause <- LikeVariations OtherOperatorExpression EscapeClause? -// The function's location is the like clause itself; a NOT wrapper covers -// the whole expression (wholeSp). +// Port of TransformLikeClause plus the function branch of +// ApplyBetweenInLikeOperator: ESCAPE turns ~~/~~* into +// like_escape/ilike_escape (other variations keep their name and take +// the escape as a third argument); a negated regex spelling becomes NOT +// around the positive function; NOT before ~~/~~* negates the operator +// itself, any other NOT wraps the function. The function's location is +// the like clause itself; a NOT wrapper takes wholeSp. func (tc *transformContext) transformLikeClause(input ast.Expr, n tnode, negated bool, wholeSp ast.Span) ast.Expr { sp := n.span() _, variation := n.child(0).sole().choice() - pattern := tc.transformOtherOperator(n.child(1)) - name, isOp, wrapNot := likeFunc(variation.name(), negated) - if name == "" { + name, ok := likeVariationNames[variation.name()] + if !ok { shapeError(variation, "unknown like variation") } + pattern := tc.transformOtherOperator(n.child(1)) + caseInsensitive := strings.HasSuffix(name, "__case_insensitive") + name = strings.TrimSuffix(name, "__case_insensitive") + bare := strings.TrimPrefix(name, "!") + isRegex := bare == "regexp_matches" || bare == "regexp_full_match" args := []ast.Expr{input, pattern} - insensitiveRegex := variation.name() == "RegexInsensitiveMatchToken" || variation.name() == "NotRegexInsensitiveMatchOp" - if insensitiveRegex { - args = append(args, constExpr(invalidSpan, varcharValue("i"))) - } if escNode, ok := n.child(2).opt(); ok { - // EscapeClause <- 'ESCAPE' ComparisonExpression; negation stays a - // NOT wrapper around the positive escape function - esc := tc.transformComparison(escNode.child(1)) + // EscapeClause <- 'ESCAPE' OtherOperatorExpression + esc := tc.transformOtherOperator(escNode.child(1)) + if caseInsensitive { + raise("ESCAPE clause is not supported with case-insensitive regular expression match operators") + } switch name { case "~~": - name, isOp = "like_escape", true - case "!~~": - name, isOp, wrapNot = "like_escape", true, !wrapNot + name = "like_escape" case "~~*": - name, isOp = "ilike_escape", true - case "!~~*": - name, isOp, wrapNot = "ilike_escape", true, !wrapNot - default: - raise("ESCAPE is only supported for LIKE/ILIKE") + name = "ilike_escape" } args = append(args, esc) } + if caseInsensitive { + args = append(args, stringConst(invalidSpan, "i")) + } + // TryRemoveRegexOperatorNegation / TryNegateLikeFunction + regexNegated := isRegex && strings.HasPrefix(name, "!") + if regexNegated { + name = bare + } + wrapNot := regexNegated != negated + if negated && !regexNegated { + switch name { + case "~~": + name, wrapNot = "!~~", false + case "~~*": + name, wrapNot = "!~~*", false + } + } var result ast.Expr - if isOp { - result = opCall(sp, name, args...) - } else { + if isRegex { result = fnCall(sp, name, args...) + } else { + result = opCall(sp, name, args...) } if wrapNot { result = notExpr(wholeSp, result) @@ -440,33 +645,86 @@ func comparisonFromOpText(op string) (ast.ExpressionType, bool) { return "", false } -// OtherOperatorExpression <- BitwiseExpression OtherOperatorTail* +// OtherOperatorExpression <- InfixOtherOperatorExpression / CustomPrefixExpression func (tc *transformContext) transformOtherOperator(n tnode) ast.Expr { + _, alt := n.sole().choice() + switch alt.name() { + case "InfixOtherOperatorExpression": + return tc.transformInfixOtherOperator(alt) + case "CustomPrefixExpression": + // CustomPrefixExpression <- OperatorLiteral OtherOperatorExpression + operand := tc.transformOtherOperator(alt.child(1)) + return operatorFunction(alt.span(), keywordOfOp(alt.child(0)), operand) + } + shapeError(alt, "unknown OtherOperatorExpression alternative") + return nil +} + +// InfixOtherOperatorExpression <- BitwiseExpression OtherOperatorTail* +func (tc *transformContext) transformInfixOtherOperator(n tnode) ast.Expr { expr := tc.transformBitwise(n.child(0)) tails := n.child(1).repeat() + folds := make([]func(ast.Expr, int, bool) ast.Expr, len(tails)) for i, tail := range tails { - _, opAlt := tail.child(0).sole().choice() - rhsNode := tail.child(1) - outermost := i == len(tails)-1 - switch opAlt.name() { - case "AnyAllParsedOperator": - expr = tc.transformAnyAll(expr, opAlt.sole(), rhsNode, n.span().Start) - case "NamedOtherOperator": - expr = tc.transformNamedOperator(expr, opAlt.sole(), rhsNode, n.span().Start, outermost) - default: - shapeError(opAlt, "unknown other-operator") - } + folds[i] = tc.otherOperatorTail(tail) + } + for i, fold := range folds { + expr = fold(expr, n.span().Start, i == len(tails)-1) } return expr } -// AnyAllOperator <- AnyOp AnyOrAll -func (tc *transformContext) transformAnyAll(input ast.Expr, n tnode, rhsNode tnode, exprStart int) ast.Expr { +// otherOperatorTail transforms OtherOperatorTail <- OtherOperator +// BitwiseExpression and returns the fold applying it to a left operand. +// exprStart < 0 means the fold's result gets no location of its own. +func (tc *transformContext) otherOperatorTail(tail tnode) func(ast.Expr, int, bool) ast.Expr { + _, opAlt := tail.child(0).sole().choice() + rhsNode := tail.child(1) + rhs := tc.transformBitwise(rhsNode) + end := rhsNode.span().End + span := func(exprStart int, outermost bool) ast.Span { + if exprStart < 0 || !outermost { + return invalidSpan + } + return ast.Span{Start: exprStart, End: end} + } + switch opAlt.name() { + case "AnyAllParsedOperator": + return func(input ast.Expr, exprStart int, outermost bool) ast.Expr { + whole := ast.Span{Start: exprStart, End: end} + if exprStart < 0 { + whole = invalidSpan + } + return tc.transformAnyAll(input, opAlt.sole(), rhs, whole) + } + case "NamedOtherOperator": + return func(input ast.Expr, exprStart int, outermost bool) ast.Expr { + return tc.transformNamedOperator(input, opAlt.sole(), rhs, span(exprStart, outermost)) + } + } + shapeError(opAlt, "unknown other-operator") + return nil +} + +// operatorFunction ports TransformOperatorFunction: an operator call, +// "schema.op" splitting into a schema-qualified call. +func operatorFunction(sp ast.Span, name string, args ...ast.Expr) *ast.FunctionExpression { + parts := strings.Split(name, ".") + if len(parts) > 2 { + raise("Too many identifiers found, expected schema.operator or operator") + } + f := opCall(sp, parts[len(parts)-1], args...) + if len(parts) == 2 { + f.Schema = parts[0] + } + return f +} + +// AnyAllOperator <- AnyOperatorLiteral AnyOrAll +func (tc *transformContext) transformAnyAll(input ast.Expr, n tnode, rhs ast.Expr, whole ast.Span) ast.Expr { opText := keywordOfOp(n.child(0)) _, anyOrAll := n.child(1).sole().choice() isAll := anyOrAll.name() == "SubqueryAll" - rhs := tc.transformBitwise(rhsNode) - whole := ast.Span{Start: exprStart, End: rhsNode.span().End} cmp, ok := comparisonFromOpText(opText) if !ok { if sub, isSub := rhs.(*ast.SubqueryExpression); isSub && sub.SubqueryType == ast.SubqueryScalar { @@ -584,17 +842,11 @@ func regexAnyAll(input, list ast.Expr, opText string, isAll bool, whole ast.Span return out } -// NamedOtherOperator <- QualifiedOperator / InetOperator / JsonOperator / -// ListOperator / StringOperator / OperatorLiteral +// NamedOtherOperator <- QualifiedOperator / OperatorLiteral // Only the outermost fold of a chain carries a location, like the binary // ladder levels. -func (tc *transformContext) transformNamedOperator(input ast.Expr, n tnode, rhsNode tnode, exprStart int, outermost bool) ast.Expr { +func (tc *transformContext) transformNamedOperator(input ast.Expr, n tnode, rhs ast.Expr, sp ast.Span) ast.Expr { _, alt := n.choice() - rhs := tc.transformBitwise(rhsNode) - sp := invalidSpan - if outermost { - sp = ast.Span{Start: exprStart, End: rhsNode.span().End} - } if alt.name() == "QualifiedOperator" { // OPERATOR(schema.op) is always a function call — comparison // spellings included — with the qualifier as its schema @@ -603,18 +855,12 @@ func (tc *transformContext) transformNamedOperator(input ast.Expr, n tnode, rhsN f.Schema = schema return f } - var opText string - switch alt.name() { - case "InetOperator", "JsonOperator", "ListOperator", "StringOperator": - opText = keywordOfOp(alt.sole()) - default: - // OperatorLiteral: a free operator token - op, ok := alt.r.(*matcher.OperatorResult) - if !ok { - shapeError(alt, "want operator literal, got %T", alt.r) - } - opText = op.Operator + // OperatorLiteral: a free operator token + op, ok := alt.r.(*matcher.OperatorResult) + if !ok { + shapeError(alt, "want operator literal, got %T", alt.r) } + opText := op.Operator if cmp, isCmp := comparisonFromOpText(opText); isCmp { c := &ast.ComparisonExpression{Type: cmp, Left: input, Right: rhs} c.SetSpan(sp) @@ -680,6 +926,9 @@ func keywordOfOp(n tnode) string { switch r := n.r.(type) { case *matcher.KeywordResult: return r.Keyword + case *matcher.OperatorResult: + // OperatorLiteral / AnyOperatorLiteral + return r.Operator case *matcher.ListResult: if len(r.Children) == 1 { return keywordOfOp(tnode{r.Children[0]}) @@ -691,8 +940,27 @@ func keywordOfOp(n tnode) string { return "" } +// BitwiseExpression <- TildeExpression BitwiseExpressionTail* func (tc *transformContext) transformBitwise(n tnode) ast.Expr { - return tc.binaryLadder(n, tc.transformAdditive, false) + return tc.binaryLadder(n, tc.transformTilde, false) +} + +// TildeExpression <- TildePrefixOperator* AdditiveExpression +// Port of TransformTildeExpression: bitwise NOT binds looser than +// arithmetic (~a + b is ~(a + b)); only the outermost operator carries +// a location, the whole expression's. +func (tc *transformContext) transformTilde(n tnode) ast.Expr { + expr := tc.transformAdditive(n.child(1)) + ops := n.child(0).repeat() + stackCheck(len(ops)) + for i := len(ops) - 1; i >= 0; i-- { + sp := invalidSpan + if i == 0 { + sp = n.span() + } + expr = operatorFunction(sp, "~", expr) + } + return expr } func (tc *transformContext) transformAdditive(n tnode) ast.Expr { @@ -820,15 +1088,15 @@ func (tc *transformContext) transformPrefix(n tnode) ast.Expr { } switch alt.name() { case "MinusPrefixOperator": - if folded, ok := negateConstant(expr, alt.span().Start, end, i == 0); ok { - expr = folded + // fold the sign into the number text so + // -9223372036854775808 stays exact (Literal::Negate) + if c, ok := expr.(*ast.ConstantExpression); ok && c.Literal.IsNumeric() { + expr = literalExpr(sp, c.Literal.Negate()) continue } expr = opCall(sp, "-", expr) case "PlusPrefixOperator": expr = opCall(sp, "+", expr) - case "TildePrefixOperator": - expr = opCall(sp, "~", expr) case "QualifiedOperator": // the prefix form folds qualifiers into the name itself: // OPERATOR(main.-) x calls "main.-", mirroring upstream @@ -845,57 +1113,6 @@ func (tc *transformContext) transformPrefix(n tnode) ast.Expr { return expr } -// negateConstant folds `-literal` into a negative constant, mirroring -// upstream's constant folding for numeric literals; the folded constant's -// location grows to include the minus sign. -func negateConstant(e ast.Expr, opStart, end int, outermost bool) (ast.Expr, bool) { - c, ok := e.(*ast.ConstantExpression) - if !ok { - return nil, false - } - v := c.Value - switch v.Kind { - case ast.ValueInt64: - v.Int64 = -v.Int64 - case ast.ValueDouble: - v.Float64 = -v.Float64 - case ast.ValueHugeint: - v.Hugeint = negateHugeint(v.Hugeint) - if v.Type.ID == "UHUGEINT" { - // -(2^127) is representable as HUGEINT; larger magnitudes - // stay unfolded - if uint64(v.Hugeint.Upper) < 1<<63 && !(v.Hugeint.Upper == 0 && v.Hugeint.Lower == 0) { - return nil, false - } - v.Type = ast.LogicalType{ID: "HUGEINT"} - } - // a negated HUGEINT that now fits an int64 demotes (the INT64_MIN - // literal is only representable negated) — but only when this - // minus is the outermost prefix operator - if outermost && v.Hugeint.Upper == -1 && v.Hugeint.Lower >= 1<<63 { - v.Kind = ast.ValueInt64 - v.Int64 = int64(v.Hugeint.Lower) - v.Hugeint = ast.Hugeint{} - } - default: - return nil, false - } - // negating can shrink or widen the integer class (e.g. the INT32_MIN - // literal is only representable negated); DECIMAL keeps its type - if v.Kind == ast.ValueInt64 && v.Type.ID != "DECIMAL" { - v.Type = ast.LogicalType{ID: integerTypeFor(v.Int64)} - } - out := &ast.ConstantExpression{Value: v} - if outermost { - // the folded constant spans the operator through the operand - // (parentheses included) - out.SetSpan(ast.Span{Start: opStart, End: end}) - } else { - out.SetSpan(invalidSpan) - } - return out, true -} - func negateHugeint(h ast.Hugeint) ast.Hugeint { // two's complement negation of the 128-bit value upper := ^h.Upper @@ -998,23 +1215,39 @@ func (tc *transformContext) transformDot(base ast.Expr, n tnode, baseStart int, } f.SetSpan(method.span()) f.Arguments = append([]ast.FunctionArgument{{Expr: base}}, f.Arguments...) + // a method-chained call names a function too, so it takes the + // same rewrites (TransformBaseExpression); the rewritten node has + // no location unless it is the base expression's result + sp := invalidSpan + if last { + sp = ast.Span{Start: baseStart, End: alt.span().End} + } + if out := parserFunctionRewrite(sp, f.FunctionName, f.Arguments, true); out != nil { + upper := strings.ToUpper(f.FunctionName) + if f.Distinct { + raise("DISTINCT is not supported in %s expressions", upper) + } + if len(f.OrderBys) > 0 { + raise("ORDER BY is not supported in %s expressions", upper) + } + return out, false + } return f, false } shapeError(alt, "unknown dot operator") return nil, false } -// emptyListValue is the sentinel constant upstream uses for omitted slice -// bounds: an empty LIST(INTEGER). -func emptyListValue(sp ast.Span) *ast.ConstantExpression { - return constExpr(sp, ast.Value{ - Type: ast.LogicalType{ID: "LIST", Child: &ast.LogicalType{ID: "INTEGER"}}, - Kind: ast.ValueEmptyList, - }) +// emptySliceBound ports OperatorExpression::EmptySliceBound: an omitted +// slice bound is the call list_value() (v2.0; formerly an empty +// INTEGER[] constant). +func emptySliceBound(sp ast.Span) *ast.FunctionExpression { + return fnCall(sp, "list_value") } // SliceExpression <- '[' SliceBound ']' -// SliceBound <- Expression? EndSliceBound? StepSliceBound? +// SliceBound <- Expression? SliceUpperBound? +// SliceUpperBound <- MinusStepSliceBound / EndStepSliceBound func (tc *transformContext) transformSlice(base ast.Expr, n tnode) ast.Expr { bound := n.child(1) // the slice operator's location is the bracketed subscript itself @@ -1023,41 +1256,41 @@ func (tc *transformContext) transformSlice(base ast.Expr, n tnode) ast.Expr { if s, ok := bound.child(0).opt(); ok { start = tc.transformExpression(s) } - endBound, hasEnd := bound.child(1).opt() - if !hasEnd { + upper, hasUpper := bound.child(1).opt() + if !hasUpper { if start == nil { raise("Empty subscript '[]' is not allowed") } return opExpr(sp, ast.ArrayExtract, base, start) } - // an omitted start bound has no location; an omitted end bound sits - // on the ':' - colon := endBound.child(0).span() - sentinelSpan := ast.Span{Start: colon.Start, End: colon.Start + 1} + // an omitted start bound has no location if start == nil { - start = emptyListValue(invalidSpan) - } - // EndSliceBound <- ':' EndSliceValue? - var end ast.Expr - if ev, ok := endBound.child(1).opt(); ok { - _, alt := ev.sole().choice() - if alt.name() == "EndSliceMinus" { - // explicit '-': open end, sentinel located on the '-' - minus := alt.sole().span() - end = emptyListValue(ast.Span{Start: minus.Start, End: minus.Start + 1}) - } else { - end = tc.transformExpression(alt) - } + start = emptySliceBound(invalidSpan) } - if end == nil { - end = emptyListValue(sentinelSpan) - } - children := []ast.Expr{base, start, end} - if stepBound, ok := bound.child(2).opt(); ok { - // StepSliceBound <- ':' Expression? - if sv, ok := stepBound.child(1).opt(); ok { - children = append(children, tc.transformExpression(sv)) + children := []ast.Expr{base, start} + _, alt := upper.sole().choice() + switch alt.name() { + case "MinusStepSliceBound": + // ':' '-' StepSliceBound: an explicit open end, location-free + children = append(children, emptySliceBound(invalidSpan), tc.sliceBoundValue(alt.child(2))) + case "EndStepSliceBound": + // EndSliceBound StepSliceBound? + children = append(children, tc.sliceBoundValue(alt.child(0))) + if step, ok := alt.child(1).opt(); ok { + children = append(children, tc.sliceBoundValue(step)) } + default: + shapeError(alt, "unknown SliceUpperBound") } return opExpr(sp, ast.ArraySlice, children...) } + +// sliceBoundValue transforms EndSliceBound / StepSliceBound <- ':' +// Expression?: an omitted expression is the empty slice bound, located +// on the ':'. +func (tc *transformContext) sliceBoundValue(n tnode) ast.Expr { + if e, ok := n.child(1).opt(); ok { + return tc.transformExpression(e) + } + return emptySliceBound(n.span()) +} diff --git a/parser/transform_func.go b/parser/transform_func.go index 6022845..e3b8d26 100644 --- a/parser/transform_func.go +++ b/parser/transform_func.go @@ -14,7 +14,6 @@ import ( // typeCastFunctions maps type-named single-argument calls to the // resolved logical type they cast to. var typeCastFunctions = map[string]string{ - "date": "DATE", "time": "TIME", "timestamp": "TIMESTAMP", "interval": "INTERVAL", @@ -52,37 +51,24 @@ type functionParts struct { // FunctionExpression <- FunctionIdentifier FunctionExpressionArguments // WithinGroupClause? FilterClause? ExportClause? OverClause? func (tc *transformContext) transformFunction(n tnode) ast.Expr { - catalog, schema, name := tc.transformFunctionIdentifier(n.child(0)) + qn, rawName := tc.transformFunctionIdentifier(n.child(0)) + catalog, schema, name := qn.catalog, qn.schema, strings.ToLower(rawName) parts := tc.transformFunctionArgumentList(n.child(1).sole().parens()) - starCallRewrite(&parts) - if wg, ok := n.child(2).opt(); ok { - // WITHIN GROUP (ORDER BY ...): the ordering replaces the - // function's ORDER BY, and only the ordered-set aggregates are - // accepted (renamed to their quantile implementations) - orderBy := wg.child(2).parens() - parts.orderBys = tc.transformOrderByClause(orderBy) + wg, hasWithinGroup := n.child(2).opt() + if hasWithinGroup { + // WITHIN GROUP (ORDER BY ...) replaces the function's ORDER BY + if parts.distinct { + raise("DISTINCT is not allowed in combination with WITHIN GROUP") + } + if len(parts.orderBys) > 0 { + raise("Cannot use multiple ORDER BY statements with WITHIN GROUP") + } + parts.orderBys = tc.transformOrderByClause(wg.child(2).parens()) if len(parts.orderBys) != 1 { raise("Cannot use multiple ORDER BY clauses with WITHIN GROUP") } - switch name { - case "percentile_cont": - if len(parts.args) != 1 { - raise("Wrong number of arguments for PERCENTILE_CONT") - } - name = "quantile_cont" - case "percentile_disc": - if len(parts.args) != 1 { - raise("Wrong number of arguments for PERCENTILE_DISC") - } - name = "quantile_disc" - case "mode": - if len(parts.args) != 0 { - raise("Wrong number of arguments for MODE") - } - default: - raise("Unknown ordered aggregate \"%s\".", name) - } } + starCallRewrite(&parts) var filter ast.Expr if fc, ok := n.child(3).opt(); ok { // FilterClause <- 'FILTER' Parens('WHERE'? Expression) @@ -95,83 +81,176 @@ func (tc *transformContext) transformFunction(n tnode) ast.Expr { if exportState { raise("EXPORT_STATE is not supported for window functions!") } - return tc.transformOver(over, catalog, schema, name, parts, filter, n.span()) - } - if parts.hasNullsOpt { - raise("RESPECT/IGNORE NULLS is not supported for non-window functions") + return tc.transformOver(over, qn, name, parts, filter, n.span()) } // zero-argument count() is count_star(), for non-window calls only - if name == "count" && len(parts.args) == 0 && schema == "" && catalog == "" { + if name == "count" && len(parts.args) == 0 { name = "count_star" } - // single-argument calls named after a type are casts (DATE('...')) + if out := parserFunctionRewrite(n.span(), name, parts.args, false); out != nil { + return out + } + // single-argument calls named after a type are casts (TIME('...')) if id, isType := typeCastFunctions[name]; isType && schema == "" && catalog == "" && len(parts.args) == 1 && parts.args[0].Name == "" && !parts.distinct && filter == nil { cast := &ast.CastExpression{Child: parts.args[0].Expr, ResolvedType: id} cast.SetSpan(n.span()) return cast } - if (name == "if" || name == "ifnull") && schema == "" && catalog == "" && - !parts.distinct && filter == nil && len(parts.orderBys) == 0 { - if name == "if" && len(parts.args) == 3 { - c := &ast.CaseExpression{ - CaseChecks: []ast.CaseCheck{{When: parts.args[0].Expr, Then: parts.args[1].Expr}}, - ElseExpr: parts.args[2].Expr, - } - c.SetSpan(n.span()) - return c - } - if name == "ifnull" && len(parts.args) == 2 { - return opExpr(n.span(), ast.OperatorCoalesce, parts.args[0].Expr, parts.args[1].Expr) - } + if parts.hasNullsOpt { + raise("RESPECT/IGNORE NULLS is not supported for non-window functions") } - if name == "construct_array" && schema == "" && catalog == "" && !parts.distinct && filter == nil { - // construct_array(...) is the ARRAY[...] operator - var children []ast.Expr - for _, a := range parts.args { - children = append(children, a.Expr) + if hasWithinGroup { + // only the ordered-set aggregates are accepted (renamed to their + // quantile implementations) + switch name { + case "percentile_cont": + if len(parts.args) != 1 { + raise("Wrong number of arguments for PERCENTILE_CONT") + } + name = "quantile_cont" + case "percentile_disc": + if len(parts.args) != 1 { + raise("Wrong number of arguments for PERCENTILE_DISC") + } + name = "quantile_disc" + case "mode": + if len(parts.args) != 0 { + raise("Wrong number of arguments for MODE") + } + default: + raise("Unknown ordered aggregate %s.", quoteIdent(rawName)) } - return opExpr(n.span(), ast.ArrayConstructor, children...) } f := &ast.FunctionExpression{ - Catalog: catalog, - Schema: schema, - FunctionName: name, - Arguments: parts.args, - Distinct: parts.distinct, - ExportState: exportState, - Filter: filter, - OrderBys: parts.orderBys, + Catalog: catalog, + Schema: schema, + Qualification: qn.path, + FunctionName: name, + Arguments: parts.args, + Distinct: parts.distinct, + ExportState: exportState, + Filter: filter, + OrderBys: parts.orderBys, } f.SetSpan(n.span()) return f } +// quoteIdent renders an identifier the way upstream formats an Identifier +// into an exception message (SQLQuotedIdentifier: always double-quoted, +// embedded quotes doubled). +func quoteIdent(s string) string { + return `"` + strings.ReplaceAll(s, `"`, `""`) + `"` +} + +// parserFunctionRewrite ports TransformParserFunctionRewrite: the names +// the parser turns into a syntax node instead of a catalog function call. +// Both the plain call and the method chain (x.f(y)) go through it; +// COALESCE has a grammar rule of its own, so only the method chain +// rewrites it. It returns nil for an ordinary function. +func parserFunctionRewrite(sp ast.Span, name string, args []ast.FunctionArgument, methodChain bool) ast.Expr { + rejectNamed := func(context string) { + for _, a := range args { + if a.Name != "" { + raise("Named arguments are not supported in %s", context) + } + } + } + children := func() []ast.Expr { + out := make([]ast.Expr, len(args)) + for i, a := range args { + out[i] = a.Expr + } + return out + } + switch name { + case "unpack": + if len(args) != 1 { + raise("Wrong number of arguments to the UNPACK operator") + } + rejectNamed("UNPACK operator") + return opExpr(sp, ast.OperatorUnpack, children()...) + case "try": + if len(args) != 1 { + raise("Wrong number of arguments provided to TRY expression") + } + rejectNamed("TRY expression") + return opExpr(sp, ast.OperatorTry, children()...) + case "construct_array": + rejectNamed("array constructors") + return opExpr(sp, ast.ArrayConstructor, children()...) + case "ifnull": + if len(args) != 2 { + raise("Wrong number of arguments to IFNULL.") + } + rejectNamed("IFNULL expressions") + return opExpr(sp, ast.OperatorCoalesce, children()...) + case "coalesce": + if !methodChain { + return nil + } + rejectNamed("COALESCE expressions") + return opExpr(sp, ast.OperatorCoalesce, children()...) + case "date": + if len(args) != 1 { + raise("Wrong number of arguments provided to DATE function") + } + cast := &ast.CastExpression{Child: args[0].Expr, ResolvedType: "DATE"} + cast.SetSpan(sp) + return cast + } + return nil +} + +// qualifiedName is a parsed function/type/table qualification: catalog +// and schema per QualifiedName::Catalog()/Schema(), and the full +// qualification path when it is deeper than catalog.schema. +type qualifiedName struct { + catalog, schema string + path []string // set only for nested (> 2 component) qualifications +} + +// newQualifiedName ports the QualifiedName(vector +// qualification, name) constructor's accessors: with one qualifier it is +// the schema; with two or more the first is the catalog and the last the +// schema. +func newQualifiedName(quals []string) qualifiedName { + switch len(quals) { + case 0: + return qualifiedName{} + case 1: + return qualifiedName{schema: quals[0]} + case 2: + return qualifiedName{catalog: quals[0], schema: quals[1]} + } + return qualifiedName{catalog: quals[0], schema: quals[len(quals)-1], path: append([]string{}, quals...)} +} + // FunctionIdentifier <- CatalogReservedSchemaFunctionName / // SchemaReservedFunctionName / FunctionNameAsQualifiedName -func (tc *transformContext) transformFunctionIdentifier(n tnode) (catalog, schema, name string) { +// The name is returned as written (callers lowercase it). +func (tc *transformContext) transformFunctionIdentifier(n tnode) (qualifiedName, string) { _, alt := n.sole().choice() + var quals []string + var name string switch alt.name() { case "CatalogReservedSchemaFunctionName": - // CatalogQualification ReservedSchemaQualification? ReservedFunctionName - catalog = identifierText(alt.child(0).child(0)) - if sq, ok := alt.child(1).opt(); ok { - schema = identifierText(sq.child(0)) + // CatalogQualification ReservedSchemaQualification* ReservedFunctionName + quals = append(quals, identifierText(alt.child(0).child(0))) + for _, sq := range alt.child(1).repeat() { + quals = append(quals, identifierText(sq.child(0))) } name = identifierText(alt.child(2)) case "SchemaReservedFunctionName": - schema = identifierText(alt.child(0).child(0)) + quals = append(quals, identifierText(alt.child(0).child(0))) name = identifierText(alt.child(1)) case "FunctionNameAsQualifiedName": name = identifierText(alt.sole()) default: shapeError(alt, "unknown function identifier") } - // a catalog with no schema is really a schema qualification - if catalog != "" && schema == "" { - catalog, schema = "", catalog - } - return catalog, schema, strings.ToLower(name) + return newQualifiedName(quals), name } // transformFunctionArgumentList handles FunctionExpressionArgumentList @@ -179,13 +258,22 @@ func (tc *transformContext) transformFunctionIdentifier(n tnode) (catalog, schem // DistinctOrAll? FunctionArgumentList? OrderByClause? IgnoreOrRespectNulls? func (tc *transformContext) transformFunctionArgumentList(n tnode) functionParts { var parts functionParts + list, hasArgs := n.child(1).opt() + if hasArgs { + for _, argNode := range list.sole().listElems() { + parts.args = append(parts.args, tc.transformFunctionArgument(argNode)) + } + } if da, ok := n.child(0).opt(); ok { _, kind := da.sole().choice() parts.distinct = kind.name() == "DistinctKeyword" - } - if list, ok := n.child(1).opt(); ok { - for _, argNode := range list.sole().listElems() { - parts.args = append(parts.args, tc.transformFunctionArgument(argNode)) + if !hasArgs && n.name() == "FunctionExpressionArgumentList" { + // TransformFunctionExpressionArgumentList: f(DISTINCT) / f(ALL) + // (the method-call list has no such check) + if parts.distinct { + raise("DISTINCT requires at least one argument") + } + raise("ALL requires at least one argument") } } if ob, ok := n.child(2).opt(); ok { @@ -200,25 +288,38 @@ func (tc *transformContext) transformFunctionArgumentList(n tnode) functionParts } // starCallRewrite ports upstream's bare-star call handling: a single -// unmodified `*` argument of a non-DISTINCT call is dropped. +// unmodified, unqualified `*` argument of a non-DISTINCT call without +// ORDER BY is dropped (COUNT(*) is COUNT(); COUNT(t.*) is not). func starCallRewrite(parts *functionParts) { - if parts.distinct || len(parts.args) != 1 || parts.args[0].Name != "" { + if parts.distinct || len(parts.orderBys) > 0 || len(parts.args) != 1 || parts.args[0].Name != "" { return } star, ok := parts.args[0].Expr.(*ast.StarExpression) - if !ok || star.Columns || star.RelationName != "" || star.Expr != nil || - len(star.ExcludeList) != 0 || len(star.QualifiedExcludeList) != 0 || - len(star.ReplaceList) != 0 || len(star.RenameList) != 0 { + if !ok || !isEmptyStar(star) { return } parts.args = nil } +// isEmptyStar ports ExpressionIsUnqualifiedStar: a bare `*` — no +// relation, no COLUMNS, no EXCLUDE/REPLACE/RENAME. +func isEmptyStar(star *ast.StarExpression) bool { + return !star.Columns && star.RelationName == "" && star.Expr == nil && + len(star.ExcludeList) == 0 && len(star.QualifiedExcludeList) == 0 && + len(star.ReplaceList) == 0 && len(star.RenameList) == 0 +} + // transformFunctionArgumentsInto is the method-call variant used by // `expr.f(...)`: it builds a bare FunctionExpression from an argument // list node. func (tc *transformContext) transformFunctionArgumentsInto(argList tnode, name string) *ast.FunctionExpression { parts := tc.transformFunctionArgumentList(argList) + if len(parts.args) == 1 && parts.args[0].Name == "" { + // TransformMethodExpression: x.count(*) is x.count() + if star, ok := parts.args[0].Expr.(*ast.StarExpression); ok && isEmptyStar(star) { + parts.args = nil + } + } if parts.hasNullsOpt { raise("RESPECT/IGNORE NULLS is not supported for non-window functions") } @@ -235,10 +336,9 @@ func (tc *transformContext) transformFunctionArgument(n tnode) ast.FunctionArgum _, alt := n.sole().choice() switch alt.name() { case "NamedFunctionArgument": - // NamedParameter <- TypeFuncName Type? NamedParameterAssignment Expression - np := alt.sole() - name := identifierText(np.child(0)) - expr := tc.transformExpression(np.child(3)) + // NamedFunctionArgument <- TypeFuncName NamedParameterAssignment Expression + name := identifierText(alt.child(0)) + expr := tc.transformExpression(alt.child(2)) // upstream also stamps the argument name as the expression alias expr.SetAlias(name) return ast.FunctionArgument{Name: name, Expr: expr} @@ -253,13 +353,15 @@ func (tc *transformContext) transformFunctionArgument(n tnode) ast.FunctionArgum // transformOver builds the WindowExpression for a call with an OVER // clause. -func (tc *transformContext) transformOver(n tnode, catalog, schema, name string, parts functionParts, filter ast.Expr, sp ast.Span) ast.Expr { +func (tc *transformContext) transformOver(n tnode, qn qualifiedName, name string, parts functionParts, filter ast.Expr, sp ast.Span) ast.Expr { if tc.inWindowDefinition { raise("window functions are not allowed in window definitions") } + catalog, schema := qn.catalog, qn.schema w := &ast.WindowExpression{ Catalog: catalog, Schema: schema, + Qualification: qn.path, FunctionName: name, Arguments: parts.args, Distinct: parts.distinct, @@ -309,7 +411,7 @@ func (tc *transformContext) transformOver(n tnode, catalog, schema, name string, func (tc *transformContext) applyNamedWindow(w *ast.WindowExpression, name string) { base := tc.namedWindow(name) if base == nil { - raise("window \"%s\" does not exist", name) + raise("window %s does not exist", quoteIdent(name)) } copyWindowSpec(w, base) } @@ -421,6 +523,10 @@ func (tc *transformContext) transformFrameClause(w *ast.WindowExpression, n tnod switch extent.name() { case "SingleFrameExtent": start, startExpr := tc.transformFrameBound(extent.sole(), kind, true) + if frameBoundKind(start) == "EXPR_FOLLOWING" { + // TransformSingleFrameExtent + raise("Frame starting from following row cannot end with current row") + } w.FrameStart, w.StartExpr = start, startExpr switch kind { case "ROWS": @@ -438,6 +544,14 @@ func (tc *transformContext) transformFrameClause(w *ast.WindowExpression, n tnod default: shapeError(extent, "unknown frame extent") } + // TransformFrameClause rejects frames that run backwards + startKind, endKind := frameBoundKind(w.FrameStart), frameBoundKind(w.FrameEnd) + if startKind == "CURRENT_ROW" && endKind == "EXPR_PRECEDING" { + raise("Frame starting from current row cannot have preceding rows") + } + if startKind == "EXPR_FOLLOWING" && (endKind == "CURRENT_ROW" || endKind == "EXPR_PRECEDING") { + raise("Frame starting from following row cannot have preceding rows") + } // upstream validates the start bound before the end bound if w.FrameStart == ast.WindowUnboundedFollowing { raise("Frame start cannot be UNBOUNDED FOLLOWING") @@ -489,6 +603,19 @@ func (tc *transformContext) transformFrameBound(n tnode, kind string, isStart bo return "", nil } +// frameBoundKind strips the framing suffix from a boundary +// (EXPR_PRECEDING_ROWS -> EXPR_PRECEDING): upstream checks frame +// direction on the RANGE spelling before converting to the framing. +func frameBoundKind(b ast.WindowBoundary) string { + s := string(b) + for _, suffix := range []string{"_ROWS", "_RANGE", "_GROUPS"} { + if strings.HasSuffix(s, suffix) { + return strings.TrimSuffix(s, suffix) + } + } + return s +} + func preceding(n tnode) bool { _, alt := n.sole().choice() return alt.name() == "PrecedingFrame" diff --git a/parser/transform_misc.go b/parser/transform_misc.go index a92ed6b..3da4cc4 100644 --- a/parser/transform_misc.go +++ b/parser/transform_misc.go @@ -22,7 +22,6 @@ import ( "strings" "github.com/sqlc-dev/darkwing/ast" - "github.com/sqlc-dev/darkwing/token" ) func init() { @@ -62,7 +61,7 @@ func init() { return stmt }) register("DeallocateStatement", func(tc *transformContext, n tnode) ast.Stmt { - // 'DEALLOCATE' DeallocatePrepare? Identifier + // 'DEALLOCATE' DeallocatePrepare? ColIdOrString stmt := &ast.DeallocateStatement{Name: identifierText(n.child(2))} stmt.SetSpan(n.span()) return stmt @@ -115,6 +114,9 @@ func init() { register("ExternalResourceStatement", func(tc *transformContext, n tnode) ast.Stmt { return tc.transformExternalResource(n) }) + register("ExtensionRepositoryStatement", func(tc *transformContext, n tnode) ast.Stmt { + return tc.transformExtensionRepository(n) + }) } // ---- SET / RESET ------------------------------------------------------- @@ -209,7 +211,17 @@ func (tc *transformContext) transformZoneValue(n tnode) ast.Expr { case "ZoneStringLiteral", "ZoneIdentifier": return constExpr(invalidSpan, varcharValue(identifierText(alt.sole()))) case "ZoneIntervalWithInterval": - // 'INTERVAL' StringLiteral Interval? -> CAST(str AS INTERVAL) + // 'INTERVAL' StringLiteral Interval? -> CAST(str AS INTERVAL); + // the Interval child still transforms, so a range specifier + // raises (UnsupportedIntervalRange) + if unitNode, ok := alt.child(2).opt(); ok { + if _, unit := unitNode.sole().choice(); unit.name() == "IntervalToInterval" { + _, r := unit.sole().choice() + if spec, known := intervalRangeSpecifiers[r.name()]; known { + raise("%s is not supported", spec) + } + } + } return intervalCast(identifierText(alt.child(1))) case "ZoneIntervalWithPrecision": // 'INTERVAL' Parens(NumberLiteral) StringLiteral @@ -318,7 +330,8 @@ func (tc *transformContext) transformUse(n tnode) ast.Stmt { _, alt := n.child(1).sole().choice() switch alt.name() { case "SchemaNameAsUseTarget", "CatalogNameAsUseTarget": - stmt.Name = identifierText(alt.sole()) + // SchemaName / StringLiteral + stmt.Name = identifierText(alt) case "UseTargetCatalogSchema": // CatalogName '.' ReservedSchemaName DotIdentifier* if len(alt.child(3).repeat()) > 0 { @@ -389,8 +402,10 @@ func (tc *transformContext) transformAnalyzeTarget(n tnode) (ast.TableRef, []str } // VacuumStatement <- 'VACUUM' VacuumOptions? AnalyzeTarget? -// FULL/FREEZE/VERBOSE and unknown parenthesized options raise -// NotImplemented upstream (post-parse); darkwing records the raw options. +// FULL/FREEZE/VERBOSE/DISABLE_PAGE_SKIPPING raise NotImplemented upstream +// (post-parse); darkwing records the raw options. In the parenthesized +// form, the first option that is none of those nor ANALYZE is a parse +// error (TransformVacuumParensOptions). func (tc *transformContext) transformVacuum(n tnode) ast.Stmt { stmt := &ast.VacuumStatement{} stmt.SetSpan(n.span()) @@ -415,9 +430,16 @@ func (tc *transformContext) transformVacuum(n tnode) ast.Stmt { name = identifierText(opt) } stmt.Options = append(stmt.Options, name) - if strings.EqualFold(name, "analyze") { - stmt.Analyze = true + } + for _, name := range stmt.Options { + lower := strings.ToLower(name) + if lower == "disable_page_skipping" || lower == "freeze" || lower == "full" || lower == "verbose" { + break + } + if lower != "analyze" { + raise("unrecognized VACUUM option \"%s\"", name) } + stmt.Analyze = true } case "VacuumLegacyOptions": // OptFull? OptFreeze? OptVerbose? OptAnalyze? @@ -549,7 +571,7 @@ func preparableStatement(stmt ast.Stmt) bool { return false } -// PrepareStatement <- 'PREPARE' Identifier TypeList? 'AS' Statement +// PrepareStatement <- 'PREPARE' ColIdOrString TypeList? 'AS' Statement // A TypeList raises NotImplemented upstream (post-parse); darkwing // ignores it. The inner statement's parameters belong to EXECUTE, so the // collected parameter state is cleared, mirroring upstream's @@ -569,7 +591,7 @@ func (tc *transformContext) transformPrepare(n tnode) ast.Stmt { return stmt } -// ExecuteStatement <- 'EXECUTE' Identifier TableFunctionArguments? +// ExecuteStatement <- 'EXECUTE' ColIdOrString TableFunctionArguments? // Non-scalar and mixed named/positional arguments raise // InvalidInput/NotImplemented upstream (post-parse); darkwing records // the arguments as written. @@ -599,12 +621,15 @@ func (tc *transformContext) transformExecute(n tnode) ast.Stmt { // ---- EXPLAIN ----------------------------------------------------------- // ExplainStatement <- 'EXPLAIN' AnalyzeKeyword? ExplainOptionList? ExplainableStatements -// Unknown options and malformed FORMAT arguments raise -// NotImplemented/InvalidInput upstream (post-parse); darkwing records -// what it recognizes and accepts. +// Unknown options, malformed FORMAT/SQL arguments and SQL combined with +// ANALYZE or FORMAT raise NotImplemented/InvalidInput upstream +// (post-parse); darkwing records what it recognizes and accepts. The one +// Parser Error is PivotEntryCheck for EXPLAIN (SQL), which runs after the +// explained statement is transformed. func (tc *transformContext) transformExplain(n tnode) ast.Stmt { stmt := &ast.ExplainStatement{Type: ast.ExplainStandard} stmt.SetSpan(n.span()) + sqlIsSet := false if _, ok := n.child(1).opt(); ok { stmt.Type = ast.ExplainAnalyze } @@ -624,6 +649,8 @@ func (tc *transformContext) transformExplain(n tnode) ast.Stmt { } case "analyze": stmt.Type = ast.ExplainAnalyze + case "sql": + sqlIsSet = true } } } @@ -637,6 +664,10 @@ func (tc *transformContext) transformExplain(n tnode) ast.Stmt { } else { shapeError(inner, "unknown explainable statement") } + if sqlIsSet { + tc.pivotEntryCheck("EXPLAIN (SQL) statement") + stmt.Type = ast.ExplainSQL + } return stmt } @@ -647,7 +678,7 @@ func (tc *transformContext) transformExplain(n tnode) ast.Stmt { func checkSingleValuedOptions(opts []ast.GenericOption) { for _, o := range opts { if o.Expr == nil && len(o.Values) > 1 { - raise("Option %s can only have one argument", o.Name) + raise("Option %s can only have one argument", quotedIdent(o.Name)) } } } @@ -723,7 +754,9 @@ var commentOnTypes = map[string]ast.CommentOnType{ "CommentColumn": ast.CommentOnColumn, } -// CommentStatement <- 'COMMENT' 'ON' CommentOnType DottedIdentifier 'IS' CommentValue +// CommentStatement <- 'COMMENT' 'ON' CommentOnType CommentTarget 'IS' CommentValue +// CommentTarget <- DottedIdentifier / CommentStringLiteralIdentifier +// (a string target is a single-component name). // Upstream desugars into ALTER with a comment info; COMMENT ON // DATABASE/SCHEMA raise NotImplemented upstream (post-parse). func (tc *transformContext) transformComment(n tnode) ast.Stmt { @@ -735,12 +768,17 @@ func (tc *transformContext) transformComment(n tnode) ast.Stmt { shapeError(kind, "unknown comment target") } stmt.OnType = onType - parts := dottedIdentifier(n.child(3)) + var parts []string + if _, target := n.child(3).sole().choice(); target.name() == "DottedIdentifier" { + parts = dottedIdentifier(target) + } else { + parts = []string{identifierText(target)} + } if onType == ast.CommentOnColumn { stmt.Column = parts[len(parts)-1] parts = parts[:len(parts)-1] if len(parts) == 0 { - raise("Invalid column reference: '%s'", stmt.Column) + raise("Invalid column reference: %s", sqlIdentifier(stmt.Column)) } } stmt.Catalog, stmt.Schema, stmt.Name = qualifiedNameFromParts(parts) @@ -754,28 +792,6 @@ func (tc *transformContext) transformComment(n tnode) ast.Stmt { return stmt } -// optionallyQuoted renders an identifier for an error message the way -// upstream's KeywordHelper::WriteOptionallyQuoted does: wrapped in double -// quotes (embedded quotes doubled) when it is empty, is a keyword, or is -// not a plain lowercase identifier. -func optionallyQuoted(s string) string { - needs := s == "" || token.IsKeyword(s) - for i := 0; i < len(s) && !needs; i++ { - c := s[i] - switch { - case c >= 'a' && c <= 'z' || c == '_': - case c >= '0' && c <= '9': - needs = i == 0 - default: - needs = true - } - } - if !needs { - return s - } - return `"` + strings.ReplaceAll(s, `"`, `""`) + `"` -} - // qualifiedNameFromParts splits a dotted path into catalog/schema/name, // mirroring upstream's QualifiedName::StringToQualifiedName. func qualifiedNameFromParts(parts []string) (catalog, schema, name string) { @@ -793,11 +809,14 @@ func qualifiedNameFromParts(parts []string) (catalog, schema, name string) { // ---- extensions -------------------------------------------------------- -// LoadStatement <- 'LOAD' ColIdOrString ExtensionAlias? +// LoadStatement <- 'LOAD' ColIdOrString FromSource? ExtensionAlias? func (tc *transformContext) transformLoad(n tnode) ast.Stmt { stmt := &ast.LoadStatement{Kind: ast.LoadTypeLoad, Name: identifierText(n.child(1))} stmt.SetSpan(n.span()) - if alias, ok := n.child(2).opt(); ok { + if src, ok := n.child(2).opt(); ok { + stmt.Repository, stmt.RepoIsAlias = fromSource(src) + } + if alias, ok := n.child(3).opt(); ok { // ExtensionAlias <- 'AS' Identifier stmt.Kind = ast.LoadTypeLoadAs stmt.Alias = identifierText(alias.child(1)) @@ -805,62 +824,112 @@ func (tc *transformContext) transformLoad(n tnode) ast.Stmt { return stmt } -// InstallStatement <- 'FORCE'? 'INSTALL' IdentifierOrStringLiteral FromSource? VersionNumber? +// fromSource maps FromSource <- FromSourceIdentifier / FromSourceString. +func fromSource(n tnode) (string, bool) { + _, alt := n.sole().choice() + return identifierText(alt.child(1)), alt.name() == "FromSourceIdentifier" +} + +// InstallStatement <- 'FORCE'? 'INSTALL' InstallAndLoad? +// IdentifierOrStringLiteral FromSource? VersionNumber? func (tc *transformContext) transformInstall(n tnode) ast.Stmt { stmt := &ast.LoadStatement{Kind: ast.LoadTypeInstall} stmt.SetSpan(n.span()) if _, force := n.child(0).opt(); force { stmt.Kind = ast.LoadTypeForceInstall } - stmt.Name = identifierText(n.child(2)) - if src, ok := n.child(3).opt(); ok { - // FromSource <- FromSourceIdentifier / FromSourceString - _, alt := src.sole().choice() - stmt.Repository = identifierText(alt.child(1)) - stmt.RepoIsAlias = alt.name() == "FromSourceIdentifier" + // InstallAndLoad <- 'AND' 'LOAD' + stmt.LoadAfterInstall = optMatched(n.child(2)) + stmt.Name = identifierText(n.child(3)) + if src, ok := n.child(4).opt(); ok { + stmt.Repository, stmt.RepoIsAlias = fromSource(src) } - if ver, ok := n.child(4).opt(); ok { + if ver, ok := n.child(5).opt(); ok { // VersionNumber <- 'VERSION' IdentifierOrStringLiteral stmt.Version = identifierText(ver.child(1)) } return stmt } +// ExtensionRepositoryStatement <- CreateExtensionRepositoryStmt / +// DropExtensionRepositoryStmt. Port of +// TransformCreateExtensionRepositoryStmt / TransformDropExtensionRepositoryStmt +// (both produce a LoadStatement upstream). +func (tc *transformContext) transformExtensionRepository(n tnode) ast.Stmt { + stmt := &ast.LoadStatement{} + stmt.SetSpan(n.span()) + _, alt := n.sole().choice() + switch alt.name() { + case "CreateExtensionRepositoryStmt": + // 'CREATE' OrReplace? 'EXTENSION' 'REPOSITORY' IfNotExists? + // ColIdOrString RepositoryPrefix RepositoryPublicKey? + stmt.Kind = ast.LoadTypeCreateRepository + stmt.Repository = identifierText(alt.child(5)) + // RepositoryPrefix <- 'WITH'? 'PREFIX' StringLiteral + stmt.RepositoryURL = identifierText(alt.child(6).child(2)) + if keys, ok := alt.child(7).opt(); ok { + // RepositoryPublicKey <- 'USING'? 'PUBLIC' ('KEYS' / 'KEY') List(StringLiteral) + stmt.PublicKeys = identifierList(keys.child(3)) + } + orReplace, ifNotExists := optMatched(alt.child(1)), optMatched(alt.child(4)) + if orReplace && ifNotExists { + raise("Cannot combine OR REPLACE with IF NOT EXISTS") + } + switch { + case orReplace: + stmt.OnConflict = ast.CreateReplace + case ifNotExists: + stmt.OnConflict = ast.CreateIgnore + } + case "DropExtensionRepositoryStmt": + // 'DROP' 'EXTENSION' 'REPOSITORY' IfExists? ColIdOrString + stmt.Kind = ast.LoadTypeDropRepository + stmt.MissingOK = optMatched(alt.child(3)) + stmt.Repository = identifierText(alt.child(4)) + default: + shapeError(alt, "unknown extension repository statement") + } + return stmt +} + // ExternalResourceStatement <- CreateExternalResourceStmt / -// RegisterExternalResourceStmt / DestroyExternalResourceStmt / ShowExternalResourcesStmt +// RegisterExternalResourceStmt / DestroyExternalResourceStmt / +// ShowExternalResourcesStmt / AttachToExternalResource / +// ConnectToExternalResource +// (ExternalResourceKeyword <- 'EXTERNAL' 'RESOURCE') func (tc *transformContext) transformExternalResource(n tnode) ast.Stmt { + _, alt := n.sole().choice() + switch alt.name() { + case "AttachToExternalResource": + return tc.transformAttachToExternalResource(alt) + case "ConnectToExternalResource": + return tc.transformConnectToExternalResource(alt) + } stmt := &ast.ExternalResourceStatement{} stmt.SetSpan(n.span()) - _, alt := n.sole().choice() switch alt.name() { case "CreateExternalResourceStmt": - // 'CREATE' 'EXTERNAL' 'RESOURCE' StringLiteral AttachAlias? ExternalResourceCreationOptions? + // 'CREATE' ExternalResourceKeyword StringLiteral AttachAlias? ExternalResourceCreationOptions? stmt.Operation = ast.ExternalResourceCreate - stmt.Type = identifierText(alt.child(3)) - if alias, ok := alt.child(4).opt(); ok { + stmt.Type = identifierText(alt.child(2)) + if alias, ok := alt.child(3).opt(); ok { stmt.Name = identifierText(alias.child(1)) } - if opts, ok := alt.child(5).opt(); ok { - // a bare flag binds to boolean true, mirroring upstream - for _, o := range tc.transformGenericOptionList(opts.sole()) { - if o.Expr == nil && len(o.Values) == 0 { - o.Values = []ast.Value{{Type: ast.LogicalType{ID: "BOOLEAN"}, Kind: ast.ValueBool, Bool: true}} - } - stmt.Options = append(stmt.Options, o) - } + if opts, ok := alt.child(4).opt(); ok { + stmt.Options = tc.collectGenericOptions(opts) } case "RegisterExternalResourceStmt": - // 'REGISTER' 'EXTERNAL' 'RESOURCE' StringLiteral AttachAlias? 'FROM' Expression + // 'REGISTER' ExternalResourceKeyword StringLiteral AttachAlias? 'FROM' Expression stmt.Operation = ast.ExternalResourceRegister - stmt.Type = identifierText(alt.child(3)) - if alias, ok := alt.child(4).opt(); ok { + stmt.Type = identifierText(alt.child(2)) + if alias, ok := alt.child(3).opt(); ok { stmt.Name = identifierText(alias.child(1)) } - stmt.Handle = tc.transformExpression(alt.child(6)) + stmt.Handle = tc.transformExpression(alt.child(5)) case "DestroyExternalResourceStmt": - // 'DESTROY' 'EXTERNAL' 'RESOURCE' ColId + // 'DESTROY' ExternalResourceKeyword ColId stmt.Operation = ast.ExternalResourceDestroy - stmt.Name = identifierText(alt.child(3)) + stmt.Name = identifierText(alt.child(2)) case "ShowExternalResourcesStmt": // 'SHOW' ShowAllModifier? 'EXTERNAL' 'RESOURCES' stmt.Operation = ast.ExternalResourceShow @@ -870,3 +939,79 @@ func (tc *transformContext) transformExternalResource(n tnode) ast.Stmt { } return stmt } + +// collectGenericOptions ports CollectGenericOptions over +// ExternalResourceCreationOptions (GenericCopyOptionList): a bare flag +// binds to boolean true, an option carries at most one argument (a NULL +// argument raises a BinderException upstream: post-parse). +func (tc *transformContext) collectGenericOptions(n tnode) []ast.GenericOption { + var out []ast.GenericOption + for _, o := range tc.transformGenericOptionList(n.sole()) { + if o.Expr == nil { + switch { + case len(o.Values) == 0: + o.Values = []ast.Value{boolValue(true)} + case len(o.Values) > 1: + raise("Option %s can only have one argument", quotedIdent(o.Name)) + } + } + out = append(out, o) + } + return out +} + +// transformExternalResourceSource maps ExternalResourceSource <- +// ExternalResourceCreateClause / ExternalResourceReferenceClause. +func (tc *transformContext) transformExternalResourceSource(n tnode) *ast.ExternalResourceSource { + src := &ast.ExternalResourceSource{} + _, alt := n.sole().choice() + switch alt.name() { + case "ExternalResourceCreateClause": + // 'NEW' 'TEMPORARY' ExternalResourceKeyword StringLiteral ExternalResourceCreationOptions? + src.Provider = identifierText(alt.child(3)) + if opts, ok := alt.child(4).opt(); ok { + src.Params = tc.collectGenericOptions(opts) + } + case "ExternalResourceReferenceClause": + // ExternalResourceKeyword ColId + src.ReferenceName = identifierText(alt.child(1)) + default: + shapeError(alt, "unknown external resource source") + } + return src +} + +// AttachToExternalResource <- 'ATTACH' 'TO' ExternalResourceSource +// AttachAlias AttachOptions? +// Port of TransformAttachToExternalResource. +func (tc *transformContext) transformAttachToExternalResource(n tnode) ast.Stmt { + stmt := &ast.AttachStatement{OnConflict: ast.CreateError} + stmt.SetSpan(n.span()) + stmt.ExternalResource = tc.transformExternalResourceSource(n.child(2)) + stmt.Alias = identifierText(n.child(3).child(1)) + if opts, ok := n.child(4).opt(); ok { + stmt.Options = tc.transformGenericOptionList(opts.sole()) + checkSingleValuedOptions(stmt.Options) + } + return stmt +} + +// ConnectToExternalResource <- 'CONNECT' 'TO' ExternalResourceSource AttachOptions? +// Port of TransformConnectToExternalResource: provisioning claims the +// create params, so the connection cannot take an option list of its own. +func (tc *transformContext) transformConnectToExternalResource(n tnode) ast.Stmt { + stmt := &ast.ConnectStatement{} + stmt.SetSpan(n.span()) + stmt.ExternalResource = tc.transformExternalResourceSource(n.child(2)) + if opts, ok := n.child(3).opt(); ok { + options := tc.transformGenericOptionList(opts.sole()) + if stmt.ExternalResource.ReferenceName == "" { + raise("CONNECT TO NEW TEMPORARY EXTERNAL RESOURCE: the option list belongs to the resource, so " + + "the connection cannot take one of its own. Use `ATTACH TO NEW TEMPORARY EXTERNAL " + + "RESOURCE ... AS (options); CONNECT ;` instead") + } + checkSingleValuedOptions(options) + stmt.Options = options + } + return stmt +} diff --git a/parser/transform_select.go b/parser/transform_select.go index ebc6dd5..1d1ed6b 100644 --- a/parser/transform_select.go +++ b/parser/transform_select.go @@ -59,7 +59,7 @@ func (tc *transformContext) transformWithClause(n tnode) ast.CTEMap { name, cte := tc.transformWithStatement(ws, recursive) key := strings.ToLower(name) if seen[key] { - raise("Duplicate CTE name \"%s\"", name) + raise("Duplicate CTE name %s", quoteIdent(name)) } seen[key] = true out.Entries = append(out.Entries, ast.CTEMapEntry{Name: name, CTE: cte}) @@ -67,13 +67,14 @@ func (tc *transformContext) transformWithClause(n tnode) ast.CTEMap { return out } -// WithStatement <- ColIdOrString InsertColumnList? UsingKey? 'AS' Materialized? CTEBody +// WithStatement <- ColIdOrString ColumnAliases? UsingKey? 'AS' Materialized? CTEBody func (tc *transformContext) transformWithStatement(n tnode, recursive bool) (string, *ast.CommonTableExpr) { name := identifierText(n.child(0)) cte := &ast.CommonTableExpr{Materialized: ast.CTEMaterializeDefault} cte.SetSpan(n.span()) if cols, ok := n.child(1).opt(); ok { - cte.Aliases = identifierList(cols.sole().parens()) + // ColumnAliases <- Parens(List(ColIdOrString)) + cte.Aliases = identifierList(cols.parens()) } if uk, ok := n.child(2).opt(); ok { // UsingKey <- 'USING' 'KEY' Parens(TargetList) @@ -432,9 +433,6 @@ func (tc *transformContext) transformAliasedExpression(n tnode) ast.Expr { expr.SetAlias(identifierText(id)) } return expr - case "Expression": - // ExpressionAlias (expression statements) reuses this dispatch - return tc.transformExpression(alt) } shapeError(alt, "unknown aliased expression") return nil @@ -500,7 +498,8 @@ func normalizeSet(s ast.GroupingSet) ast.GroupingSet { return out } -// peekBareStar reports whether a GroupByExpression entry is a bare `*`. +// peekBareStar reports whether a GroupByExpression entry is a bare `*` +// (ExpressionIsEmptyStar: a qualified `t.*` counts too). func (tc *transformContext) peekBareStar(n tnode) (bool, bool) { _, alt := n.sole().choice() if alt.name() != "GroupByBaseExpression" { @@ -508,7 +507,7 @@ func (tc *transformContext) peekBareStar(n tnode) (bool, bool) { } expr := tc.transformExpression(alt.sole()) star, ok := expr.(*ast.StarExpression) - if !ok || star.Columns || star.Expr != nil || star.RelationName != "" || + if !ok || star.Columns || star.Expr != nil || len(star.ExcludeList) != 0 || len(star.ReplaceList) != 0 || len(star.QualifiedExcludeList) != 0 || len(star.RenameList) != 0 { return false, false @@ -693,7 +692,8 @@ func nullOrderOf(n tnode) ast.NullOrder { return ast.NullsLast } -// LimitOffset <- LimitOffsetClause / OffsetFetchClause / OffsetLimitClause / FetchOnlyClause +// LimitOffset <- LimitOffsetClause / OffsetFetchClause / OffsetLimitClause / +// FetchOffsetClause / FetchOnlyClause func (tc *transformContext) transformLimitOffset(n tnode) []ast.ResultModifier { _, alt := n.sole().choice() mod := &ast.LimitModifier{LimitType: ast.LimitRowCount} @@ -712,6 +712,10 @@ func (tc *transformContext) transformLimitOffset(n tnode) []ast.ResultModifier { case "OffsetFetchClause": mod.Offset = tc.transformOffsetValue(alt.child(0)) mod.Limit = tc.transformFetchValue(alt.child(1)) + case "FetchOffsetClause": + // FetchClause OffsetClause (v2.0) + mod.Limit = tc.transformFetchValue(alt.child(0)) + mod.Offset = tc.transformOffsetValue(alt.child(1)) case "FetchOnlyClause": mod.Limit = tc.transformFetchValue(alt.sole()) default: @@ -729,7 +733,7 @@ func (tc *transformContext) applyLimitClause(mod *ast.LimitModifier, n tnode) { // LIMIT ALL is an explicit NULL limit mod.Limit = constExpr(invalidSpan, ast.Value{Type: ast.LogicalType{ID: "NULL"}, IsNull: true, Kind: ast.ValueNull}) case "LimitLiteralPercent": - mod.Limit = numberConstant(alt.child(0).span(), alt.child(0).number()) + mod.Limit = numberConstant(invalidSpan, alt.child(0).number()) mod.LimitType = ast.LimitPercentage case "LimitExpression": // Expression '%'? @@ -747,9 +751,16 @@ func (tc *transformContext) transformOffsetValue(n tnode) ast.Expr { return tc.transformExpression(n.child(1).child(0)) } -// FetchClause <- 'FETCH' FirstOrNext FetchValue RowOrRows 'ONLY' +// FetchClause <- FetchClauseWithoutValue / FetchClauseWithValue +// FetchClauseWithValue <- 'FETCH' FirstOrNext FetchValue RowOrRows 'ONLY' +// FetchClauseWithoutValue <- 'FETCH' FirstOrNext RowOrRows 'ONLY' fetches +// one row (TransformFetchClauseWithoutValue: a location-free 1). func (tc *transformContext) transformFetchValue(n tnode) ast.Expr { - return tc.transformExpression(n.child(2).sole()) + _, alt := n.sole().choice() + if alt.name() == "FetchClauseWithoutValue" { + return intConst(invalidSpan, 1) + } + return tc.transformExpression(alt.child(2).sole()) } // ---- SHOW / DESCRIBE / SUMMARIZE -------------------------------------- @@ -764,75 +775,177 @@ var specialShowNames = map[string]bool{ "variables": true, } -// DescribeStatement <- ShowTables / ShowSelect / ShowAllTables / ShowQualifiedName -// All SHOW/DESCRIBE desugaring uses synthesized (location-free) nodes, -// mirroring upstream. +// DescribeStatement <- ShowTables / ShowDeprecatedSelect / DescribeSelect / +// ShowAllTables / ShowByName / DescribeByName +// Port of transformer/transform_describe.cpp. All SHOW/DESCRIBE +// desugaring uses synthesized (location-free) nodes, mirroring upstream. func (tc *transformContext) transformDescribe(n tnode) ast.QueryNode { _, alt := n.sole().choice() - ref := &ast.ShowRef{ShowType: ast.ShowTypeDescribe} + ref := &ast.ShowRef{} ref.SetSpan(invalidSpan) switch alt.name() { - case "ShowSelect": - if isSummarize(alt.child(0)) { - ref.ShowType = ast.ShowTypeSummary - } + case "ShowDeprecatedSelect": + // ShowRule SelectStatementInternal + ref.ShowType = ast.ShowTypeShow + ref.Query = tc.transformSelectInternal(alt.child(1)) + case "DescribeSelect": + // DescribeOrSummarize SelectStatementInternal + ref.ShowType = describeOrSummarize(alt.child(0)) ref.Query = tc.transformSelectInternal(alt.child(1)) case "ShowAllTables": - ref.ShowType = ast.ShowTypeShowUnqualified - ref.TableName = "__show_tables_expanded" - case "ShowQualifiedName": - if isSummarize(alt.child(0)) { - ref.ShowType = ast.ShowTypeSummary - } - target, ok := alt.child(1).opt() - if !ok { - // bare SHOW expands like SHOW ALL TABLES - ref.ShowType = ast.ShowTypeShowUnqualified - ref.TableName = "__show_tables_expanded" - break - } - _, t := target.sole().choice() - switch t.name() { - case "DescribeBaseTableName": - btr := &ast.BaseTableRef{} - btr.SetSpan(invalidSpan) - tc.fillBaseTableName(btr, t.sole()) - if btr.CatalogName == "" && btr.SchemaName == "" && - ref.ShowType == ast.ShowTypeDescribe && specialShowNames[strings.ToLower(btr.TableName)] { - ref.ShowType = ast.ShowTypeShowUnqualified - ref.TableName = "\"" + strings.ToLower(btr.TableName) + "\"" - break - } - // DESCRIBE/SUMMARIZE t wraps the relation as SELECT * FROM t - ref.Query = starSelect(btr, invalidSpan) - case "DescribeStringLiteral": - // DESCRIBE 'file.csv' wraps SELECT * FROM 'file.csv' - s, _ := t.sole().stringLit() - btr := &ast.BaseTableRef{TableName: s} - btr.SetSpan(invalidSpan) - ref.Query = starSelect(btr, invalidSpan) - } + setShowAllTables(ref) + case "ShowByName": + // ShowRule ShowTarget? + ref.ShowType = ast.ShowTypeShow + tc.buildShowByName(ref, alt.child(1)) + case "DescribeByName": + // DescribeOrSummarize DescribeTarget? + ref.ShowType = describeOrSummarize(alt.child(0)) + tc.buildDescribeByName(ref, alt.child(1)) case "ShowTables": - // 'SHOW' 'TABLES' 'FROM' QualifiedName + // ShowOrDescribe 'TABLES' 'FROM' QualifiedName ref.ShowType = ast.ShowTypeShowFrom cat, schema, name := tc.transformQualifiedNameParts(alt.child(3)) - if cat == "" && schema == "" { - schema = name - } else if cat == "" { - cat, schema = schema, name + if cat != "" { + raise("Expected \"SHOW TABLES FROM database\", \"SHOW TABLES FROM schema\", or " + + "\"SHOW TABLES FROM database.schema\"") + } + if schema == "" { + ref.SchemaName = name + } else { + ref.CatalogName, ref.SchemaName = schema, name } - ref.CatalogName, ref.SchemaName = cat, schema default: shapeError(alt, "unknown describe statement") } return starSelect(ref, invalidSpan) } -// isSummarize reports whether a ShowOrDescribeOrSummarize (or -// ShowOrDescribe) node spelled SUMMARIZE. -func isSummarize(n tnode) bool { - _, alt := n.sole().choice() - return alt.name() == "Summarize" +// describeOrSummarize maps DescribeOrSummarize <- DescribeRule / Summarize. +func describeOrSummarize(n tnode) ast.ShowType { + if _, alt := n.sole().choice(); alt.name() == "Summarize" { + return ast.ShowTypeSummary + } + return ast.ShowTypeDescribe +} + +// setShowAllTables configures the "list all tables" form (bare +// SHOW/DESCRIBE and SHOW ALL TABLES). +func setShowAllTables(ref *ast.ShowRef) { + ref.TableName = "__show_tables_expanded" + ref.ShowType = ast.ShowTypeShowSpecial +} + +// describeTarget is upstream's DescribeTarget: a string-literal table +// name, a relation, or nothing. +type describeTarget struct { + isTableName bool + tableName string + table *ast.BaseTableRef +} + +// transformDescribeTarget maps the target alternatives shared by +// ShowTarget and DescribeTarget. +func (tc *transformContext) transformDescribeTarget(alt tnode) describeTarget { + switch alt.name() { + case "DescribeBaseTableName", "ShowDeprecatedQualifiedTableName": + btr := &ast.BaseTableRef{} + btr.SetSpan(invalidSpan) + inner := alt.sole() + if inner.name() == "QualifiedTableName" { + // fillBaseTableName expects a BaseTableName-shaped choice + _, q := inner.sole().choice() + tc.fillQualifiedTable(btr, q) + } else { + tc.fillBaseTableName(btr, inner) + } + return describeTarget{table: btr} + case "ShowSettingName": + // a bare name: tried as a setting first, then as a table + btr := &ast.BaseTableRef{TableName: identifierText(alt)} + btr.SetSpan(invalidSpan) + return describeTarget{table: btr} + case "DescribeStringLiteral": + s := identifierText(alt) + if s == "" { + raise("Expected a table name, but got an empty string") + } + return describeTarget{isTableName: true, tableName: s} + case "ShowSpecialForm": + // keyword-only alternative: no target (autocomplete aid) + return describeTarget{} + } + shapeError(alt, "unknown describe target") + return describeTarget{} +} + +// fillQualifiedTable fills a ref from a QualifiedTableName alternative +// (CatalogReservedSchemaTable / SchemaReservedTable). +func (tc *transformContext) fillQualifiedTable(ref *ast.BaseTableRef, alt tnode) { + tc.fillTableNameAlt(ref, alt) +} + +// trySetSpecialShowForm ports TrySetSpecialShowForm: an unqualified +// DATABASES/SCHEMAS/TABLES/VARIABLES target is a special form. +func trySetSpecialShowForm(ref *ast.ShowRef, rel *ast.BaseTableRef) bool { + if rel.SchemaName != "" { + return false + } + name := strings.ToLower(rel.TableName) + if !specialShowNames[name] { + return false + } + ref.TableName = "\"" + name + "\"" + ref.ShowType = ast.ShowTypeShowSpecial + return true +} + +// buildShowByName ports BuildShowByName (SHOW is settings-first). +func (tc *transformContext) buildShowByName(ref *ast.ShowRef, targetNode tnode) { + var target describeTarget + if t, ok := targetNode.opt(); ok { + _, alt := t.sole().choice() + target = tc.transformDescribeTarget(alt) + } + switch { + case !target.isTableName && target.table == nil: + // bare SHOW lists all tables + setShowAllTables(ref) + case target.isTableName: + ref.TableName = target.tableName + case trySetSpecialShowForm(ref, target.table): + case target.table.SchemaName != "": + // SHOW cat.tbl (deprecated) describes the table via a query + ref.CatalogName = target.table.CatalogName + ref.SchemaName = target.table.SchemaName + ref.TableName = target.table.TableName + ref.Qualification = target.table.Qualification + ref.Query = starSelect(target.table, invalidSpan) + default: + ref.TableName = target.table.TableName + } +} + +// buildDescribeByName ports BuildDescribeByName (DESCRIBE/SUMMARIZE always +// describe a relation or query). +func (tc *transformContext) buildDescribeByName(ref *ast.ShowRef, targetNode tnode) { + var target describeTarget + if t, ok := targetNode.opt(); ok { + _, alt := t.sole().choice() + target = tc.transformDescribeTarget(alt) + } + switch { + case !target.isTableName && target.table == nil: + if ref.ShowType == ast.ShowTypeSummary { + raise("Expected table name with SUMMARIZE") + } + setShowAllTables(ref) + case target.isTableName: + ref.TableName = target.tableName + case trySetSpecialShowForm(ref, target.table): + default: + ref.Query = starSelect(target.table, invalidSpan) + } } // ---- samples ----------------------------------------------------------- @@ -940,43 +1053,5 @@ func formatSampleMethod(m string) ast.SampleMethod { return ast.SampleMethod(strings.ToUpper(lower[:1]) + lower[1:]) } -// ExpressionStatement <- List(ExpressionAlias): a bare expression list is -// a SELECT without a FROM clause. -func init() { - register("ExpressionStatement", func(tc *transformContext, n tnode) ast.Stmt { - node := &ast.SelectNode{AggregateHandling: ast.StandardHandling} - node.SetSpan(n.span()) - empty := &ast.EmptyTableRef{} - empty.SetSpan(invalidSpan) - node.FromTable = empty - for _, e := range n.sole().listElems() { - node.SelectList = append(node.SelectList, tc.transformAliasedExpression(e)) - } - // a single bare column reference is a table query (`foo` is - // upstream's SELECT * FROM foo) - if len(node.SelectList) == 1 { - if ref, ok := node.SelectList[0].(*ast.ColumnRefExpression); ok && ref.GetAlias() == "" && len(ref.ColumnNames) <= 3 { - table := &ast.BaseTableRef{} - table.SetSpan(invalidSpan) - names := ref.ColumnNames - table.TableName = names[len(names)-1] - if len(names) >= 2 { - table.SchemaName = names[len(names)-2] - } - if len(names) == 3 { - table.CatalogName = names[0] - } - sel := starSelect(table, n.span()) - stmt := &ast.SelectStatement{Node: sel} - stmt.SetSpan(n.span()) - return stmt - } - } - stmt := &ast.SelectStatement{Node: node} - stmt.SetSpan(n.span()) - return stmt - }) -} - // normalizeKeyword upper-cases a keyword spelling for comparisons. func normalizeKeyword(s string) string { return strings.ToUpper(s) } diff --git a/parser/transform_single.go b/parser/transform_single.go index 81f1875..12d0ec8 100644 --- a/parser/transform_single.go +++ b/parser/transform_single.go @@ -6,7 +6,6 @@ package parser import ( "errors" - "fmt" "math" "strconv" "strings" @@ -111,14 +110,12 @@ func (tc *transformContext) transformSingle(n tnode) ast.Expr { case "StructExpression": return tc.transformStruct(alt) case "PositionalExpression": - idx, err := strconv.ParseUint(alt.child(1).number(), 10, 64) - if err != nil { - raise("invalid positional reference") - } - if idx == 0 { + // TransformPositionalExpression: an INTEGER literal fitting int64 + idx, ok := literalInt64(numberLiteral(alt.child(1).number())) + if !ok || idx <= 0 { raise("Positional reference node needs to be >= 1") } - p := &ast.PositionalReferenceExpression{Index: idx} + p := &ast.PositionalReferenceExpression{Index: uint64(idx)} p.SetSpan(alt.span()) return p case "DefaultExpression": @@ -166,23 +163,31 @@ func (tc *transformContext) transformLiteral(n tnode) ast.Expr { } // stringConstant builds the constant for a string literal, honoring the -// prefix kind. +// prefix kind (StringLiteralParseResult::ToExpression). func (tc *transformContext) stringConstant(sp ast.Span, s string, kind matcher.StringKind) ast.Expr { switch kind { case matcher.StringHexadecimal: - // X'FF' -> BLOB \xFF - blob, ok := hexToBlob(s) - if !ok { - raise("invalid hexadecimal string literal") + // X'FF' -> HEX literal "FF" (Literal::Hex validates the digits) + if len(s)%2 != 0 { + raise("Hex string literal must have an even number of hex digits") + } + for i := 0; i < len(s); i++ { + if !isHexDigit(s[i]) { + raise("Hex string literal contains a non-hexadecimal character '%c'", s[i]) + } } - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: "BLOB"}, Kind: ast.ValueString, Str: blob}) + return literalExpr(sp, ast.Literal{Kind: ast.LiteralHex, Text: s}) case matcher.StringBit: - // B'1010' stays a VARCHAR "b1010" at parse time (the binder - // converts it) - return constExpr(sp, varcharValue("b"+s)) + // B'1010' -> BIT literal "1010" (Literal::Bit validates the digits) + for i := 0; i < len(s); i++ { + if s[i] != '0' && s[i] != '1' { + raise("Bit string literal contains a non-binary character '%c'", s[i]) + } + } + return literalExpr(sp, ast.Literal{Kind: ast.LiteralBit, Text: s}) case matcher.StringNational: // N'abc' -> CAST('abc' AS VARCHAR) - child := constExpr(invalidSpan, varcharValue(s)) + child := stringConst(invalidSpan, s) cast := &ast.CastExpression{Child: child, ResolvedType: "VARCHAR"} cast.SetSpan(sp) return cast @@ -292,51 +297,65 @@ func integerTypeFor(v int64) string { return "BIGINT" } -// numberConstant ports upstream's TransformNumberLiteral: integers become -// INTEGER/BIGINT/HUGEINT (then DOUBLE), plain decimals become DECIMAL -// with derived width/scale (up to width 38), exponent forms become -// DOUBLE. -// unconvertibleNumber stands in for a number literal whose text has no -// value (e.g. "2.03.0", tokenized as a single number): upstream accepts -// the token and throws InvalidInputException while constructing the -// value ("Could not convert string ... to DECIMAL(5,1)") — post-parse -// under the oracle's classification — so darkwing records the raw text -// as a cast to the derived type and accepts (found by cmd/difftest). -func unconvertibleNumber(sp ast.Span, text, typeID string) ast.Expr { - child := constExpr(invalidSpan, varcharValue(text)) - cast := &ast.CastExpression{Child: child, ResolvedType: typeID} - cast.SetSpan(sp) - return cast +// numberConstant ports upstream's TransformNumberLiteral, which since +// v2.0 is ConstantExpression::Number: the literal keeps the number text +// as written, classified INTEGER or NUMERIC (Literal::Number); the value +// is only derived (by the binder upstream, for convenience here). +func numberConstant(sp ast.Span, text string) *ast.ConstantExpression { + return literalExpr(sp, numberLiteral(text)) +} + +// numberLiteral ports Literal::Number: text with a '.' or an exponent is +// NUMERIC, anything else INTEGER. +func numberLiteral(text string) ast.Literal { + if strings.ContainsAny(text, ".eE") { + return ast.Literal{Kind: ast.LiteralNumeric, Text: text} + } + return ast.Literal{Kind: ast.LiteralInteger, Text: text} } -func numberConstant(sp ast.Span, text string) ast.Expr { +// numberValue ports NumberToValue (literal.cpp): integers become +// INTEGER/BIGINT/HUGEINT/UHUGEINT (then DOUBLE), plain decimals become +// DECIMAL with derived width/scale (up to width 38), exponent forms +// become DOUBLE. ok is false for text with no value (e.g. "2.03.0", a +// single number token), which upstream only rejects when binding. +func numberValue(text string) (ast.Value, bool) { clean := strings.ReplaceAll(text, "_", "") lower := strings.ToLower(clean) - if strings.ContainsAny(lower, "e") { + double := func() (ast.Value, bool) { f, err := parseDouble(clean) if err != nil { - return unconvertibleNumber(sp, clean, "DOUBLE") + return ast.Value{}, false } - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: "DOUBLE"}, Kind: ast.ValueDouble, Float64: f}) + return ast.Value{Type: ast.LogicalType{ID: "DOUBLE"}, Kind: ast.ValueDouble, Float64: f}, true + } + if strings.ContainsAny(lower, "e") { + return double() } if dot := strings.IndexByte(clean, '.'); dot >= 0 { - return decimalConstant(sp, clean, dot) + return decimalValue(clean, dot) } // integer path if v, err := strconv.ParseInt(clean, 10, 64); err == nil { - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: integerTypeFor(v)}, Kind: ast.ValueInt64, Int64: v}) + return ast.Value{Type: ast.LogicalType{ID: integerTypeFor(v)}, Kind: ast.ValueInt64, Int64: v}, true } if h, ok := parseHugeint(clean); ok { - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: "HUGEINT"}, Kind: ast.ValueHugeint, Hugeint: h}) + return ast.Value{Type: ast.LogicalType{ID: "HUGEINT"}, Kind: ast.ValueHugeint, Hugeint: h}, true } if h, ok := parseUint128(clean); ok { - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: "UHUGEINT"}, Kind: ast.ValueHugeint, Hugeint: h}) + return ast.Value{Type: ast.LogicalType{ID: "UHUGEINT"}, Kind: ast.ValueHugeint, Hugeint: h}, true } - f, err := parseDouble(clean) - if err != nil { - return unconvertibleNumber(sp, clean, "DOUBLE") + return double() +} + +// literalInt64 ports Literal::TryGetInt64: only INTEGER literals that fit +// an int64 qualify. +func literalInt64(l ast.Literal) (int64, bool) { + if l.Kind != ast.LiteralInteger { + return 0, false } - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: "DOUBLE"}, Kind: ast.ValueDouble, Float64: f}) + v, err := strconv.ParseInt(strings.ReplaceAll(l.Text, "_", ""), 10, 64) + return v, err == nil } // parseDouble parses a float literal the way upstream does: values whose @@ -353,7 +372,7 @@ func parseDouble(s string) (float64, error) { // digits: width counts the integer digits as written (leading zeros // included) plus the scale; literals too wide for DECIMAL(38) fall back // to DOUBLE. -func decimalConstant(sp ast.Span, clean string, dot int) ast.Expr { +func decimalValue(clean string, dot int) (ast.Value, bool) { intPart := strings.TrimLeft(clean[:dot], "+-") fracPart := clean[dot+1:] digits := strings.TrimLeft(intPart, "0") @@ -365,23 +384,26 @@ func decimalConstant(sp ast.Span, clean string, dot int) ast.Expr { if width > 38 { f, err := parseDouble(clean) if err != nil { - return unconvertibleNumber(sp, clean, "DOUBLE") + return ast.Value{}, false } - return constExpr(sp, ast.Value{Type: ast.LogicalType{ID: "DOUBLE"}, Kind: ast.ValueDouble, Float64: f}) + return ast.Value{Type: ast.LogicalType{ID: "DOUBLE"}, Kind: ast.ValueDouble, Float64: f}, true } unscaled := digits + fracPart if unscaled == "" { unscaled = "0" } + if strings.HasPrefix(clean, "-") { + unscaled = "-" + unscaled + } typ := ast.LogicalType{ID: "DECIMAL", Width: width, Scale: scale} if v, err := strconv.ParseInt(unscaled, 10, 64); err == nil && width <= 18 { - return constExpr(sp, ast.Value{Type: typ, Kind: ast.ValueInt64, Int64: v}) + return ast.Value{Type: typ, Kind: ast.ValueInt64, Int64: v}, true } h, ok := parseHugeint(unscaled) if !ok { - return unconvertibleNumber(sp, clean, fmt.Sprintf("DECIMAL(%d,%d)", width, scale)) + return ast.Value{}, false } - return constExpr(sp, ast.Value{Type: typ, Kind: ast.ValueHugeint, Hugeint: h}) + return ast.Value{Type: typ, Kind: ast.ValueHugeint, Hugeint: h}, true } // parseHugeint parses a decimal digit string into a 128-bit integer. @@ -495,12 +517,14 @@ func (tc *transformContext) transformParameter(n tnode) ast.Expr { return p } +// atoiOrRaise reads a ?N / $N parameter number: upstream requires an +// INTEGER literal fitting int64 that is greater than 0. func atoiOrRaise(s string) int { - v, err := strconv.Atoi(s) - if err != nil { - raise("invalid parameter number \"%s\"", s) + v, ok := literalInt64(numberLiteral(s)) + if !ok || v <= 0 { + raise("Parameter numbers must be greater than 0") } - return v + return int(v) } // ---- subqueries, case, star ------------------------------------------- @@ -575,7 +599,7 @@ func (tc *transformContext) transformStar(n tnode) ast.Expr { path := excludeNamePath(e) for _, prev := range excludePaths { if qualifiedColumnsMatch(prev, path) { - raise("Duplicate entry \"%s\" in EXCLUDE list", strings.Join(path, ".")) + raise("Duplicate entry \"%s\" in EXCLUDE list", qualifiedColumnText(path)) } } excludePaths = append(excludePaths, path) @@ -621,7 +645,7 @@ func (tc *transformContext) transformStar(n tnode) ast.Expr { } for _, r := range star.ReplaceList { if inExclude([]string{r.Key}) { - raise("Column \"%s\" cannot occur in both EXCLUDE and REPLACE list", r.Key) + raise("Column \"%s\" cannot occur in both EXCLUDE and REPLACE list", quoteIdent(r.Key)) } } } @@ -644,10 +668,10 @@ func (tc *transformContext) transformStar(n tnode) ast.Expr { } for _, r := range star.RenameList { if inExclude(r.Key.Path) { - raise("Column \"%s\" cannot occur in both EXCLUDE and RENAME list", strings.Join(r.Key.Path, ".")) + raise("Column \"%s\" cannot occur in both EXCLUDE and RENAME list", qualifiedColumnText(r.Key.Path)) } if replaced[strings.ToLower(r.Key.Path[len(r.Key.Path)-1])] { - raise("Column \"%s\" cannot occur in both REPLACE and RENAME list", strings.Join(r.Key.Path, ".")) + raise("Column \"%s\" cannot occur in both REPLACE and RENAME list", qualifiedColumnText(r.Key.Path)) } } } @@ -688,6 +712,11 @@ func excludeNamePath(n tnode) []string { for _, dot := range d.child(1).repeat() { path = append(path, identifierText(dot.child(1))) } + if len(path) > 4 { + // StringToQualifiedColumnName + raise("Expected at most 4 entries (catalog.schema.table.column), but found %d entries (input: %s)", + len(path), strings.Join(path, ".")) + } return path case "ExcludeColumnName": return []string{identifierText(alt.sole())} @@ -696,12 +725,34 @@ func excludeNamePath(n tnode) []string { return nil } +// qualifiedColumnText ports QualifiedColumnName::ToString: each part +// rendered with SQLIdentifier (quoted only when required). +func qualifiedColumnText(path []string) string { + parts := make([]string, len(path)) + for i, p := range path { + parts[i] = sqlIdentifier(p) + } + return strings.Join(parts, ".") +} + // ---- column references ------------------------------------------------- func (tc *transformContext) transformColumnReference(n tnode) ast.Expr { _, alt := n.sole().choice() var names []string switch alt.name() { + case "NestedSchemaTableColumnName": + // CatalogQualification ReservedSchemaQualification + // ReservedSchemaQualification ReservedSchemaQualification+ + // ReservedColumnName: five or more components, all kept as the + // column reference's path + for i := 0; i < 3; i++ { + names = append(names, identifierText(alt.child(i).child(0))) + } + for _, q := range alt.child(3).repeat() { + names = append(names, identifierText(q.child(0))) + } + names = append(names, identifierText(alt.child(4))) case "CatalogReservedSchemaTableColumnName": names = qualificationChain(alt, 4) case "SchemaReservedTableColumnName": diff --git a/parser/transform_tableref.go b/parser/transform_tableref.go index 07103fa..b66687f 100644 --- a/parser/transform_tableref.go +++ b/parser/transform_tableref.go @@ -6,7 +6,6 @@ package parser import ( "strconv" "strings" - "time" "github.com/sqlc-dev/darkwing/ast" ) @@ -63,27 +62,66 @@ func (tc *transformContext) transformInnerTableRef(n tnode) ast.TableRef { _, alt := n.sole().choice() switch alt.name() { case "ValuesRef": - // ValuesClause TableAlias? — a VALUES ref in FROM position is - // always wrapped in a subquery (SELECT * FROM valueslist), the - // alias landing on the wrapper - ref := tc.transformValuesClause(alt.child(0)) + // TableAliasColon? ValuesClause TableAlias? SampleClause? — a + // VALUES ref in FROM position is always wrapped in a subquery + // (SELECT * FROM valueslist), the alias landing on the wrapper + ref := tc.transformValuesClause(alt.child(1)) ref.Alias = "valueslist" sub := &ast.SubqueryRef{Subquery: &ast.SelectStatement{Node: starSelect(ref, invalidSpan)}} sub.SetSpan(alt.span()) - if aliasNode, ok := alt.child(1).opt(); ok { + colon, hasColon := alt.child(0).opt() + aliasNode, hasAlias := alt.child(2).opt() + var sample *ast.SampleOptions + if sc, ok := alt.child(3).opt(); ok { + sample = tc.transformSampleClause(sc) + } + if hasColon && hasAlias { + raise("Table reference cannot have two aliases") + } + if hasColon { + sub.Alias = identifierText(colon.child(0)) + } + if hasAlias { sub.Alias, sub.ColumnNameAlias = tc.transformTableAlias(aliasNode) } + sub.Sample = sample return sub case "TableFunction": return tc.transformTableFunction(alt) case "TableSubquery": - // Lateral? SubqueryReference TableAlias? — the location covers only - // the parenthesized subquery, not the alias - ref := &ast.SubqueryRef{Subquery: tc.transformSelectInternalStatement(alt.child(1).sole().parens())} - ref.SetSpan(alt.child(1).span()) - if aliasNode, ok := alt.child(2).opt(); ok { - ref.Alias, ref.ColumnNameAlias = tc.transformTableAlias(aliasNode) + // TableAliasColon? Lateral? SubqueryReference TableAlias? + // SampleClause? — the location covers only the parenthesized + // subquery, not the alias + subNode := alt.child(2) + ref := &ast.SubqueryRef{Subquery: tc.transformSelectInternalStatement(subNode.sole().parens())} + ref.SetSpan(subNode.span()) + colon, hasColon := alt.child(0).opt() + _, lateral := alt.child(1).opt() + aliasNode, hasAlias := alt.child(3).opt() + var alias string + var colAliases []string + if hasAlias { + alias, colAliases = tc.transformTableAlias(aliasNode) + } + var sample *ast.SampleOptions + if sc, ok := alt.child(4).opt(); ok { + sample = tc.transformSampleClause(sc) + } + if hasColon && hasAlias { + // upstream renders the subquery with SubqueryRef::ToString; + // darkwing quotes its source text + raise("Table reference %s cannot have two aliases", tc.src[subNode.span().Start:subNode.span().End]) + } + if lateral && sample != nil { + raise("TABLESAMPLE cannot be applied to a LATERAL subquery") + } + if hasColon { + ref.Alias = identifierText(colon.child(0)) } + if hasAlias { + ref.Alias, ref.ColumnNameAlias = alias, colAliases + } + ref.Sample = sample return ref case "BaseTableRef": return tc.transformBaseTableRef(alt) @@ -206,14 +244,28 @@ func (tc *transformContext) transformBaseTableRef(n tnode) ast.TableRef { } // fillBaseTableName fills catalog/schema/table from a BaseTableName node. -// BaseTableName <- CatalogReservedSchemaTable / SchemaReservedTable / -// UnqualifiedBaseTableName +// BaseTableName <- QualifiedTableName / UnqualifiedBaseTableName +// QualifiedTableName <- CatalogReservedSchemaTable / SchemaReservedTable +// CatalogReservedSchemaTable <- CatalogQualification ReservedSchemaQualification+ ReservedTableName func (tc *transformContext) fillBaseTableName(ref *ast.BaseTableRef, n tnode) { _, alt := n.sole().choice() + if alt.name() == "QualifiedTableName" { + _, alt = alt.sole().choice() + } + tc.fillTableNameAlt(ref, alt) +} + +// fillTableNameAlt fills a ref from one BaseTableName/QualifiedTableName +// alternative. +func (tc *transformContext) fillTableNameAlt(ref *ast.BaseTableRef, alt tnode) { switch alt.name() { case "CatalogReservedSchemaTable": - ref.CatalogName = identifierText(alt.child(0).child(0)) - ref.SchemaName = identifierText(alt.child(1).child(0)) + quals := []string{identifierText(alt.child(0).child(0))} + for _, sq := range alt.child(1).repeat() { + quals = append(quals, identifierText(sq.child(0))) + } + qn := newQualifiedName(quals) + ref.CatalogName, ref.SchemaName, ref.Qualification = qn.catalog, qn.schema, qn.path ref.TableName = identifierText(alt.child(2)) case "SchemaReservedTable": ref.SchemaName = identifierText(alt.child(0).child(0)) @@ -225,25 +277,39 @@ func (tc *transformContext) fillBaseTableName(ref *ast.BaseTableRef, n tnode) { } } -// transformQualifiedNameParts splits a QualifiedName rule node. +// transformQualifiedNameParts splits a QualifiedName rule node into +// QualifiedName::Catalog()/Schema()/Name(); a nested schema chain keeps +// its first component as the catalog and its last as the schema (use +// transformQualifiedNamePath for the full path). // QualifiedName <- CatalogReservedSchemaIdentifier / // SchemaReservedIdentifierOrStringLiteral / IdentifierOrStringLiteral func (tc *transformContext) transformQualifiedNameParts(n tnode) (catalog, schema, name string) { + quals, name := tc.transformQualifiedNamePath(n) + qn := newQualifiedName(quals) + return qn.catalog, qn.schema, name +} + +// transformQualifiedNamePath returns a QualifiedName rule node's +// qualification path (catalog, schemas...) and name. +// CatalogReservedSchemaIdentifier <- CatalogQualification ReservedSchemaQualification+ ReservedIdentifierOrStringLiteral +func (tc *transformContext) transformQualifiedNamePath(n tnode) (quals []string, name string) { _, alt := n.sole().choice() switch alt.name() { case "CatalogReservedSchemaIdentifier": - catalog = identifierText(alt.child(0).child(0)) - schema = identifierText(alt.child(1).child(0)) + quals = append(quals, identifierText(alt.child(0).child(0))) + for _, sq := range alt.child(1).repeat() { + quals = append(quals, identifierText(sq.child(0))) + } name = identifierText(alt.child(2)) case "SchemaReservedIdentifierOrStringLiteral": - schema = identifierText(alt.child(0).child(0)) + quals = append(quals, identifierText(alt.child(0).child(0))) name = identifierText(alt.child(1)) case "IdentifierOrStringLiteral": name = identifierText(alt) default: shapeError(alt, "unknown qualified name") } - return catalog, schema, name + return quals, name } // TableAlias <- TableAliasAs / TableAliasWithoutAs @@ -309,11 +375,14 @@ func (tc *transformContext) transformTableFunction(n tnode) ast.TableRef { var qualified, args, ordinality tnode switch alt.name() { case "TableFunctionLateralOpt": - // Lateral? QualifiedTableFunction TableFunctionArguments WithOrdinality? TableAlias? + // Lateral? QualifiedTableFunction TableFunctionArguments WithOrdinality? TableAlias? SampleClause? qualified, args, ordinality = alt.child(1), alt.child(2), alt.child(3) if aliasNode, ok := alt.child(4).opt(); ok { ref.Alias, ref.ColumnNameAlias = tc.transformTableAlias(aliasNode) } + if sc, ok := alt.child(5).opt(); ok { + ref.Sample = tc.transformSampleClause(sc) + } case "TableFunctionAliasColon": // TableAliasColon QualifiedTableFunction TableFunctionArguments WithOrdinality? SampleClause? ref.Alias = identifierText(alt.child(0).child(0)) @@ -328,6 +397,9 @@ func (tc *transformContext) transformTableFunction(n tnode) ast.TableRef { ref.WithOrdinality = true } fn := tc.qualifiedFunctionExpr(qualified, args) + if _, lateral := alt.child(0).opt(); lateral && alt.name() == "TableFunctionLateralOpt" && ref.Sample != nil { + raise("TABLESAMPLE cannot be applied to a LATERAL table function") + } // values(...) is a VALUES list, wrapped like any FROM-position VALUES if fn.FunctionName == "values" && fn.Schema == "" && fn.Catalog == "" { el := &ast.ExpressionListRef{} @@ -349,20 +421,13 @@ func (tc *transformContext) transformTableFunction(n tnode) ast.TableRef { // qualifiedFunctionExpr builds the call expression for a qualified table // function plus its argument list (shared by table functions and CALL). -// QualifiedTableFunction <- CatalogQualification? SchemaQualification? TableFunctionName +// QualifiedTableFunction <- CatalogQualification? SchemaQualification* TableFunctionName // TableFunctionArguments <- Parens(List(FunctionArgument)?) func (tc *transformContext) qualifiedFunctionExpr(qualified, args tnode) *ast.FunctionExpression { fn := &ast.FunctionExpression{} fn.SetSpan(invalidSpan) - if cq, ok := qualified.child(0).opt(); ok { - fn.Catalog = identifierText(cq.child(0)) - } - if sq, ok := qualified.child(1).opt(); ok { - fn.Schema = identifierText(sq.child(0)) - } - if fn.Catalog != "" && fn.Schema == "" { - fn.Catalog, fn.Schema = "", fn.Catalog - } + qn := qualifiedTableFunction(qualified) + fn.Catalog, fn.Schema, fn.Qualification = qn.catalog, qn.schema, qn.path fn.FunctionName = strings.ToLower(identifierText(qualified.child(2))) if list, ok := args.sole().parens().opt(); ok { for _, a := range list.listElems() { @@ -372,6 +437,20 @@ func (tc *transformContext) qualifiedFunctionExpr(qualified, args tnode) *ast.Fu return fn } +// qualifiedTableFunction ports TransformQualifiedTableFunction: +// CatalogQualification? SchemaQualification* TableFunctionName, the +// qualifiers forming one QualifiedName path. +func qualifiedTableFunction(qualified tnode) qualifiedName { + var quals []string + if cq, ok := qualified.child(0).opt(); ok { + quals = append(quals, identifierText(cq.child(0))) + } + for _, sq := range qualified.child(1).repeat() { + quals = append(quals, identifierText(sq.child(0))) + } + return newQualifiedName(quals) +} + // ---- joins ------------------------------------------------------------- // JoinOrPivot <- JoinClause / TablePivotClause / TableUnpivotClause @@ -510,9 +589,10 @@ func (tc *transformContext) transformNearestJoin(left ast.TableRef, n tnode) ast join.NearestApprox = kind.name() == "NearestApprox" } if num, ok := alt.child(5).opt(); ok { - v, err := strconv.ParseInt(num.number(), 10, 64) - if err != nil || v <= 0 { - raise("NEAREST expects a positive integer literal, got \"%s\"", num.number()) + lit := numberLiteral(num.number()) + v, ok := literalInt64(lit) + if !ok || v < 1 { + raise("NEAREST expects a positive integer literal, got \"%s\"", valueString(literalValue(lit))) } join.NearestCount = v } @@ -539,16 +619,8 @@ func (tc *transformContext) transformNearestBareRef(n tnode) ast.TableRef { ref.SetSpan(alt.span()) qualified := alt.child(1) fn := &ast.FunctionExpression{FunctionName: strings.ToLower(identifierText(qualified.child(2)))} - if cq, ok := qualified.child(0).opt(); ok { - fn.Schema = identifierText(cq.child(0)) - } - if sq, ok := qualified.child(1).opt(); ok { - if fn.Schema != "" { - fn.Catalog, fn.Schema = fn.Schema, identifierText(sq.child(0)) - } else { - fn.Schema = identifierText(sq.child(0)) - } - } + qn := qualifiedTableFunction(qualified) + fn.Catalog, fn.Schema, fn.Qualification = qn.catalog, qn.schema, qn.path if list, ok := alt.child(2).sole().parens().opt(); ok { for _, a := range list.listElems() { fn.Arguments = append(fn.Arguments, tc.transformFunctionArgument(a)) @@ -601,7 +673,8 @@ func (tc *transformContext) transformTablePivot(left ast.TableRef, n tnode) ast. ref.Pivots = append(ref.Pivots, tc.transformPivotValueList(pv, true)) } if gb, ok := body.child(3).opt(); ok { - ref.GroupBy = identifierList(gb.child(2)) + // PivotGroupByList <- 'GROUP' 'BY' OptionalParensNameList + ref.GroupBy = optionalParensNameList(gb.child(2)) } if aliasNode, ok := n.child(2).opt(); ok { ref.Alias, ref.ColumnNameAlias = tc.transformTableAlias(aliasNode) @@ -635,70 +708,57 @@ func (tc *transformContext) transformPivotValueList(n tnode, expandHeader bool) return col } -// pivotEntry converts one aliased expression into a pivot IN-list entry: -// constants keep their value, a bare column name is stringified (PIVOT -// ... IN (c) pivots on the value "c"), anything else stays an expression. +// pivotEntry converts one aliased expression into a pivot IN-list entry +// (TransformPivotTargetList / TransformPivotInList): a bare column name +// is stringified (PIVOT ... IN (c) pivots on the value "c"), as is a +// non-empty row(...) of bare column names; since v2.0 constants and +// everything else stay expressions, folded by the binder. func (tc *transformContext) pivotEntry(n tnode) ast.PivotColumnEntry { expr := tc.transformAliasedExpression(n) + // the expression keeps its alias (TransformPivotTargetList) entry := ast.PivotColumnEntry{Alias: expr.GetAlias()} - expr.SetAlias("") - parts := rowParts(expr) - values := make([]ast.Value, 0, len(parts)) - for _, part := range parts { - switch e := part.(type) { - case *ast.ConstantExpression: - values = append(values, e.Value) - case *ast.ColumnRefExpression: - if len(e.ColumnNames) == 1 { - values = append(values, ast.Value{Type: ast.LogicalType{ID: "VARCHAR"}, Kind: ast.ValueString, Str: e.ColumnNames[0]}) - continue - } - case *ast.CastExpression: - // fold constant casts: integer casts of integer constants - // (`1::INT`) and ISO dates (`'2022-01-01'::DATE`) - if c, isConst := e.Child.(*ast.ConstantExpression); isConst && e.CastType != nil && - e.CastType.Schema == "" && len(e.CastType.Args) == 0 { - if id, isInt := integerTypeNames[e.CastType.TypeName]; isInt && c.Value.Kind == ast.ValueInt64 { - v := c.Value - v.Type = ast.LogicalType{ID: id} - values = append(values, v) - continue - } - if e.CastType.TypeName == "DATE" && c.Value.Kind == ast.ValueString { - if days, ok := isoDateToDays(c.Value.Str); ok { - values = append(values, ast.Value{Type: ast.LogicalType{ID: "DATE"}, Kind: ast.ValueInt64, Int64: days}) - continue - } - } - } - } - } - if len(values) == len(parts) { + if values, ok := pivotInListValues(expr); ok && len(values) > 0 { entry.Values = values } else { - // any unfoldable part keeps the whole entry as an expression entry.StarExpr = expr } return entry } -// isoDateToDays parses a YYYY-MM-DD date into days since 1970-01-01. -func isoDateToDays(s string) (int64, bool) { - t, err := time.Parse("2006-01-02", s) - if err != nil { - return 0, false +// pivotInListValues ports TransformPivotInList's folding. +func pivotInListValues(e ast.Expr) ([]ast.Value, bool) { + switch x := e.(type) { + case *ast.ColumnRefExpression: + if len(x.ColumnNames) != 1 { + raise("PIVOT IN list cannot contain qualified column references") + } + return []ast.Value{varcharValue(x.ColumnNames[0])}, true + case *ast.FunctionExpression: + if x.FunctionName != "row" || len(x.Arguments) == 0 { + return nil, false + } + var values []ast.Value + for _, a := range x.Arguments { + v, ok := pivotInListValues(a.Expr) + if !ok { + return nil, false + } + values = append(values, v...) + } + return values, true } - return int64(t.Unix() / 86400), true + return nil, false } -// integerTypeNames maps unbound integer type spellings to logical type -// ids (used to fold constant casts in pivot IN entries). -var integerTypeNames = map[string]string{ - "INTEGER": "INTEGER", - "BIGINT": "BIGINT", - "SMALLINT": "SMALLINT", - "TINYINT": "TINYINT", - "HUGEINT": "HUGEINT", +// optionalParensNameList transforms OptionalParensNameList <- +// ParenthesizedNameList / BareNameList (both List(ColIdOrString), the +// first parenthesized). +func optionalParensNameList(n tnode) []string { + _, alt := n.sole().choice() + if alt.name() == "ParenthesizedNameList" { + return identifierList(alt.sole().parens()) + } + return identifierList(alt.sole()) } // rowParts flattens a row(...) constructor into its parts (multi-column @@ -783,6 +843,13 @@ func (tc *transformContext) transformUnpivotHeader(n tnode) []string { func (tc *transformContext) transformPivotStatement(n tnode) ast.QueryNode { ref := &ast.PivotRef{Source: tc.transformTableRef(n.child(1))} ref.SetSpan(invalidSpan) + _, hasOn := n.child(2).opt() + _, hasUsing := n.child(3).opt() + _, hasGroup := n.child(4).opt() + if !hasOn && !hasUsing && !hasGroup { + // FinalizePivotStatementTrampoline (v2.0) + raise("PIVOT requires an ON, USING or GROUP BY clause") + } if on, ok := n.child(2).opt(); ok { // PivotOn <- 'ON' PivotColumnList for _, e := range on.child(1).sole().listElems() { @@ -808,6 +875,9 @@ func (tc *transformContext) transformPivotStatement(n tnode) ast.QueryNode { // matching upstream's transform order. for _, col := range ref.Pivots { if col.PivotEnum == "" && len(col.Entries) == 0 && len(col.PivotExpressions) > 0 { + if tc.pivotEntries == 0 { + tc.pivotFirstColumn = tc.exprText(col.PivotExpressions[0]) + } tc.pivotEntries++ if tc.paramCount > 0 || tc.hasNamed || tc.hasPosition { tc.pivotEntryHasParams = true @@ -821,7 +891,7 @@ func (tc *transformContext) transformPivotStatement(n tnode) ast.QueryNode { } } if gb, ok := n.child(4).opt(); ok { - ref.GroupBy = identifierList(gb.child(2)) + ref.GroupBy = optionalParensNameList(gb.child(2)) } if len(ref.Pivots) > 0 && len(ref.Aggregates) == 0 { // pivots without USING default to count_star() @@ -910,6 +980,20 @@ func (tc *transformContext) exprSourceText(e ast.Expr) string { return constantText(e) } +// exprText renders an expression for an error message: a column +// reference as ColumnRefExpression::ToString (SQLIdentifier parts), any +// other expression via its source text (exprSourceText). +func (tc *transformContext) exprText(e ast.Expr) string { + if ref, ok := e.(*ast.ColumnRefExpression); ok { + parts := make([]string, len(ref.ColumnNames)) + for i, p := range ref.ColumnNames { + parts[i] = sqlIdentifier(p) + } + return strings.Join(parts, ".") + } + return tc.exprSourceText(e) +} + // PivotColumnEntry <- PivotColumnSubquery / PivotValueList / PivotColumnExpression func (tc *transformContext) transformPivotColumnEntry(n tnode) ast.PivotColumn { _, alt := n.sole().choice() @@ -938,9 +1022,9 @@ func (tc *transformContext) transformUnpivotStatement(n tnode) ast.QueryNode { col.Entries = append(col.Entries, tc.unpivotEntry(e)) } if into, ok := n.child(4).opt(); ok { - // IntoNameValues <- 'INTO' 'NAME' ColIdOrString ValueOrValues List(Identifier) + // IntoNameValues <- 'INTO' 'NAME' ColIdOrString ValueOrValues OptionalParensNameList col.UnpivotNames = []string{identifierText(into.child(2))} - ref.UnpivotNames = identifierList(into.child(4)) + ref.UnpivotNames = optionalParensNameList(into.child(4)) } else { col.UnpivotNames = []string{"name"} ref.UnpivotNames = []string{"value"} diff --git a/parser/transform_type.go b/parser/transform_type.go index 5477fb6..9e3ef1b 100644 --- a/parser/transform_type.go +++ b/parser/transform_type.go @@ -21,13 +21,25 @@ func (tc *transformContext) transformType(n tnode) *ast.TypeExpression { for _, bound := range bounds { base = tc.applyArrayBound(base, bound) } - if len(bounds) == 0 { + if len(bounds) == 0 && base.Pos() < 0 { + // a SETOF inner type keeps its own (NestedType) location base.SetSpan(n.span()) } return base } -// applyArrayBound wraps a type into list/array per one ArrayBounds entry. +// NestedType <- TypeVariations ArrayBounds* — the element types of +// STRUCT/UNION/MAP/TUPLE and SETOF (v2.0). Unlike Type it is a rule of its +// own producing an expression, so an array wrapper takes the rule's +// location (TransformNestedType). +func (tc *transformContext) transformNestedType(n tnode) *ast.TypeExpression { + t := tc.transformType(n) + if t.Pos() < 0 { + t.SetSpan(n.span()) + } + return t +} + // applyArrayBound wraps a type into list/array; the synthesized wrapper // carries no location (only named leaf types do). func (tc *transformContext) applyArrayBound(base *ast.TypeExpression, n tnode) *ast.TypeExpression { @@ -52,19 +64,21 @@ func (tc *transformContext) squareBracketArray(base *ast.TypeExpression, n tnode return typeExpr(sp, "list", base) } bound := tc.transformExpression(expr) - // the bound must be a constant; a constant integer is re-synthesized - // as a location-free BIGINT value, and negative sizes are a parser - // error upstream (non-integer constants fail at conversion, post-parse) + // the bound must be a constant INTEGER literal + // (TransformSquareBracketsArray); it is re-synthesized as a + // location-free ConstantExpression::Integer, and negative sizes are a + // parser error (non-integer literals raise a BinderException upstream + // — post-parse under the oracle's classification — so darkwing keeps + // the constant and accepts) c, isConst := bound.(*ast.ConstantExpression) if !isConst { raise("Expected a constant number as array size") } - if c.Value.Kind == ast.ValueInt64 { - if c.Value.Int64 < 0 { + if v, ok := literalInt64(c.Literal); ok { + if v < 0 { raise("Array size must be greater than 0") } - c.Value.Type = ast.LogicalType{ID: "BIGINT"} - c.SetSpan(invalidSpan) + bound = intConst(invalidSpan, v) } return typeExpr(sp, "array", base, bound) } @@ -91,18 +105,19 @@ func (tc *transformContext) transformTypeVariation(n tnode) *ast.TypeExpression case "VariantType": return typeExpr(sp, "VARIANT") case "MapType": - // 'MAP' Parens(List(Type))? + // 'MAP' Parens(List(NestedType))? var args []ast.Expr if types, ok := alt.child(1).opt(); ok { for _, t := range types.parens().listElems() { - args = append(args, tc.transformType(t)) + args = append(args, tc.transformNestedType(t)) } } return typeExpr(sp, "MAP", args...) case "TupleType": var args []ast.Expr + // 'TUPLE' Parens(List(NestedType)) for _, t := range alt.child(1).parens().listElems() { - args = append(args, tc.transformType(t)) + args = append(args, tc.transformNestedType(t)) } return typeExpr(sp, "TUPLE", args...) case "GeometryType": @@ -120,8 +135,9 @@ func (tc *transformContext) transformTypeVariation(n tnode) *ast.TypeExpression case "NumericType": return tc.transformNumericType(alt) case "SetofType": - // SETOF is dropped at parse time; the inner type stands alone - return tc.transformType(alt.child(1)) + // 'SETOF' NestedType: SETOF is dropped at parse time; the inner + // type stands alone + return tc.transformNestedType(alt.child(1)) case "SimpleType": return tc.transformSimpleType(alt) } @@ -134,8 +150,8 @@ func (tc *transformContext) transformTypeVariation(n tnode) *ast.TypeExpression func (tc *transformContext) transformColIdTypeList(n tnode) []ast.Expr { var args []ast.Expr for _, field := range n.parens().listElems() { - // ColIdType <- ColId Type - t := tc.transformType(field.child(1)) + // ColIdType <- ColId NestedType + t := tc.transformNestedType(field.child(1)) t.Alias = identifierText(field.child(0)) args = append(args, t) } @@ -155,12 +171,26 @@ func (tc *transformContext) transformTimeType(n tnode) *ast.TypeExpression { // a precision modifier picks the timestamp variant if mods, ok := n.child(1).opt(); ok { args := tc.transformTypeModifiers(mods) + if len(args) > 0 { + if tz, ok := n.child(2).opt(); ok { + if _, w := tz.child(0).sole().choice(); w.name() == "WithRule" { + raise("TIMESTAMP WITH TIME ZONE does not take a precision") + } + } + } if len(args) > 1 { raise("TIMESTAMP only supports a single modifier") } if len(args) == 1 { - if c, isConst := args[0].(*ast.ConstantExpression); isConst && c.Value.Kind == ast.ValueInt64 { - p := c.Value.Int64 + c := args[0].(*ast.ConstantExpression) + if c.Literal.Kind == ast.LiteralNull { + raise("TIMESTAMP precision cannot be NULL") + } + p, isInt := literalInt64(c.Literal) + if !isInt { + raise("TIMESTAMP precision must be an integral type") + } + { switch { case p > 10: raise("TIMESTAMP only supports until nano-second precision (9)") @@ -237,7 +267,7 @@ func (tc *transformContext) transformNumericType(n tnode) *ast.TypeExpression { // 'FLOAT' Parens(NumberLiteral)? var args []ast.Expr if mod, ok := t.child(1).opt(); ok { - args = append(args, numberConstant(mod.parens().span(), mod.parens().number())) + args = append(args, numberConstant(invalidSpan, mod.parens().number())) } return typeExpr(sp, "FLOAT", args...) case "DecimalType", "DecType", "NumericModType": @@ -281,13 +311,13 @@ func (tc *transformContext) transformSimpleType(n tnode) *ast.TypeExpression { return typeExpr(sp, "VARCHAR", args...) case "QualifiedSimpleType": // QualifiedTypeName TypeModifiers? - catalog, schema, name := tc.transformQualifiedTypeName(alt.child(0)) + qn, name := tc.transformQualifiedTypeNamePath(alt.child(0)) var args []ast.Expr if mods, ok := alt.child(1).opt(); ok { args = tc.transformTypeModifiers(mods) } t := typeExpr(sp, name, args...) - t.Catalog, t.Schema = catalog, schema + t.Catalog, t.Schema, t.Qualification = qn.catalog, qn.schema, qn.path return t } shapeError(alt, "unknown simple type") @@ -296,24 +326,33 @@ func (tc *transformContext) transformSimpleType(n tnode) *ast.TypeExpression { // QualifiedTypeName <- CatalogReservedSchemaTypeName / // SchemaReservedTypeName / TypeNameAsQualifiedName -func (tc *transformContext) transformQualifiedTypeName(n tnode) (catalog, schema, name string) { +// CatalogReservedSchemaTypeName <- CatalogQualification ReservedSchemaQualification+ ReservedTypeName +func (tc *transformContext) transformQualifiedTypeNamePath(n tnode) (qualifiedName, string) { _, alt := n.sole().choice() + var quals []string + var name string switch alt.name() { case "CatalogReservedSchemaTypeName": - catalog = identifierText(alt.child(0).child(0)) - schema = identifierText(alt.child(1).child(0)) + quals = append(quals, identifierText(alt.child(0).child(0))) + for _, sq := range alt.child(1).repeat() { + quals = append(quals, identifierText(sq.child(0))) + } name = identifierText(alt.child(2)) case "SchemaReservedTypeName": - schema = identifierText(alt.child(0).child(0)) + quals = append(quals, identifierText(alt.child(0).child(0))) name = identifierText(alt.child(1)) case "TypeNameAsQualifiedName": name = identifierText(alt.sole()) default: shapeError(alt, "unknown qualified type name") } - // a catalog with no schema is a schema qualification - if catalog != "" && schema == "" { - catalog, schema = "", catalog - } - return catalog, schema, name + return newQualifiedName(quals), name +} + +// transformQualifiedTypeName returns QualifiedName::Catalog()/Schema()/ +// Name() of a QualifiedTypeName (see transformQualifiedTypeNamePath for +// nested schema paths). +func (tc *transformContext) transformQualifiedTypeName(n tnode) (catalog, schema, name string) { + qn, name := tc.transformQualifiedTypeNamePath(n) + return qn.catalog, qn.schema, name } diff --git a/token/keywords.go b/token/keywords.go index 1dc8caa..360c59c 100644 --- a/token/keywords.go +++ b/token/keywords.go @@ -31,6 +31,10 @@ const ( // func-name keywords, as function names (upstream folds both lists // into its type/func map). KeywordTypeName + // KeywordBareLabel keywords may be used as a column alias without AS + // (BareColLabel). The classification is orthogonal: every bare-label + // keyword is also an unreserved or column-name keyword. + KeywordBareLabel // KeywordNone means the word is not a keyword. KeywordNone KeywordCategory = 0 @@ -55,6 +59,7 @@ func (c KeywordCategory) String() string { {KeywordColumnName, "column_name"}, {KeywordFuncName, "func_name"}, {KeywordTypeName, "type_name"}, + {KeywordBareLabel, "bare_label"}, } { if c.Has(entry.bit) { parts = append(parts, entry.name) @@ -84,6 +89,8 @@ func listCategory(file string) KeywordCategory { return KeywordFuncName case "type_name_keyword.list": return KeywordTypeName + case "bare_label_keyword.list": + return KeywordBareLabel default: return KeywordNone } @@ -103,12 +110,16 @@ func keywords() map[string]KeywordCategory { m[w] |= category } } - // the only disjointness upstream's build script enforces + // the consistency checks upstream's build script enforces for w, c := range m { if c.Has(KeywordReserved) && c.Has(KeywordUnreserved) { keywordErr = fmt.Errorf("keyword %q has conflicting RESERVED/UNRESERVED categories", w) return } + if c.Has(KeywordBareLabel) && !c.Has(KeywordUnreserved) && !c.Has(KeywordColumnName) { + keywordErr = fmt.Errorf("bare label keyword %q is not an unreserved or column-name keyword", w) + return + } } keywordMap = m }) diff --git a/token/keywords_test.go b/token/keywords_test.go index 7a18c69..4778d2e 100644 --- a/token/keywords_test.go +++ b/token/keywords_test.go @@ -2,6 +2,7 @@ package token import ( "sort" + "strings" "testing" "github.com/sqlc-dev/darkwing/internal/grammar" @@ -11,8 +12,9 @@ import ( // these is expected to update this test alongside the vendored lists. func TestKeywordListCounts(t *testing.T) { counts := map[string]int{ + "bare_label_keyword.list": 358, "reserved_keyword.list": 75, - "unreserved_keyword.list": 338, + "unreserved_keyword.list": 342, "column_name_keyword.list": 55, "func_name_keyword.list": 30, "type_name_keyword.list": 32, @@ -28,8 +30,8 @@ func TestKeywordListCounts(t *testing.T) { } total += len(words) } - if total != 530 { - t.Errorf("total keyword entries = %d, want 530", total) + if total != 892 { + t.Errorf("total keyword entries = %d, want 892", total) } } @@ -39,10 +41,13 @@ func TestCategoryCounts(t *testing.T) { want int }{ {KeywordReserved, 75}, - {KeywordUnreserved, 338}, + {KeywordUnreserved, 342}, {KeywordColumnName, 55}, {KeywordFuncName, 30}, {KeywordTypeName, 32}, + {KeywordBareLabel, 358}, + // the bare-label list adds no new words + {KeywordNone, 502}, } { if got := KeywordCount(tc.category); got != tc.want { t.Errorf("KeywordCount(%s) = %d, want %d", tc.category, got, tc.want) @@ -81,7 +86,9 @@ func TestMultiCategoryKeywords(t *testing.T) { seen := map[string]bool{} for _, words := range lists { for _, w := range words { - if !seen[w] && !single(Categories(w)) { + // the bare-label classification is orthogonal to the other + // five; count overlaps among those + if !seen[w] && !single(Categories(w)&^KeywordBareLabel) { multi = append(multi, w) } seen[w] = true @@ -93,10 +100,10 @@ func TestMultiCategoryKeywords(t *testing.T) { t.Errorf("multi-category keywords = %d (%v), want 32", len(multi), multi) } // spot-check the documented examples - if got := Categories("generated"); got != KeywordColumnName|KeywordFuncName { + if got := Categories("generated"); got != KeywordColumnName|KeywordFuncName|KeywordBareLabel { t.Errorf("Categories(generated) = %s", got) } - if got := Categories("map"); got != KeywordColumnName|KeywordFuncName { + if got := Categories("map"); got != KeywordColumnName|KeywordFuncName|KeywordBareLabel { t.Errorf("Categories(map) = %s", got) } if got := Categories("is"); got != KeywordFuncName|KeywordTypeName { @@ -104,6 +111,46 @@ func TestMultiCategoryKeywords(t *testing.T) { } } +// Every bare-label keyword is also an unreserved or column-name keyword +// (upstream's build script enforces it); the converse does not hold. Pin +// the unreserved/column-name keywords that are not bare labels, the ones a +// column alias without AS cannot use. +func TestBareLabelKeywords(t *testing.T) { + var notBare []string + for _, list := range []string{"unreserved_keyword.list", "column_name_keyword.list"} { + words, err := grammar.Keywords(list) + if err != nil { + t.Fatal(err) + } + for _, w := range words { + if !Categories(w).Has(KeywordBareLabel) { + notBare = append(notBare, w) + } + } + } + sort.Strings(notBare) + want := []string{ + "centuries", "century", "day", "days", "decade", "decades", "escape", + "exclude", "export_state", "filter", "hour", "hours", "ignore", + "microsecond", "microseconds", "millennia", "millennium", + "millisecond", "milliseconds", "minute", "minutes", "month", + "months", "over", "precision", "quarter", "quarters", "rename", + "replace", "respect", "second", "seconds", "varying", "week", "weeks", + "within", "without", "year", "years", + } + if strings.Join(notBare, " ") != strings.Join(want, " ") { + t.Errorf("unreserved/column-name keywords that are not bare labels = %v, want %v", notBare, want) + } + for _, w := range []string{"abort", "between", "destroy", "secure"} { + if !Categories(w).Has(KeywordBareLabel) { + t.Errorf("Categories(%s) = %s, want bare_label", w, Categories(w)) + } + } + if Categories("select").Has(KeywordBareLabel) { + t.Error("reserved keyword select is a bare label") + } +} + func TestCategoriesCaseInsensitive(t *testing.T) { for _, w := range []string{"select", "SELECT", "Select", "sElEcT"} { if got := Categories(w); !got.Has(KeywordReserved) { diff --git a/token/token.go b/token/token.go index 978d5e7..169fc14 100644 --- a/token/token.go +++ b/token/token.go @@ -15,8 +15,8 @@ const ( // Keyword is a bare word that appears in one of the keyword lists. Keyword // String is a string literal, including prefixed (E'...', X'...', - // N'...', B'...') and dollar-quoted forms (already normalized to a - // plain quoted literal by the tokenizer, as upstream does). + // N'...', B'...') and dollar-quoted forms (kept raw; the string + // literal matcher strips the delimiters). String // Number is a numeric literal. Number @@ -67,10 +67,8 @@ type Span struct { End int } -// Token is a single lexical token. Text is the raw source slice except for -// dollar-quoted strings, which the tokenizer rewrites to an equivalent -// plain quoted literal while Span still covers the original source (the -// same behavior as upstream's MatcherToken). +// Token is a single lexical token: Text is the raw source slice. Port of +// upstream's MatcherToken. type Token struct { Kind Kind Text string @@ -78,6 +76,14 @@ type Token struct { // Unterminated marks a token that ran into end of input (an unclosed // dollar-quoted string). Unterminated bool + // PrecededByNewline reports a newline between the previous token and + // this one; PrecededByBlockComment reports a /* */ comment there. They + // decide string literal continuation ('a''b' is 'ab'). + // Upstream sets both only for tokens that go through + // TokenizerBehavior::PushToken, so single-byte operators, terminators + // and the final token of the input never carry them. + PrecededByNewline bool + PrecededByBlockComment bool } func (t Token) String() string {